acknowledgment added for demo request creation.

design_3.0_demo_module
Sikander Saleem 11 hours ago
parent 17dc2a7809
commit c81d3181d2

@ -154,6 +154,62 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
setState(() {});
},
),
16.height,
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Checkbox(
value: _demoFormModel.demoEaluationAcknowledge,
visualDensity: const VisualDensity(horizontal: -4, vertical: -4),
activeColor: AppColor.blueStatus(context),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (value) {
setState(() {
_demoFormModel.demoEaluationAcknowledge = value!;
});
}),
8.width,
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"DEMO outcome evaluation form acknowledgement".bodyText(context).custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral50),
4.height,
"I acknowledge at the end of the trial period I will complete and submit the Medical Technology Trial Outcome Form within two weeks."
.tinyFont(context)
.custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120),
],
).expanded,
],
),
16.height,
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Checkbox(
value: _demoFormModel.acknowledgeNotEquipment,
visualDensity: const VisualDensity(horizontal: -4, vertical: -4),
activeColor: AppColor.blueStatus(context),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (value) {
setState(() {
_demoFormModel.acknowledgeNotEquipment = value!;
});
}),
8.width,
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Acknowledgement of not using the equipment".bodyText(context).custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral50),
4.height,
"I acknowledge at the end of the trial period I will not use the DEMO medical equipment & I will not book any patient on the DEMO medical equipment."
.tinyFont(context)
.custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral120),
],
).expanded,
],
),
],
).toShadowContainer(context, borderRadius: 20),
).expanded,
@ -161,6 +217,7 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
context: context,
child: AppFilledButton(
buttonColor: AppColor.primary10,
disableButton: !_demoFormModel.demoEaluationAcknowledge || !_demoFormModel.acknowledgeNotEquipment,
label: context.translation.submitRequest,
onPressed: _submit,
// buttonColor: AppColor.primary10,

@ -34,6 +34,9 @@ class DemoFormModel {
SupplierDetails? vendor;
List<DemoAttachments>? demoAttachment;
bool demoEaluationAcknowledge;
bool acknowledgeNotEquipment;
DemoFormModel({
this.id,
this.docName,
@ -54,6 +57,8 @@ class DemoFormModel {
this.vendor,
this.supEngineer,
this.department,
this.demoEaluationAcknowledge = false,
this.acknowledgeNotEquipment = false,
});
Map<String, dynamic> toJson() {
@ -79,36 +84,37 @@ class DemoFormModel {
"demoPeriodId": demoPeriod?.id,
"supplierId": vendor?.id,
"suppPersonId": supEngineer?.id,
// "vendorEmail": vendorEmail,
"demoEaluationAcknowledge": demoEaluationAcknowledge,
"acknowledgeNotEquipment": acknowledgeNotEquipment,
"demoAttachments":
// [
// {
// "id": 3,
// // "documentType": {
// // "id": 7748,
// // "name": "February",
// // "value": 2
// // },
// "documentTypeId": 7748,
// "attachmentName": "6c9f50b0-1c92-4ae9-ae64-7c284c61ea72.jpg",
// "originalName": "scaled_d245df97-1289-4d0c-92a0-569abedfb0db8154518103327960943.jpg",
// "demoRequestId": 3
// },
// {
// "id": 4,
// // "documentType": {
// // "id": 7748,
// // "name": "February",
// // "value": 2
// // },
// "documentTypeId": 7748,
// "attachmentName": "346e04f6-0f9b-4004-ad85-4cdbf8318f7c.jpg",
// "originalName": "scaled_85790b6c-7b16-46e6-891c-11c316d5897a2973693360957767376.jpg",
// "demoRequestId": 3
// }
// ]
// [
// {
// "id": 3,
// // "documentType": {
// // "id": 7748,
// // "name": "February",
// // "value": 2
// // },
// "documentTypeId": 7748,
// "attachmentName": "6c9f50b0-1c92-4ae9-ae64-7c284c61ea72.jpg",
// "originalName": "scaled_d245df97-1289-4d0c-92a0-569abedfb0db8154518103327960943.jpg",
// "demoRequestId": 3
// },
// {
// "id": 4,
// // "documentType": {
// // "id": 7748,
// // "name": "February",
// // "value": 2
// // },
// "documentTypeId": 7748,
// "attachmentName": "346e04f6-0f9b-4004-ad85-4cdbf8318f7c.jpg",
// "originalName": "scaled_85790b6c-7b16-46e6-891c-11c316d5897a2973693360957767376.jpg",
// "demoRequestId": 3
// }
// ]
demoAttachment != null ? demoAttachment!.map((v) => v.toJson()).toList() : [],
demoAttachment != null ? demoAttachment!.map((v) => v.toJson()).toList() : [],
};
}

@ -41,7 +41,7 @@ class _AssetDetailPageState extends State<AssetDetailPage> {
AssetProvider? _assetProvider;
@override
Widget build(BuildContext context) {
Widget build(BuildContext context) {_assetProvider!.getAssetById(assetId!, context.translation);
assetId ??= ModalRoute.of(context)?.settings.arguments as int;
_assetProvider ??= Provider.of<AssetProvider>(context, listen: false);
_assetProvider?.stateCode = null;

Loading…
Cancel
Save