|
|
|
|
@ -23,10 +23,10 @@ import 'package:test_sa/new_views/swipe_module/dialoge/acknowledge_work_dialog.d
|
|
|
|
|
import 'package:test_sa/providers/service_request_providers/reject_reason_provider.dart';
|
|
|
|
|
|
|
|
|
|
class FooterActionButton {
|
|
|
|
|
static Widget footerContainer({required Widget child,required BuildContext context}) {
|
|
|
|
|
static Widget footerContainer({required Widget child, required BuildContext context}) {
|
|
|
|
|
return Container(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
padding: const EdgeInsets.only(left: 16, right: 16, top: 12,bottom: 8),
|
|
|
|
|
padding: const EdgeInsets.only(left: 16, right: 16, top: 12, bottom: 8),
|
|
|
|
|
color: AppColor.background(context),
|
|
|
|
|
child: SafeArea(child: child),
|
|
|
|
|
);
|
|
|
|
|
@ -49,16 +49,16 @@ class FooterActionButton {
|
|
|
|
|
switch (workOrderNextStepStatus) {
|
|
|
|
|
case WorkOrderNextStepEnum.assignToMe:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: 'Assign To Me',
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.engineerAssignWorkOrderToHimself(id: requestDetailProvider.currentWorkOrder!.data!.requestId.toString());
|
|
|
|
|
},
|
|
|
|
|
fontSize: 12.toScreenWidth,
|
|
|
|
|
));
|
|
|
|
|
label: 'Assign To Me',
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.engineerAssignWorkOrderToHimself(id: requestDetailProvider.currentWorkOrder!.data!.requestId.toString());
|
|
|
|
|
},
|
|
|
|
|
fontSize: 12.toScreenWidth,
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.markedAsFixed:
|
|
|
|
|
break;
|
|
|
|
|
// TODO: Handle this case.
|
|
|
|
|
@ -79,20 +79,20 @@ class FooterActionButton {
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.close,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
label: context.translation.close,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.nTakeAction:
|
|
|
|
|
if (requestDetailProvider.isReadOnlyRequest) {
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.activities,
|
|
|
|
|
buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50,
|
|
|
|
|
buttonColor: context.isDark ? AppColor.primary10 : AppColor.neutral50,
|
|
|
|
|
textColor: context.isDark ? AppColor.black10 : Colors.white,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView()));
|
|
|
|
|
@ -103,148 +103,148 @@ class FooterActionButton {
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.close,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
label: context.translation.close,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.eRejectAccept:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.reject,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor:AppColor.background(context),
|
|
|
|
|
// textColor: context.isDark ? AppColor.neutral30 : Colors.white,
|
|
|
|
|
textColor: AppColor.red30,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
//TODO need to discuss getData is not called by default...
|
|
|
|
|
if (context.mounted) {
|
|
|
|
|
RejectReasonProvider rejectionReasonProvider = Provider.of<RejectReasonProvider>(context, listen: false);
|
|
|
|
|
rejectionReasonProvider.reset();
|
|
|
|
|
//rejectionReasonProvider.getDate();
|
|
|
|
|
}
|
|
|
|
|
ServiceRequestBottomSheet.rejectRequestBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
const SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
),
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.accept,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.engineerAcceptWorkOrder(id: requestDetailProvider.currentWorkOrder!.data!.requestId.toString());
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.reject,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.background(context),
|
|
|
|
|
// textColor: context.isDark ? AppColor.neutral30 : Colors.white,
|
|
|
|
|
textColor: AppColor.red30,
|
|
|
|
|
showBorder: true,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
//TODO need to discuss getData is not called by default...
|
|
|
|
|
if (context.mounted) {
|
|
|
|
|
RejectReasonProvider rejectionReasonProvider = Provider.of<RejectReasonProvider>(context, listen: false);
|
|
|
|
|
rejectionReasonProvider.reset();
|
|
|
|
|
//rejectionReasonProvider.getDate();
|
|
|
|
|
}
|
|
|
|
|
ServiceRequestBottomSheet.rejectRequestBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
const SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
),
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.accept,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.engineerAcceptWorkOrder(id: requestDetailProvider.currentWorkOrder!.data!.requestId.toString());
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.eFixRemotelyNeedVisit:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.needAVisit,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.neutral50,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.needVisitHelperModel = NeedVisitHelperModel();
|
|
|
|
|
ServiceRequestBottomSheet.initialVisitBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
const SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
),
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.fixedRemotely,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.fixRemotelyHelperModel = FixRemotelyHelperModel();
|
|
|
|
|
ServiceRequestBottomSheet.fixRemotelyBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.needAVisit,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.neutral50,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.needVisitHelperModel = NeedVisitHelperModel();
|
|
|
|
|
ServiceRequestBottomSheet.initialVisitBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
const SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
),
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.fixedRemotely,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.fixRemotelyHelperModel = FixRemotelyHelperModel();
|
|
|
|
|
ServiceRequestBottomSheet.fixRemotelyBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
).expanded,
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.eArrived:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.iHaveArrived,
|
|
|
|
|
showIcon: true,
|
|
|
|
|
icon: 'arrived_icon'.toSvgAsset(),
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const VerifyArrivalView()));
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
label: context.translation.iHaveArrived,
|
|
|
|
|
showIcon: true,
|
|
|
|
|
icon: 'arrived_icon'.toSvgAsset(),
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const VerifyArrivalView()));
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.verifyAssetDetail:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.updateAssetDetails,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => VerifyAssetDetails(isEdit: false)));
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
label: context.translation.updateAssetDetails,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => VerifyAssetDetails(isEdit: false)));
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.activity:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.activities,
|
|
|
|
|
textColor: context.isDark ? AppColor.black10 : Colors.white,
|
|
|
|
|
buttonColor: context.isDark? AppColor.primary10:AppColor.neutral50,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
// ServiceRequestBottomSheet.activityTypeBottomSheet(context: context);
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView()));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
if (showMarkAsFixedButton) ...[
|
|
|
|
|
8.height,
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.markAsCompleted,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
bool isValid = ServiceRequestBottomSheet.validateAssetSituation(Provider.of<ServiceRequestDetailProvider>(context, listen: false));
|
|
|
|
|
if (isValid) {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext cxt) => AcknowledgeWorkDialog(
|
|
|
|
|
message: "Are you sure you want to mark this Work Order as complete ",
|
|
|
|
|
confirmButtonText: 'Complete',
|
|
|
|
|
cancelButtonText: 'Cancel',
|
|
|
|
|
onSave: () async {
|
|
|
|
|
int status = await requestDetailProvider.engineerMarkAsFixed(workOrderId: requestDetailProvider.currentWorkOrder!.data!.requestId!, feedback: '');
|
|
|
|
|
if (status != -1) {
|
|
|
|
|
Navigator.of(cxt).pop();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onDiscard: () {},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
// ServiceRequestBottomSheet.feedBackBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.activities,
|
|
|
|
|
textColor: context.isDark ? AppColor.black10 : Colors.white,
|
|
|
|
|
buttonColor: context.isDark ? AppColor.primary10 : AppColor.neutral50,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
// ServiceRequestBottomSheet.activityTypeBottomSheet(context: context);
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const ActivitiesListView()));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
if (showMarkAsFixedButton) ...[
|
|
|
|
|
8.height,
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.markAsCompleted,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
bool isValid = ServiceRequestBottomSheet.validateAssetSituation(Provider.of<ServiceRequestDetailProvider>(context, listen: false));
|
|
|
|
|
if (isValid) {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext cxt) => AcknowledgeWorkDialog(
|
|
|
|
|
message: "Are you sure you want to mark this Work Order as complete ",
|
|
|
|
|
confirmButtonText: 'Complete',
|
|
|
|
|
cancelButtonText: 'Cancel',
|
|
|
|
|
onSave: () async {
|
|
|
|
|
int status = await requestDetailProvider.engineerMarkAsFixed(workOrderId: requestDetailProvider.currentWorkOrder!.data!.requestId!, feedback: '');
|
|
|
|
|
if (status != -1) {
|
|
|
|
|
Navigator.of(cxt).pop();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onDiscard: () {},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
// ServiceRequestBottomSheet.feedBackBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.endWorkFlow:
|
|
|
|
|
return const SizedBox();
|
|
|
|
|
|
|
|
|
|
@ -252,60 +252,60 @@ class FooterActionButton {
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.assetRetiredPendingOpManagementApproval,
|
|
|
|
|
buttonColor: AppColor.background(context),
|
|
|
|
|
textColor: context.isDark ? Colors.white: AppColor.neutral150,
|
|
|
|
|
fontSize: 12.toScreenWidth,
|
|
|
|
|
));
|
|
|
|
|
label: context.translation.assetRetiredPendingOpManagementApproval,
|
|
|
|
|
buttonColor: AppColor.background(context),
|
|
|
|
|
textColor: context.isDark ? Colors.white : AppColor.neutral150,
|
|
|
|
|
fontSize: 12.toScreenWidth,
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.waitingForRequesterToConfirm:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: 'Waiting for requester to verify',
|
|
|
|
|
buttonColor: AppColor.background(context),
|
|
|
|
|
textColor: context.isDark ? Colors.white: AppColor.neutral150,
|
|
|
|
|
// buttonColor: AppColor.neutral140,
|
|
|
|
|
// textColor: AppColor.neutral150,
|
|
|
|
|
fontSize: 12.toScreenWidth,
|
|
|
|
|
),
|
|
|
|
|
12.height,
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.info_outline_rounded, size: 16, color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
6.width,
|
|
|
|
|
Text(
|
|
|
|
|
"If you're experiencing issues with verification, please select another method to continue",
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
).expanded,
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: 'Waiting for requester to verify',
|
|
|
|
|
buttonColor: AppColor.background(context),
|
|
|
|
|
textColor: context.isDark ? Colors.white : AppColor.neutral150,
|
|
|
|
|
// buttonColor: AppColor.neutral140,
|
|
|
|
|
// textColor: AppColor.neutral150,
|
|
|
|
|
fontSize: 12.toScreenWidth,
|
|
|
|
|
),
|
|
|
|
|
12.height,
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.info_outline_rounded, size: 16, color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
6.width,
|
|
|
|
|
Text(
|
|
|
|
|
"If you're experiencing issues with verification, please select another method to continue",
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
).expanded,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
12.height,
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: "Switch Arrival Method",
|
|
|
|
|
showIcon: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
showDialog(context: context, barrierDismissible: false, builder: (context) => const AppLazyLoading());
|
|
|
|
|
Provider.of<ServiceRequestDetailProvider>(context, listen: false).switchToIHaveArrived().then((value) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
if (value) {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const VerifyArrivalView()));
|
|
|
|
|
} else {
|
|
|
|
|
"Failed to switch, please try again".showToast;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
12.height,
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: "Switch Arrival Method",
|
|
|
|
|
showIcon: true,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
showDialog(context: context, barrierDismissible: false, builder: (context) => const AppLazyLoading());
|
|
|
|
|
Provider.of<ServiceRequestDetailProvider>(context, listen: false).switchToIHaveArrived().then((value) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
if (value) {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const VerifyArrivalView()));
|
|
|
|
|
} else {
|
|
|
|
|
"Failed to switch, please try again".showToast;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
));
|
|
|
|
|
case WorkOrderNextStepEnum.eFixRemotely:
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.fixedRemotely,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
@ -320,40 +320,40 @@ class FooterActionButton {
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.needAVisit,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
label: context.translation.needAVisit,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
textColor: context.isDark ? AppColor.neutral30 : Colors.white,
|
|
|
|
|
buttonColor: AppColor.neutral50,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.needVisitHelperModel = NeedVisitHelperModel();
|
|
|
|
|
ServiceRequestBottomSheet.initialVisitBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
buttonColor: AppColor.neutral50,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
requestDetailProvider.needVisitHelperModel = NeedVisitHelperModel();
|
|
|
|
|
ServiceRequestBottomSheet.initialVisitBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (workOrderNextStepStatus == WorkOrderNextStepEnum.nTakeAction) {
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.takeAction,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
ServiceRequestBottomSheet.nurseTakeActionBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
label: context.translation.takeAction,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
ServiceRequestBottomSheet.nurseTakeActionBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
if (workOrderNextStepStatus == WorkOrderNextStepEnum.waitingForRequesterToConfirm) {
|
|
|
|
|
return footerContainer(
|
|
|
|
|
context: context,
|
|
|
|
|
context: context,
|
|
|
|
|
child: AppFilledButton(
|
|
|
|
|
label: context.translation.takeAction,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
ServiceRequestBottomSheet.nurseVerifyArrivalBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
label: context.translation.takeAction,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
buttonColor: AppColor.primary10,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
ServiceRequestBottomSheet.nurseVerifyArrivalBottomSheet(context: context);
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return const SizedBox();
|
|
|
|
|
|