From c6e66e82e84508e5691e17dd5caf61425ed828ce Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 22 Oct 2025 10:11:37 +0300 Subject: [PATCH 1/4] ppm external type id changed to value. --- .../ppm_wo/update_ppm/ppm_external_details_form.dart | 4 ++-- lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart | 2 +- lib/modules/pm_module/ppm_wo/update_ppm/wo_info_form.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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 68da0fc5..046001b0 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 @@ -104,7 +104,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 75a7ed6b..b0b68432 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 @@ -268,7 +268,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; From 985d55986085d69e4dda4a623e17e14813166dc0 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 22 Oct 2025 16:30:36 +0300 Subject: [PATCH 2/4] ppm update button hide for end user. & status color changed. --- .../components/service_request_detail_view.dart | 10 +++++----- lib/modules/pm_module/ppm_wo/ppm_details_page.dart | 14 +++++++------- lib/new_views/app_style/app_color.dart | 9 +++++++++ lib/views/widgets/requests/request_status.dart | 8 ++++---- 4 files changed, 25 insertions(+), 16 deletions(-) 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 f74c2c11..8ed34f3b 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 78d8cefe..5cc61615 100644 --- a/lib/modules/pm_module/ppm_wo/ppm_details_page.dart +++ b/lib/modules/pm_module/ppm_wo/ppm_details_page.dart @@ -117,13 +117,13 @@ class _PpmDetailsPageState extends State { ).paddingAll(16) ] else ...[ - AppFilledButton( - onPressed: () async { - await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdatePpm(ppm: null, planPreventiveVisit: planPreventiveVisit))); - getVisitData(); - }, - label: context.translation.viewDetails, - ).paddingAll(16) + // AppFilledButton( + // onPressed: () async { + // await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdatePpm(ppm: null, planPreventiveVisit: planPreventiveVisit))); + // getVisitData(); + // }, + // label: context.translation.viewDetails, + // ).paddingAll(16) ] ]):const Center(child: NoDataFound()); }), diff --git a/lib/new_views/app_style/app_color.dart b/lib/new_views/app_style/app_color.dart index 22a12370..bbcd289e 100644 --- a/lib/new_views/app_style/app_color.dart +++ b/lib/new_views/app_style/app_color.dart @@ -258,6 +258,11 @@ static Color getActivityTypeTextColor(String type) { return green15; case 370: return green15; + case 0: + return green15; + case 1: + //high priority + return white10; case 82: //high priority return white10; @@ -273,9 +278,13 @@ static Color getActivityTypeTextColor(String type) { 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( From ea54aea1f6248b4a3935af794d0a5b68bc9cff55 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 22 Oct 2025 16:31:29 +0300 Subject: [PATCH 3/4] 1.3.11+30 uploaded on stores. --- lib/controllers/api_routes/urls.dart | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/controllers/api_routes/urls.dart b/lib/controllers/api_routes/urls.dart index cd20cdc9..20a693b9 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/pubspec.yaml b/pubspec.yaml index 1f67dfc8..4e5de8ae 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" From 46fd537c3abbf16578bf5ef78a2b7ad006e564cd Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 4 Nov 2025 12:20:49 +0300 Subject: [PATCH 4/4] global health ui improvements added. --- .../widgets/app_bar_widget.dart | 4 ++-- .../widgets/request_category_fragment.dart | 2 +- lib/extensions/context_extension.dart | 9 ++++++++- .../common_widgets/app_text_form_field.dart | 17 +++++++++++++---- .../create_request-type_bottomsheet.dart | 2 +- lib/new_views/pages/login_page.dart | 10 ++++++---- 6 files changed, 31 insertions(+), 13 deletions(-) diff --git a/lib/dashboard_latest/widgets/app_bar_widget.dart b/lib/dashboard_latest/widgets/app_bar_widget.dart index f65ed034..2ec335be 100644 --- a/lib/dashboard_latest/widgets/app_bar_widget.dart +++ b/lib/dashboard_latest/widgets/app_bar_widget.dart @@ -48,11 +48,11 @@ class AppBarWidget extends StatelessWidget { children: [ Text( snapshot.user?.username ?? "", // Simplified null check - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50, fontWeight: FontWeight.w600), + style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50, fontWeight: FontWeight.w600, fontSize: context.isTablet() ? 14 : null), ), Text( snapshot.user?.type?.name.toCamelCase ?? "", // Simplified null check - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral20), + style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral20, fontSize: context.isTablet() ? 12 : null), ), ], ), diff --git a/lib/dashboard_latest/widgets/request_category_fragment.dart b/lib/dashboard_latest/widgets/request_category_fragment.dart index 95af0330..0736fe80 100644 --- a/lib/dashboard_latest/widgets/request_category_fragment.dart +++ b/lib/dashboard_latest/widgets/request_category_fragment.dart @@ -73,7 +73,7 @@ class RequestCategoryFragment extends StatelessWidget { Widget getTabs({required BuildContext context, required DashBoardProvider requestsProvider, required UsersTypes? userType}) { List tabs = CategoryTabs.getTabs(userType: userType ?? UsersTypes.normal_user, context: context); return SizedBox( - height: 44 + 16, + height: 44 + (context.isTablet() ? 36 : 16), child: ListView.separated( scrollDirection: Axis.horizontal, separatorBuilder: (cxt, index) => 12.width, diff --git a/lib/extensions/context_extension.dart b/lib/extensions/context_extension.dart index 1f36d4ba..85299f73 100644 --- a/lib/extensions/context_extension.dart +++ b/lib/extensions/context_extension.dart @@ -19,7 +19,14 @@ extension BuildContextExtension on BuildContext { SettingProvider get settingProvider => Provider.of(this, listen: false); UserProvider get userProvider => Provider.of(this, listen: false); - + bool isTablet() { + final mediaQueryData = MediaQuery.of(this); + final double screenWidth = mediaQueryData.size.width; + final double screenHeight = mediaQueryData.size.height; + final double devicePixelRatio = mediaQueryData.devicePixelRatio; + bool isTablet = (devicePixelRatio < 2 && (screenWidth >= 700 || screenHeight >= 700)) || (devicePixelRatio >= 2 && (screenWidth >= 1000 || screenHeight >= 1000)); + return isTablet; + } void showConfirmDialog(String message, {String? title, VoidCallback? onTap}) => showDialog( context: this, builder: (BuildContext cxt) => ConfirmDialog(message: message, onTap: onTap, title: title), diff --git a/lib/new_views/common_widgets/app_text_form_field.dart b/lib/new_views/common_widgets/app_text_form_field.dart index 2434230c..02cb825b 100644 --- a/lib/new_views/common_widgets/app_text_form_field.dart +++ b/lib/new_views/common_widgets/app_text_form_field.dart @@ -25,6 +25,7 @@ class AppTextFormField extends StatefulWidget { final TextStyle? style; final TextStyle? labelStyle; final TextStyle? hintStyle; + final TextStyle? floatingLabelStyle; final bool enable; final TextAlign? textAlign; final FocusNode? node; @@ -58,6 +59,7 @@ class AppTextFormField extends StatefulWidget { this.hintText, this.labelText, this.hintStyle, + this.floatingLabelStyle, this.textInputType = TextInputType.text, this.initialValue, // Provide default value this.enable = true, @@ -183,12 +185,16 @@ class _AppTextFormFieldState extends State { onChanged: widget.onChange, obscureText: widget.obscureText ?? false, keyboardType: widget.textInputType, - maxLines: widget.makeMultiLinesNull ? null:widget.textInputType == TextInputType.multiline ? 4 : 1, + maxLines: widget.makeMultiLinesNull + ? null + : widget.textInputType == TextInputType.multiline + ? 4 + : 1, obscuringCharacter: "*", controller: widget.controller, textInputAction: widget.textInputType == TextInputType.multiline ? null : widget.textInputAction ?? TextInputAction.next, onEditingComplete: widget.onAction ?? () => FocusScope.of(context).nextFocus(), - style: widget.style ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500,color:context.isDark?AppColor.white10: AppColor.black10), + style: widget.style ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.black10), onTap: widget.onTap, decoration: InputDecoration( alignLabelWithHint: widget.alignLabelWithHint, @@ -208,9 +214,12 @@ class _AppTextFormFieldState extends State { ? (widget.enableColor ?? AppColor.neutral40) : AppColor.background(context)), errorStyle: AppTextStyle.tiny.copyWith(color: context.isDark ? AppColor.red50 : AppColor.red60), - floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.neutral20), + floatingLabelStyle: widget.floatingLabelStyle ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.neutral20), hintText: widget.hintText ?? "", - labelText: (widget.showSpeechToText && _speechToText.isListening) ? "Listening..." : widget.labelText ?? "", + // labelText: (widget.showSpeechToText && _speechToText.isListening) ? "Listening..." : widget.labelText ?? "", + label: Text( + (widget.showSpeechToText && _speechToText.isListening) ? "Listening..." : widget.labelText ?? "", + ), labelStyle: widget.labelStyle, hintStyle: widget.labelStyle, prefixIcon: widget.prefixIcon ?? diff --git a/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart b/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart index edd2ba89..20478b13 100644 --- a/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart +++ b/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart @@ -72,7 +72,7 @@ class CreateRequestTypeBottomSheet extends StatelessWidget { size: 32, ), //24.height, - label.bodyText2(context).custom(color: context.isDark ? Colors.white : AppColor.black20), + label.bodyText2(context).custom(color: context.isDark ? Colors.white : AppColor.black20, fontSize: context.isTablet() ? 10.toScreenWidth : null), ], ), ), diff --git a/lib/new_views/pages/login_page.dart b/lib/new_views/pages/login_page.dart index 35eb9134..8c54e927 100644 --- a/lib/new_views/pages/login_page.dart +++ b/lib/new_views/pages/login_page.dart @@ -110,8 +110,9 @@ class _LoginPageState extends State { backgroundColor: AppColor.fieldBgColor(context), validator: (value) => Validator.hasValue(value!) ? null : context.translation.requiredField, labelText: context.translation.username, - style: TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), - labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 11, color: context.isDark ? Colors.white : const Color(0xff767676)), + style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), + floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), + labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), textInputType: TextInputType.text, showWithoutDecoration: true, contentPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 12.toScreenHeight), @@ -125,8 +126,9 @@ class _LoginPageState extends State { showWithoutDecoration: true, labelText: context.translation.password, backgroundColor: AppColor.fieldBgColor(context), - style: TextStyle(fontWeight: FontWeight.w500, fontSize: 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), - labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 11, color: context.isDark ? Colors.white : const Color(0xff767676)), + style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), + labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), + floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), contentPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 12.toScreenHeight), obscureText: !_passwordVisible, suffixIcon: Icon(