fix success add item order
This commit is contained in:
@@ -58,6 +58,7 @@ class _CheckoutRightPanelState extends State<CheckoutRightPanel> {
|
||||
context.read<OrderFormBloc>().add(
|
||||
OrderFormEvent.customerNameChanged(customerController.text),
|
||||
);
|
||||
context.read<CheckoutFormBloc>().add(CheckoutFormEvent.customerNameChanged(customerController.text));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+4
-5
@@ -108,10 +108,7 @@ class SuccessAddItemOrderLeftPanel extends StatelessWidget {
|
||||
icon: Icons.person,
|
||||
label: 'Pemesan',
|
||||
value:
|
||||
checkoutState
|
||||
.orderAdded
|
||||
?.metadata['customer_name'] ??
|
||||
"-",
|
||||
checkoutState.customerName,
|
||||
),
|
||||
if (checkoutState.orderAdded?.payments.isNotEmpty ??
|
||||
false) ...[
|
||||
@@ -195,7 +192,9 @@ class SuccessAddItemOrderLeftPanel extends StatelessWidget {
|
||||
context.read<PrintStruckBloc>().add(
|
||||
PrintStruckEvent.order(
|
||||
Order.fromLastOrder(
|
||||
order,
|
||||
order.copyWith(metadata: {
|
||||
"customer_name": checkoutState.customerName
|
||||
}),
|
||||
checkoutState.items,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user