|
|
|
|
@ -447,48 +447,72 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
|
|
|
|
|
return [
|
|
|
|
|
'Vendor Details'.addTranslation.bodyText(context).custom(color: AppColor.black10),
|
|
|
|
|
8.height,
|
|
|
|
|
SingleItemDropDownMenu<SupplierDetails, VendorProvider>(
|
|
|
|
|
context: context,
|
|
|
|
|
title: 'Vendor Name'.addTranslation,
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
labelText:'Vendor Name'.addTranslation,
|
|
|
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
initialValue: _demoFormModel.vendor,
|
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
|
|
|
|
|
showShadow: false,
|
|
|
|
|
showCancel: true,
|
|
|
|
|
onSelect: (person) {
|
|
|
|
|
_demoFormModel.vendor = person;
|
|
|
|
|
_demoFormModel.supEngineer = null;
|
|
|
|
|
vendorPhoneController.text = person?.contact ?? '';
|
|
|
|
|
vendorEmailController.text = person?.email ?? '';
|
|
|
|
|
setState(() {});
|
|
|
|
|
textInputType: TextInputType.text,
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
|
onChange: (value) {
|
|
|
|
|
_demoFormModel.vendorName = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
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,
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
labelText:'Representative Name'.addTranslation,
|
|
|
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
|
|
|
|
|
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(() {});
|
|
|
|
|
}
|
|
|
|
|
textInputType: TextInputType.text,
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
|
onChange: (value) {
|
|
|
|
|
_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,
|
|
|
|
|
enable: false,
|
|
|
|
|
// controller: vendorPhoneController,
|
|
|
|
|
labelText: "Contact Number",
|
|
|
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
@ -497,14 +521,13 @@ class _CreateDemoRequestPageState extends State<CreateDemoRequestPage> with Tick
|
|
|
|
|
textInputType: TextInputType.phone,
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
|
onChange: (value) {
|
|
|
|
|
_demoFormModel.vendorNumber = value;
|
|
|
|
|
_demoFormModel.vendorContactNumber = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
AppTextFormField(
|
|
|
|
|
labelText: "Email",
|
|
|
|
|
controller: vendorEmailController,
|
|
|
|
|
enable: false,
|
|
|
|
|
// controller: vendorEmailController,
|
|
|
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)),
|
|
|
|
|
|