frontend phase 10

This commit is contained in:
hamid
2026-07-10 12:51:53 +03:30
parent 40cc1d163b
commit ccfa27aff6
32 changed files with 2151 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
/**
* React Query key factory for the refunds domain (hierarchical, per the `services/{domain}` pattern).
* The cancellation preview and the refund status are keyed by the **booking** id (the customer reaches a
* refund through its booking, never through an admin-only refund id); `detail` keys the by-refund-id read
* used by the real `refunds/{id}/status` route.
*/
export const refundKeys = {
all: ['refunds'] as const,
policyPreviews: () => [...refundKeys.all, 'policy_preview'] as const,
policyPreview: (bookingId: number) => [...refundKeys.policyPreviews(), bookingId] as const,
byBookings: () => [...refundKeys.all, 'by_booking'] as const,
byBooking: (bookingId: number) => [...refundKeys.byBookings(), bookingId] as const,
details: () => [...refundKeys.all, 'detail'] as const,
detail: (refundId: number) => [...refundKeys.details(), refundId] as const,
};