chat employee id changes.

design_3.0_medical_gas
Sikander Saleem 19 hours ago
parent 267a4445d1
commit df8d22f792

@ -53,90 +53,88 @@ class _MedicalGasInspectionDetailPageState extends State<MedicalGasInspectionDet
Widget build(BuildContext context) {
return Scaffold(
appBar: const DefaultAppBar(title: "Request Details"),
body: SafeArea(
child: _isLoading
? SizedBox.expand(child: const CircularProgressIndicator(color: AppColor.primary10).center)
: model == null
? const NoDataFound().center
: Column(
children: [
ListView(
padding: const EdgeInsets.all(16),
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//Need to return the status form api backend
Row(
children: [
if (widget.prority != null) ...[
StatusLabel(
label: widget.prority,
textColor: AppColor.getRequestStatusTextColorByName(context, widget.prority),
backgroundColor: AppColor.getRequestStatusColorByName(context, widget.prority),
),
8.width,
],
body: _isLoading
? SizedBox.expand(child: const CircularProgressIndicator(color: AppColor.primary10).center)
: model == null
? const NoDataFound().center
: Column(
children: [
ListView(
padding: const EdgeInsets.all(16),
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//Need to return the status form api backend
Row(
children: [
if (widget.prority != null) ...[
StatusLabel(
label: model?.requestStatus?.name,
textColor: AppColor.getHistoryLogStatusTextColorByName(model?.requestStatus?.name ?? ''),
backgroundColor: AppColor.getHistoryLogStatusColorByName(model?.requestStatus?.name ?? ''),
label: widget.prority,
textColor: AppColor.getRequestStatusTextColorByName(context, widget.prority),
backgroundColor: AppColor.getRequestStatusColorByName(context, widget.prority),
),
1.width.expanded,
Text(model!.requestedDate!.toServiceRequestCardFormat,
textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50))
8.width,
],
),
8.height,
Text("Request Details", style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50)),
'${context.translation.requestNo}: ${model?.requestNumber ?? '-'}'.bodyText(context),
'Requested by: ${model?.requestedBy ?? '-'}'.bodyText(context),
if (model?.lastModifiedBy != null)
'Last Modified by: ${model?.lastModifiedBy ?? '-'}'.bodyText(context),
'Order Type: ${model?.requestOrderType ?? '-'}'.bodyText(context),
'Item Type: ${model?.itemType ?? '-'}'.bodyText(context),
'Site: ${model?.site ?? '-'}'.bodyText(context),
'Supplier Name: ${model?.supplier ?? '-'}'.bodyText(context),
'Supplier Contact: ${model?.contact ?? '-'}'.bodyText(context),
'Supplier Email: ${model?.email ?? '-'}'.bodyText(context),
if (model!.deliveryNoteAttachmentDto.isNotEmpty) ...[
const Divider().defaultStyle(context),
Text(
"Attachments".addTranslation,
style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
StatusLabel(
label: model?.requestStatus?.name,
textColor: AppColor.getHistoryLogStatusTextColorByName(model?.requestStatus?.name ?? ''),
backgroundColor: AppColor.getHistoryLogStatusColorByName(model?.requestStatus?.name ?? ''),
),
FilesList(images: model!.deliveryNoteAttachmentDto.map((e) => URLs.getFileUrl(e.name ?? '') ?? '').toList() ?? []),
1.width.expanded,
Text(model!.requestedDate!.toServiceRequestCardFormat,
textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50))
],
),
8.height,
Text("Request Details", style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50)),
'${context.translation.requestNo}: ${model?.requestNumber ?? '-'}'.bodyText(context),
'Requested by: ${model?.requestedBy ?? '-'}'.bodyText(context),
if (model?.lastModifiedBy != null)
'Last Modified by: ${model?.lastModifiedBy ?? '-'}'.bodyText(context),
'Order Type: ${model?.requestOrderType ?? '-'}'.bodyText(context),
'Item Type: ${model?.itemType ?? '-'}'.bodyText(context),
'Site: ${model?.site ?? '-'}'.bodyText(context),
'Supplier Name: ${model?.supplier ?? '-'}'.bodyText(context),
'Supplier Contact: ${model?.contact ?? '-'}'.bodyText(context),
'Supplier Email: ${model?.email ?? '-'}'.bodyText(context),
if (model!.deliveryNoteAttachmentDto.isNotEmpty) ...[
const Divider().defaultStyle(context),
Text(
"Attachments".addTranslation,
style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
),
FilesList(images: model!.deliveryNoteAttachmentDto.map((e) => URLs.getFileUrl(e.name ?? '') ?? '').toList() ?? []),
],
).toShadowContainer(context, padding: 12),
],
).expanded,
if (model?.requestStatus?.value != null && model!.requestStatus!.value! < 3)
FooterActionButton.footerContainer(
context: context,
child: AppFilledButton(
buttonColor: AppColor.primary10,
label: model?.isSubmitted == true ? "Upload Delivery Note" : 'Update',
onPressed: () async {
if (model?.isSubmitted == true) {
bool? isRefresh = await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdateDeliveryNotes(dataModel: model)));
if (isRefresh == true) {
_loadData();
}
return;
}
bool? isRefresh = await Navigator.of(context).push(MaterialPageRoute(
builder: (_) => CreateMedicalGasRequestPage(
dataModel: model,
)));
],
).toShadowContainer(context, padding: 12),
],
).expanded,
if (model?.requestStatus?.value != null && model!.requestStatus!.value! < 3)
FooterActionButton.footerContainer(
context: context,
child: AppFilledButton(
buttonColor: AppColor.primary10,
label: model?.isSubmitted == true ? "Upload Delivery Note" : 'Update',
onPressed: () async {
if (model?.isSubmitted == true) {
bool? isRefresh = await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdateDeliveryNotes(dataModel: model)));
if (isRefresh == true) {
_loadData();
}
}),
),
],
),
));
return;
}
bool? isRefresh = await Navigator.of(context).push(MaterialPageRoute(
builder: (_) => CreateMedicalGasRequestPage(
dataModel: model,
)));
if (isRefresh == true) {
_loadData();
}
}),
),
],
));
}
Widget labelValueText(BuildContext context, String label, String? value) {

@ -80,211 +80,209 @@ class _UpdateDeliveryNotesState extends State<UpdateDeliveryNotes> {
// _update(context: context);
// },
),
body: SafeArea(
child: Form(
key: _formKey,
child: Column(
children: [
ListView(
padding: const EdgeInsets.all(16),
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ADatePicker(
label: "Delivered Date",
hideShadow: true,
backgroundColor: AppColor.fieldBgColor(context),
from: DateTime.now().subtract(const Duration(days: 365 * 3)),
date: formModel.deliveredDate,
formatDateWithTime: true,
onDatePicker: (selectedDate) {
showTimePicker(
context: context,
initialTime: TimeOfDay.now(),
).then((selectedTime) {
if (selectedTime != null) {
formModel.deliveredDate = DateTime(selectedDate.year, selectedDate.month, selectedDate.day, selectedTime.hour, selectedTime.minute);
setState(() {});
}
});
},
),
16.height,
AppTextFormField(
initialValue: formModel.deliveryNoteNumber,
labelText: "Delivery Notes",
// validator: (value) {
// if ((value ?? "").isEmpty) return "Delivery Notes Required";
// return null;
// },
backgroundColor: AppColor.fieldBgColor(context),
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
floatingLabelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
showShadow: false,
textInputType: TextInputType.multiline,
makeMultiLinesNull: true,
onChange: (value) {
formModel.deliveryNoteNumber = value;
},
),
16.height,
//Older design code
// MultipleItemDropDownMenu<MedicalGasRequestDetailModel, NullableLoadingProvider>(
// context: context,
// showAsBottomSheet: true,
// backgroundColor: AppColor.neutral100,
// showShadow: false,
// showCancel: true,
// requestById: context.userProvider.user?.clientId,
// title: 'Delivered Items'.addTranslation,
// staticData: formModel.deliveredItemList,
// initialValue: selectedItemList,
// onSelect: (value) {
// if ((value ?? []).isNotEmpty) {
// WidgetsBinding.instance.addPostFrameCallback((_) {
// if (!mounted) return;
// setState(() {
// selectedItemList = value ?? [];
// });
// });
// }
// },
// ),
// if (selectedItemList.isNotEmpty) ...[
// 8.height,
// ListView.separated(
// separatorBuilder: (_, __) => 12.height,
// itemCount: selectedItemList.length,
// shrinkWrap: true,
// physics: const NeverScrollableScrollPhysics(),
// itemBuilder: (context, index) {
// MedicalGasRequestDetailModel model = selectedItemList[index];
// return AppTextFormField(
// labelText: '${model.name} (Req Qty =${model.requestedQuantity})',
// hintText: 'Enter Delivered Quantity'.addTranslation,
// backgroundColor: AppColor.fieldBgColor(context),
// initialValue: model.deliveredQuantity != null ? model.deliveredQuantity?.toInt().toString() : '',
// textAlign: TextAlign.center,
// enable: true,
// textInputType: TextInputType.number,
// labelStyle: AppTextStyles.textFieldLabelStyle,
// showShadow: false,
// onChange: (value) {
// if (value.isNotEmpty) {
// model.deliveredQuantity = double.tryParse(value);
// }
// },
// style: Theme.of(context).textTheme.titleMedium,
// );
// },
// )
// ],
if (formModel.deliveredItemList.isNotEmpty) ...[
_ItemRowLayout(
left: 'Items'.addTranslation.bodyText(context).custom(color: AppColor.textColor(context)),
right: 'Delivered Qty'.addTranslation.bodyText(context).custom(color: AppColor.textColor(context)),
),
8.height,
ListView.separated(
separatorBuilder: (_, __) => 12.height,
itemCount: formModel.deliveredItemList.length,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
MedicalGasRequestDetailModel model = formModel.deliveredItemList[index];
return itemQuantityFieldWidget(index: index, model: model, context: context);
},
)
],
16.height,
body: Form(
key: _formKey,
child: Column(
children: [
ListView(
padding: const EdgeInsets.all(16),
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ADatePicker(
label: "Delivered Date",
hideShadow: true,
backgroundColor: AppColor.fieldBgColor(context),
from: DateTime.now().subtract(const Duration(days: 365 * 3)),
date: formModel.deliveredDate,
formatDateWithTime: true,
onDatePicker: (selectedDate) {
showTimePicker(
context: context,
initialTime: TimeOfDay.now(),
).then((selectedTime) {
if (selectedTime != null) {
formModel.deliveredDate = DateTime(selectedDate.year, selectedDate.month, selectedDate.day, selectedTime.hour, selectedTime.minute);
setState(() {});
}
});
},
),
16.height,
AppTextFormField(
initialValue: formModel.deliveryNoteNumber,
labelText: "Delivery Notes",
// validator: (value) {
// if ((value ?? "").isEmpty) return "Delivery Notes Required";
// return null;
// },
backgroundColor: AppColor.fieldBgColor(context),
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
floatingLabelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
showShadow: false,
textInputType: TextInputType.multiline,
makeMultiLinesNull: true,
onChange: (value) {
formModel.deliveryNoteNumber = value;
},
),
16.height,
AttachmentPicker(
label: 'Upload Attachment',
attachment: formModel.attachments,
buttonColor: AppColor.primary10,
// showAsListView: true,
onlyImages: false,
buttonIcon: 'attachment_icon'.toSvgAsset(
color: AppColor.primary10,
),
),
16.height,
//should create a reusable widget.
Row(
children: [
Checkbox(
value: formModel.isPressureChecked,
visualDensity: const VisualDensity(horizontal: -4.0, vertical: -4.0),
activeColor: AppColor.blueStatus(context),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (value) {
setState(() {
formModel.isPressureChecked = value!;
});
}),
12.width,
"I Acknowledge that the received medical gases cylinders have been tested for pressure."
.addTranslation
.bodyText(context)
.custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120)
.expanded,
],
//Older design code
// MultipleItemDropDownMenu<MedicalGasRequestDetailModel, NullableLoadingProvider>(
// context: context,
// showAsBottomSheet: true,
// backgroundColor: AppColor.neutral100,
// showShadow: false,
// showCancel: true,
// requestById: context.userProvider.user?.clientId,
// title: 'Delivered Items'.addTranslation,
// staticData: formModel.deliveredItemList,
// initialValue: selectedItemList,
// onSelect: (value) {
// if ((value ?? []).isNotEmpty) {
// WidgetsBinding.instance.addPostFrameCallback((_) {
// if (!mounted) return;
// setState(() {
// selectedItemList = value ?? [];
// });
// });
// }
// },
// ),
// if (selectedItemList.isNotEmpty) ...[
// 8.height,
// ListView.separated(
// separatorBuilder: (_, __) => 12.height,
// itemCount: selectedItemList.length,
// shrinkWrap: true,
// physics: const NeverScrollableScrollPhysics(),
// itemBuilder: (context, index) {
// MedicalGasRequestDetailModel model = selectedItemList[index];
// return AppTextFormField(
// labelText: '${model.name} (Req Qty =${model.requestedQuantity})',
// hintText: 'Enter Delivered Quantity'.addTranslation,
// backgroundColor: AppColor.fieldBgColor(context),
// initialValue: model.deliveredQuantity != null ? model.deliveredQuantity?.toInt().toString() : '',
// textAlign: TextAlign.center,
// enable: true,
// textInputType: TextInputType.number,
// labelStyle: AppTextStyles.textFieldLabelStyle,
// showShadow: false,
// onChange: (value) {
// if (value.isNotEmpty) {
// model.deliveredQuantity = double.tryParse(value);
// }
// },
// style: Theme.of(context).textTheme.titleMedium,
// );
// },
// )
// ],
if (formModel.deliveredItemList.isNotEmpty) ...[
_ItemRowLayout(
left: 'Items'.addTranslation.bodyText(context).custom(color: AppColor.textColor(context)),
right: 'Delivered Qty'.addTranslation.bodyText(context).custom(color: AppColor.textColor(context)),
),
8.height,
Row(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Checkbox(
value: formModel.isInspectedGasLeak,
visualDensity: const VisualDensity(horizontal: -4.0, vertical: -4.0),
activeColor: AppColor.blueStatus(context),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (value) {
setState(() {
formModel.isInspectedGasLeak = value!;
});
}),
12.width,
"I Acknowledge that the received medical gases cylinders have been inspected for leak test."
.addTranslation
.bodyText(context)
.custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120)
.expanded,
],
),
ListView.separated(
separatorBuilder: (_, __) => 12.height,
itemCount: formModel.deliveredItemList.length,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
MedicalGasRequestDetailModel model = formModel.deliveredItemList[index];
return itemQuantityFieldWidget(index: index, model: model, context: context);
},
)
],
).toShadowContainer(context, padding: 12),
],
).expanded,
FooterActionButton.footerContainer(
context: context,
child: Row(
children: [
AppFilledButton(
buttonColor: AppColor.primary10,
label: 'Save'.addTranslation,
onPressed: () {
_update(context: context);
},
// buttonColor: AppColor.primary10,
).expanded,
8.width,
AppFilledButton(
16.height,
AttachmentPicker(
label: 'Upload Attachment',
attachment: formModel.attachments,
buttonColor: AppColor.primary10,
label: 'Submit'.addTranslation,
onPressed: () {
_update(context: context, isSubmitted: true);
},
// buttonColor: AppColor.primary10,
).expanded,
// showAsListView: true,
onlyImages: false,
buttonIcon: 'attachment_icon'.toSvgAsset(
color: AppColor.primary10,
),
),
16.height,
//should create a reusable widget.
Row(
children: [
Checkbox(
value: formModel.isPressureChecked,
visualDensity: const VisualDensity(horizontal: -4.0, vertical: -4.0),
activeColor: AppColor.blueStatus(context),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (value) {
setState(() {
formModel.isPressureChecked = value!;
});
}),
12.width,
"I Acknowledge that the received medical gases cylinders have been tested for pressure."
.addTranslation
.bodyText(context)
.custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120)
.expanded,
],
),
8.height,
Row(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Checkbox(
value: formModel.isInspectedGasLeak,
visualDensity: const VisualDensity(horizontal: -4.0, vertical: -4.0),
activeColor: AppColor.blueStatus(context),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (value) {
setState(() {
formModel.isInspectedGasLeak = value!;
});
}),
12.width,
"I Acknowledge that the received medical gases cylinders have been inspected for leak test."
.addTranslation
.bodyText(context)
.custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120)
.expanded,
],
),
],
),
).toShadowContainer(context, padding: 12),
],
).expanded,
FooterActionButton.footerContainer(
context: context,
child: Row(
children: [
AppFilledButton(
buttonColor: AppColor.primary10,
label: 'Save'.addTranslation,
onPressed: () {
_update(context: context);
},
// buttonColor: AppColor.primary10,
).expanded,
8.width,
AppFilledButton(
buttonColor: AppColor.primary10,
label: 'Submit'.addTranslation,
onPressed: () {
_update(context: context, isSubmitted: true);
},
// buttonColor: AppColor.primary10,
).expanded,
],
),
],
),
),
],
),
));
// .handlePopScope(

