feat: update primaryRole handling in authStore and adjust context role for clinics
This commit is contained in:
@@ -1783,11 +1783,11 @@ function ScheduleSection({ doctorUuid }: { doctorUuid: string }) {
|
||||
|
||||
const locationsQ = useQuery({
|
||||
queryKey: ['available-locations', doctorUuid],
|
||||
queryFn: () => api.get<ApiResponse<AddressData[]>>(`/api/v1/appointment-settings/available-locations/${doctorUuid}`),
|
||||
queryFn: () => api.get<ApiResponse<any>>(`/api/v1/appointment-settings/available-locations/${doctorUuid}`),
|
||||
enabled: !!doctorUuid,
|
||||
staleTime: 30_000,
|
||||
});
|
||||
const availableLocations: AddressData[] = locationsQ.data?.data ?? [];
|
||||
const availableLocations: AddressData[] = locationsQ.data?.data?.data ?? locationsQ.data?.data ?? [];
|
||||
|
||||
return (
|
||||
<div className="cp-card p-6">
|
||||
|
||||
Reference in New Issue
Block a user