Table updates for new appointments fields. Schedule modal baseline functionality. Refactor schedule components to be more reusable.

This commit is contained in:
Patrick Fic
2020-02-06 13:39:39 -08:00
parent 1a14fb8da6
commit fae1e8cdeb
35 changed files with 785 additions and 67 deletions

View File

@@ -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" />;