@ -228,7 +228,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
requestId: widget.model.id!.toInt(),
assigneeEmployeeNumber: _model!.senderAssignedEmployeeNumber,
myLoginUserID: context.userProvider.user!.employeeId ?? context.userProvider.user!.username!,
contactEmployeeINumber: _model!.assetTransferContactPersons!.first.employeeNumber,
contactEmployeeINumber: _model!.assetTransferContactPersons!.first.employeeId ?? _model!.assetTransferContactPersons!.first.employeeNumber,
),
if ((_userProvider!.user?.type == UsersTypes.engineer))
if (isCurrentEngineerEligibleForEdit && isCurrentRequestEditAble)
@ -289,7 +289,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
requestId: widget.model.id!.toInt(),
assigneeEmployeeNumber: isSender ? _deviceTransfer.senderAssignedEmployeeNumber! : _deviceTransfer.receiverAssignedEmployeeNumber!,
myLoginUserID: context.userProvider.user!.employeeId ?? context.userProvider.user!.username!,
contactEmployeeINumber: _deviceTransfer.assetTransferContactPersons!.first.employeeNumber,
contactEmployeeINumber: _model!.assetTransferContactPersons!.first.employeeId ?? _deviceTransfer.assetTransferContactPersons!.first.employeeNumber,
),
if ((_userProvider!.user?.type == UsersTypes.engineer))
if (isCurrentEngineerEligibleForEdit && !isCurrentRequestClosed)

