bugfix: appointment hours now use the client timezone on UTC servers.
Logical API errors throw stable codes so users see translated messages instead of a generic bad request. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { apiClient } from './client';
|
||||
import { getClientTimeZone } from '@/lib/i18n/clientTimeZone';
|
||||
|
||||
export interface StaffMemberDto {
|
||||
id: string;
|
||||
@@ -142,7 +143,10 @@ export const staffApi = {
|
||||
blocks: { dayOfWeek: number; startMinute: number; endMinute: number; sortOrder?: number }[];
|
||||
},
|
||||
): Promise<{ success: boolean; message: string }> => {
|
||||
const response = await apiClient.put(`/staff/members/${membershipId}/working-hours`, body);
|
||||
const response = await apiClient.put(`/staff/members/${membershipId}/working-hours`, {
|
||||
...body,
|
||||
timeZone: getClientTimeZone(),
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user