improvement: datepicker component now let user choose past dates too.
This commit is contained in:
@@ -9,6 +9,8 @@ export interface CreateAppointmentBody {
|
||||
purpose: string;
|
||||
}
|
||||
|
||||
export type UpdateAppointmentBody = Partial<CreateAppointmentBody>;
|
||||
|
||||
export const appointmentsApi = {
|
||||
columnProviders: async (): Promise<{ success: boolean; data: AppointmentColumnProvider[] }> => {
|
||||
const response = await apiClient.get('/appointments/column-providers');
|
||||
@@ -25,6 +27,14 @@ export const appointmentsApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
update: async (
|
||||
id: string,
|
||||
body: UpdateAppointmentBody,
|
||||
): Promise<{ success: boolean; data: AppointmentRecord }> => {
|
||||
const response = await apiClient.patch(`/appointments/${id}`, body);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
remove: async (id: string): Promise<{ success: boolean }> => {
|
||||
const response = await apiClient.delete(`/appointments/${id}`);
|
||||
return response.data;
|
||||
|
||||
Reference in New Issue
Block a user