cart & checkout: UI enhacnements

This commit is contained in:
2025-12-25 21:13:25 +03:00
parent 90e729cdce
commit ce9092d634
24 changed files with 167 additions and 86 deletions

View File

@@ -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