create order
This commit is contained in:
@@ -304,26 +304,27 @@ class _CheckoutRightPanelState extends State<CheckoutRightPanel> {
|
||||
SpaceWidth(12),
|
||||
Expanded(
|
||||
child: AppElevatedButton.filled(
|
||||
onPressed: () {
|
||||
if (customerController.text == '') {
|
||||
AppFlushbar.showError(
|
||||
context,
|
||||
'Pilih Pelanggan terlebih dahulu',
|
||||
);
|
||||
return;
|
||||
}
|
||||
isLoading: orderState.isCreating,
|
||||
onPressed: orderState.isCreating
|
||||
? null
|
||||
: () {
|
||||
if (customerController.text == '') {
|
||||
AppFlushbar.showError(
|
||||
context,
|
||||
'Pilih Pelanggan terlebih dahulu',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
context.read<OrderFormBloc>().add(
|
||||
OrderFormEvent.createOrderWithPayment(
|
||||
items: widget.checkoutState.items,
|
||||
orderType: widget.checkoutState.orderType,
|
||||
table: widget.checkoutState.table,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
// context.read<OrderFormBloc>().add(
|
||||
// OrderFormEvent.createWithPayment(
|
||||
// items: items,
|
||||
// customerName: customerController.text,
|
||||
// orderType: orderType,
|
||||
// paymentMethod: selectedPaymentMethod!,
|
||||
// table: widget.table,
|
||||
// customer: selectedCustomer,
|
||||
// ),
|
||||
// );
|
||||
},
|
||||
label: 'Bayar',
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user