EnakPoint & EnakCoin wallet, PIN, outlet, order, community, reward
- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode bayar, tukar EnakCoin, transfer - PIN (buat, ganti, lupa), outlet, riwayat order, game spin - Halaman community, webview, coming soon, dan ikon menu beranda baru - Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR - Hapus customer point loader, menu, dan checkout lama - Base URL ke enaklo-pos-api.altru.id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5954510b93
commit
f5e3075205
@@ -0,0 +1,28 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
|
||||
import '../../../domain/wallet/wallet.dart';
|
||||
import '../datasources/customer_remote_data_provider.dart';
|
||||
|
||||
@Injectable(as: IOutletRepository)
|
||||
class OutletRepository implements IOutletRepository {
|
||||
final CustomerRemoteDataProvider _remoteDataProvider;
|
||||
|
||||
final String _logName = 'OutletRepository';
|
||||
|
||||
OutletRepository(this._remoteDataProvider);
|
||||
|
||||
@override
|
||||
Future<Either<WalletFailure, List<Outlet>>> getOutlets() async {
|
||||
try {
|
||||
final result = await _remoteDataProvider.fetchOutlets();
|
||||
if (result.hasError) return left(result.error!);
|
||||
return right(result.data!.map((e) => e.toDomain()).toList());
|
||||
} catch (e, s) {
|
||||
log('getOutlets', name: _logName, error: e, stackTrace: s);
|
||||
return left(const WalletFailure.unexpectedError());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user