Table updates for new appointments fields. Schedule modal baseline functionality. Refactor schedule components to be more reusable.
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
import React from "react";
|
||||
import { useQuery } from "react-apollo";
|
||||
import ScheduleCalendarComponent from "./schedule-calendar.component";
|
||||
import { QUERY_ALL_APPOINTMENTS } from "../../graphql/appointments.queries";
|
||||
import { QUERY_ALL_ACTIVE_APPOINTMENTS } from "../../graphql/appointments.queries";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
|
||||
export default function ScheduleCalendarContainer() {
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_ALL_APPOINTMENTS, {
|
||||
fetchPolicy: "network-only"
|
||||
});
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
QUERY_ALL_ACTIVE_APPOINTMENTS,
|
||||
{
|
||||
fetchPolicy: "network-only"
|
||||
}
|
||||
);
|
||||
|
||||
if (loading) return <LoadingSpinner />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
Reference in New Issue
Block a user