Initial commit for intaleq_admin
This commit is contained in:
@@ -32,6 +32,42 @@ class CaptainAdminController extends GetxController {
|
||||
update();
|
||||
}
|
||||
|
||||
Future deletCaptain() async {
|
||||
isLoading = true;
|
||||
update();
|
||||
var res = await CRUD().get(
|
||||
link: AppLink.deleteCaptain,
|
||||
payload: {},
|
||||
);
|
||||
var d = jsonDecode(res);
|
||||
if (d['status'] == 'success') {
|
||||
captainData = d;
|
||||
}
|
||||
|
||||
isLoading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
Future find_driver_by_phone(String phone) async {
|
||||
isLoading = true;
|
||||
update();
|
||||
var res = await CRUD().post(
|
||||
link: AppLink.find_driver_by_phone,
|
||||
payload: {'phone': phone},
|
||||
);
|
||||
var d = (res);
|
||||
if (d != 'failure') {
|
||||
captainData = d;
|
||||
} else {
|
||||
captainData = {};
|
||||
Get.snackbar('Error', 'No captain found with this phone number',
|
||||
backgroundColor: AppColor.redColor);
|
||||
}
|
||||
|
||||
isLoading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
Future addCaptainPrizeToWallet() async {
|
||||
String? paymentId;
|
||||
//todo link to add wallet to captain
|
||||
|
||||
Reference in New Issue
Block a user