Commit 45828f6e authored by Dio Maulana's avatar Dio Maulana

Hide Tombol Batalkan CC Mandiri ketika status table lock

parent be178cf2
......@@ -1172,30 +1172,36 @@ class CoreBill extends StatelessWidget {
],
)
: const SizedBox()
: Column(
children: [
const SizedBox(
height: 12,
),
GestureDetector(
onTap: () {
Api.addCancelPromotion(
dataBill[0].id,
false,
).then((value) {
if (value) {
context.read<ViewBillBloc>().getBill();
}
});
},
child: ButtonComponent(
buttonColor: cancelColorButton,
teksButton: 'Batalkan Promo CC Mandiri',
teksButtonColor: textColorBlack,
),
: (dataBill[0].tableStatus == tableStatusOpen)
? Column(
children: [
const SizedBox(
height: 12,
),
GestureDetector(
onTap: () {
Api.addCancelPromotion(
dataBill[0].id,
false,
).then((value) {
if (value) {
context
.read<ViewBillBloc>()
.getBill();
}
});
},
child: ButtonComponent(
buttonColor: cancelColorButton,
teksButton: 'Batalkan Promo CC Mandiri',
teksButtonColor: textColorBlack,
),
),
],
)
: const SizedBox(
height: 5,
),
],
),
const SizedBox(
height: 5,
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment