Renamed some owner fields to follow CIECA standard. Work on Owner Select modal.

This commit is contained in:
Patrick Fic
2020-01-29 09:52:02 -08:00
parent 1cdedac0a8
commit 7d6969b186
49 changed files with 691 additions and 135 deletions

View File

@@ -1,19 +1,20 @@
import React from "react";
import { useQuery, useMutation } from "react-apollo";
import { useMutation, useQuery } from "react-apollo";
import {
QUERY_AVAILABLE_NEW_JOBS,
DELETE_AVAILABLE_JOB,
DELETE_ALL_AVAILABLE_NEW_JOBS
DELETE_ALL_AVAILABLE_NEW_JOBS,
QUERY_AVAILABLE_NEW_JOBS
} from "../../graphql/available-jobs.queries";
import { INSERT_NEW_JOB } from "../../graphql/jobs.queries";
import AlertComponent from "../alert/alert.component";
import JobsAvailableComponent from "./jobs-available-new.component";
export default function JobsAvailableContainer() {
export default function JobsAvailableContainer({ deleteJob, estDataLazyLoad }) {
const { loading, error, data, refetch } = useQuery(QUERY_AVAILABLE_NEW_JOBS, {
fetchPolicy: "network-only"
});
const [deleteJob] = useMutation(DELETE_AVAILABLE_JOB);
const [deleteAllNewJobs] = useMutation(DELETE_ALL_AVAILABLE_NEW_JOBS);
const [insertNewJob] = useMutation(INSERT_NEW_JOB);
if (error) return <AlertComponent type="error" message={error.message} />;
return (
@@ -23,6 +24,8 @@ export default function JobsAvailableContainer() {
refetch={refetch}
deleteJob={deleteJob}
deleteAllNewJobs={deleteAllNewJobs}
insertNewJob={insertNewJob}
estDataLazyLoad={estDataLazyLoad}
/>
);
}