|
|
|
@ -32,6 +32,8 @@ import 'package:test_sa/providers/loading_list_notifier.dart';
|
|
|
|
import 'package:test_sa/providers/lookups/department_lookup_provider.dart';
|
|
|
|
import 'package:test_sa/providers/lookups/department_lookup_provider.dart';
|
|
|
|
import 'package:test_sa/providers/work_order/vendor_provider.dart';
|
|
|
|
import 'package:test_sa/providers/work_order/vendor_provider.dart';
|
|
|
|
import 'package:test_sa/views/widgets/images/multi_image_picker.dart';
|
|
|
|
import 'package:test_sa/views/widgets/images/multi_image_picker.dart';
|
|
|
|
|
|
|
|
import 'package:test_sa/views/widgets/item_views/info_header_widget.dart';
|
|
|
|
|
|
|
|
import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
|
|
|
|
import '../../../../../../new_views/common_widgets/default_app_bar.dart';
|
|
|
|
import '../../../../../../new_views/common_widgets/default_app_bar.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class CreateLoanRequestPage extends StatefulWidget {
|
|
|
|
class CreateLoanRequestPage extends StatefulWidget {
|
|
|
|
@ -106,34 +108,40 @@ class _CreateLoanRequestPageState extends State<CreateLoanRequestPage> with Tick
|
|
|
|
staticData: loanTypes,
|
|
|
|
staticData: loanTypes,
|
|
|
|
initialValue: isBackUpRequest ? loanTypes[1] : loanTypes[0],
|
|
|
|
initialValue: isBackUpRequest ? loanTypes[1] : loanTypes[0],
|
|
|
|
showShadow: false,
|
|
|
|
showShadow: false,
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
// backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
onSelect: (value) {},
|
|
|
|
onSelect: (value) {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
16.height,
|
|
|
|
16.height,
|
|
|
|
if (isBackUpRequest) ...[
|
|
|
|
if (isBackUpRequest) ...[
|
|
|
|
'Asset Information'.addTranslation.bodyText(context).custom(color: AppColor.black10),
|
|
|
|
InfoHeaderWidget('Asset Information'.addTranslation),
|
|
|
|
8.height,
|
|
|
|
8.height,
|
|
|
|
Text(
|
|
|
|
InfoTextWidget(label: context.translation.assetName, value: widget.workOrder!.assetNdModel!.name?.cleanupWhitespace.capitalizeFirstOfEach ?? '-'),
|
|
|
|
'${context.translation.assetName}: ${widget.workOrder!.assetNdModel!.name?.cleanupWhitespace.capitalizeFirstOfEach}',
|
|
|
|
// Text(
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
// '${context.translation.assetName}: ${widget.workOrder!.assetNdModel!.name?.cleanupWhitespace.capitalizeFirstOfEach}',
|
|
|
|
),
|
|
|
|
// style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
Text(
|
|
|
|
// ),
|
|
|
|
'${context.translation.assetNumber}: ${widget.workOrder!.asset!.assetNumber}',
|
|
|
|
InfoTextWidget(label: context.translation.assetNumber,value:widget.workOrder!.asset!.assetNumber ,),
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
// Text(
|
|
|
|
),
|
|
|
|
// '${context.translation.assetNumber}: ${widget.workOrder!.asset!.assetNumber}',
|
|
|
|
Text(
|
|
|
|
// style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
'${context.translation.serialNo}: ${widget.workOrder!.asset!.assetSerialNo}',
|
|
|
|
// ),
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
InfoTextWidget(label: context.translation.serialNo,value:widget.workOrder!.asset!.assetSerialNo ,),
|
|
|
|
),
|
|
|
|
InfoTextWidget(label: context.translation.model,value:widget.workOrder!.model?.name!.cleanupWhitespace.capitalizeFirstOfEach,),
|
|
|
|
Text(
|
|
|
|
InfoTextWidget(label: context.translation.manufacture,value:widget.workOrder!.manufacturer?.name?.cleanupWhitespace.capitalizeFirstOfEach),
|
|
|
|
'${context.translation.model}: ${widget.workOrder!.model?.name!.cleanupWhitespace.capitalizeFirstOfEach}',
|
|
|
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
// Text(
|
|
|
|
),
|
|
|
|
// '${context.translation.serialNo}: ${widget.workOrder!.asset!.assetSerialNo}',
|
|
|
|
Text(
|
|
|
|
// style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
'${context.translation.manufacture}: ${widget.workOrder!.manufacturer?.name?.cleanupWhitespace.capitalizeFirstOfEach}',
|
|
|
|
// ),
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
// Text(
|
|
|
|
),
|
|
|
|
// '${context.translation.model}: ${widget.workOrder!.model?.name!.cleanupWhitespace.capitalizeFirstOfEach}',
|
|
|
|
|
|
|
|
// style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Text(
|
|
|
|
|
|
|
|
// '${context.translation.manufacture}: ${widget.workOrder!.manufacturer?.name?.cleanupWhitespace.capitalizeFirstOfEach}',
|
|
|
|
|
|
|
|
// style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
16.height,
|
|
|
|
16.height,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
...doctorInfoSection(),
|
|
|
|
...doctorInfoSection(),
|
|
|
|
@ -228,7 +236,8 @@ class _CreateLoanRequestPageState extends State<CreateLoanRequestPage> with Tick
|
|
|
|
|
|
|
|
|
|
|
|
List<Widget> doctorInfoSection() {
|
|
|
|
List<Widget> doctorInfoSection() {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
context.translation.contactInfo.bodyText(context).custom(color: AppColor.black10),
|
|
|
|
InfoHeaderWidget(context.translation.contactInfo),
|
|
|
|
|
|
|
|
// context.translation.contactInfo.bodyText(context).custom(color: AppColor.black10),
|
|
|
|
8.height,
|
|
|
|
8.height,
|
|
|
|
AppTextFormField(
|
|
|
|
AppTextFormField(
|
|
|
|
initialValue: "",
|
|
|
|
initialValue: "",
|
|
|
|
@ -288,7 +297,7 @@ class _CreateLoanRequestPageState extends State<CreateLoanRequestPage> with Tick
|
|
|
|
|
|
|
|
|
|
|
|
List<Widget> itemDetailsSection() {
|
|
|
|
List<Widget> itemDetailsSection() {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
'Item Details'.addTranslation.bodyText(context).custom(color: AppColor.black10),
|
|
|
|
InfoHeaderWidget('Item Details'.addTranslation),
|
|
|
|
8.height,
|
|
|
|
8.height,
|
|
|
|
SingleItemDropDownMenu<MappedSite, MappedSiteProvider>(
|
|
|
|
SingleItemDropDownMenu<MappedSite, MappedSiteProvider>(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
@ -442,7 +451,7 @@ class _CreateLoanRequestPageState extends State<CreateLoanRequestPage> with Tick
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
'Vendor Details'.addTranslation.bodyText(context).custom(color: AppColor.black10),
|
|
|
|
InfoHeaderWidget('Vendor Details'.addTranslation),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
|