This commit is contained in:
Hamza-Ayed
2024-05-29 16:09:37 +03:00
parent 058fb67a41
commit 4af52f4392
44 changed files with 9509 additions and 2044 deletions

View File

@@ -10,6 +10,7 @@ import 'package:SEFER/main.dart';
class DriverWalletHistoryController extends GetxController {
bool isLoading = false;
List archive = [];
List weeklyList = [];
getArchivePayment() async {
isLoading = true;
@@ -36,9 +37,35 @@ class DriverWalletHistoryController extends GetxController {
update();
}
getWeekllyArchivePayment() async {
isLoading = true;
update();
var res = await CRUD().get(
link: AppLink.getDriverWeekPaymentMove,
payload: {'driverID': box.read(BoxName.driverID)});
print(res);
if (res == 'failure') {
Get.defaultDialog(
barrierDismissible: false,
title: 'There is no data yet.'.tr,
middleText: '',
confirm: MyElevatedButton(
title: 'Back'.tr,
onPressed: () {
Get.back();
Get.back();
},
));
}
weeklyList = jsonDecode(res)['message'];
print(archive);
isLoading = false;
update();
}
@override
void onInit() {
getArchivePayment();
// getArchivePayment();
super.onInit();
}
}