Update group booking and package

This commit is contained in:
Roba Boru
2026-08-27 22:54:59 +03:00
parent 5c2100e76d
commit 1603ff8211
35 changed files with 1170 additions and 377 deletions

View File

@@ -475,6 +475,15 @@ export const packagesApi = {
addTier: (packageId: string, data: any) => apiClient.post<any>(`/packages/${packageId}/tiers`, data),
updateTier: (tierId: string, data: any) => apiClient.patch<any>(`/packages/tiers/${tierId}`, data),
deleteTier: (tierId: string) => apiClient.delete(`/packages/tiers/${tierId}`),
// `apiClient` pins Content-Type: application/json on every request — clearing it (rather than
// setting multipart/form-data by hand, which omits the boundary) is what lets the browser
// generate a proper boundary of its own. Same pattern as features/support/supportApi.ts.
uploadImage: (id: string, file: File) => {
const form = new FormData();
form.append('image', file);
return apiClient.post<any>(`/packages/${id}/image`, form, { headers: { 'Content-Type': undefined } });
},
removeImage: (id: string) => apiClient.delete<any>(`/packages/${id}/image`),
};
// Package Inquiries API