cart & checkout: UI enhacnements
This commit is contained in:
@@ -70,6 +70,7 @@ interface CartState {
|
||||
pickupType: string;
|
||||
order: any;
|
||||
splitBillAmount: number;
|
||||
customerName: string;
|
||||
}
|
||||
|
||||
// localStorage keys
|
||||
@@ -187,6 +188,7 @@ const initialState: CartState = {
|
||||
pickupType: getFromLocalStorage(CART_STORAGE_KEYS.PICKUP_TYPE, ""),
|
||||
order: getFromLocalStorage(CART_STORAGE_KEYS.ORDER, null),
|
||||
splitBillAmount: 0,
|
||||
customerName: "",
|
||||
};
|
||||
|
||||
const orderSlice = createSlice({
|
||||
@@ -637,6 +639,9 @@ const orderSlice = createSlice({
|
||||
updateSplitBillAmount(state, action: PayloadAction<number>) {
|
||||
state.splitBillAmount = action.payload;
|
||||
},
|
||||
updateCustomerName(state, action: PayloadAction<string>) {
|
||||
state.customerName = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -675,6 +680,7 @@ export const {
|
||||
updatePickUpType,
|
||||
updateOrder,
|
||||
updateSplitBillAmount,
|
||||
updateCustomerName,
|
||||
} = orderSlice.actions;
|
||||
|
||||
// Tax calculation helper functions
|
||||
|
||||
Reference in New Issue
Block a user