diff --git a/lib/controllers/api_routes/urls.dart b/lib/controllers/api_routes/urls.dart index 2cac62b1..c88be8eb 100644 --- a/lib/controllers/api_routes/urls.dart +++ b/lib/controllers/api_routes/urls.dart @@ -1,7 +1,7 @@ class URLs { URLs._(); - static const String appReleaseBuildNumber = "26"; + static const String appReleaseBuildNumber = "28"; // static const host1 = "https://atomsm.hmg.com"; // production url // static const host1 = "https://atomsmdev.hmg.com"; // local DEV url diff --git a/lib/modules/cm_module/views/components/service_request_detail_view.dart b/lib/modules/cm_module/views/components/service_request_detail_view.dart index cb63de73..992c0060 100644 --- a/lib/modules/cm_module/views/components/service_request_detail_view.dart +++ b/lib/modules/cm_module/views/components/service_request_detail_view.dart @@ -146,20 +146,20 @@ class _ServiceRequestDetailViewState extends State { if (Provider.of(context, listen: false).showPriority) ...[ StatusLabel( label: workOrder.priority?.name, - id: workOrder.priority!.id!, + id: workOrder.priority!.value!, radius: 4, - textColor: AppColor.getPriorityStatusTextColor(context, workOrder.priority!.id!), - backgroundColor: AppColor.getPriorityStatusColor(context, workOrder.priority!.id!), + textColor: AppColor.getPriorityStatusTextColor(context, workOrder.priority!.value!), + backgroundColor: AppColor.getPriorityStatusColor(context, workOrder.priority!.value!), ), 8.width, ], if (workOrder.itgFormWorkOrderStatus != null) ...[ StatusLabel( label: workOrder.itgFormWorkOrderStatus, - id: 0, + // id: 0, radius: 4, textColor: AppColor.getPriorityStatusTextColor(context, 82), - backgroundColor: AppColor.getPriorityStatusColor(context, 0), + backgroundColor: AppColor.getPriorityStatusColor(context, 1000), ), 8.width, ], diff --git a/lib/modules/pm_module/ppm_wo/ppm_details_page.dart b/lib/modules/pm_module/ppm_wo/ppm_details_page.dart index 0ac5b3ae..85b1d569 100644 --- a/lib/modules/pm_module/ppm_wo/ppm_details_page.dart +++ b/lib/modules/pm_module/ppm_wo/ppm_details_page.dart @@ -120,16 +120,16 @@ class _PpmDetailsPageState extends State { context: context, ) ] else ...[ - FooterActionButton.footerContainer( - context: context, - child: AppFilledButton( - onPressed: () async { - await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdatePpm(ppm: null, planPreventiveVisit: planPreventiveVisit))); - getVisitData(); - }, - label: context.translation.viewDetails, - ), - ) + // FooterActionButton.footerContainer( + // context: context, + // child: AppFilledButton( + // onPressed: () async { + // await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdatePpm(ppm: null, planPreventiveVisit: planPreventiveVisit))); + // getVisitData(); + // }, + // label: context.translation.viewDetails, + // ), + // ) ] ]) : const Center(child: NoDataFound()); diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart index 8b1be526..ad48a65f 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/ppm_external_details_form.dart @@ -58,7 +58,7 @@ class _PpmExternalDetailsFormState extends State { final ppmProvider = Provider.of(context, listen: false); return ListView.builder( itemCount: widget.models!.length + 1, - padding: const EdgeInsets.all(16), + padding: const EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 16), itemBuilder: (context, index) { if (index == widget.models!.length) { return Visibility( @@ -190,7 +190,7 @@ class _ExternalDetailItemState extends State { ), child: Icon(Icons.add, color: context.isDark ? null : AppColor.neutral60), ).onPress(() async { - if(widget.model.supplier==null) { + if (widget.model.supplier == null) { "Please select supplier".showToast; return; } diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart b/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart index e4bd68ba..4441a434 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart @@ -108,7 +108,7 @@ class _UpdatePpmState extends State with TickerProviderStateMixin { if (typeOfService == null) { return; } - if (typeOfService?.id == 66) { + if (typeOfService?.value == 2) { ppmProvider.totalTabs = 4; } else { ppmProvider.totalTabs = 3; diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart b/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart index 3cef0f21..489ea245 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart @@ -299,7 +299,7 @@ class _WoInfoFormState extends State { onSelect: (value) { if (value != null) { widget.planPreventiveVisit.typeOfService = value; - if (widget.planPreventiveVisit.typeOfService?.id == 66) { + if (widget.planPreventiveVisit.typeOfService?.value == 2) { ppmProvider.totalTabs = 4; } else { ppmProvider.totalTabs = 3; diff --git a/lib/new_views/app_style/app_color.dart b/lib/new_views/app_style/app_color.dart index 7b7df7d4..f8c42ce9 100644 --- a/lib/new_views/app_style/app_color.dart +++ b/lib/new_views/app_style/app_color.dart @@ -264,6 +264,11 @@ class AppColor { return green15; case 370: return green15; + case 0: + return green15; + case 1: + //high priority + return white10; case 82: //high priority return white10; @@ -279,9 +284,13 @@ class AppColor { return greenStatus(context); case 370: return greenStatus(context); + case 0: + return greenStatus(context); //high priority case 82: return redStatus(context); + case 1: + return redStatus(context); default: return blueStatus(context); } diff --git a/lib/views/widgets/requests/request_status.dart b/lib/views/widgets/requests/request_status.dart index b304eb51..272ddf42 100644 --- a/lib/views/widgets/requests/request_status.dart +++ b/lib/views/widgets/requests/request_status.dart @@ -11,23 +11,23 @@ class StatusLabel extends StatelessWidget { final double radius; final bool labelInCenter; - StatusLabel({Key? key, this.id = 0, this.label, this.backgroundColor, this.textColor, this.isPriority = false, this.radius = 4,this.labelInCenter=false}) : super(key: key); + StatusLabel({Key? key, this.id = 0, this.label, this.backgroundColor, this.textColor, this.isPriority = false, this.radius = 4, this.labelInCenter = false}) : super(key: key); @override Widget build(BuildContext context) { - if (id == 82) label = context.translation.highPriority; - if (id == 81) label = context.translation.lowPriority; if (label?.toLowerCase() == 'In progress'.toLowerCase()) label = context.translation.inProgress; if (label?.toLowerCase() == 'Completed'.toLowerCase()) label = context.translation.completed; if (label?.toLowerCase() == 'Open'.toLowerCase()) label = context.translation.open; if (label?.toLowerCase() == 'Closed'.toLowerCase()) label = context.translation.closed; if (label?.toLowerCase() == 'Low'.toLowerCase()) label = context.translation.lowPriority; + if (label?.toLowerCase() == 'No'.toLowerCase()) label = context.translation.lowPriority; if (label?.toLowerCase() == 'High'.toLowerCase()) label = context.translation.highPriority; + if (label?.toLowerCase() == 'Yes'.toLowerCase()) label = context.translation.highPriority; if (label?.toLowerCase() == 'Waiting for quotation'.toLowerCase()) label = context.translation.waitingForQuotation; return Container( padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10), - alignment: labelInCenter ? Alignment.center: null, + alignment: labelInCenter ? Alignment.center : null, decoration: ShapeDecoration( color: backgroundColor, shape: RoundedRectangleBorder( diff --git a/pubspec.yaml b/pubspec.yaml index a7cf4381..70641f4d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.3.10+29 +version: 1.3.11+30 environment: sdk: ">=3.5.0 <4.0.0"