From 4b5150eb69c474e6d7993fe9f9feb4cf30401f11 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Sun, 10 May 2026 15:12:40 +0300 Subject: [PATCH] icons added. --- assets/images/delete.svg | 3 +++ assets/images/edit_icon.svg | 8 ++++---- assets/images/wo/equipment_audit_wo.svg | 4 ++++ assets/images/wo/incident_wo.svg | 3 +++ assets/images/wo/system_audit_wo.svg | 4 ++++ assets/images/wo/task_wo.svg | 4 ++++ assets/images/wo/traf_wo.svg | 5 +++++ .../widgets/cleaner_checklist_widget.dart | 2 +- .../components/service_request_detail_view.dart | 7 ++++--- .../widgets/cleaner_checklist_widget.dart | 2 +- .../traf_module/create_traf_request_page.dart | 2 +- lib/new_views/app_style/app_color.dart | 2 ++ .../create_request_type_bottom_sheet.dart | 16 ++++++++-------- lib/views/widgets/equipment/asset_picker.dart | 6 +----- lib/views/widgets/timer/app_timer.dart | 2 +- 15 files changed, 46 insertions(+), 24 deletions(-) create mode 100644 assets/images/delete.svg create mode 100644 assets/images/wo/equipment_audit_wo.svg create mode 100644 assets/images/wo/incident_wo.svg create mode 100644 assets/images/wo/system_audit_wo.svg create mode 100644 assets/images/wo/task_wo.svg create mode 100644 assets/images/wo/traf_wo.svg diff --git a/assets/images/delete.svg b/assets/images/delete.svg new file mode 100644 index 00000000..7fdfe788 --- /dev/null +++ b/assets/images/delete.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/edit_icon.svg b/assets/images/edit_icon.svg index 3b49167b..fda0002c 100644 --- a/assets/images/edit_icon.svg +++ b/assets/images/edit_icon.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/assets/images/wo/equipment_audit_wo.svg b/assets/images/wo/equipment_audit_wo.svg new file mode 100644 index 00000000..613c2a1a --- /dev/null +++ b/assets/images/wo/equipment_audit_wo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/wo/incident_wo.svg b/assets/images/wo/incident_wo.svg new file mode 100644 index 00000000..def3594b --- /dev/null +++ b/assets/images/wo/incident_wo.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/wo/system_audit_wo.svg b/assets/images/wo/system_audit_wo.svg new file mode 100644 index 00000000..bc1990f7 --- /dev/null +++ b/assets/images/wo/system_audit_wo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/wo/task_wo.svg b/assets/images/wo/task_wo.svg new file mode 100644 index 00000000..a9504573 --- /dev/null +++ b/assets/images/wo/task_wo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/wo/traf_wo.svg b/assets/images/wo/traf_wo.svg new file mode 100644 index 00000000..92a07332 --- /dev/null +++ b/assets/images/wo/traf_wo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/lib/modules/cleaner_module/widgets/cleaner_checklist_widget.dart b/lib/modules/cleaner_module/widgets/cleaner_checklist_widget.dart index 9f6f117b..12d22165 100644 --- a/lib/modules/cleaner_module/widgets/cleaner_checklist_widget.dart +++ b/lib/modules/cleaner_module/widgets/cleaner_checklist_widget.dart @@ -368,7 +368,7 @@ class _CleanerChecklistWidgetState extends State { borderRadius: BorderRadius.circular(30), //boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)], ), - child: const Icon(Icons.delete_rounded, color: Color(0xffF63939))) + child: "delete".toSvgAsset()) .onPress(() { widget.onImageCaptured?.call(null); }); 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 e61a2591..01a5ac5c 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 @@ -22,6 +22,7 @@ import 'package:test_sa/new_views/app_style/app_color.dart'; import 'package:test_sa/new_views/common_widgets/app_filled_button.dart'; import 'package:test_sa/views/widgets/images/files_list.dart'; import 'package:test_sa/views/widgets/images/multi_image_picker.dart'; +import 'package:test_sa/views/widgets/item_views/info_text_widget.dart'; import 'package:test_sa/views/widgets/loaders/no_data_found.dart'; import 'package:test_sa/views/widgets/requests/request_status.dart'; import 'package:test_sa/views/widgets/sound/sound_player.dart'; @@ -505,7 +506,7 @@ class _ServiceRequestDetailViewState extends State { style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), ).expanded, if (!provider.isReadOnlyRequest) - "edit_icon".toSvgAsset(height: 21, width: 21, color: context.isDark ? AppColor.primary10 : null).onPress(() async { + "edit_icon".toSvgAsset(height: 24, width: 24, color: AppColor.icon2Color(context)).onPress(() async { provider.refreshTimer = false; await Navigator.push(context, MaterialPageRoute(builder: (context) => CostDetailFormScreen(isEdit: true))); provider.refreshTimer = true; @@ -551,7 +552,7 @@ class _ServiceRequestDetailViewState extends State { ], ), ], - ).toShadowContainer(context, padding: 12); + ).toShadowContainer(context); } Widget assetRetiredButton({required BuildContext context}) { @@ -560,7 +561,7 @@ class _ServiceRequestDetailViewState extends State { child: AppFilledButton( label: context.translation.assetToBeRetired, maxWidth: true, - buttonColor: Colors.white54, + buttonColor: AppColor.background(context), textColor: AppColor.red30, showBorder: true, onPressed: () async { diff --git a/lib/modules/export_module/widgets/cleaner_checklist_widget.dart b/lib/modules/export_module/widgets/cleaner_checklist_widget.dart index 9f6f117b..12d22165 100644 --- a/lib/modules/export_module/widgets/cleaner_checklist_widget.dart +++ b/lib/modules/export_module/widgets/cleaner_checklist_widget.dart @@ -368,7 +368,7 @@ class _CleanerChecklistWidgetState extends State { borderRadius: BorderRadius.circular(30), //boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)], ), - child: const Icon(Icons.delete_rounded, color: Color(0xffF63939))) + child: "delete".toSvgAsset()) .onPress(() { widget.onImageCaptured?.call(null); }); diff --git a/lib/modules/traf_module/create_traf_request_page.dart b/lib/modules/traf_module/create_traf_request_page.dart index 8a7f5435..ce3818f4 100644 --- a/lib/modules/traf_module/create_traf_request_page.dart +++ b/lib/modules/traf_module/create_traf_request_page.dart @@ -308,7 +308,7 @@ class _CreateTRAFRequestPageState extends State { title: Text("Name: ${userBasedOnSearch[index].userName ?? ""}"), subtitle: Text( "Position: ${userBasedOnSearch[index].position ?? "-"}\nEmail: ${userBasedOnSearch[index].email ?? ""}\nPhone: ${userBasedOnSearch[index].phoneNumber ?? ""}"), - trailing: const Icon(Icons.delete_rounded, color: Color(0xffF63939), size: 20).onPress(() { + trailing: "delete".toSvgAsset().onPress(() { userBasedOnSearch.removeAt(index); setState(() {}); }), diff --git a/lib/new_views/app_style/app_color.dart b/lib/new_views/app_style/app_color.dart index e5a249b0..1a021c19 100644 --- a/lib/new_views/app_style/app_color.dart +++ b/lib/new_views/app_style/app_color.dart @@ -90,6 +90,8 @@ class AppColor { static const Color orange60 = Color(0xff886400); static const Color orange70 = Color(0xffFFC945); static const Color orange80 = Color(0xff65531B); + static const Color yellowBgColor = Color(0xffF4DC92); + static const Color yellowTextColor = Color(0xff65531B); // new UI colors diff --git a/lib/new_views/pages/land_page/create_request_type_bottom_sheet.dart b/lib/new_views/pages/land_page/create_request_type_bottom_sheet.dart index 5fa4e229..7c1bdb87 100644 --- a/lib/new_views/pages/land_page/create_request_type_bottom_sheet.dart +++ b/lib/new_views/pages/land_page/create_request_type_bottom_sheet.dart @@ -115,26 +115,26 @@ class CreateRequestModel { // } // }); if (context.userProvider.isQualityUser && context.settingProvider.isUserFlowMedical) { - list.add(CreateRequestModel("Equipment Internal Audit Checklist".addTranslation, "add_icon", CreateEquipmentInternalAuditForm.id)); - list.add(CreateRequestModel("System Internal Audit Checklist".addTranslation, "add_icon", CreateSystemInternalAuditForm.id)); + list.add(CreateRequestModel("Equipment Internal Audit Checklist".addTranslation, "wo/equipment_audit_wo", CreateEquipmentInternalAuditForm.id)); + list.add(CreateRequestModel("System Internal Audit Checklist".addTranslation, "wo/system_audit_wo", CreateSystemInternalAuditForm.id)); } else if (context.userProvider.isAssessor && context.settingProvider.isUserFlowMedical) { - list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id)); + list.add(CreateRequestModel("TRAF".addTranslation, "wo/traf_wo", CreateTRAFRequestPage.id)); } else if (context.userProvider.isEngineer) { if (Provider.of(context, listen: false).engineerCanCreateCM) { list.add(CreateRequestModel(context.translation.correctiveMaintenance, "wo/cm_wo", CreateCMRequest.id)); } //TODO uncommit this to enable task. - list.add(CreateRequestModel(context.translation.task, "add_icon", CreateTaskView.id)); + list.add(CreateRequestModel(context.translation.task, "wo/task_wo", CreateTaskView.id)); //Need to add check from permission Api. if ((context.settingProvider.isUserFlowMedical)) { - list.add(CreateRequestModel('Medical Gas'.addTranslation, "add_icon", CreateMedicalGasRequestPage.id)); + list.add(CreateRequestModel('Medical Gas'.addTranslation, "wo/gas_refill_wo", CreateMedicalGasRequestPage.id)); } } else { list.add(CreateRequestModel(context.translation.correctiveMaintenance, "wo/cm_wo", CreateCMRequest.id)); list.add(CreateRequestModel(context.translation.gasRefill, "wo/gas_refill_wo", GasRefillRequestForm.routeName)); list.add(CreateRequestModel(context.translation.transferAsset, "wo/device_transfer_wo", CreateDeviceTransferRequest.id)); - list.add(CreateRequestModel(context.translation.task, "add_icon", CreateTaskView.id)); + list.add(CreateRequestModel(context.translation.task, "wo/task_wo", CreateTaskView.id)); // context.userProvider.modulesPermissionsList.forEach((module) { // if (module.module!.value! == 9) { // list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id)); @@ -149,14 +149,14 @@ class CreateRequestModel { context.userProvider.modulesPermissionsList.forEach((module) { if (module.module!.value! == 9 && (module.canAdd ?? false)) { - list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id)); + list.add(CreateRequestModel("TRAF".addTranslation, "wo/traf_wo", CreateTRAFRequestPage.id)); } if (module.module!.value! == 15 && (module.canAdd ?? false)) { list.add(CreateRequestModel('Demo Request'.addTranslation, "wo/demo_wo", CreateDemoRequestPage.id)); } }); if (!context.userProvider.isNurse && context.settingProvider.isUserFlowMedical) { - list.add(CreateRequestModel("Incident Management", "add_icon", CreateIncidentRequestPage.id)); + list.add(CreateRequestModel("Incident Management", "wo/incident_wo", CreateIncidentRequestPage.id)); } return list; } diff --git a/lib/views/widgets/equipment/asset_picker.dart b/lib/views/widgets/equipment/asset_picker.dart index d94d0d2b..fcb827d5 100644 --- a/lib/views/widgets/equipment/asset_picker.dart +++ b/lib/views/widgets/equipment/asset_picker.dart @@ -199,11 +199,7 @@ class AssetPicker extends StatelessWidget { }), if (multiSelection) ...[ 4.width, - const Icon( - Icons.delete_rounded, - color: Color(0xffF63939), - size: 20, - ).onPress(() { + "delete".toSvgAsset().onPress(() { onAssetRemove!(device.id!.toInt()); }), ] diff --git a/lib/views/widgets/timer/app_timer.dart b/lib/views/widgets/timer/app_timer.dart index dfbe4f14..b9c314e2 100644 --- a/lib/views/widgets/timer/app_timer.dart +++ b/lib/views/widgets/timer/app_timer.dart @@ -278,7 +278,7 @@ class _AppTimerState extends State { ], ).expanded, 8.width, - const Icon(Icons.delete_rounded, size: 20, color: Color(0xffF63939)).onPress(() { + "delete".toSvgAsset().onPress(() { deletePickerTime(); }) ],