@ -73,7 +73,7 @@ class _GasRefillDetailsPageState extends State<GasRefillDetailsPage> {
requestId: widget.model.id!.toInt(),
assigneeEmployeeNumber: _gasRefillModel.assignedEmployee?.employeeId!,
myLoginUserID: context.userProvider.user!.employeeId ?? context.userProvider.user!.username!,
contactEmployeeINumber: _gasRefillModel.gasRefillContactPerson!.first.employeeCode!,
contactEmployeeINumber: _gasRefillModel.gasRefillContactPerson!.first.employeeId ?? _gasRefillModel.gasRefillContactPerson!.first.employeeCode!,
);
})
],

@ -254,7 +254,6 @@ class _UpdateGasRefillRequestState extends State<UpdateGasRefillRequest> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
8.height,
SingleItemDropDownMenu<Lookup, NullableLoadingProvider>(
context: context,
title: context.translation.quantity,

@ -116,11 +116,9 @@ class CreateRequestModel {
if (context.userProvider.isQualityUser && context.settingProvider.isUserFlowMedical) {
list.add(CreateRequestModel("Equipment Internal Audit Checklist".addTranslation, "add_icon", CreateEquipmentInternalAuditForm.id));
list.add(CreateRequestModel("System Internal Audit Checklist".addTranslation, "add_icon", CreateSystemInternalAuditForm.id));
}
else if (context.userProvider.isAssessor) {
} else if (context.userProvider.isAssessor) {
list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id));
}
else if (context.userProvider.isEngineer) {
} else if (context.userProvider.isEngineer) {
if (Provider.of<SettingProvider>(context, listen: false).engineerCanCreateCM) {
list.add(CreateRequestModel(context.translation.correctiveMaintenance, "add_icon", CreateCMRequest.id));
}
@ -128,16 +126,18 @@ class CreateRequestModel {
//TODO uncommit this to enable task.
list.add(CreateRequestModel(context.translation.task, "add_icon", CreateTaskView.id));
//Need to add check from permission Api.
// if (Provider.of<SettingProvider>(context, listen: false).engineerCanCreateCM) {
list.add(CreateRequestModel('Medical Gas'.addTranslation, "add_icon", CreateMedicalGasRequestPage.id));
// }
if ((context.settingProvider.isUserFlowMedical)) {
list.add(CreateRequestModel('Medical Gas'.addTranslation, "add_icon", CreateMedicalGasRequestPage.id));
}
} else {
list.add(CreateRequestModel(context.translation.correctiveMaintenance, "add_icon", CreateCMRequest.id));
list.add(CreateRequestModel(context.translation.gasRefill, "add_icon", GasRefillRequestForm.routeName));
list.add(CreateRequestModel(context.translation.transferAsset, "add_icon", CreateDeviceTransferRequest.id));
//TODO uncommit this to enable task.
list.add(CreateRequestModel(context.translation.task, "add_icon", CreateTaskView.id));
list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id));
if ((context.settingProvider.isUserFlowMedical)) {
list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id));
}
// Hide Loan
// list.add(CreateRequestModel('Loan Equipment Request'.addTranslation, "add_icon", CreateLoanRequestPage.id));
}

