feat : alert for all conformation fab button

This commit is contained in:
2025-07-15 10:31:37 +03:30
parent 699d18977c
commit f1b2e20056
2 changed files with 36 additions and 3 deletions

View File

@@ -48,7 +48,9 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
floatingActionButton: ObxValue((data) {
if ((data.value.data?.results?.length ?? 0) > 1) {
return AnimatedFab(
onPressed: () {},
onPressed: () {
//TODO FAB
},
message: 'تایید یکجا',
icon: Assets.vec.clipboardTaskSvg.svg(width: 45.w, height: 42.h),
backgroundColor: controller.bgConfirmAllColor.value,

View File

@@ -55,7 +55,9 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
secondChild: itemListExpandedWidget(item, index),
labelColor: AppColor.blueLight,
labelIcon: Assets.vec.timerSvg.path,
labelIconColor: item.registrationCode == null ? AppColor.darkGreyDark : AppColor.error,
labelIconColor: item.registrationCode == null
? AppColor.darkGreyDark
: AppColor.error,
);
}, controller.isExpandedList);
},
@@ -86,7 +88,36 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
visible: (data.value.data?.results?.length ?? 0) > 1,
child: AnimatedFab(
onPressed: () async {
await controller.confirmAllAllocations();
Get.defaultDialog(
title: 'تایید یکجا',
middleText: 'آیا از تایید تمامی تخصیص ها اطمینان دارید؟',
confirm: ElevatedButton(
onPressed: () async {
await controller.confirmAllAllocations();
controller.getAllocatedMade();
controller.rootLogic.getInventory();
Get.back();
},
child: Text('تایید'),
style: ElevatedButton.styleFrom(
backgroundColor: AppColor.blueNormal,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
),
cancel: OutlinedButton(
style: OutlinedButton.styleFrom(
foregroundColor: AppColor.error,
enableFeedback: true,
side: BorderSide(color: AppColor.error, width: 1),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
onPressed: () {
Get.back();
},
child: Text('لغو'),
),
);
},
message: 'تایید یکجا',
icon: Assets.vec.clipboardTaskSvg.svg(width: 40.w, height: 40.h),