From 3b07dca52ecd776dc329f2d5e57682013585ba23 Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Wed, 17 Dec 2025 09:00:32 +0330 Subject: [PATCH] feat: add step 5 page to CreateInspectionBottomSheet and enhance inspection submission flow with new data fields and improved UI components --- .../submit_inspection_response_schema.json | 1 + .../create_inspection_bottom_sheet.dart | 11 +- .../step5_page.dart | 1155 +++++++++++------ 3 files changed, 734 insertions(+), 433 deletions(-) diff --git a/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json b/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json index 2203955..e8a0899 100644 --- a/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json +++ b/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json @@ -427,3 +427,4 @@ + diff --git a/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet.dart b/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet.dart index 832c990..92163aa 100644 --- a/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet.dart +++ b/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet.dart @@ -16,6 +16,7 @@ class CreateInspectionBottomSheet step2Page(controller), step3Page(controller), step4Page(controller), + step5Page(controller), ]; @override @@ -69,14 +70,14 @@ class CreateInspectionBottomSheet Text( controller.isUploadingImages.value ? 'در حال آپلود...' - : (controller.activeStepperIndex.value < 3) + : (controller.activeStepperIndex.value < 4) ? 'ادامه' : 'ثبت', ), ], ), onPressed: () { - if (controller.activeStepperIndex.value < 3) { + if (controller.activeStepperIndex.value < 4) { controller.activeStepperIndex.value++; } else { controller.submitInspection(); @@ -267,7 +268,7 @@ class stepper extends StatelessWidget { ), ), ), - /* Expanded( + Expanded( child: Divider( color: activeStep >= 4 ? AppColor.greenNormalHover @@ -275,7 +276,7 @@ class stepper extends StatelessWidget { thickness: 8, ), ), - Container( + Container( alignment: Alignment.center, decoration: BoxDecoration( color: activeStep >= 4 @@ -292,7 +293,7 @@ class stepper extends StatelessWidget { color: activeStep >= 3 ? Colors.white : AppColor.iconColor, ), ), - ), */ + ), ], ), ), diff --git a/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/step5_page.dart b/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/step5_page.dart index 0ded870..4bc8be2 100644 --- a/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/step5_page.dart +++ b/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/step5_page.dart @@ -1,9 +1,9 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:rasadyar_chicken/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet_logic.dart'; import 'package:rasadyar_core/core.dart'; - - Widget step5Page(CreateInspectionBottomSheetLogic controller) { return SingleChildScrollView( physics: BouncingScrollPhysics(), @@ -37,35 +37,49 @@ Widget detailsWidget(CreateInspectionBottomSheetLogic controller) { Divider(color: AppColor.blackLightHover, height: 1, thickness: 1), ObxValue((data) { return tabBarWidget( - ['اطلاعات', 'پاییش سلامت', 'زیرساخت', 'مستندات'], + [ + 'اطلاعات کلی', + 'شرایط سالن', + 'تلفات', + 'کارشناس', + 'نهاده', + 'زیرساخت', + 'نیروی انسانی', + 'تسهیلات', + ], controller.selectedTabIndex.value, (index) => controller.changeTab(index), ); }, controller.selectedTabIndex), - ObxValue((data) { switch (data.value) { case 0: - return infoTable(); + return generalInfoTable(controller); case 1: - return healthTable(); + return generalConditionHallTable(controller); case 2: - return infrastructureTable(); + return casualtiesTable(controller); case 3: - return documentsTable(); + return technicalOfficerTable(controller); + case 4: + return inputStatusTable(controller); + case 5: + return infrastructureEnergyTable(controller); + case 6: + return hrTable(controller); + case 7: + return facilitiesTable(controller); default: - return infoTable(); + return generalInfoTable(controller); } }, controller.selectedTabIndex), ], ), - - // Expanded در سطح بالاتر ], ); } -Column infoTable() { +Widget generalInfoTable(CreateInspectionBottomSheetLogic controller) { return Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -73,13 +87,12 @@ Column infoTable() { Row( children: [ Text( - 'مشخصات کلی', + 'اطلاعات کلی', style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), ), ], ), SizedBox(height: 10), - Container( clipBehavior: Clip.hardEdge, decoration: BoxDecoration( @@ -88,30 +101,299 @@ Column infoTable() { ), child: Column( children: [ - rTableRow(title: 'نام واحد مرغداری', value: 'لذیذ'), - rTableRow(title: 'کد یکتا / شناسه واحد', value: '2541415'), - rTableRow(title: 'نام مالک / بهره‌بردار', value: 'مرغداری احمدی'), - rTableRow(title: 'موجودی سوخت اضطراری', value: '200 لیتر'), - - rTableRow(title: 'شهر/تعاونی', value: 'خرم آباد/تعاونی خرم آباد'), - - rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), - rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), - - rTableRow(title: 'سالن', value: '2'), rTableRow( - title: 'تاریخ ثبت جوجه ریزی', - value: '1402/09/19 (10:12)', + title: 'نام واحد مرغداری', + value: controller.unitNameController.text, ), - rTableRow(title: 'شهر/تعاونی', value: 'خرم آباد/تعاونی خرم آباد'), - - rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), - rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), - - rTableRow(title: 'سالن', value: '2'), rTableRow( - title: 'تاریخ ثبت جوجه ریزی', - value: '1402/09/19 (10:12)', + title: 'کد یکتا / شناسه واحد', + value: controller.breedingUniqueIdController.text, + ), + rTableRow( + title: 'پروانه بهداشتی', + value: controller.healthLicenseController.text, + ), + rTableRow( + title: 'وضعیت مستاجر', + value: controller.tenantStatusController.text, + ), + if (controller.hatchingModel?.poultry?.hasTenant == true) ...[ + rTableRow( + title: 'نام مستاجر', + value: controller.tenantNameController.text, + ), + rTableRow( + title: 'کد ملی مستاجر', + value: controller.tenantNationalIdController.text, + ), + rTableRow( + title: 'شماره تماس مستاجر', + value: controller.tenantPhoneNumberController.text, + ), + ], + rTableRow( + title: 'نام مالک', + value: controller.ownerNameController.text, + ), + rTableRow( + title: 'کد ملی مالک', + value: controller.ownerNationalCodeController.text, + ), + rTableRow( + title: 'شماره تماس مالک', + value: controller.ownerPhoneNumberController.text, + ), + rTableRow( + title: 'ظرفیت اسمی', + value: controller.totalCapacityController.text, + ), + rTableRow( + title: 'تاریخ جوجه‌ریزی', + value: controller.hatchingDateController.text, + ), + rTableRow( + title: 'تاریخ بازدید', + value: controller.visitDateController.text, + ), + rTableRow( + title: 'تعداد جوجه‌ریزی', + value: controller.hatchingCountController.text, + ), + rTableRow( + title: 'نژاد', + value: controller.hatchingBreedController.text, + ), + if (controller.currentLocation.value != null) + rTableRow( + title: 'موقعیت مکانی', + value: + '${controller.currentLocation.value!.latitude.toStringAsFixed(6)}, ${controller.currentLocation.value!.longitude.toStringAsFixed(6)}', + ), + rTableRow( + title: 'وضعیت بازرسی', + value: controller.inspectorConclusion.value ?? '-', + ), + if (controller + .inspectorConclusionDescriptionController + .text + .isNotEmpty) + rTableRow( + title: 'یادداشت بازرسی', + value: controller.inspectorConclusionDescriptionController.text, + ), + ], + ), + ), + ], + ); +} + +Widget generalConditionHallTable(CreateInspectionBottomSheetLogic controller) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'شرایط عمومی سالن', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow( + title: 'وضعیت سلامت', + value: controller.sanitaryConditionOfTheHall.value ?? '-', + ), + rTableRow( + title: 'وضعیت تهویه', + value: controller.ventilationStatus.value ?? '-', + ), + rTableRow( + title: 'وضعیت بستر', + value: controller.beddingStatus.value ?? '-', + ), + rTableRow( + title: 'دما', + value: controller.hatchingTemperatureController.text.isNotEmpty + ? controller.hatchingTemperatureController.text + : '-', + ), + rTableRow( + title: 'منبع آب آشامیدنی', + value: controller.waterQuality.value ?? '-', + ), + rTableRow( + title: 'سختی آب', + value: controller.waterHardnessController.text.isNotEmpty + ? controller.waterHardnessController.text + : '-', + ), + ], + ), + ), + Obx(() { + if (controller.hallImages.isEmpty) return SizedBox.shrink(); + return Column( + children: [ + SizedBox(height: 16), + Row( + children: [ + Text( + 'تصاویر سالن', + style: AppFonts.yekan14Bold.copyWith( + color: AppColor.textColor, + ), + ), + ], + ), + SizedBox(height: 10), + _buildLocalImagesList(controller.hallImages), + ], + ); + }), + ], + ); +} + +Widget casualtiesTable(CreateInspectionBottomSheetLogic controller) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'تلفات', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow( + title: 'تلفات عادی', + value: controller.normalLossesController.text.isNotEmpty + ? controller.normalLossesController.text + : '-', + ), + rTableRow( + title: 'تلفات غیرعادی', + value: controller.abnormalLossesController.text.isNotEmpty + ? controller.abnormalLossesController.text + : '-', + ), + rTableRow( + title: 'منبع جوجه‌ریزی', + value: controller.sourceOfHatchingController.text.isNotEmpty + ? controller.sourceOfHatchingController.text + : '-', + ), + rTableRow( + title: 'علت تلفات غیرعادی', + value: controller.isOthercauseOfUnusualCasualties.value + ? controller.otherCauseOfUnusualCasualtiesController.text + : (controller.causeOfUnusualCasualties.value ?? '-'), + ), + rTableRow( + title: 'نوع بیماری', + value: controller.isOtherTypeOfDiseaseSelected.value + ? controller.otherTypeOfDiseaseController.text + : (controller.typeOfDisease.value ?? '-'), + ), + rTableRow( + title: 'نمونه‌برداری', + value: controller.samplingDone.value ? 'انجام شده' : 'انجام نشده', + ), + if (controller.samplingDone.value) + rTableRow( + title: 'نوع نمونه‌برداری', + value: controller.sampleType.value ?? '-', + ), + ], + ), + ), + Obx(() { + if (controller.lossesImages.isEmpty) return SizedBox.shrink(); + return Column( + children: [ + SizedBox(height: 16), + Row( + children: [ + Text( + 'تصاویر تلفات', + style: AppFonts.yekan14Bold.copyWith( + color: AppColor.textColor, + ), + ), + ], + ), + SizedBox(height: 10), + _buildLocalImagesList(controller.lossesImages), + ], + ); + }), + ], + ); +} + +Widget technicalOfficerTable(CreateInspectionBottomSheetLogic controller) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'کارشناس فنی', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow( + title: 'کارشناس بهداشت', + value: + controller + .technicalHealthOfficerNameController + .text + .isNotEmpty + ? controller.technicalHealthOfficerNameController.text + : '-', + ), + rTableRow( + title: 'کارشناس فنی', + value: + controller + .technicalEngineeringOfficerNameController + .text + .isNotEmpty + ? controller.technicalEngineeringOfficerNameController.text + : '-', ), ], ), @@ -120,6 +402,410 @@ Column infoTable() { ); } +Widget inputStatusTable(CreateInspectionBottomSheetLogic controller) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'وضعیت نهاده', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow( + title: 'وضعیت نهاده', + value: controller.inputStatus.value ?? '-', + ), + if (controller.inputStatus.value == 'وابسته') + rTableRow( + title: 'نام شرکت', + value: controller.companyNameController.text.isNotEmpty + ? controller.companyNameController.text + : '-', + ) + else + rTableRow( + title: 'کد پیگیری', + value: controller.trackingCodeController.text.isNotEmpty + ? controller.trackingCodeController.text + : '-', + ), + rTableRow( + title: 'نوع دانه', + value: controller.typeOfGrain.value ?? '-', + ), + rTableRow( + title: 'موجودی در انبار', + value: + controller.inputInventoryInWarehouseController.text.isNotEmpty + ? controller.inputInventoryInWarehouseController.text + : '-', + ), + rTableRow( + title: 'موجودی تا بازدید', + value: + controller.inputInventoryUntilVisitController.text.isNotEmpty + ? controller.inputInventoryUntilVisitController.text + : '-', + ), + rTableRow( + title: 'درجه دانه', + value: controller.grainQualityInput.value ?? '-', + ), + ], + ), + ), + Obx(() { + if (controller.inputWarehouseImages.isEmpty) return SizedBox.shrink(); + return Column( + children: [ + SizedBox(height: 16), + Row( + children: [ + Text( + 'تصاویر انبار نهاده', + style: AppFonts.yekan14Bold.copyWith( + color: AppColor.textColor, + ), + ), + ], + ), + SizedBox(height: 10), + _buildLocalImagesList(controller.inputWarehouseImages), + ], + ); + }), + ], + ); +} + +Widget infrastructureEnergyTable(CreateInspectionBottomSheetLogic controller) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'زیرساخت و انرژی', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow( + title: 'نوع ژنراتور', + value: controller.generatorTypeController.text.isNotEmpty + ? controller.generatorTypeController.text + : '-', + ), + rTableRow( + title: 'مدل ژنراتور', + value: controller.generatorModelController.text.isNotEmpty + ? controller.generatorModelController.text + : '-', + ), + rTableRow( + title: 'تعداد ژنراتور', + value: controller.generatorCountController.text.isNotEmpty + ? controller.generatorCountController.text + : '-', + ), + rTableRow( + title: 'ظرفیت ژنراتور', + value: controller.generatorCapacityController.text.isNotEmpty + ? controller.generatorCapacityController.text + : '-', + ), + rTableRow( + title: 'نوع سوخت', + value: controller.fuelType.value ?? '-', + ), + rTableRow( + title: 'عملکرد ژنراتور', + value: controller.generatorOperatingStatus.value ?? '-', + ), + rTableRow( + title: 'موجودی سوخت اضطراری', + value: controller.emergencyFuelInventoryController.text.isNotEmpty + ? controller.emergencyFuelInventoryController.text + : '-', + ), + rTableRow( + title: 'سابقه قطع برق', + value: controller.powerCutHistory.value ? 'دارد' : 'ندارد', + ), + if (controller.powerCutHistory.value) ...[ + rTableRow( + title: 'مدت قطع برق', + value: controller.powerCutDurationController.text.isNotEmpty + ? controller.powerCutDurationController.text + : '-', + ), + rTableRow( + title: 'ساعت قطع برق', + value: controller.powerCutHourController.text.isNotEmpty + ? controller.powerCutHourController.text + : '-', + ), + ], + if (controller.additionalNotesController.text.isNotEmpty) + rTableRow( + title: 'یادداشت اضافی', + value: controller.additionalNotesController.text, + ), + ], + ), + ), + ], + ); +} + +Widget hrTable(CreateInspectionBottomSheetLogic controller) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'نیروی انسانی', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow( + title: 'تعداد شاغلین', + value: controller.employedWorkersCountController.text.isNotEmpty + ? controller.employedWorkersCountController.text + : '-', + ), + rTableRow( + title: 'تعداد بومی', + value: controller.nativeWorkersCountController.text.isNotEmpty + ? controller.nativeWorkersCountController.text + : '-', + ), + rTableRow( + title: 'تعداد غیربومی', + value: controller.nonNativeWorkersCountController.text.isNotEmpty + ? controller.nonNativeWorkersCountController.text + : '-', + ), + rTableRow( + title: 'وضعیت قرارداد', + value: controller.workerContractStatus.value ?? '-', + ), + rTableRow( + title: 'آموزش دیده', + value: controller.trainingStatus.value ? 'بله' : 'خیر', + ), + ], + ), + ), + ], + ); +} + +Widget facilitiesTable(CreateInspectionBottomSheetLogic controller) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'تسهیلات', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow( + title: 'دارای تسهیلات', + value: controller.hasFacilities.value ? 'بله' : 'خیر', + ), + if (controller.hasFacilities.value) ...[ + rTableRow( + title: 'نوع تسهیلات', + value: controller.facilityTypeController.text.isNotEmpty + ? controller.facilityTypeController.text + : '-', + ), + rTableRow( + title: 'مبلغ', + value: controller.facilityAmountController.text.isNotEmpty + ? controller.facilityAmountController.text + : '-', + ), + rTableRow( + title: 'تاریخ', + value: controller.facilityYearController.text.isNotEmpty + ? controller.facilityYearController.text + : '-', + ), + rTableRow( + title: 'وضعیت بازپرداخت', + value: controller.overdueStatus.value + ? 'دارای معوقه' + : 'بدون معوقه', + ), + ], + rTableRow( + title: 'درخواست تسهیلات', + value: controller.newBeneficiaryRequest.value ?? '-', + ), + ], + ), + ), + ], + ); +} + +Widget _buildLocalImagesList(RxList images) { + return SizedBox( + height: 100.h, + child: ListView.separated( + scrollDirection: Axis.horizontal, + itemCount: images.length, + separatorBuilder: (context, index) => SizedBox(width: 10), + itemBuilder: (context, index) => GestureDetector( + onTap: () => _showLocalImageDialog(images, index), + child: Container( + width: 80.w, + height: 80.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + image: DecorationImage( + fit: BoxFit.cover, + image: FileImage(File(images[index].path)), + ), + ), + ), + ), + ), + ); +} + +void _showLocalImageDialog(List images, int initialIndex) { + final pageController = PageController(initialPage: initialIndex); + final currentIndex = initialIndex.obs; + + Get.dialog( + Dialog( + backgroundColor: Colors.transparent, + insetPadding: EdgeInsets.zero, + child: Container( + width: Get.width, + height: Get.height, + color: Colors.black, + child: Stack( + children: [ + PageView.builder( + controller: pageController, + itemCount: images.length, + onPageChanged: (index) { + currentIndex.value = index; + }, + itemBuilder: (context, index) { + return InteractiveViewer( + minScale: 0.5, + maxScale: 4.0, + child: Center( + child: Image.file( + File(images[index].path), + fit: BoxFit.contain, + errorBuilder: (context, error, stackTrace) { + return Center( + child: Icon( + Icons.error, + color: Colors.white, + size: 50, + ), + ); + }, + ), + ), + ); + }, + ), + Positioned( + top: 40, + right: 16, + child: IconButton( + icon: Icon(Icons.close, color: Colors.white, size: 30), + onPressed: () => Get.back(), + ), + ), + if (images.length > 1) + Positioned( + bottom: 20, + left: 0, + right: 0, + child: Center( + child: Obx( + () => Container( + padding: EdgeInsets.symmetric( + horizontal: 12, + vertical: 6, + ), + decoration: BoxDecoration( + color: Colors.black54, + borderRadius: BorderRadius.circular(20), + ), + child: Text( + '${currentIndex.value + 1} / ${images.length}', + style: TextStyle(color: Colors.white, fontSize: 14), + ), + ), + ), + ), + ), + ], + ), + ), + ), + barrierDismissible: true, + ); +} + Row rTableRow({String? title, String? value}) { return Row( children: [ @@ -166,15 +852,13 @@ Widget tabBarWidget( Function(int) onTabSelected, ) { return SizedBox( - height: 38.h, + height: 40.h, width: Get.width, - child: Stack( - fit: StackFit.expand, + child: Column( children: [ - Positioned( - right: 0, - top: 0, - bottom: 0, + SingleChildScrollView( + scrollDirection: Axis.horizontal, + reverse: true, child: Row( children: [ ...tabs.map( @@ -207,393 +891,8 @@ Widget tabBarWidget( ], ), ), - - Positioned( - bottom: 0, - left: 0, - right: 0, - child: Divider( - color: AppColor.blackLightHover, - height: 1, - thickness: 1, - ), - ), + Divider(color: AppColor.blackLightHover, height: 1, thickness: 1), ], ), ); } - -Widget healthTable() { - return Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: 10), - Row( - children: [ - Text( - 'پاییش سلامت', - style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), - ), - ], - ), - SizedBox(height: 10), - - Container( - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - rTableRow(title: 'نام واحد مرغداری', value: 'لذیذ'), - rTableRow(title: 'کد یکتا / شناسه واحد', value: '2541415'), - rTableRow(title: 'نام مالک / بهره‌بردار', value: 'مرغداری احمدی'), - rTableRow(title: 'موجودی سوخت اضطراری', value: '200 لیتر'), - - rTableRow(title: 'شهر/تعاونی', value: 'خرم آباد/تعاونی خرم آباد'), - - rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), - rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), - - rTableRow(title: 'سالن', value: '2'), - rTableRow( - title: 'تاریخ ثبت جوجه ریزی', - value: '1402/09/19 (10:12)', - ), - rTableRow(title: 'شهر/تعاونی', value: 'خرم آباد/تعاونی خرم آباد'), - - rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), - rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), - - rTableRow(title: 'سالن', value: '2'), - rTableRow( - title: 'تاریخ ثبت جوجه ریزی', - value: '1402/09/19 (10:12)', - ), - ], - ), - ), - ], - ); -} - -Widget infrastructureTable() { - return Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: 10), - Row( - children: [ - Text( - 'زیرساخت', - style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), - ), - ], - ), - SizedBox(height: 10), - - Container( - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - child: Column( - children: [ - rTableRow(title: 'نام واحد مرغداری', value: 'لذیذ'), - rTableRow(title: 'کد یکتا / شناسه واحد', value: '2541415'), - rTableRow(title: 'نام مالک / بهره‌بردار', value: 'مرغداری احمدی'), - rTableRow(title: 'موجودی سوخت اضطراری', value: '200 لیتر'), - - rTableRow(title: 'شهر/تعاونی', value: 'خرم آباد/تعاونی خرم آباد'), - - rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), - rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), - - rTableRow(title: 'سالن', value: '2'), - rTableRow( - title: 'تاریخ ثبت جوجه ریزی', - value: '1402/09/19 (10:12)', - ), - rTableRow(title: 'شهر/تعاونی', value: 'خرم آباد/تعاونی خرم آباد'), - - rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), - rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), - - rTableRow(title: 'سالن', value: '2'), - rTableRow( - title: 'تاریخ ثبت جوجه ریزی', - value: '1402/09/19 (10:12)', - ), - ], - ), - ), - ], - ); -} - -Widget documentsTable() { - return Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: 10), - Row( - children: [ - Text( - 'مستندات', - style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), - ), - ], - ), - - SizedBox(height: 16), - - Container( - height: 135.h, - width: Get.width, - decoration: BoxDecoration( - color: AppColor.bgLight, - borderRadius: BorderRadius.circular(8), - ), - child: Column( - spacing: 10, - children: [ - SizedBox( - height: 100.h, - width: Get.width, - child: ListView.separated( - itemCount: 10, - padding: EdgeInsets.symmetric(horizontal: 12), - scrollDirection: Axis.horizontal, - itemBuilder: (context, index) { - return Container( - width: 80.w, - height: 80.h, - decoration: BoxDecoration( - color: Color(0x33000000), - image: DecorationImage( - fit: BoxFit.cover, - image: NetworkImage( - "https://picsum.photos/150/150?random=$index", - ), - ), - borderRadius: BorderRadius.circular(8), - ), - child: Stack( - fit: StackFit.expand, - children: [ - Positioned( - top: 6, - left: 6, - child: Container( - width: 24.w, - height: 24.h, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Colors.white.withValues(alpha: 0.80), - borderRadius: BorderRadius.circular(4), - ), - child: Assets.vec.trashSvg.svg( - width: 16.w, - height: 16.h, - colorFilter: ColorFilter.mode( - AppColor.redNormal, - BlendMode.srcIn, - ), - ), - ), - ), - ], - ), - ); - }, - separatorBuilder: (context, index) => SizedBox(width: 10), - ), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 18), - child: Row( - children: [ - Text( - '200 فارم در این سالن تخمین زده شده است.', - textAlign: TextAlign.right, - style: AppFonts.yekan14Bold.copyWith( - color: AppColor.textColor, - ), - ), - ], - ), - ), - ], - ), - ), - - SizedBox(height: 16), - - Container( - height: 135.h, - width: Get.width, - decoration: BoxDecoration( - color: AppColor.bgLight, - borderRadius: BorderRadius.circular(8), - ), - child: Column( - spacing: 10, - children: [ - SizedBox( - height: 100.h, - width: Get.width, - child: ListView.separated( - itemCount: 10, - padding: EdgeInsets.symmetric(horizontal: 12), - scrollDirection: Axis.horizontal, - itemBuilder: (context, index) { - return Container( - width: 80.w, - height: 80.h, - decoration: BoxDecoration( - color: Color(0x33000000), - image: DecorationImage( - fit: BoxFit.cover, - image: NetworkImage( - "https://picsum.photos/150/150?random=${index * 2 + 1}", - ), - ), - - borderRadius: BorderRadius.circular(8), - ), - child: Stack( - fit: StackFit.expand, - children: [ - Positioned( - top: 6, - left: 6, - child: Container( - width: 24.w, - height: 24.h, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Colors.white.withValues(alpha: 0.80), - borderRadius: BorderRadius.circular(4), - ), - child: Assets.vec.trashSvg.svg( - width: 16.w, - height: 16.h, - colorFilter: ColorFilter.mode( - AppColor.redNormal, - BlendMode.srcIn, - ), - ), - ), - ), - ], - ), - ); - }, - separatorBuilder: (context, index) => SizedBox(width: 10), - ), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 18), - child: Row( - children: [ - Text( - 'انبار نهاده ها', - textAlign: TextAlign.right, - style: AppFonts.yekan14Bold.copyWith( - color: AppColor.textColor, - ), - ), - ], - ), - ), - ], - ), - ), - - SizedBox(height: 16), - - Container( - height: 135.h, - width: Get.width, - decoration: BoxDecoration( - color: AppColor.bgLight, - borderRadius: BorderRadius.circular(8), - ), - child: Column( - spacing: 10, - children: [ - SizedBox( - height: 100.h, - width: Get.width, - child: ListView.separated( - itemCount: 10, - padding: EdgeInsets.symmetric(horizontal: 12), - scrollDirection: Axis.horizontal, - itemBuilder: (context, index) { - return Container( - width: 80.w, - height: 80.h, - decoration: BoxDecoration( - color: Color(0x33000000), - image: DecorationImage( - fit: BoxFit.cover, - image: NetworkImage( - "https://picsum.photos/150/150?random=${index * 3 + 1}", - ), - ), - - borderRadius: BorderRadius.circular(8), - ), - child: Stack( - fit: StackFit.expand, - children: [ - Positioned( - top: 6, - left: 6, - child: Container( - width: 24.w, - height: 24.h, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Colors.white.withValues(alpha: 0.80), - borderRadius: BorderRadius.circular(4), - ), - child: Assets.vec.trashSvg.svg( - width: 16.w, - height: 16.h, - colorFilter: ColorFilter.mode( - AppColor.redNormal, - BlendMode.srcIn, - ), - ), - ), - ), - ], - ), - ); - }, - separatorBuilder: (context, index) => SizedBox(width: 10), - ), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 18), - child: Row( - children: [ - Text( - 'تلفات', - textAlign: TextAlign.right, - style: AppFonts.yekan14Bold.copyWith( - color: AppColor.textColor, - ), - ), - ], - ), - ), - ], - ), - ), - ], - ); -}