refactor: Замена useGetPatientsQuery на useGetAllPatientsQuery
This commit is contained in:
parent
7a2ef98fd5
commit
7a2733cda6
@ -1,4 +1,4 @@
|
||||
import {useGetPatientsQuery} from "../../../Api/patientsApi.js";
|
||||
import {useGetAllPatientsQuery, useGetPatientsQuery} from "../../../Api/patientsApi.js";
|
||||
import {useGetAppointmentTypesQuery} from "../../../Api/appointmentTypesApi.js";
|
||||
import {
|
||||
useCreateAppointmentMutation,
|
||||
@ -11,7 +11,7 @@ const useAppointmentFormModal = () => {
|
||||
data: patients = [],
|
||||
isLoading: isLoadingPatients,
|
||||
isError: isErrorPatients,
|
||||
} = useGetPatientsQuery(undefined);
|
||||
} = useGetAllPatientsQuery(undefined);
|
||||
const {
|
||||
data: appointmentTypes = [],
|
||||
isLoading: isLoadingAppointmentTypes,
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
import {useCreateAppointmentMutation, useUpdateAppointmentMutation} from "../../../../../Api/appointmentsApi.js";
|
||||
import {
|
||||
useCreateScheduledAppointmentMutation,
|
||||
useUpdateScheduledAppointmentMutation
|
||||
} from "../../../../../Api/scheduledAppointmentsApi.js";
|
||||
|
||||
|
||||
const useAppointmentCalendar = () => {
|
||||
const [createAppointment] = useCreateAppointmentMutation();
|
||||
const [updateAppointment] = useUpdateAppointmentMutation();
|
||||
const [createScheduledAppointment] = useCreateScheduledAppointmentMutation();
|
||||
const [updateScheduledAppointment] = useUpdateScheduledAppointmentMutation();
|
||||
};
|
||||
@ -1,6 +1,6 @@
|
||||
import {useGetAppointmentsQuery} from "../../../Api/appointmentsApi.js";
|
||||
import {useGetScheduledAppointmentsQuery} from "../../../Api/scheduledAppointmentsApi.js";
|
||||
import {useGetPatientsQuery} from "../../../Api/patientsApi.js";
|
||||
import {useGetAllPatientsQuery} from "../../../Api/patientsApi.js";
|
||||
import {notification} from "antd";
|
||||
import {useEffect} from "react";
|
||||
import {useSelector} from "react-redux";
|
||||
@ -30,7 +30,7 @@ const useAppointments = () => {
|
||||
data: patients = [],
|
||||
isLoading: isLoadingPatients,
|
||||
isError: isErrorPatients,
|
||||
} = useGetPatientsQuery(undefined, {
|
||||
} = useGetAllPatientsQuery(undefined, {
|
||||
pollingInterval: 20000,
|
||||
});
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import {useGetAppointmentsQuery} from "../../../Api/appointmentsApi.js";
|
||||
import {useGetScheduledAppointmentsQuery} from "../../../Api/scheduledAppointmentsApi.js";
|
||||
import {useGetPatientsQuery} from "../../../Api/patientsApi.js";
|
||||
import {useGetAllPatientsQuery} from "../../../Api/patientsApi.js";
|
||||
import {notification} from "antd";
|
||||
import {useEffect} from "react";
|
||||
import {useDispatch, useSelector} from "react-redux";
|
||||
@ -15,9 +15,9 @@ import {
|
||||
} from "../../../Redux/Slices/patientsSlice.js";
|
||||
import dayjs from "dayjs";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
import {useGetAppointmentTypesQuery} from "../../../Api/appointmentTypesApi.js"; // Import isBetween plugin
|
||||
import {useGetAppointmentTypesQuery} from "../../../Api/appointmentTypesApi.js";
|
||||
|
||||
dayjs.extend(isBetween); // Extend dayjs with isBetween
|
||||
dayjs.extend(isBetween);
|
||||
|
||||
const useHomePage = () => {
|
||||
const dispatch = useDispatch();
|
||||
@ -46,7 +46,7 @@ const useHomePage = () => {
|
||||
data: patients = [],
|
||||
isLoading: isLoadingPatients,
|
||||
isError: isErrorPatients,
|
||||
} = useGetPatientsQuery(undefined, {
|
||||
} = useGetAllPatientsQuery(undefined, {
|
||||
pollingInterval: 20000,
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user