diff --git a/android/local.properties b/android/local.properties index 8cd06f6..18ea619 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,4 +1,4 @@ -sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk +sdk.dir=C:/Users/Housh11/AppData/Local/Android/Sdk flutter.sdk=C:\\src\\flutter flutter.buildMode=debug flutter.versionName=1.3.33 diff --git a/assets/icons/car_allocation.svg b/assets/icons/car_allocation.svg new file mode 100644 index 0000000..22b4a5c --- /dev/null +++ b/assets/icons/car_allocation.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/direct_purchase.svg b/assets/icons/direct_purchase.svg new file mode 100644 index 0000000..1c0c12d --- /dev/null +++ b/assets/icons/direct_purchase.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/enter_cargo_information.svg b/assets/icons/enter_cargo_information.svg new file mode 100644 index 0000000..ac3243a --- /dev/null +++ b/assets/icons/enter_cargo_information.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/management_bars.svg b/assets/icons/management_bars.svg new file mode 100644 index 0000000..a2a722e --- /dev/null +++ b/assets/icons/management_bars.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/orders_received.svg b/assets/icons/orders_received.svg new file mode 100644 index 0000000..0088fd8 --- /dev/null +++ b/assets/icons/orders_received.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/submit_request.svg b/assets/icons/submit_request.svg new file mode 100644 index 0000000..8adf75c --- /dev/null +++ b/assets/icons/submit_request.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/warehouse_distribution.svg b/assets/icons/warehouse_distribution.svg new file mode 100644 index 0000000..b06ba65 --- /dev/null +++ b/assets/icons/warehouse_distribution.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/vec/car_allocation.svg.vec b/assets/vec/car_allocation.svg.vec new file mode 100644 index 0000000..9beb3dc Binary files /dev/null and b/assets/vec/car_allocation.svg.vec differ diff --git a/assets/vec/direct_purchase.svg.vec b/assets/vec/direct_purchase.svg.vec new file mode 100644 index 0000000..ca44046 Binary files /dev/null and b/assets/vec/direct_purchase.svg.vec differ diff --git a/assets/vec/enter_cargo_information.svg.vec b/assets/vec/enter_cargo_information.svg.vec new file mode 100644 index 0000000..f5b57a5 Binary files /dev/null and b/assets/vec/enter_cargo_information.svg.vec differ diff --git a/assets/vec/management_bars.svg.vec b/assets/vec/management_bars.svg.vec new file mode 100644 index 0000000..11f72ad Binary files /dev/null and b/assets/vec/management_bars.svg.vec differ diff --git a/assets/vec/orders_received.svg.vec b/assets/vec/orders_received.svg.vec new file mode 100644 index 0000000..f36169f Binary files /dev/null and b/assets/vec/orders_received.svg.vec differ diff --git a/assets/vec/submit_request.svg.vec b/assets/vec/submit_request.svg.vec new file mode 100644 index 0000000..c662259 Binary files /dev/null and b/assets/vec/submit_request.svg.vec differ diff --git a/assets/vec/warehouse_distribution.svg.vec b/assets/vec/warehouse_distribution.svg.vec new file mode 100644 index 0000000..a8e84ac Binary files /dev/null and b/assets/vec/warehouse_distribution.svg.vec differ diff --git a/packages/chicken/lib/data/common/fa_user_role.dart b/packages/chicken/lib/data/common/fa_user_role.dart index 0fcc2b7..fa616dd 100644 --- a/packages/chicken/lib/data/common/fa_user_role.dart +++ b/packages/chicken/lib/data/common/fa_user_role.dart @@ -92,7 +92,7 @@ Map getFaUserRoleWithOnTap(String? role) { case "ProvinceFinancial": return {"مالی اتحادیه": null}; case "KillHouse": - return {"کشتارگاه": null}; + return {"کشتارگاه": ChickenRoutes.initKillHouse}; case "KillHouseVet": return {"دامپزشک کشتارگاه": null}; case "VetFarm": diff --git a/packages/chicken/lib/data/models/kill_house_module/register_request/response/kill_request/kill_request_response.dart b/packages/chicken/lib/data/models/kill_house_module/register_request/response/kill_request/kill_request_response.dart deleted file mode 100644 index 2897427..0000000 --- a/packages/chicken/lib/data/models/kill_house_module/register_request/response/kill_request/kill_request_response.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; - -part 'kill_request_response.freezed.dart'; -part 'kill_request_response.g.dart'; - -@freezed -class KillRequestResponse with _$KillRequestResponse { - const factory KillRequestResponse({ - int? killCapacity, - String? reciveTime, - String? reciveDate, - bool? lowWeight, - bool? highWeight, - double? indexWeight, - String? chickenBreed, - bool? cash, - bool? credit, - bool? smsPayment, - String? killHouseKey, - String? killerKillHouseKey, - String? role, - }) = _KillRequestResponse; - - factory KillRequestResponse.fromJson(Map json) => - _$KillRequestResponseFromJson(json); -} diff --git a/packages/chicken/lib/data/models/request/kill_registration/kill_registration.freezed.dart b/packages/chicken/lib/data/models/request/kill_registration/kill_registration.freezed.dart index 91fee55..75f3864 100644 --- a/packages/chicken/lib/data/models/request/kill_registration/kill_registration.freezed.dart +++ b/packages/chicken/lib/data/models/request/kill_registration/kill_registration.freezed.dart @@ -15,7 +15,8 @@ T _$identity(T value) => value; /// @nodoc mixin _$KillRegistrationRequest { - bool? get approvedPrice; bool? get market; String? get killReqKey; String? get operatorKey; String? get poultryHatchingKey; int? get quantity; String? get sendDate; String? get chickenBreed;@JsonKey(name: "Index_weight") double? get indexWeight; String? get losses; List? get auctionList; bool? get freezing; bool? get export; bool? get cash; bool? get credit; List? get killHouseList; String? get role; String? get poultryKey; int? get amount; String? get financialOperation; bool? get freeSaleInProvince; String? get confirmPoultryMobile; + bool? get approvedPrice; bool? get market; String? get killReqKey; String? get operatorKey; String? get poultryHatchingKey; int? get quantity; String? get sendDate; String? get chickenBreed;// ignore: invalid_annotation_target +@JsonKey(name: "Index_weight") double? get indexWeight; String? get losses; List? get auctionList; bool? get freezing; bool? get export; bool? get cash; bool? get credit; List? get killHouseList; String? get role; String? get poultryKey; int? get amount; String? get financialOperation; bool? get freeSaleInProvince; String? get confirmPoultryMobile; /// Create a copy of KillRegistrationRequest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -241,6 +242,7 @@ class _KillRegistrationRequest implements KillRegistrationRequest { @override final int? quantity; @override final String? sendDate; @override final String? chickenBreed; +// ignore: invalid_annotation_target @override@JsonKey(name: "Index_weight") final double? indexWeight; @override final String? losses; final List? _auctionList; diff --git a/packages/chicken/lib/data/models/response/poultry_order/poultry_order.freezed.dart b/packages/chicken/lib/data/models/response/poultry_order/poultry_order.freezed.dart index cf022e3..a65f1c5 100644 --- a/packages/chicken/lib/data/models/response/poultry_order/poultry_order.freezed.dart +++ b/packages/chicken/lib/data/models/response/poultry_order/poultry_order.freezed.dart @@ -15,7 +15,8 @@ T _$identity(T value) => value; /// @nodoc mixin _$PoultryOrder { - String? get key; int? get id; Poultry? get poultry; int? get orderCode; String? get createDate; String? get sendDate; List? get killHouseList; int? get firstQuantity; int? get quantity; bool? get directBuying; bool? get union; double? get amount; String? get financialOperation; int? get remainQuantity;@JsonKey(name: "Index_weight") double? get indexWeight; Hatching? get hatching; String? get finalState; int? get losses; String? get provinceState; String? get stateProcess; Registrar? get registrar; VetFarm? get vetFarm; bool? get freeSaleInProvince; bool? get freezing; bool? get export; String? get cityCheckRequest; bool? get market; + String? get key; int? get id; Poultry? get poultry; int? get orderCode; String? get createDate; String? get sendDate; List? get killHouseList; int? get firstQuantity; int? get quantity; bool? get directBuying; bool? get union; double? get amount; String? get financialOperation; int? get remainQuantity;// ignore: invalid_annotation_target +@JsonKey(name: "Index_weight") double? get indexWeight; Hatching? get hatching; String? get finalState; int? get losses; String? get provinceState; String? get stateProcess; Registrar? get registrar; VetFarm? get vetFarm; bool? get freeSaleInProvince; bool? get freezing; bool? get export; String? get cityCheckRequest; bool? get market; /// Create a copy of PoultryOrder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -308,6 +309,7 @@ class _PoultryOrder implements PoultryOrder { @override final double? amount; @override final String? financialOperation; @override final int? remainQuantity; +// ignore: invalid_annotation_target @override@JsonKey(name: "Index_weight") final double? indexWeight; @override final Hatching? hatching; @override final String? finalState; diff --git a/packages/chicken/lib/presentation/pages/common/auth/logic.dart b/packages/chicken/lib/presentation/pages/common/auth/logic.dart index 17af2d5..6c349d6 100644 --- a/packages/chicken/lib/presentation/pages/common/auth/logic.dart +++ b/packages/chicken/lib/presentation/pages/common/auth/logic.dart @@ -119,17 +119,11 @@ class AuthLogic extends GetxController with GetTickerProviderStateMixin { await tokenStorageService.saveModule(_module); await tokenStorageService.saveAccessToken(_module, result?.accessToken ?? ''); await tokenStorageService.saveRefreshToken(_module, result?.accessToken ?? ''); - var tmpRoles = result?.role - ?.where((element) => element == 'PoultryScience' || element == 'Steward') - .toList(); - - /*var tmpRoles = result?.role?.where((element) { - return element == 'PoultryScience' || - element == 'Steward' || - element == 'CityOperator' || - element == 'CityJahad' || - element.toLowerCase().contains("admin"); - }).toList();*/ + var tmpRoles = result?.role?.where((element) { + final allowedRoles = {'poultryscience', 'steward', 'killhouse'}; + final lowerElement = element.toString().toLowerCase().trim(); + return allowedRoles.contains(lowerElement); + }).toList(); await tokenStorageService.saveRoles(_module, tmpRoles ?? []); if (rememberMe.value) { diff --git a/packages/chicken/lib/presentation/pages/common/role/view.dart b/packages/chicken/lib/presentation/pages/common/role/view.dart index 58b1b11..0f36180 100644 --- a/packages/chicken/lib/presentation/pages/common/role/view.dart +++ b/packages/chicken/lib/presentation/pages/common/role/view.dart @@ -32,11 +32,17 @@ class RolePage extends GetView { return roleCard( title: role.keys.first, onTap: () async { - String route = role.values.first; - await controller.gService.saveRoute(Module.chicken, route); + try { + String route = role.values.first; + await controller.gService.saveRoute(Module.chicken, route); - await controller.gService.saveRole(Module.chicken, data[index]); - Get.offAllNamed(route); + await controller.gService.saveRole(Module.chicken, data[index]); + Get.offAllNamed(route); + } catch (e) { + eLog( + "احتمالا در\n ``getFaUserRoleWithOnTap`` \nروت اش را تعریف نکردی 👻👻 ==>$e ", + ); + } }, ); }, diff --git a/packages/chicken/lib/presentation/pages/kill_house/action/logic.dart b/packages/chicken/lib/presentation/pages/kill_house/action/logic.dart new file mode 100644 index 0000000..a3ed2ff --- /dev/null +++ b/packages/chicken/lib/presentation/pages/kill_house/action/logic.dart @@ -0,0 +1,41 @@ +import 'package:rasadyar_core/core.dart'; + +class KillHouseActionLogic extends GetxController { + List items = [ + GlassMorphismCardItem(title: "ثبت درخواست", icon: Assets.vec.submitRequestSvg.path, route: ''), + GlassMorphismCardItem( + title: "انبار و توزیع", + icon: Assets.vec.warehouseDistributionSvg.path, + route: '', + ), + GlassMorphismCardItem( + title: "سفارشات دریافتی", + icon: Assets.vec.ordersReceivedSvg.path, + route: '', + ), + GlassMorphismCardItem(title: "خرید مستقیم", icon: Assets.vec.directPurchaseSvg.path, route: ''), + GlassMorphismCardItem(title: "تخصیص خودرو", icon: Assets.vec.carAllocationSvg.path, route: ''), + GlassMorphismCardItem( + title: "ورود اطلاعات بار", + icon: Assets.vec.enterCargoInformationSvg.path, + route: '', + ), + GlassMorphismCardItem( + title: "مدیریت بارها", + icon: Assets.vec.managementBarsSvg.path, + route: '', + ), + ]; + + @override + void onReady() { + // TODO: implement onReady + super.onReady(); + } + + @override + void onClose() { + // TODO: implement onClose + super.onClose(); + } +} diff --git a/packages/chicken/lib/presentation/pages/kill_house/action/view.dart b/packages/chicken/lib/presentation/pages/kill_house/action/view.dart new file mode 100644 index 0000000..221294f --- /dev/null +++ b/packages/chicken/lib/presentation/pages/kill_house/action/view.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; +import 'package:rasadyar_core/core.dart'; + +import 'logic.dart'; + +class KillHouseActionPage extends GetView { + const KillHouseActionPage({super.key}); + + @override + Widget build(BuildContext context) { + return ChickenBasePage( + isBase: true, + child: GlassMorphismGrid( + items: controller.items, + onTap: () { + iLog("Hoooooura 😍😍😍😍😍"); + }, + ), + ); + } +} diff --git a/packages/chicken/lib/presentation/pages/kill_house/root/logic.dart b/packages/chicken/lib/presentation/pages/kill_house/root/logic.dart new file mode 100644 index 0000000..b3d5288 --- /dev/null +++ b/packages/chicken/lib/presentation/pages/kill_house/root/logic.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_chicken/presentation/pages/common/profile/view.dart'; +import 'package:rasadyar_chicken/presentation/routes/pages.dart'; +import 'package:rasadyar_chicken/presentation/routes/routes.dart'; +import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart'; +import 'package:rasadyar_core/core.dart'; + +class KillHouseRootLogic extends GetxController { + RxInt currentPage = 2.obs; + + final pages = [ + Navigator( + key: Get.nestedKey(killHouseFirstKey), + onGenerateRoute: (settings) { + final page = ChickenPages.pages.firstWhere( + (e) => e.name == settings.name, + orElse: () => + ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.actionKillHouse), + ); + + return buildRouteFromGetPage(page); + }, + ), + Container(color: Colors.deepPurpleAccent.withAlpha(50)), + ProfilePage(), + ]; + + @override + void onReady() { + // TODO: implement onReady + super.onReady(); + } + + @override + void onClose() { + // TODO: implement onClose + super.onClose(); + } + + void changePage(int i) { + currentPage.value = i; + } +} diff --git a/packages/chicken/lib/presentation/pages/kill_house/root/view.dart b/packages/chicken/lib/presentation/pages/kill_house/root/view.dart new file mode 100644 index 0000000..05bcc9e --- /dev/null +++ b/packages/chicken/lib/presentation/pages/kill_house/root/view.dart @@ -0,0 +1,77 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; +import 'package:rasadyar_core/core.dart'; + +import 'logic.dart'; + +class KillHouseRootPage extends GetView { + const KillHouseRootPage({super.key}); + + @override + Widget build(BuildContext context) { + return ObxValue((data) { + return ChickenBasePage( + isBase: true, + isFullScreen: true, + scrollable: true, + child: Stack( + children: [ + IndexedStack(children: controller.pages, index: data.value), + Positioned( + right: 0, + left: 0, + bottom: 0, + child: RBottomNavigation( + mainAxisAlignment: MainAxisAlignment.spaceAround, + items: [ + RBottomNavigationItem( + label: 'عملیات', + icon: Assets.vec.settingSvg.path, + isSelected: controller.currentPage.value == 0, + onTap: () { + /* Get.nestedKey( + poultrySecondKey, + )?.currentState?.popUntil((route) => route.isFirst); + Get.nestedKey( + poultryFirstKey, + )?.currentState?.popUntil((route) => route.isFirst);*/ + controller.changePage(0); + }, + ), + RBottomNavigationItem( + label: 'خانه', + icon: Assets.vec.homeSvg.path, + isSelected: controller.currentPage.value == 1, + onTap: () { + /* Get.nestedKey( + poultryFirstKey, + )?.currentState?.popUntil((route) => route.isFirst); + Get.nestedKey( + poultryThirdKey, + )?.currentState?.popUntil((route) => route.isFirst);*/ + controller.changePage(1); + }, + ), + RBottomNavigationItem( + label: 'پروفایل', + icon: Assets.vec.profileCircleSvg.path, + isSelected: controller.currentPage.value == 2, + onTap: () { + /* Get.nestedKey( + poultryFirstKey, + )?.currentState?.popUntil((route) => route.isFirst); + Get.nestedKey( + poultrySecondKey, + )?.currentState?.popUntil((route) => route.isFirst);*/ + controller.changePage(2); + }, + ), + ], + ), + ), + ], + ), + ); + }, controller.currentPage); + } +} diff --git a/packages/chicken/lib/presentation/routes/pages.dart b/packages/chicken/lib/presentation/routes/pages.dart index 22a1194..2379288 100644 --- a/packages/chicken/lib/presentation/routes/pages.dart +++ b/packages/chicken/lib/presentation/routes/pages.dart @@ -2,6 +2,10 @@ import 'package:rasadyar_chicken/presentation/pages/common/auth/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/common/auth/view.dart'; import 'package:rasadyar_chicken/presentation/pages/common/role/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/common/role/view.dart'; +import 'package:rasadyar_chicken/presentation/pages/kill_house/action/logic.dart'; +import 'package:rasadyar_chicken/presentation/pages/kill_house/action/view.dart'; +import 'package:rasadyar_chicken/presentation/pages/kill_house/root/logic.dart'; +import 'package:rasadyar_chicken/presentation/pages/kill_house/root/view.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_farm_inspection/poultry_farm_inspection.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/active_hatching/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/active_hatching/view.dart'; @@ -234,5 +238,27 @@ sealed class ChickenPages { }), ), //endregion + + //region kill house + GetPage( + name: ChickenRoutes.initKillHouse, + page: () => KillHouseRootPage(), + binding: BindingsBuilder(() { + Get.lazyPut(() => KillHouseRootLogic()); + Get.lazyPut(() => BaseLogic(), fenix: true); + }), + ), + GetPage( + name: ChickenRoutes.actionKillHouse, + page: () => KillHouseActionPage(), + bindings: [ + GlobalBinding(), + BindingsBuilder(() { + Get.lazyPut(() => KillHouseActionLogic()); + Get.lazyPut(() => BaseLogic(), fenix: true); + }), + ], + ), + //endregion ]; } diff --git a/packages/chicken/lib/presentation/routes/routes.dart b/packages/chicken/lib/presentation/routes/routes.dart index 9049f91..58c7414 100644 --- a/packages/chicken/lib/presentation/routes/routes.dart +++ b/packages/chicken/lib/presentation/routes/routes.dart @@ -42,4 +42,12 @@ sealed class ChickenRoutes { static const poultryFarmInspectionHome = '$_poultryFarmInspection/Home'; //endregion + + //region KillHouse Routes + + static const _killHouse = '$_base/killHouse'; + static const initKillHouse = '$_killHouse/home'; + static const actionKillHouse = '$_killHouse/action'; + + //endregion } diff --git a/packages/chicken/lib/presentation/utils/nested_keys_utils.dart b/packages/chicken/lib/presentation/utils/nested_keys_utils.dart index 4a2b69d..d816541 100644 --- a/packages/chicken/lib/presentation/utils/nested_keys_utils.dart +++ b/packages/chicken/lib/presentation/utils/nested_keys_utils.dart @@ -11,3 +11,8 @@ const int poultryFirstKey = 105; const int poultrySecondKey = 106; const int poultryThirdKey = 107; //endregion + +//region kill house Keys +const int killHouseFirstKey = 108; + +//endregion diff --git a/packages/core/lib/presentation/common/assets.gen.dart b/packages/core/lib/presentation/common/assets.gen.dart index 5a43f44..1108d38 100644 --- a/packages/core/lib/presentation/common/assets.gen.dart +++ b/packages/core/lib/presentation/common/assets.gen.dart @@ -79,6 +79,9 @@ class $AssetsIconsGen { /// File path: assets/icons/call.svg SvgGenImage get call => const SvgGenImage('assets/icons/call.svg'); + /// File path: assets/icons/car_allocation.svg + SvgGenImage get carAllocation => const SvgGenImage('assets/icons/car_allocation.svg'); + /// File path: assets/icons/check.svg SvgGenImage get check => const SvgGenImage('assets/icons/check.svg'); @@ -163,6 +166,9 @@ class $AssetsIconsGen { /// File path: assets/icons/diagram.svg SvgGenImage get diagram => const SvgGenImage('assets/icons/diagram.svg'); + /// File path: assets/icons/direct_purchase.svg + SvgGenImage get directPurchase => const SvgGenImage('assets/icons/direct_purchase.svg'); + /// File path: assets/icons/download.svg SvgGenImage get download => const SvgGenImage('assets/icons/download.svg'); @@ -172,6 +178,9 @@ class $AssetsIconsGen { /// File path: assets/icons/empty.svg SvgGenImage get empty => const SvgGenImage('assets/icons/empty.svg'); + /// File path: assets/icons/enter_cargo_information.svg + SvgGenImage get enterCargoInformation => const SvgGenImage('assets/icons/enter_cargo_information.svg'); + /// File path: assets/icons/excel_download.svg SvgGenImage get excelDownload => const SvgGenImage('assets/icons/excel_download.svg'); @@ -232,6 +241,9 @@ class $AssetsIconsGen { /// File path: assets/icons/logout.svg SvgGenImage get logout => const SvgGenImage('assets/icons/logout.svg'); + /// File path: assets/icons/management_bars.svg + SvgGenImage get managementBars => const SvgGenImage('assets/icons/management_bars.svg'); + /// File path: assets/icons/map.svg SvgGenImage get map => const SvgGenImage('assets/icons/map.svg'); @@ -250,6 +262,9 @@ class $AssetsIconsGen { /// File path: assets/icons/note_remove.svg SvgGenImage get noteRemove => const SvgGenImage('assets/icons/note_remove.svg'); + /// File path: assets/icons/orders_received.svg + SvgGenImage get ordersReceived => const SvgGenImage('assets/icons/orders_received.svg'); + /// File path: assets/icons/outside.svg SvgGenImage get outside => const SvgGenImage('assets/icons/outside.svg'); @@ -328,6 +343,9 @@ class $AssetsIconsGen { /// File path: assets/icons/shopping_basket.svg SvgGenImage get shoppingBasket => const SvgGenImage('assets/icons/shopping_basket.svg'); + /// File path: assets/icons/submit_request.svg + SvgGenImage get submitRequest => const SvgGenImage('assets/icons/submit_request.svg'); + /// File path: assets/icons/tag_label.svg SvgGenImage get tagLabel => const SvgGenImage('assets/icons/tag_label.svg'); @@ -364,6 +382,9 @@ class $AssetsIconsGen { /// File path: assets/icons/virtual.svg SvgGenImage get virtual => const SvgGenImage('assets/icons/virtual.svg'); + /// File path: assets/icons/warehouse_distribution.svg + SvgGenImage get warehouseDistribution => const SvgGenImage('assets/icons/warehouse_distribution.svg'); + /// File path: assets/icons/whare_house.svg SvgGenImage get whareHouse => const SvgGenImage('assets/icons/whare_house.svg'); @@ -385,6 +406,7 @@ class $AssetsIconsGen { calendarSearchOutline, calendarTick, call, + carAllocation, check, checkSquare, chicken, @@ -413,9 +435,11 @@ class $AssetsIconsGen { cubeTopRotation, cubeWatting, diagram, + directPurchase, download, edit, empty, + enterCargoInformation, excelDownload, farm, farms, @@ -436,12 +460,14 @@ class $AssetsIconsGen { liveStock, lock, logout, + managementBars, map, map1, map2, mapMarker, messageAdd, noteRemove, + ordersReceived, outside, pdfDownload, people, @@ -468,6 +494,7 @@ class $AssetsIconsGen { setting, shop, shoppingBasket, + submitRequest, tagLabel, tagUser, task, @@ -480,6 +507,7 @@ class $AssetsIconsGen { userRaduis, userSquare, virtual, + warehouseDistribution, whareHouse, ]; } @@ -570,6 +598,9 @@ class $AssetsVecGen { /// File path: assets/vec/call.svg.vec SvgGenImage get callSvg => const SvgGenImage.vec('assets/vec/call.svg.vec'); + /// File path: assets/vec/car_allocation.svg.vec + SvgGenImage get carAllocationSvg => const SvgGenImage.vec('assets/vec/car_allocation.svg.vec'); + /// File path: assets/vec/check.svg.vec SvgGenImage get checkSvg => const SvgGenImage.vec('assets/vec/check.svg.vec'); @@ -654,6 +685,9 @@ class $AssetsVecGen { /// File path: assets/vec/diagram.svg.vec SvgGenImage get diagramSvg => const SvgGenImage.vec('assets/vec/diagram.svg.vec'); + /// File path: assets/vec/direct_purchase.svg.vec + SvgGenImage get directPurchaseSvg => const SvgGenImage.vec('assets/vec/direct_purchase.svg.vec'); + /// File path: assets/vec/download.svg.vec SvgGenImage get downloadSvg => const SvgGenImage.vec('assets/vec/download.svg.vec'); @@ -663,6 +697,9 @@ class $AssetsVecGen { /// File path: assets/vec/empty.svg.vec SvgGenImage get emptySvg => const SvgGenImage.vec('assets/vec/empty.svg.vec'); + /// File path: assets/vec/enter_cargo_information.svg.vec + SvgGenImage get enterCargoInformationSvg => const SvgGenImage.vec('assets/vec/enter_cargo_information.svg.vec'); + /// File path: assets/vec/excel_download.svg.vec SvgGenImage get excelDownloadSvg => const SvgGenImage.vec('assets/vec/excel_download.svg.vec'); @@ -723,6 +760,9 @@ class $AssetsVecGen { /// File path: assets/vec/logout.svg.vec SvgGenImage get logoutSvg => const SvgGenImage.vec('assets/vec/logout.svg.vec'); + /// File path: assets/vec/management_bars.svg.vec + SvgGenImage get managementBarsSvg => const SvgGenImage.vec('assets/vec/management_bars.svg.vec'); + /// File path: assets/vec/map.svg.vec SvgGenImage get mapSvg => const SvgGenImage.vec('assets/vec/map.svg.vec'); @@ -741,6 +781,9 @@ class $AssetsVecGen { /// File path: assets/vec/note_remove.svg.vec SvgGenImage get noteRemoveSvg => const SvgGenImage.vec('assets/vec/note_remove.svg.vec'); + /// File path: assets/vec/orders_received.svg.vec + SvgGenImage get ordersReceivedSvg => const SvgGenImage.vec('assets/vec/orders_received.svg.vec'); + /// File path: assets/vec/outside.svg.vec SvgGenImage get outsideSvg => const SvgGenImage.vec('assets/vec/outside.svg.vec'); @@ -819,6 +862,9 @@ class $AssetsVecGen { /// File path: assets/vec/shopping_basket.svg.vec SvgGenImage get shoppingBasketSvg => const SvgGenImage.vec('assets/vec/shopping_basket.svg.vec'); + /// File path: assets/vec/submit_request.svg.vec + SvgGenImage get submitRequestSvg => const SvgGenImage.vec('assets/vec/submit_request.svg.vec'); + /// File path: assets/vec/tag_label.svg.vec SvgGenImage get tagLabelSvg => const SvgGenImage.vec('assets/vec/tag_label.svg.vec'); @@ -855,6 +901,9 @@ class $AssetsVecGen { /// File path: assets/vec/virtual.svg.vec SvgGenImage get virtualSvg => const SvgGenImage.vec('assets/vec/virtual.svg.vec'); + /// File path: assets/vec/warehouse_distribution.svg.vec + SvgGenImage get warehouseDistributionSvg => const SvgGenImage.vec('assets/vec/warehouse_distribution.svg.vec'); + /// File path: assets/vec/whare_house.svg.vec SvgGenImage get whareHouseSvg => const SvgGenImage.vec('assets/vec/whare_house.svg.vec'); @@ -876,6 +925,7 @@ class $AssetsVecGen { calendarSearchOutlineSvg, calendarTickSvg, callSvg, + carAllocationSvg, checkSvg, checkSquareSvg, chickenSvg, @@ -904,9 +954,11 @@ class $AssetsVecGen { cubeTopRotationSvg, cubeWattingSvg, diagramSvg, + directPurchaseSvg, downloadSvg, editSvg, emptySvg, + enterCargoInformationSvg, excelDownloadSvg, farmSvg, farmsSvg, @@ -927,12 +979,14 @@ class $AssetsVecGen { liveStockSvg, lockSvg, logoutSvg, + managementBarsSvg, mapSvg, map1Svg, map2Svg, mapMarkerSvg, messageAddSvg, noteRemoveSvg, + ordersReceivedSvg, outsideSvg, pdfDownloadSvg, peopleSvg, @@ -959,6 +1013,7 @@ class $AssetsVecGen { settingSvg, shopSvg, shoppingBasketSvg, + submitRequestSvg, tagLabelSvg, tagUserSvg, taskSvg, @@ -971,6 +1026,7 @@ class $AssetsVecGen { userRaduisSvg, userSquareSvg, virtualSvg, + warehouseDistributionSvg, whareHouseSvg, ]; } diff --git a/packages/core/lib/presentation/widget/card/card_icon_widget.dart b/packages/core/lib/presentation/widget/card/card_icon_widget.dart index b198b49..9a04a6a 100644 --- a/packages/core/lib/presentation/widget/card/card_icon_widget.dart +++ b/packages/core/lib/presentation/widget/card/card_icon_widget.dart @@ -225,3 +225,37 @@ class GlassMorphismCardIcon extends StatelessWidget { ); } } + +class GlassMorphismCardItem { + final String title; + final String route; + final String icon; + + GlassMorphismCardItem({required this.title, required this.route, required this.icon}); +} + +class GlassMorphismGrid extends StatelessWidget { + const GlassMorphismGrid({super.key, required this.items, required this.onTap}); + + final List items; + final VoidCallback onTap; + + @override + Widget build(BuildContext context) { + return GridView.builder( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.symmetric(vertical: 18.h, horizontal: 32.w), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 24.h, + crossAxisSpacing: 24.w, + ), + itemCount: items.length, + hitTestBehavior: HitTestBehavior.opaque, + itemBuilder: (BuildContext context, int index) { + var item = items[index]; + return GlassMorphismCardIcon(title: item.title, vecIcon: item.icon, onTap: onTap); + }, + ); + } +}