Success Split Bill Page

This commit is contained in:
efrilm
2025-11-01 03:24:39 +07:00
parent 35f02e6b76
commit fecb4fb5c1
13 changed files with 862 additions and 156 deletions
@@ -480,7 +480,7 @@ class _SplitBillRightPanelState extends State<SplitBillRightPanel> {
selectedCustomer: widget.state.customer,
onSelected: (customer) {
context.read<SplitBillFormBloc>().add(
SplitBillFormEvent.customerChanged(customer!),
SplitBillFormEvent.customerChanged(customer),
);
},
),
@@ -488,7 +488,7 @@ class _SplitBillRightPanelState extends State<SplitBillRightPanel> {
}
void _confirmSplit() {
if (widget.state.customerName == '' || widget.state.customer == null) {
if (widget.state.customerName == '') {
AppFlushbar.showError(context, 'Nama Pelanggan harus diisi');
return;
@@ -519,6 +519,7 @@ class _SplitBillRightPanelState extends State<SplitBillRightPanel> {
isSplit: true,
splitType: widget.state.splitType,
customerId: widget.state.customer?.id,
customerName: widget.state.customerName,
order: widget.state.order.copyWith(
orderItems: splitItems,
subtotal: splitTotal,
@@ -540,6 +541,7 @@ class _SplitBillRightPanelState extends State<SplitBillRightPanel> {
isSplit: true,
splitType: widget.state.splitType,
customerId: widget.state.customer?.id,
customerName: widget.state.customerName,
order: widget.state.order.copyWith(
subtotal: widget.state.totalAmount,
totalAmount: widget.state.totalAmount,