fix : some ui bug
This commit is contained in:
@@ -18,8 +18,8 @@ part 'app_paths.dart';
|
||||
sealed class AppPages {
|
||||
AppPages._();
|
||||
|
||||
//static const String initRoutes = AppPaths.splash;
|
||||
static const String initRoutes = AppPaths.test;
|
||||
static const String initRoutes = AppPaths.splash;
|
||||
// static const String initRoutes = AppPaths.test;
|
||||
static const String initDesignSystem = AppPaths.systemDesignPage;
|
||||
|
||||
static List<GetPage> pages = [
|
||||
|
||||
@@ -74,6 +74,7 @@ class GenocidePage extends GetView<GenocideLogic> {
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.timerSvg.path,
|
||||
labelIconColor: AppColor.yellowNormal2,
|
||||
);
|
||||
}, controller.expandedIndex);
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 8.h),
|
||||
SizedBox(height: 18.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.isExpanded.value = !controller.isExpanded.value;
|
||||
|
||||
@@ -57,6 +57,9 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
labelIcon: item.reportInfo?.image == false
|
||||
? Assets.vec.timerSvg.path
|
||||
: Assets.vec.checkSquareSvg.path,
|
||||
labelIconColor: item.reportInfo?.image == false
|
||||
? AppColor.yellowNormal2
|
||||
: AppColor.mediumGreyDarkHover,
|
||||
);
|
||||
}, controller.expandedIndex);
|
||||
},
|
||||
|
||||
@@ -174,4 +174,11 @@ class BuyInProvinceAllLogic extends GetxController {
|
||||
isExpandedListIndex.value = index;
|
||||
}
|
||||
}
|
||||
|
||||
Color getLabelColor(String? receiverState) {
|
||||
if (receiverState == 'pending') {
|
||||
return AppColor.yellowNormal2;
|
||||
}
|
||||
return AppColor.mediumGreyDarkHover;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
labelColor: getLabelColor(item.receiverState),
|
||||
labelIcon: controller.getVecPathItem(item.receiverState),
|
||||
labelIconColor: controller.getLabelColor(item.receiverState),
|
||||
);
|
||||
}, controller.isExpandedListIndex);
|
||||
},
|
||||
@@ -87,9 +88,10 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${item.weightOfCarcasses?.separatedByCommaFa}kg',
|
||||
item.weightOfCarcasses?.separatedByCommaFa.addKg ?? 'N/A',
|
||||
textAlign: TextAlign.left,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
textDirection: TextDirection.ltr,
|
||||
style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -195,15 +197,21 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
||||
buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'وزن خریداری شده',
|
||||
value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم',
|
||||
value: item.weightOfCarcasses?.separatedByCommaFa ?? 'N/A',
|
||||
valueLabel: 'کیلوگرم',
|
||||
),
|
||||
buildRow(
|
||||
title: 'قیمت هر کیلوگرم',
|
||||
titleLabel: (item.approvedPriceStatus ?? false) ? 'مصوب' : 'آزاد',
|
||||
titleLabelStyle: AppFonts.yekan14Bold.copyWith(color: AppColor.greenNormal),
|
||||
value: '${item.amount?.separatedByCommaFa} ریال',
|
||||
value: item.amount?.separatedByCommaFa ?? 'N/A',
|
||||
valueLabel: 'ریال',
|
||||
),
|
||||
buildRow(
|
||||
title: 'قیمت کل',
|
||||
value: item.totalAmount?.separatedByCommaFa ?? 'N/A',
|
||||
valueLabel: 'ریال',
|
||||
),
|
||||
buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'),
|
||||
|
||||
Visibility(
|
||||
visible: item.receiverState == 'pending',
|
||||
@@ -222,7 +230,6 @@ class BuyInProvinceAllPage extends GetView<BuyInProvinceAllLogic> {
|
||||
conformationBottomSheet(item),
|
||||
isScrollControlled: true,
|
||||
).then((value) {
|
||||
|
||||
Get.back();
|
||||
controller.clearApprovedController();
|
||||
});
|
||||
|
||||
@@ -32,6 +32,7 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.timerSvg.path,
|
||||
labelIconColor: AppColor.yellowNormal2,
|
||||
);
|
||||
}, controller.isExpandedListIndex);
|
||||
},
|
||||
@@ -90,9 +91,10 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${item.weightOfCarcasses?.separatedByCommaFa}kg',
|
||||
item.weightOfCarcasses?.separatedByCommaFa.addKg ?? 'N/A',
|
||||
textAlign: TextAlign.left,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
textDirection: TextDirection.ltr,
|
||||
style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -19,13 +19,14 @@ class HomePage extends GetView<HomeLogic> {
|
||||
isBase: true,
|
||||
onRefresh: controller.refreshData,
|
||||
child: SingleChildScrollView(
|
||||
padding: EdgeInsets.only(bottom: 100.h),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 18.h),
|
||||
mainInformation(),
|
||||
SizedBox(height: 8.h),
|
||||
WidelyUsedWidget(),
|
||||
SizedBox(height: 20),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -189,9 +189,10 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${item.weightOfCarcasses?.separatedByCommaFa}kg',
|
||||
item.weightOfCarcasses!.separatedByCommaFa.addKg,
|
||||
textAlign: TextAlign.left,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
textDirection: TextDirection.ltr,
|
||||
style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:rasadyar_chicken/data/models/response/roles_products/roles_produ
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/steward/inventory_widget.dart';
|
||||
@@ -140,11 +141,11 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
||||
),
|
||||
|
||||
Text(
|
||||
'${item.weightOfCarcasses?.separatedByCommaFa ?? 0}KG',
|
||||
item.weightOfCarcasses!.separatedByCommaFa.addKg,
|
||||
textAlign: TextAlign.center,
|
||||
textDirection: TextDirection.ltr,
|
||||
style: AppFonts.yekan12Bold.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -176,8 +177,6 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 8,
|
||||
children: [
|
||||
|
||||
|
||||
Text(
|
||||
item.buyer?.province ?? 'N/A',
|
||||
textAlign: TextAlign.center,
|
||||
@@ -191,7 +190,6 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -257,12 +255,30 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
||||
buildRow(title: 'تلفن خریدار', value: item.buyer?.mobile ?? 'N/A'),
|
||||
buildRow(title: 'نام واحد', value: item.buyer?.unitName ?? 'N/A'),
|
||||
buildRow(
|
||||
title: 'وزن لاشه (کیلوگرم)',
|
||||
title: 'وزن لاشه ',
|
||||
value: '${item.weightOfCarcasses?.separatedByCommaFa}',
|
||||
valueLabel: 'کیلوگرم'
|
||||
),
|
||||
buildRow(
|
||||
title: 'حجم تقریبی لاشه (قطعه)',
|
||||
title: 'حجم تقریبی لاشه ',
|
||||
value: '${item.numberOfCarcasses?.separatedByCommaFa}',
|
||||
valueLabel: 'قطعه'
|
||||
|
||||
),
|
||||
buildRow(
|
||||
title: 'انبار فروش',
|
||||
value: '${item.quota?.faTitle}',
|
||||
),
|
||||
buildRow(
|
||||
title: 'کد قرنطینه ',
|
||||
value: item.clearanceCode?? 'بدون کد',
|
||||
),
|
||||
|
||||
buildRow(
|
||||
title: 'حجم تقریبی لاشه ',
|
||||
value: '${item.numberOfCarcasses?.separatedByCommaFa}',
|
||||
valueLabel: 'قطعه'
|
||||
|
||||
),
|
||||
|
||||
Row(
|
||||
|
||||
@@ -53,7 +53,7 @@ class SalesOutOfProvinceBuyersPage extends GetView<SalesOutOfProvinceBuyersLogic
|
||||
return ObxValue((val) {
|
||||
return ExpandableListItem2(
|
||||
selected: val.value == index,
|
||||
onTap: () => controller.toggleExpansion(),
|
||||
onTap: () => controller.toggleExpansion(index: index),
|
||||
index: index,
|
||||
child: itemListWidget(item),
|
||||
secondChild: itemListExpandedWidget(item),
|
||||
@@ -304,7 +304,16 @@ class SalesOutOfProvinceBuyersPage extends GetView<SalesOutOfProvinceBuyersLogic
|
||||
title: 'تعداد درخواست ها',
|
||||
value: '${item.requestsInfo?.numberOfRequests.separatedByCommaFa}',
|
||||
),
|
||||
buildRow(title: 'وزن', value: '${item.requestsInfo?.totalWeight.separatedByCommaFa}'),
|
||||
buildRow(
|
||||
title: 'حجم تقریبی',
|
||||
value: '${item.requestsInfo?.totalQuantity.separatedByCommaFa}',
|
||||
valueLabel: 'قطعه',
|
||||
),
|
||||
buildRow(
|
||||
title: 'وزن',
|
||||
value: '${item.requestsInfo?.totalWeight.separatedByCommaFa}',
|
||||
valueLabel: 'کیلوگرم',
|
||||
),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -34,6 +34,7 @@ class SalesOutOfProvinceSalesListPage extends GetView<SalesOutOfProvinceSalesLis
|
||||
secondChild: itemListExpandedWidget(item, index),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.timerSvg.path,
|
||||
labelIconColor: AppColor.yellowNormal2,
|
||||
);
|
||||
}, controller.expandedListIndex);
|
||||
},
|
||||
|
||||
@@ -132,9 +132,10 @@ class SegmentationPage extends GetView<SegmentationLogic> {
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
'${item.weight.separatedByCommaFa} KG',
|
||||
item.weight.separatedByCommaFa.addKg,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||
textDirection: TextDirection.ltr,
|
||||
style: AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -207,7 +208,10 @@ class SegmentationPage extends GetView<SegmentationLogic> {
|
||||
: item.buyer?.shop ?? 'N/A',
|
||||
),
|
||||
buildRow(title: 'ماهیت', value: item.toGuild != null ? 'مباشر' : 'قطعهبند'),
|
||||
buildRow(title: 'وزن قطعهبندی', value: '${item.weight?.separatedByCommaFa}'),
|
||||
buildRow(title: 'وزن قطعهبندی',
|
||||
value: item.weight!.separatedByCommaFa,
|
||||
valueLabel: 'کیلوگرم'
|
||||
),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -128,12 +128,15 @@ class AppColor {
|
||||
static const Color yellowLightHover = Color(0xFFfff6da); // #fff6da rgb(255, 246, 218)
|
||||
static const Color yellowLightActive = Color(0xFFffecb2); // #ffecb2 rgb(255, 236, 178)
|
||||
static const Color yellowNormal = Color(0xFFffc107); // #ffc107 rgb(255, 193, 7)
|
||||
static const Color yellowNormal2 = Color(0xFFFF9800); // #FF9800 rgb(255, 152, 0)
|
||||
static const Color yellowNormalHover = Color(0xFFe6ae06); // #e6ae06 rgb(230, 174, 6)
|
||||
static const Color yellowNormalActive = Color(0xFFcc9a06); // #cc9a06 rgb(204, 154, 6)
|
||||
static const Color yellowDark = Color(0xFFbf9105); // #bf9105 rgb(191, 145, 5)
|
||||
static const Color yellowDarkHover = Color(0xFF997404); // #997404 rgb(153, 116, 4)
|
||||
static const Color yellowDarkActive = Color(0xFF735703); // #735703 rgb(115, 87, 3)
|
||||
static const Color yellowDarker = Color(0xFF594402); // #594402 rgb(89, 68, 2)
|
||||
|
||||
// #594402 rgb(89, 68, 2)
|
||||
//endregion
|
||||
|
||||
//region --- red Colors ---
|
||||
|
||||
@@ -85,6 +85,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
if (hasNotification) SizedBox(width: 8.w),
|
||||
|
||||
if (!isBase) ...{
|
||||
SizedBox(width: 8.w),
|
||||
if (hasFilter)
|
||||
GestureDetector(
|
||||
onTap: onFilterTap,
|
||||
@@ -95,7 +96,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
),
|
||||
),
|
||||
if (hasBack) SizedBox(width: 8.w),
|
||||
|
||||
if (hasSearch) SizedBox(width: 8.w),
|
||||
if (hasSearch) GestureDetector(
|
||||
onTap: onSearchTap,
|
||||
child: Assets.vec.searchSvg.svg(
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:persian_datetime_picker/persian_datetime_picker.dart';
|
||||
|
||||
extension XString on String {
|
||||
extension XString on String? {
|
||||
String get separatedByComma {
|
||||
final formatter = NumberFormat('#,###');
|
||||
final number = num.tryParse(this);
|
||||
return number != null ? formatter.format(number) : this;
|
||||
final number = num.tryParse(this ?? '');
|
||||
return number != null ? formatter.format(number) : (this ?? '');
|
||||
}
|
||||
|
||||
String get clearComma {
|
||||
return replaceAll(RegExp(r'\D'), '');
|
||||
return (this ?? '').replaceAll(RegExp(r'\D'), '');
|
||||
}
|
||||
|
||||
String get addCountEXT {
|
||||
@@ -20,21 +20,29 @@ extension XString on String {
|
||||
return '$thisروزه';
|
||||
}
|
||||
|
||||
String get addKgEXT {
|
||||
return '$this کیلوگرم';
|
||||
String get addKgFa {
|
||||
return '${this ?? 0}کیلوگرم ';
|
||||
}
|
||||
|
||||
DateTime get toDateTime => DateTime.parse(this);
|
||||
String get addKgFaWithParentheses {
|
||||
return '${this ?? 0} (کیلوگرم)';
|
||||
}
|
||||
|
||||
String get addKg {
|
||||
return '$this KG';
|
||||
}
|
||||
|
||||
DateTime get toDateTime => DateTime.parse(this ?? '');
|
||||
|
||||
String get formattedJalaliDate {
|
||||
String tmp = contains("/") ? replaceAll("/", "-") : this;
|
||||
String tmp = (this != null && this!.contains("/")) ? this!.replaceAll("/", "-") : (this ?? "");
|
||||
final dateTime = DateTime.parse(tmp);
|
||||
final jalaliDate = Jalali.fromDateTime(dateTime);
|
||||
return "${jalaliDate.year}/${jalaliDate.month.toString().padLeft(2, '0')}/${jalaliDate.day.toString().padLeft(2, '0')}";
|
||||
}
|
||||
|
||||
String get formattedJalaliDateYHMS {
|
||||
final dateTime = DateTime.parse(this);
|
||||
final dateTime = DateTime.parse(this ?? '');
|
||||
final jalaliDate = Jalali.fromDateTime(dateTime);
|
||||
return "${jalaliDate.hour.toString().padLeft(2, '0')}:${jalaliDate.minute.toString().padLeft(2, '0')} - ${jalaliDate.year}/${jalaliDate.month.toString().padLeft(2, '0')}/${jalaliDate.day.toString().padLeft(2, '0')}";
|
||||
}
|
||||
@@ -44,9 +52,9 @@ extension XString on String {
|
||||
}
|
||||
|
||||
Jalali get toJalali {
|
||||
final dateTime = DateTime.parse(this);
|
||||
final dateTime = DateTime.parse(this ?? '');
|
||||
return Jalali.fromDateTime(dateTime);
|
||||
}
|
||||
|
||||
int get versionNumber => int.parse(replaceAll(".", ''));
|
||||
int get versionNumber => int.parse(this?.replaceAll(".", '') ?? '0');
|
||||
}
|
||||
|
||||
@@ -558,12 +558,12 @@ class MapPage extends GetView<MapLogic> {
|
||||
|
||||
buildRow(
|
||||
title: 'میانگین وزن کشتار',
|
||||
value: hatchingDetails?.totalAverageKilledWeight.toString().addKgEXT ?? 'N/A',
|
||||
value: hatchingDetails?.totalAverageKilledWeight.toString().addKgFa ?? 'N/A',
|
||||
),
|
||||
|
||||
buildRow(
|
||||
title: 'وزن کشتار',
|
||||
value: hatchingDetails?.totalKilledWeight.separatedByCommaFa.addKgEXT ?? 'N/A',
|
||||
value: hatchingDetails?.totalKilledWeight.separatedByCommaFa.addKgFa ?? 'N/A',
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user