fix : edit or delete in list item expanded when in state waiting for buyer conformation

This commit is contained in:
2025-07-15 09:38:08 +03:30
parent 3bc87340d4
commit 699d18977c

View File

@@ -280,43 +280,46 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
value: item.systemRegistrationCode == true ? "ارسال شده" : "ارسال نشده", value: item.systemRegistrationCode == true ? "ارسال شده" : "ارسال نشده",
), ),
Row( Visibility(
mainAxisAlignment: MainAxisAlignment.center, visible: item.registrationCode == null,
spacing: 16.w, child: Row(
children: [ mainAxisAlignment: MainAxisAlignment.center,
RElevated( spacing: 16.w,
text: 'ویرایش', children: [
width: 150.w, RElevated(
height: 40.h, text: 'ویرایش',
onPressed: () { width: 150.w,
controller.setEditData(item); height: 40.h,
Get.bottomSheet( onPressed: () {
addOrEditBottomSheet(true), controller.setEditData(item);
isScrollControlled: true, Get.bottomSheet(
backgroundColor: Colors.transparent, addOrEditBottomSheet(true),
); isScrollControlled: true,
}, backgroundColor: Colors.transparent,
textStyle: AppFonts.yekan20.copyWith(color: Colors.white), );
backgroundColor: AppColor.greenNormal, },
), textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
ROutlinedElevated( backgroundColor: AppColor.greenNormal,
text: 'حذف', ),
textStyle: AppFonts.yekan20.copyWith(color: AppColor.redNormal), ROutlinedElevated(
width: 150.w, text: 'حذف',
height: 40.h, textStyle: AppFonts.yekan20.copyWith(color: AppColor.redNormal),
onPressed: () { width: 150.w,
buildDeleteDialog( height: 40.h,
onConfirm: () async { onPressed: () {
controller.isExpandedList.remove(index); buildDeleteDialog(
// controller.denyAllocation(item.key ?? ''); onConfirm: () async {
//await controller.deleteAllocation(item); controller.isExpandedList.remove(index);
}, // controller.denyAllocation(item.key ?? '');
onRefresh: () => controller.getAllocatedMade(), //await controller.deleteAllocation(item);
); },
}, onRefresh: () => controller.getAllocatedMade(),
borderColor: AppColor.redNormal, );
), },
], borderColor: AppColor.redNormal,
),
],
),
), ),
], ],
), ),