Updates for dynamic ruleset choices.

This commit is contained in:
Patrick Fic
2023-02-09 12:52:57 -08:00
parent 7e12247f8b
commit 1f0bcf5611
8 changed files with 147 additions and 39 deletions

View File

@@ -5,6 +5,7 @@ import moment from "moment";
import client from "../graphql/GraphQLClient";
import {
INSERT_NEW_JOB,
QUERY_CLOSE_DATE_BY_CLM_NO,
QUERY_JOB_BY_CLM_NO,
UPDATE_JOB,
} from "../graphql/jobs.queries";
@@ -48,6 +49,14 @@ export function CalculateVehicleAge(job) {
return ret;
}
export async function GetR4PDateWithClaim(clm_no) {
const existingJobs = await client.query({
query: QUERY_CLOSE_DATE_BY_CLM_NO,
variables: { clm_no: clm_no },
});
return existingJobs.data.jobs[0] && existingJobs.data.jobs[0].close_date;
}
export async function UpsertEstimate(job) {
const shopId = store.getState().user.bodyshop.id;
//logger.info("Beginning Upserting job from Renderer.");