Update logic to ensure removed lines are always ignored. IO-733

This commit is contained in:
Patrick Fic
2021-03-05 09:34:18 -08:00
parent c4555f7441
commit 22f3f20882
5 changed files with 54 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
import { GET_JOB_LINES_BY_PK } from "../../graphql/jobs-lines.queries";
import { GET_ALL_JOBLINES_BY_PK } from "../../graphql/jobs-lines.queries";
import { gql } from "@apollo/client";
import _ from "lodash";
@@ -8,7 +8,7 @@ export const GetSupplementDelta = async (client, jobId, newLines) => {
const {
data: { joblines: existingLinesFromDb },
} = await client.query({
query: GET_JOB_LINES_BY_PK,
query: GET_ALL_JOBLINES_BY_PK,
variables: { id: jobId },
});
const existingLines = _.cloneDeep(existingLinesFromDb);