mirror of
http://88.130.71.182:3000/BlitTech/badoHair_fe.git
synced 2026-06-13 08:58:31 +00:00
Update May 24 by Elvis
This commit is contained in:
@@ -108,9 +108,12 @@ export const AdminProvider = ({ children }: { children: ReactNode }) => {
|
||||
|
||||
const updateReservationStatus = async (id: string, status: "confirmed" | "cancelled") => {
|
||||
await bookingsApi.adminUpdateBookingStatus(id, status);
|
||||
// Optimistic update for immediate feedback
|
||||
setReservations((prev) =>
|
||||
prev.map((r) => (r.id === id ? { ...r, status } : r))
|
||||
);
|
||||
// Refresh from server to ensure consistency
|
||||
refreshReservations();
|
||||
};
|
||||
|
||||
const deleteReservation = async (id: string) => {
|
||||
|
||||
Reference in New Issue
Block a user