feat : segment page

This commit is contained in:
2025-07-15 09:03:11 +03:30
parent f79a3ae46f
commit b1496b1ed0
15 changed files with 63 additions and 63 deletions

View File

@@ -17,7 +17,7 @@ class SegmentationPage extends GetView<SegmentationLogic> {
routes: controller.routesName,
onSearchChanged: (data) => controller.setSearchValue(data),
filteringWidget: filterBottomSheet(),
isBase: true,
hasBack: false,
widgets: [
Expanded(
child: ObxValue((data) {
@@ -41,7 +41,8 @@ class SegmentationPage extends GetView<SegmentationLogic> {
child: itemListWidget(item),
secondChild: itemListExpandedWidget(item, index),
labelColor: AppColor.blueLight,
labelIcon: Assets.vec.timerSvg.path,
labelIconColor: AppColor.customGrey,
labelIcon: Assets.vec.convertCubeSvg.path,
);
}, controller.isExpandedList);
},
@@ -51,11 +52,10 @@ class SegmentationPage extends GetView<SegmentationLogic> {
}, controller.segmentationList),
),
],
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
floatingActionButton: RFab.add(
onPressed: () {
//TODO
//Get.bottomSheet(addOrEditSaleBottomSheet(), isScrollControlled: true);
Get.bottomSheet(addOrEditBottomSheet(), isScrollControlled: true);
},
),
);
@@ -221,7 +221,7 @@ class SegmentationPage extends GetView<SegmentationLogic> {
Widget addOrEditBottomSheet([bool isOnEdit = false]) {
return BaseBottomSheet(
height: 500.h,
height: 300.h,
child: SingleChildScrollView(
child: Form(
key: controller.formKey,
@@ -244,18 +244,14 @@ class SegmentationPage extends GetView<SegmentationLogic> {
child: Column(
spacing: 12,
children: [
RTextField(
UnitTextField(
hint: 'وزن',
unit: 'کیلوگرم',
controller: controller.weightController,
label: 'وزن',
keyboardType: TextInputType.number,
borderColor: AppColor.darkGreyLight,
filledColor: AppColor.bgLight,
filled: true,
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
SeparatorInputFormatter(),
],
validator: (value) {
if (value == null) {
return 'لطفاً وزن لاشه را وارد کنید';
@@ -295,13 +291,13 @@ class SegmentationPage extends GetView<SegmentationLogic> {
: null,
height: 40,
);
}, controller.isSaleSubmitButtonEnabled);
}, controller.isSubmitButtonEnabled);
}
Widget _productDropDown() {
return Obx(() {
return OverlayDropdownWidget<ProductModel>(
items: controller.rolesProductsModel,
items: controller.rootLogic.rolesProductsModel,
height: 56,
hasDropIcon: false,
background: Colors.white,
@@ -321,7 +317,7 @@ class SegmentationPage extends GetView<SegmentationLogic> {
Text(item?.name ?? 'انتخاب محصول'),
Spacer(),
Text(
'موجودی:${controller.rootLogic.inventoryModel.value?.totalRemainWeight.separatedByComma ?? 0}',
'موجودی: ${controller.rootLogic.inventoryModel.value?.totalRemainWeight.separatedByComma ?? 0} کیلوگرم',
),
],
),