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