feat: update type and customer is required

This commit is contained in:
efrilm
2025-08-06 00:36:13 +07:00
parent 092e68615c
commit 37ed6686f8
4 changed files with 87 additions and 38 deletions
@@ -876,16 +876,26 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
SpaceWidth(12),
Expanded(
child: Button.filled(
onPressed: () => showDialog(
context: context,
builder: (dcontext) => SaveDialog(
selectedTable: widget.table,
customerName: customerController.text,
items: items,
orderType: orderType,
customer: selectedCustomer,
),
),
onPressed: () {
if (customerController.text == '') {
AppFlushbar.showError(
context,
'Pilih Pelanggan terlebih dahulu',
);
return;
}
showDialog(
context: context,
builder: (dcontext) => SaveDialog(
selectedTable: widget.table,
customerName: customerController.text,
items: items,
orderType: orderType,
customer: selectedCustomer,
),
);
},
label: 'Simpan',
),
),
@@ -914,6 +924,15 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
child: state.maybeMap(
orElse: () => Button.filled(
onPressed: () {
if (customerController.text ==
'') {
AppFlushbar.showError(
context,
'Pilih Pelanggan terlebih dahulu',
);
return;
}
context.read<OrderFormBloc>().add(
OrderFormEvent.create(
items: items,