diff --git a/assets/images/download.svg b/assets/images/download.svg new file mode 100644 index 00000000..501106de --- /dev/null +++ b/assets/images/download.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/filter.svg b/assets/images/filter.svg new file mode 100644 index 00000000..489d2128 --- /dev/null +++ b/assets/images/filter.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/wo/cm_wo.svg b/assets/images/wo/cm_wo.svg new file mode 100644 index 00000000..617657fd --- /dev/null +++ b/assets/images/wo/cm_wo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/wo/demo_wo.svg b/assets/images/wo/demo_wo.svg new file mode 100644 index 00000000..03674ffc --- /dev/null +++ b/assets/images/wo/demo_wo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/wo/device_transfer_wo.svg b/assets/images/wo/device_transfer_wo.svg new file mode 100644 index 00000000..afd843bd --- /dev/null +++ b/assets/images/wo/device_transfer_wo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/wo/gas_refill_wo.svg b/assets/images/wo/gas_refill_wo.svg new file mode 100644 index 00000000..e3ea6f43 --- /dev/null +++ b/assets/images/wo/gas_refill_wo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/lib/modules/export_module/pages/export_form_view.dart b/lib/modules/export_module/pages/export_form_view.dart index cffc0be0..446524dd 100644 --- a/lib/modules/export_module/pages/export_form_view.dart +++ b/lib/modules/export_module/pages/export_form_view.dart @@ -71,13 +71,7 @@ class _ExportFormViewState extends State> { @override Widget build(BuildContext context) { return Scaffold( - appBar: DefaultAppBar( - title: 'Export', - titleStyle: AppTextStyles.heading3.copyWith( - fontWeight: FontWeight.w500, - color: Theme.of(context).brightness == Brightness.dark ? AppColor.neutral30 : AppColor.neutral50, - ), - ), + appBar: const DefaultAppBar(title: 'Export'), body: Column( children: [ Expanded( 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 8946ebc7..5fa4e229 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 @@ -69,20 +69,19 @@ class CreateRequestTypeBottomSheet extends StatelessWidget { onTap: onTap, child: Container( constraints: BoxConstraints(minWidth: 111.toScreenWidth, minHeight: 111.toScreenHeight), - padding: EdgeInsets.symmetric(horizontal: 12.toScreenWidth, vertical: 12.toScreenHeight), - decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), border: Border.all(width: 1, color: AppColor.white70)), + padding: EdgeInsets.all(12.toScreenWidth), + decoration: BoxDecoration( + color: AppColor.background(context), + borderRadius: BorderRadius.circular(16), + border: Border.all(color: AppColor.borderColor(context), width: 2), + ), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Icon( - Icons.add_circle, - color: AppColor.iconColor(context), - size: 32, - ), - //24.height, - label.bodyText2(context).custom(color: context.isDark ? Colors.white : AppColor.black20, fontSize: context.isTablet() ? 10.toScreenWidth : null), + icon.toSvgAsset(width: 24, height: 24, color: AppColor.icon2Color(context)), + label.bodyText2(context).custom(color: AppColor.labelTextStyleColor(context), fontSize: context.isTablet() ? 10.toScreenWidth : null), ], ), ), @@ -122,7 +121,7 @@ class CreateRequestModel { list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id)); } else if (context.userProvider.isEngineer) { if (Provider.of(context, listen: false).engineerCanCreateCM) { - list.add(CreateRequestModel(context.translation.correctiveMaintenance, "add_icon", CreateCMRequest.id)); + list.add(CreateRequestModel(context.translation.correctiveMaintenance, "wo/cm_wo", CreateCMRequest.id)); } //TODO uncommit this to enable task. @@ -132,9 +131,9 @@ class CreateRequestModel { list.add(CreateRequestModel('Medical Gas'.addTranslation, "add_icon", CreateMedicalGasRequestPage.id)); } } else { - list.add(CreateRequestModel(context.translation.correctiveMaintenance, "add_icon", CreateCMRequest.id)); - list.add(CreateRequestModel(context.translation.gasRefill, "add_icon", GasRefillRequestForm.routeName)); - list.add(CreateRequestModel(context.translation.transferAsset, "add_icon", CreateDeviceTransferRequest.id)); + 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)); // context.userProvider.modulesPermissionsList.forEach((module) { // if (module.module!.value! == 9) { @@ -153,7 +152,7 @@ class CreateRequestModel { list.add(CreateRequestModel("TRAF".addTranslation, "add_icon", CreateTRAFRequestPage.id)); } if (module.module!.value! == 15 && (module.canAdd ?? false)) { - list.add(CreateRequestModel('Demo Request'.addTranslation, "add_icon", CreateDemoRequestPage.id)); + list.add(CreateRequestModel('Demo Request'.addTranslation, "wo/demo_wo", CreateDemoRequestPage.id)); } }); if (!context.userProvider.isNurse && context.settingProvider.isUserFlowMedical) { diff --git a/lib/new_views/pages/land_page/my_request/my_requests_page.dart b/lib/new_views/pages/land_page/my_request/my_requests_page.dart index 69fcb175..b8b0c850 100644 --- a/lib/new_views/pages/land_page/my_request/my_requests_page.dart +++ b/lib/new_views/pages/land_page/my_request/my_requests_page.dart @@ -2,6 +2,7 @@ import 'dart:developer'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:test_sa/controllers/providers/api/all_requests_provider.dart'; @@ -143,41 +144,42 @@ class _MyRequestsPageState extends State { ], ), ).onPress(() async { - final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => AllRequestsSearchPage(data: _search))); + final result = await Navigator.push(context, CupertinoPageRoute(builder: (context) => AllRequestsSearchPage(data: _search))); if (result != null) { _search = result; setState(() {}); } }).expanded, 16.width, - Text( - 'Export', - style: AppTextStyles.bodyText2.copyWith(color: AppColor.blueStatus(context)), - ).onPress(() async { - final provider = Provider.of(context, listen: false); - await Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ExportFormView( - searchModel: _search, - moduleType: ExportModuleType.callRequest, - pageNo: provider.pageItemNumber, - pageSize: (provider.allRequestsAndCount?.requestsDetails?.length ?? 0) ~/ (provider.pageItemNumber > 0 ? provider.pageItemNumber : 1) + 1, + IconButton( + icon: "download".toSvgAsset(height: 24, width: 24, color: AppColor.icon2Color(context)), + padding: EdgeInsets.zero, + onPressed: () async { + final provider = Provider.of(context, listen: false); + await Navigator.push( + context, + CupertinoPageRoute( + builder: (context) => ExportFormView( + searchModel: _search, + moduleType: ExportModuleType.callRequest, + pageNo: provider.pageItemNumber, + pageSize: (provider.allRequestsAndCount?.requestsDetails?.length ?? 0) ~/ (provider.pageItemNumber > 0 ? provider.pageItemNumber : 1) + 1, + ), ), - ), - ); - }), - 16.width, - Text( - context.translation.filter, - style: AppTextStyles.bodyText2.copyWith(color: AppColor.blueStatus(context)), - ).onPress(() async { - final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => AllRequestsFilterPage(data: _search))); - if (result != null) { - _search = result; - setState(() {}); - } - }), + ); + }, + ), + IconButton( + icon: "filter".toSvgAsset(height: 24, width: 24, color: AppColor.icon2Color(context)), + padding: EdgeInsets.zero, + onPressed: () async { + final result = await Navigator.push(context, CupertinoPageRoute(builder: (context) => AllRequestsFilterPage(data: _search))); + if (result != null) { + _search = result; + setState(() {}); + } + }, + ), ], ).paddingOnly(start: 16, end: 16), ), diff --git a/lib/new_views/pages/land_page/widgets/request_item_view_list.dart b/lib/new_views/pages/land_page/widgets/request_item_view_list.dart index e0005278..edec75d5 100644 --- a/lib/new_views/pages/land_page/widgets/request_item_view_list.dart +++ b/lib/new_views/pages/land_page/widgets/request_item_view_list.dart @@ -84,7 +84,7 @@ class RequestItemViewList extends StatelessWidget { ); } }, - separatorBuilder: (cxt, index) => 16.height, + separatorBuilder: (cxt, index) => 12.height, itemCount: isLoading ? 6 : list.length); } } diff --git a/lib/new_views/swipe_module/utils/swipe_general_utils.dart b/lib/new_views/swipe_module/utils/swipe_general_utils.dart index b26532d3..b5b71ae8 100644 --- a/lib/new_views/swipe_module/utils/swipe_general_utils.dart +++ b/lib/new_views/swipe_module/utils/swipe_general_utils.dart @@ -118,7 +118,7 @@ class SwipeGeneralUtils { padding: const EdgeInsets.all(12), decoration: BoxDecoration( color: isEnabled ? AppColor.background(context) : AppColor.tabBarBackground(context), - borderRadius: BorderRadius.circular(18), + borderRadius: BorderRadius.circular(16), border: Border.all(color: AppColor.borderColor(context), width: 2), ), child: Column( diff --git a/lib/views/widgets/equipment/single_device_picker.dart b/lib/views/widgets/equipment/single_device_picker.dart index 652c98c6..62aca8c9 100644 --- a/lib/views/widgets/equipment/single_device_picker.dart +++ b/lib/views/widgets/equipment/single_device_picker.dart @@ -1,3 +1,4 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:test_sa/controllers/providers/api/devices_provider.dart'; @@ -122,42 +123,38 @@ class _MyAssetsPageState extends State { _searchableList.addAll(_devicesProvider.devices); }).expanded, 16.width, - Icon( - Icons.grid_view_outlined, - color: context.isDark ? AppColor.neutral10 : AppColor.neutral20, - ).onPress(() => setState(() { + Icon(Icons.grid_view_outlined, color: AppColor.icon2Color(context)).onPress(() => setState(() { showListView = !showListView; })), - 16.width, - Text( - context.translation.filter, - style: AppTextStyles.bodyText2.copyWith(color: AppColor.blueStatus(context)), - ).onPress(() async { - final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => DeviceFilterScreen(data: _searchAsset))); - if (result != null) { - _searchAsset = result; - } - _searchableList.clear(); - _searchableList.addAll(_devicesProvider.devices); - }), - 16.width, - Text( - 'Export', - style: AppTextStyles.bodyText2.copyWith(color: AppColor.blueStatus(context)), - ).onPress(() async { - await Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ExportFormView( - searchModel: _searchAsset, - moduleType: ExportModuleType.asset, - pageNo: _devicesProvider.pageItemNumber, - pageSize:_devicesProvider.devices.length ~/ _devicesProvider.pageItemNumber + 1 , + IconButton( + icon: "download".toSvgAsset(height: 24, width: 24, color: AppColor.icon2Color(context)), + padding: EdgeInsets.zero, + onPressed: () async { + await Navigator.push( + context, + CupertinoPageRoute( + builder: (context) => ExportFormView( + searchModel: _searchAsset, + moduleType: ExportModuleType.asset, + pageNo: _devicesProvider.pageItemNumber, + pageSize: _devicesProvider.devices.length ~/ _devicesProvider.pageItemNumber + 1, + ), ), - ), - ); - }), - 16.width, + ); + }, + ), + IconButton( + icon: "filter".toSvgAsset(height: 24, width: 24, color: AppColor.icon2Color(context)), + padding: EdgeInsets.zero, + onPressed: () async { + final result = await Navigator.push(context, CupertinoPageRoute(builder: (context) => DeviceFilterScreen(data: _searchAsset))); + if (result != null) { + _searchAsset = result; + } + _searchableList.clear(); + _searchableList.addAll(_devicesProvider.devices); + }, + ), ], ).paddingOnly(start: 16, end: 16), ), diff --git a/pubspec.yaml b/pubspec.yaml index f877f774..27055b4d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -138,6 +138,7 @@ flutter: - assets/audio/ - assets/images/ - assets/images/dashboard/ + - assets/images/wo/ - assets/lottie/ - assets/subtitles/ - assets/rives/