feat : alert for all conformation fab button
This commit is contained in:
@@ -48,7 +48,9 @@ class BuyInProvinceWaitingPage extends GetView<BuyInProvinceWaitingLogic> {
|
|||||||
floatingActionButton: ObxValue((data) {
|
floatingActionButton: ObxValue((data) {
|
||||||
if ((data.value.data?.results?.length ?? 0) > 1) {
|
if ((data.value.data?.results?.length ?? 0) > 1) {
|
||||||
return AnimatedFab(
|
return AnimatedFab(
|
||||||
onPressed: () {},
|
onPressed: () {
|
||||||
|
//TODO FAB
|
||||||
|
},
|
||||||
message: 'تایید یکجا',
|
message: 'تایید یکجا',
|
||||||
icon: Assets.vec.clipboardTaskSvg.svg(width: 45.w, height: 42.h),
|
icon: Assets.vec.clipboardTaskSvg.svg(width: 45.w, height: 42.h),
|
||||||
backgroundColor: controller.bgConfirmAllColor.value,
|
backgroundColor: controller.bgConfirmAllColor.value,
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
secondChild: itemListExpandedWidget(item, index),
|
secondChild: itemListExpandedWidget(item, index),
|
||||||
labelColor: AppColor.blueLight,
|
labelColor: AppColor.blueLight,
|
||||||
labelIcon: Assets.vec.timerSvg.path,
|
labelIcon: Assets.vec.timerSvg.path,
|
||||||
labelIconColor: item.registrationCode == null ? AppColor.darkGreyDark : AppColor.error,
|
labelIconColor: item.registrationCode == null
|
||||||
|
? AppColor.darkGreyDark
|
||||||
|
: AppColor.error,
|
||||||
);
|
);
|
||||||
}, controller.isExpandedList);
|
}, controller.isExpandedList);
|
||||||
},
|
},
|
||||||
@@ -85,8 +87,37 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
return Visibility(
|
return Visibility(
|
||||||
visible: (data.value.data?.results?.length ?? 0) > 1,
|
visible: (data.value.data?.results?.length ?? 0) > 1,
|
||||||
child: AnimatedFab(
|
child: AnimatedFab(
|
||||||
|
onPressed: () async {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'تایید یکجا',
|
||||||
|
middleText: 'آیا از تایید تمامی تخصیص ها اطمینان دارید؟',
|
||||||
|
confirm: ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await controller.confirmAllAllocations();
|
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: 'تایید یکجا',
|
message: 'تایید یکجا',
|
||||||
icon: Assets.vec.clipboardTaskSvg.svg(width: 40.w, height: 40.h),
|
icon: Assets.vec.clipboardTaskSvg.svg(width: 40.w, height: 40.h),
|
||||||
|
|||||||
Reference in New Issue
Block a user