Merge branch with resolved conflicts - restructured features and added new modules

This commit is contained in:
2025-12-17 10:26:39 +03:30
484 changed files with 55236 additions and 4255 deletions

View File

@@ -1,7 +1,8 @@
import 'package:flutter/cupertino.dart' hide LinearGradient;
import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
=
import 'package:rasadyar_chicken/features/common/data/model/response/inventory/inventory_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/kill_house_distribution_info/kill_house_distribution_info.dart';
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
import 'package:rasadyar_chicken/presentation/widget/steward/widely_used/view.dart';
import 'package:rasadyar_core/core.dart';
@@ -75,7 +76,10 @@ class HomePage extends GetView<HomeLogic> {
AnimatedRotation(
turns: 180,
duration: Duration(milliseconds: 3000),
child: Icon(CupertinoIcons.chevron_up, size: 18),
child: Icon(
CupertinoIcons.chevron_up,
size: 18,
),
),
],
),
@@ -99,7 +103,9 @@ class HomePage extends GetView<HomeLogic> {
Row(
spacing: 8,
mainAxisAlignment: MainAxisAlignment.end,
children: [Icon(CupertinoIcons.chevron_down, size: 18)],
children: [
Icon(CupertinoIcons.chevron_down, size: 18),
],
),
_todayShipmentWidget(),
_todayShipmentWidget2(),
@@ -127,12 +133,17 @@ class HomePage extends GetView<HomeLogic> {
Assets.vec.chicken2Svg.svg(
width: 24.w,
height: 24.h,
colorFilter: ColorFilter.mode(AppColor.blueDark, BlendMode.srcIn),
colorFilter: ColorFilter.mode(
AppColor.blueDark,
BlendMode.srcIn,
),
),
Text(
'اطلاعات مرغ گرم',
textAlign: TextAlign.right,
style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor),
style: AppFonts.yekan16Bold.copyWith(
color: AppColor.iconColor,
),
),
],
),
@@ -151,7 +162,11 @@ class HomePage extends GetView<HomeLogic> {
Row(
children: [
SizedBox(width: 5.w),
Text('اطلاعات پخش', textAlign: TextAlign.right, style: AppFonts.yekan16),
Text(
'اطلاعات پخش',
textAlign: TextAlign.right,
style: AppFonts.yekan16,
),
],
),
SizedBox(height: 8.h),
@@ -164,7 +179,8 @@ class HomePage extends GetView<HomeLogic> {
title: 'وزن دولتی',
titleBgColor: const Color(0xFFB8E7DC),
valueBgColor: const Color(0xFFE6FAF5),
value: data.value?.totalGovernmentalInputWeight.separatedByComma,
value:
data.value?.totalGovernmentalInputWeight.separatedByComma,
),
),
Expanded(
@@ -178,7 +194,10 @@ class HomePage extends GetView<HomeLogic> {
Expanded(
child: broadcastItem(
title: 'فروش دولتی',
value: data.value?.totalGovernmentalOutputWeight.separatedByComma,
value: data
.value
?.totalGovernmentalOutputWeight
.separatedByComma,
titleBgColor: const Color(0xFFEBC4CE),
valueBgColor: const Color(0xFFEDDCE0),
),
@@ -202,7 +221,10 @@ class HomePage extends GetView<HomeLogic> {
Expanded(
child: broadcastItem(
title: 'مانده دولتی',
value: data.value?.totalGovernmentalRemainWeight.separatedByComma,
value: data
.value
?.totalGovernmentalRemainWeight
.separatedByComma,
titleBgColor: const Color(0xFFB8E7DC),
valueBgColor: const Color(0xFFE6FAF5),
),
@@ -218,7 +240,10 @@ class HomePage extends GetView<HomeLogic> {
Expanded(
child: broadcastItem(
title: 'فروش خارج استان',
value: data.value?.totalStewardFreeSaleBarCarcassesWeight.separatedByComma,
value: data
.value
?.totalStewardFreeSaleBarCarcassesWeight
.separatedByComma,
titleBgColor: const Color(0xFFEBC4CE),
valueBgColor: const Color(0xFFEDDCE0),
),
@@ -242,7 +267,8 @@ class HomePage extends GetView<HomeLogic> {
child: _informationIconCard(
title: 'توزیع داخل استان',
isLoading: data.value == null,
description: data.value?.freeSalesWeight.separatedByCommaFa ?? '0',
description:
data.value?.freeSalesWeight.separatedByCommaFa ?? '0',
iconPath: Assets.vec.truckSvg.path,
iconColor: const Color.fromRGBO(85, 97, 93, 1),
bgDescriptionColor: const Color(0xFFE6FAF5),
@@ -253,7 +279,9 @@ class HomePage extends GetView<HomeLogic> {
child: _informationIconCard(
title: 'توزیع خارج استان',
isLoading: data.value == null,
description: data.value?.stewardAllocationsWeight.separatedByCommaFa ?? '0',
description:
data.value?.stewardAllocationsWeight.separatedByCommaFa ??
'0',
iconPath: Assets.vec.truckFastSvg.path,
iconColor: Color(0xFF647379),
bgDescriptionColor: const Color(0xFFEAEFFF),
@@ -302,7 +330,9 @@ class HomePage extends GetView<HomeLogic> {
child: _informationLabelCard(
title: 'خارج استان',
isLoading: data.value == null,
description: data.value?.freeBuyingCarcassesWeight.separatedByCommaFa ?? '0',
description:
data.value?.freeBuyingCarcassesWeight.separatedByCommaFa ??
'0',
iconPath: Assets.vec.cubeSearchSvg.path,
iconColor: Color(0xFF2D5FFF),
bgLabelColor: const Color(0xFFAFCBFF),
@@ -326,7 +356,8 @@ class HomePage extends GetView<HomeLogic> {
child: _informationLabelCard(
title: 'مانده انبار',
isLoading: data.value == null,
description: data.value?.totalRemainWeight.separatedByCommaFa ?? '0',
description:
data.value?.totalRemainWeight.separatedByCommaFa ?? '0',
iconPath: Assets.vec.cubeSearchSvg.path,
bgDescriptionColor: const Color(0xFFEAEFFF),
bgLabelColor: const Color(0xFFBDD4FF),
@@ -337,7 +368,8 @@ class HomePage extends GetView<HomeLogic> {
child: _informationLabelCard(
title: 'توزیع شده',
isLoading: data.value == null,
description: data.value?.realAllocatedWeight.separatedByCommaFa ?? '0',
description:
data.value?.realAllocatedWeight.separatedByCommaFa ?? '0',
iconPath: Assets.vec.cubeRotateSvg.path,
iconColor: Color(0xFF5C4D64),
bgLabelColor: Color(0xFFC8B8D1),
@@ -375,7 +407,10 @@ class HomePage extends GetView<HomeLogic> {
child: Assets.vec.cubeScanSvg.svg(
width: 12.w,
height: 12.h,
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
colorFilter: const ColorFilter.mode(
Colors.white,
BlendMode.srcIn,
),
),
),
bgDescriptionColor: Colors.white,
@@ -395,7 +430,8 @@ class HomePage extends GetView<HomeLogic> {
title: 'درانتظار',
borderColor: const Color(0xFF9758FF),
isLoading: data.value == null,
description: data.value?.totalNotEnteredBars.separatedByCommaFa ?? '0',
description:
data.value?.totalNotEnteredBars.separatedByCommaFa ?? '0',
unit:
'(${data.value?.totalNotEnteredKillHouseRequestsWeight.separatedByCommaFa})\nکیلوگرم',
icon: Container(
@@ -409,7 +445,10 @@ class HomePage extends GetView<HomeLogic> {
child: Assets.vec.cubeCardFreeSvg.svg(
width: 12.w,
height: 12.h,
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
colorFilter: const ColorFilter.mode(
Colors.white,
BlendMode.srcIn,
),
),
),
bgDescriptionColor: Colors.white,
@@ -437,7 +476,12 @@ class HomePage extends GetView<HomeLogic> {
child: _informationLabelCard(
title: 'مانده دولتی',
isLoading: data.value == null,
description: data.value?.totalGovernmentalRemainWeight?.separatedByCommaFa ?? '0',
description:
data
.value
?.totalGovernmentalRemainWeight
?.separatedByCommaFa ??
'0',
iconPath: Assets.vec.cubeCardGovermentSvg.path,
iconColor: AppColor.textColor,
bgDescriptionColor: const Color(0xFFF5ECEE),
@@ -448,7 +492,8 @@ class HomePage extends GetView<HomeLogic> {
child: _informationLabelCard(
title: 'مانده آزاد',
isLoading: data.value == null,
description: data.value?.totalFreeRemainWeight.separatedByCommaFa ?? '0',
description:
data.value?.totalFreeRemainWeight.separatedByCommaFa ?? '0',
unit: 'کیلوگرم',
iconPath: Assets.vec.cubeCardFreeSvg.path,
iconColor: AppColor.textColor,
@@ -496,7 +541,10 @@ class HomePage extends GetView<HomeLogic> {
),
Divider(),
inventoryListItem(title: 'کل فروش', value: model.realAllocatedWeight?.separatedByComma),
inventoryListItem(
title: 'کل فروش',
value: model.realAllocatedWeight?.separatedByComma,
),
Divider(),
inventoryListItem(
title: 'مانده انبار',
@@ -515,14 +563,25 @@ class HomePage extends GetView<HomeLogic> {
children: [
Text(
title,
style: AppFonts.yekan14.copyWith(color: const Color(0xFF353535), height: 1.2),
style: AppFonts.yekan14.copyWith(
color: const Color(0xFF353535),
height: 1.2,
),
),
Spacer(),
value == null
? Center(child: CupertinoActivityIndicator())
: Text(value, style: AppFonts.yekan14.copyWith(color: const Color(0xFF353535))),
: Text(
value,
style: AppFonts.yekan14.copyWith(
color: const Color(0xFF353535),
),
),
SizedBox(width: 20.w),
Text('کیلوگرم', style: AppFonts.yekan10.copyWith(color: const Color(0xFF353535))),
Text(
'کیلوگرم',
style: AppFonts.yekan10.copyWith(color: const Color(0xFF353535)),
),
],
),
);
@@ -546,7 +605,9 @@ class HomePage extends GetView<HomeLogic> {
height: 65.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: borderColor != null ? Border.all(width: 1, color: borderColor) : null,
border: borderColor != null
? Border.all(width: 1, color: borderColor)
: null,
),
clipBehavior: Clip.hardEdge,
child: Row(
@@ -605,12 +666,16 @@ class HomePage extends GetView<HomeLogic> {
Text(
description,
textAlign: TextAlign.right,
style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan16.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
Text(
unit,
textAlign: TextAlign.center,
style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan12.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
],
),
@@ -656,7 +721,9 @@ class HomePage extends GetView<HomeLogic> {
Text(
title,
textAlign: TextAlign.right,
style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan14.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
isLoading
@@ -664,12 +731,16 @@ class HomePage extends GetView<HomeLogic> {
: Text(
description,
textAlign: TextAlign.right,
style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan16.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
Text(
unit,
textAlign: TextAlign.center,
style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan12.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
],
),
@@ -729,8 +800,14 @@ class HomePage extends GetView<HomeLogic> {
'کل ورودی به انبار (کیلوگرم)',
model.totalFreeBarsCarcassesWeight.toString(),
),
buildRow('کل فروش (کیلوگرم)', model.realAllocatedWeight.toString()),
buildRow('مانده انبار (کیلوگرم)', model.totalRemainWeight.toString()),
buildRow(
'کل فروش (کیلوگرم)',
model.realAllocatedWeight.toString(),
),
buildRow(
'مانده انبار (کیلوگرم)',
model.totalRemainWeight.toString(),
),
],
),
),
@@ -749,7 +826,9 @@ class HomePage extends GetView<HomeLogic> {
child: Text(
title,
textAlign: TextAlign.right,
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
),
Flexible(
@@ -757,7 +836,9 @@ class HomePage extends GetView<HomeLogic> {
child: Text(
value,
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
),
],
@@ -783,7 +864,9 @@ class HomePage extends GetView<HomeLogic> {
Text(
'اطلاعات ارسالی',
textAlign: TextAlign.right,
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
style: AppFonts.yekan16Bold.copyWith(
color: AppColor.blueNormal,
),
),
const SizedBox(height: 12),
buildRow(
@@ -816,7 +899,10 @@ class HomePage extends GetView<HomeLogic> {
return Container(
height: height?.h ?? 73.h,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: valueBgColor, borderRadius: BorderRadius.circular(8)),
decoration: BoxDecoration(
color: valueBgColor,
borderRadius: BorderRadius.circular(8),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
@@ -829,7 +915,9 @@ class HomePage extends GetView<HomeLogic> {
Text(
title ?? 'بدون تیتر',
textAlign: TextAlign.center,
style: titleStyle ?? AppFonts.yekan12.copyWith(color: const Color(0xFF3E3E3E)),
style:
titleStyle ??
AppFonts.yekan12.copyWith(color: const Color(0xFF3E3E3E)),
),
],
),
@@ -842,7 +930,9 @@ class HomePage extends GetView<HomeLogic> {
child: Text(
value,
textAlign: TextAlign.right,
style: valueStyle ?? AppFonts.yekan14.copyWith(color: AppColor.textColor),
style:
valueStyle ??
AppFonts.yekan14.copyWith(color: AppColor.textColor),
),
)
: Center(child: CupertinoActivityIndicator()),
@@ -850,7 +940,9 @@ class HomePage extends GetView<HomeLogic> {
Text(
unit ?? 'کیلوگرم',
textAlign: TextAlign.center,
style: unitStyle ?? AppFonts.yekan10.copyWith(color: Color(0xFF717171)),
style:
unitStyle ??
AppFonts.yekan10.copyWith(color: Color(0xFF717171)),
),
SizedBox(height: 4.h),
],
@@ -902,19 +994,29 @@ class HomePage extends GetView<HomeLogic> {
Row(
children: [
SizedBox(width: 5.w),
Text('تعهدات', textAlign: TextAlign.right, style: AppFonts.yekan16),
Text(
'تعهدات',
textAlign: TextAlign.right,
style: AppFonts.yekan16,
),
],
),
commitmentsItemList(
title: 'تعهد دولتی توزیع داخل استان',
value: data.value?.totalCommitmentSellingInProvinceGovernmentalWeight.separatedByComma,
value: data
.value
?.totalCommitmentSellingInProvinceGovernmentalWeight
.separatedByComma,
labelColor: const Color(0xFFB9E8DC),
bgColor: const Color(0xFFF3F9F8),
),
commitmentsItemList(
title: 'توزیع دولتی داخل استان',
value: data.value?.totalSellingInProvinceGovernmentalWeight.separatedByComma,
value: data
.value
?.totalSellingInProvinceGovernmentalWeight
.separatedByComma,
labelColor: const Color(0xFFC3D4F3),
bgColor: const Color(0xFFECF3FF),
),
@@ -929,19 +1031,26 @@ class HomePage extends GetView<HomeLogic> {
),
commitmentsItemList(
title: 'تعهد آزاد توزیع داخل استان',
value: data.value?.totalCommitmentSellingInProvinceFreeWeight.separatedByComma,
value: data
.value
?.totalCommitmentSellingInProvinceFreeWeight
.separatedByComma,
labelColor: const Color(0xFFC7DADA),
bgColor: const Color(0xFFE5F7F7),
),
commitmentsItemList(
title: 'توزیع آزاد داخل استان',
value: data.value?.totalSellingInProvinceFreeWeight.separatedByComma,
value:
data.value?.totalSellingInProvinceFreeWeight.separatedByComma,
labelColor: const Color(0xFFE0D6ED),
bgColor: const Color(0xFFF5EDFF),
),
commitmentsItemList(
title: 'باقیمانده تعهد آزاد توزیع داخل استان',
value: data.value?.totalCommitmentSellingInProvinceFreeRemainWeight.separatedByComma,
value: data
.value
?.totalCommitmentSellingInProvinceFreeRemainWeight
.separatedByComma,
labelColor: const Color(0xFFEBC5CE),
bgColor: const Color(0xFFFFF1F4),
),
@@ -986,7 +1095,9 @@ class HomePage extends GetView<HomeLogic> {
: Text(
value,
textAlign: TextAlign.right,
style: AppFonts.yekan16.copyWith(color: AppColor.textColor),
style: AppFonts.yekan16.copyWith(
color: AppColor.textColor,
),
),
SizedBox(width: 8.w),