|
|
|
|
@ -705,7 +705,7 @@ class ServiceRequestBottomSheet {
|
|
|
|
|
);
|
|
|
|
|
Navigator.pushReplacement(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(builder: (context) => MaintenanceRequestForm()),
|
|
|
|
|
MaterialPageRoute(builder: (context) => MaintenanceRequestForm()),
|
|
|
|
|
);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -850,7 +850,6 @@ class ServiceRequestBottomSheet {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Future feedBackBottomSheet({required BuildContext context}) {
|
|
|
|
|
|
|
|
|
|
String feedback = '';
|
|
|
|
|
TextEditingController _commentController = TextEditingController();
|
|
|
|
|
return buildBottomSheetParent(
|
|
|
|
|
@ -1185,122 +1184,133 @@ class ServiceRequestBottomSheet {
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//TODO need to modify this accroding to FM requirements....
|
|
|
|
|
|
|
|
|
|
// static Future nurseVerifyAssetTransferBottomSheet({required BuildContext context}) {
|
|
|
|
|
// bool acknowledge = false;
|
|
|
|
|
// Uint8List? newSignature;
|
|
|
|
|
// String? nurseSignature;
|
|
|
|
|
// return buildBottomSheetParent(
|
|
|
|
|
// context: context,
|
|
|
|
|
// childWidget: Consumer<ServiceRequestDetailProvider>(builder: (context, ServiceRequestDetailProvider requestDetailProvider, child) {
|
|
|
|
|
// return Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
// children: [
|
|
|
|
|
// const SizedBox().indicatorWidget(),
|
|
|
|
|
// 8.height,
|
|
|
|
|
// Align(
|
|
|
|
|
// alignment: AlignmentDirectional.centerStart,
|
|
|
|
|
// child: context.translation.pleaseConfirmTheIssueHasBeenResolved.bottomSheetHeadingTextStyle(context),
|
|
|
|
|
// ),
|
|
|
|
|
// 10.height,
|
|
|
|
|
// StatefulBuilder(
|
|
|
|
|
// builder: (context, setState) {
|
|
|
|
|
// return Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// InkWell(
|
|
|
|
|
// child: acknowledge
|
|
|
|
|
// ? const Icon(
|
|
|
|
|
// Icons.check_box,
|
|
|
|
|
// color: AppColor.primary10,
|
|
|
|
|
// )
|
|
|
|
|
// : const Icon(
|
|
|
|
|
// Icons.check_box_outline_blank,
|
|
|
|
|
// color: AppColor.neutral120,
|
|
|
|
|
// ),
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// setState(() {
|
|
|
|
|
// acknowledge = !acknowledge;
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// 6.width,
|
|
|
|
|
// Flexible(
|
|
|
|
|
// child: context.translation.nurseAcknowledge.bodyText(context).custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// 17.height,
|
|
|
|
|
// ESignature(
|
|
|
|
|
// title: '',
|
|
|
|
|
// oldSignature: '',
|
|
|
|
|
// newSignature: newSignature,
|
|
|
|
|
// backgroundColor: AppColor.neutral100,
|
|
|
|
|
// showShadow: false,
|
|
|
|
|
// onChange: (signature) {
|
|
|
|
|
// if (signature == null || signature.isEmpty) return;
|
|
|
|
|
// setState(() {
|
|
|
|
|
// newSignature = signature;
|
|
|
|
|
// nurseSignature = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// onSaved: (signature) {
|
|
|
|
|
// if (signature == null || signature.isEmpty) return;
|
|
|
|
|
// setState(() {
|
|
|
|
|
// newSignature = signature;
|
|
|
|
|
// nurseSignature = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// 36.height,
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
// children: [
|
|
|
|
|
// AppFilledButton(
|
|
|
|
|
// label: context.translation.reject,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
// buttonColor: Colors.white54,
|
|
|
|
|
// textColor: AppColor.red30,
|
|
|
|
|
// showBorder: true,
|
|
|
|
|
// onPressed: () async {
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
// nurseRejectBackBottomSheet(context: context);
|
|
|
|
|
// },
|
|
|
|
|
// ).expanded,
|
|
|
|
|
// const SizedBox(
|
|
|
|
|
// width: 20,
|
|
|
|
|
// ),
|
|
|
|
|
// AppFilledButton(
|
|
|
|
|
// label: context.translation.confirm,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
// loading: requestDetailProvider.isLoading,
|
|
|
|
|
// buttonColor: AppColor.green70,
|
|
|
|
|
// onPressed: () async {
|
|
|
|
|
// if (newSignature != null) {
|
|
|
|
|
// requestDetailProvider.nurseActionHelperModel = NurseActionHelperModel(workOrderId: requestDetailProvider.currentWorkOrder!.data!.requestId!, signatureNurse: nurseSignature);
|
|
|
|
|
// WorkOrderDetail? data = await requestDetailProvider.nurseConfirm();
|
|
|
|
|
// if (data != null) {
|
|
|
|
|
// if (requestDetailProvider.currentWorkOrder!.data!.requestId != null) {
|
|
|
|
|
// requestDetailProvider.updateCurrentWorkOrder(data);
|
|
|
|
|
// }
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// context.translation.signaturesAreRequired.showToast;
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// ).expanded,
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// );
|
|
|
|
|
// }));
|
|
|
|
|
// }
|
|
|
|
|
static Future nurseVerifyAssetTransferBottomSheet({required BuildContext context, required Function(String? value) onAckhnowledgePress}) {
|
|
|
|
|
bool acknowledge = false;
|
|
|
|
|
Uint8List? newSignature;
|
|
|
|
|
String? nurseSignature;
|
|
|
|
|
return buildBottomSheetParent(
|
|
|
|
|
context: context,
|
|
|
|
|
childWidget: Consumer<ServiceRequestDetailProvider>(builder: (context, ServiceRequestDetailProvider requestDetailProvider, child) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
const SizedBox().indicatorWidget(),
|
|
|
|
|
8.height,
|
|
|
|
|
Align(
|
|
|
|
|
alignment: AlignmentDirectional.centerStart,
|
|
|
|
|
child: context.translation.nurseSignature.bottomSheetHeadingTextStyle(context),
|
|
|
|
|
),
|
|
|
|
|
10.height,
|
|
|
|
|
StatefulBuilder(
|
|
|
|
|
builder: (context, setState) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// InkWell(
|
|
|
|
|
// child: acknowledge
|
|
|
|
|
// ? const Icon(
|
|
|
|
|
// Icons.check_box,
|
|
|
|
|
// color: AppColor.primary10,
|
|
|
|
|
// )
|
|
|
|
|
// : const Icon(
|
|
|
|
|
// Icons.check_box_outline_blank,
|
|
|
|
|
// color: AppColor.neutral120,
|
|
|
|
|
// ),
|
|
|
|
|
// onTap: () {
|
|
|
|
|
// setState(() {
|
|
|
|
|
// acknowledge = !acknowledge;
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// 6.width,
|
|
|
|
|
// Flexible(
|
|
|
|
|
// child: context.translation.nurseAcknowledge.bodyText(context).custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// 17.height,
|
|
|
|
|
ESignature(
|
|
|
|
|
title: '',
|
|
|
|
|
oldSignature: '',
|
|
|
|
|
newSignature: newSignature,
|
|
|
|
|
backgroundColor: AppColor.neutral100,
|
|
|
|
|
showShadow: false,
|
|
|
|
|
onChange: (signature) {
|
|
|
|
|
if (signature.isEmpty) return;
|
|
|
|
|
setState(() {
|
|
|
|
|
newSignature = signature;
|
|
|
|
|
nurseSignature = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onSaved: (signature) {
|
|
|
|
|
if (signature == null || signature.isEmpty) return;
|
|
|
|
|
setState(() {
|
|
|
|
|
newSignature = signature;
|
|
|
|
|
nurseSignature = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
36.height,
|
|
|
|
|
AppFilledButton(
|
|
|
|
|
label: context.translation.confirm,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
loading: requestDetailProvider.isLoading,
|
|
|
|
|
buttonColor: AppColor.green70,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
if (newSignature != null) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
onAckhnowledgePress(nurseSignature);
|
|
|
|
|
} else {
|
|
|
|
|
context.translation.signaturesAreRequired.showToast;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
// Row(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
// children: [
|
|
|
|
|
// // AppFilledButton(
|
|
|
|
|
// // label: context.translation.cancel,
|
|
|
|
|
// // maxWidth: true,
|
|
|
|
|
// // buttonColor: AppColor.white60,
|
|
|
|
|
// // textColor: AppColor.black10,
|
|
|
|
|
// // showBorder: true,
|
|
|
|
|
// // onPressed: () async {
|
|
|
|
|
// // Navigator.pop(context);
|
|
|
|
|
// // },
|
|
|
|
|
// // ).expanded,
|
|
|
|
|
// // const SizedBox(
|
|
|
|
|
// // width: 20,
|
|
|
|
|
// // ),
|
|
|
|
|
// AppFilledButton(
|
|
|
|
|
// label: context.translation.confirm,
|
|
|
|
|
// maxWidth: true,
|
|
|
|
|
// loading: requestDetailProvider.isLoading,
|
|
|
|
|
// buttonColor: AppColor.green70,
|
|
|
|
|
// onPressed: () async {
|
|
|
|
|
// if (newSignature != null) {
|
|
|
|
|
// requestDetailProvider.nurseActionHelperModel = NurseActionHelperModel(workOrderId: requestDetailProvider.currentWorkOrder!.data!.requestId!, signatureNurse: nurseSignature);
|
|
|
|
|
// WorkOrderDetail? data = await requestDetailProvider.nurseConfirm();
|
|
|
|
|
// if (data != null) {
|
|
|
|
|
// if (requestDetailProvider.currentWorkOrder!.data!.requestId != null) {
|
|
|
|
|
// requestDetailProvider.updateCurrentWorkOrder(data);
|
|
|
|
|
// }
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// context.translation.signaturesAreRequired.showToast;
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// ).expanded,
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|