Added log rocket + analytics to ensure functionality
This commit is contained in:
@@ -5,7 +5,7 @@ import client from "../graphql/GraphQLClient";
|
||||
import {
|
||||
INSERT_NEW_JOB,
|
||||
QUERY_JOB_BY_CLM_NO,
|
||||
UPDATE_JOB,
|
||||
UPDATE_JOB
|
||||
} from "../graphql/jobs.queries";
|
||||
import { QUERY_GROUPS_BY_MAKE_TYPE } from "../graphql/veh_group.queries";
|
||||
import { store } from "../redux/store";
|
||||
@@ -15,8 +15,6 @@ export async function UpsertEstimate(job) {
|
||||
const shopId = store.getState().user.bodyshop.id;
|
||||
logger.info("Beginning Upserting job from Renderer.");
|
||||
const parsedYr = parseInt(job.v_model_yr);
|
||||
console.log("UpsertEstimate -> parsedYr", parsedYr);
|
||||
|
||||
logger.info(
|
||||
moment(job.loss_date).year() -
|
||||
(parsedYr >= 0 ? 2000 + parsedYr : 1900 + parsedYr)
|
||||
@@ -50,13 +48,11 @@ export async function UpsertEstimate(job) {
|
||||
});
|
||||
delete job.joblines;
|
||||
|
||||
const updatedJob = await client.mutate({
|
||||
await client.mutate({
|
||||
mutation: UPDATE_JOB,
|
||||
variables: { jobId: existingJobs.data.jobs[0].id, job: job },
|
||||
});
|
||||
logger.info("Job updated succesfully.");
|
||||
|
||||
console.log("UpsertEstimate -> updatedJob", updatedJob);
|
||||
} else {
|
||||
logger.info("Attemping to insert job record.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user