WIP for editable cells. Changed the keys + added new cells for editing.

This commit is contained in:
Patrick Fic
2020-01-29 21:16:27 -08:00
parent 7eedd95403
commit 142c297032
4 changed files with 104 additions and 17 deletions

View File

@@ -0,0 +1,19 @@
import React from "react";
import JobLinesComponent from "./job-lines.component";
import { useQuery } from "@apollo/react-hooks";
import AlertComponent from "../alert/alert.component";
import { GET_JOB_LINES_BY_PK } from "../../graphql/jobs-lines.queries";
export default function JobLinesContainer({ jobId }) {
const { loading, error, data } = useQuery(GET_JOB_LINES_BY_PK, {
variables: { id: jobId },
fetchPolicy: "network-only"
});
if (error) return <AlertComponent message={error.message} type="error" />;
return (
<JobLinesComponent loading={loading} joblines={data ? data.joblines : null} />
);
}