@ -81,9 +81,9 @@ class _AllRequestsFilterPageState extends State<AllRequestsFilterPage> {
if (isEngineer) {
types[context.translation.recurrentWo] = 5;
if (context.settingProvider.isUserFlowMedical) types["Equipment Internal Audit".addTranslation] = 10;
if (context.settingProvider.isUserFlowMedical) types["System Internal Audit".addTranslation] = 11;
if (context.settingProvider.isUserFlowMedical) types["Medical Gas Inspection".addTranslation] = 11;
if (context.settingProvider.isUserFlowMedical) types["Equipment Internal Audit".addTranslation] = 10;
if (context.settingProvider.isUserFlowMedical) types["System Internal Audit".addTranslation] = 11;
if (context.settingProvider.isUserFlowMedical) types["Medical Gas Inspection".addTranslation] = 11;
}
if (context.settingProvider.isUserFlowMedical && isEngineer) {
@ -97,17 +97,17 @@ class _AllRequestsFilterPageState extends State<AllRequestsFilterPage> {
}
});
//Hide traf
if (!isEngineer) {
if (!isEngineer && context.settingProvider.isUserFlowMedical) {
types['TRAF'] = 9;
}
if (context.userProvider.isAssessor) {
if (context.settingProvider.isUserFlowMedical && context.userProvider.isAssessor) {
types = {"TRAF": 9};
}
if (context.userProvider.isQualityUser) {
if (context.settingProvider.isUserFlowMedical) types = {'Recall and Alert': 7};
if (context.settingProvider.isUserFlowMedical) types['Equipment Internal Audit'] = 10;
if (context.settingProvider.isUserFlowMedical) types['System Internal Audit'] = 11;
if (context.settingProvider.isUserFlowMedical) types['Equipment Internal Audit'] = 10;
if (context.settingProvider.isUserFlowMedical) types['System Internal Audit'] = 11;
}
if (context.userProvider.isCommissioningEngineer) {
///TODO need to check what other requests type needed here.

@ -63,7 +63,7 @@ class _MyRequestsPageState extends State<MyRequestsPage> {
}
});
//Hide TRAF.
if (context.userProvider.user!.type == UsersTypes.normal_user) {
if (context.settingProvider.isUserFlowMedical && context.userProvider.user!.type == UsersTypes.normal_user) {
requestsList.add(Request(9, 'TRAF'));
}
if (context.userProvider.isEngineer && context.settingProvider.isUserFlowMedical) {
@ -74,7 +74,6 @@ class _MyRequestsPageState extends State<MyRequestsPage> {
requestsList.add(Request(14, "Medical Gas Inspection"));
}
// Hide Loan
// requestsList.add(Request(12, "Loan Equipment"));

Loading…
Cancel
Save