|
|
|
|
@ -254,40 +254,6 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
// SingleItemDropDownMenu<Site, SiteProvider>(
|
|
|
|
|
// context: context,
|
|
|
|
|
// title: context.translation.site,
|
|
|
|
|
// initialValue: _demoFormModel.site,
|
|
|
|
|
// showShadow: false,
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// if (value == null) return "Please select a site";
|
|
|
|
|
// return null;
|
|
|
|
|
// },
|
|
|
|
|
// backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
// showAsBottomSheet: true,
|
|
|
|
|
// onSelect: (value) {
|
|
|
|
|
// _demoFormModel.site = value;
|
|
|
|
|
// setState(() {});
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// 8.height,
|
|
|
|
|
// SingleItemDropDownMenu<MedicalDepartmentModel, MedicalDepartmentProvider>(
|
|
|
|
|
// context: context,
|
|
|
|
|
// title: context.translation.department,
|
|
|
|
|
// showShadow: false,
|
|
|
|
|
// validator: (value) {
|
|
|
|
|
// if (value == null) return "Please select a department";
|
|
|
|
|
// return null;
|
|
|
|
|
// },
|
|
|
|
|
// showAsBottomSheet: true,
|
|
|
|
|
// initialValue: _demoFormModel.department,
|
|
|
|
|
// requestById: context.userProvider.user?.clientId,
|
|
|
|
|
// backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
// onSelect: (value) {
|
|
|
|
|
// _demoFormModel.department = value;
|
|
|
|
|
// setState(() {});
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -494,44 +460,6 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
|
|
|
|
|
_demoFormModel.vendorRepresentativeName = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
// SingleItemDropDownMenu<SupplierDetails, VendorProvider>(
|
|
|
|
|
// context: context,
|
|
|
|
|
// title: 'Vendor Name'.addTranslation,
|
|
|
|
|
// backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
// initialValue: _demoFormModel.vendor,
|
|
|
|
|
// showAsBottomSheet: true,
|
|
|
|
|
// showShadow: false,
|
|
|
|
|
// showCancel: true,
|
|
|
|
|
// onSelect: (person) {
|
|
|
|
|
// _demoFormModel.vendor = person;
|
|
|
|
|
// _demoFormModel.supEngineer = null;
|
|
|
|
|
// vendorPhoneController.text = person?.contact ?? '';
|
|
|
|
|
// vendorEmailController.text = person?.email ?? '';
|
|
|
|
|
// setState(() {});
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// 8.height,
|
|
|
|
|
// SingleItemDropDownMenu<SuppPersons, NullableLoadingProvider>(
|
|
|
|
|
// context: context,
|
|
|
|
|
// backgroundColor: _demoFormModel.vendor?.suppliername == null
|
|
|
|
|
// ? context.isDark
|
|
|
|
|
// ? AppColor.neutral20
|
|
|
|
|
// : AppColor.neutral40
|
|
|
|
|
// : AppColor.fieldBgColor(context),
|
|
|
|
|
// title: "Representative Name".addTranslation,
|
|
|
|
|
// showShadow: false,
|
|
|
|
|
// enabled: _demoFormModel.vendor?.suppPersons?.isNotEmpty ?? false,
|
|
|
|
|
// staticData: _demoFormModel.vendor?.suppPersons,
|
|
|
|
|
// showAsBottomSheet: true,
|
|
|
|
|
// initialValue: _demoFormModel.supEngineer == null ? null : SuppPersons.fromJson(_demoFormModel.supEngineer?.toJson()),
|
|
|
|
|
// onSelect: (suppPerson) {
|
|
|
|
|
// if (suppPerson != null) {
|
|
|
|
|
// _demoFormModel.supEngineer = SuppEngineerWorkOrders.fromJson(suppPerson.toJson());
|
|
|
|
|
//
|
|
|
|
|
// setState(() {});
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
8.height,
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
// controller: vendorPhoneController,
|
|
|
|
|
@ -570,7 +498,6 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
|
|
|
|
|
_demoFormModel.demoAttachment = [];
|
|
|
|
|
for (var item in attachments) {
|
|
|
|
|
String fileName = CMRequestUtils.isLocalUrl(item.name ?? '') ? ("${item.name ?? ''.split("/").last}|${base64Encode(File(item.name ?? '').readAsBytesSync())}") : item.name ?? '';
|
|
|
|
|
//Todo need to change from static attachmentTypeId lookUp value from lookup 4104...
|
|
|
|
|
_demoFormModel.demoAttachment?.add(DemoAttachments(id: 0, attachmentName: fileName, demoRequestId: 0,documentTypeId: 7748));
|
|
|
|
|
}
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
|