ProManager WIP.
This commit is contained in:
@@ -38,7 +38,7 @@ class ErrorBoundary extends React.Component {
|
||||
}
|
||||
|
||||
handleErrorSubmit = () => {
|
||||
InstanceRenderManager({executeFunction:true, imex: () => {
|
||||
InstanceRenderManager({executeFunction:true,args:[], imex: () => {
|
||||
window.$crisp.push([
|
||||
"do",
|
||||
"message:send",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -111,12 +111,14 @@ export function JobsAvailableContainer({bodyshop, currentUser, insertAuditTrail,
|
||||
}
|
||||
// if (process.env.VITE_APP_COUNTRY === "USA") {
|
||||
//Massage the CCC file set to remove duplicate UNQ_SEQ.
|
||||
InstanceRenderManager({executeFunction:true,rome: ResolveCCCLineIssues(estData.est_data, bodyshop) })
|
||||
InstanceRenderManager({executeFunction:true,rome: ResolveCCCLineIssues, args: [estData.est_data, bodyshop], promanager: ResolveCCCLineIssues })
|
||||
|
||||
// } else {
|
||||
//IO-539 Check for Parts Rate on PAL for SGI use case.
|
||||
//TODO:AIO Check that the async function is actually waiting before moving on.
|
||||
InstanceRenderManager({executeFunction: true, imex: await CheckTaxRates(estData.est_data, bodyshop), rome: await CheckTaxRatesUSA(estData.est_data, bodyshop)})
|
||||
await InstanceRenderManager({executeFunction: true,
|
||||
debug:true,
|
||||
imex: CheckTaxRates, rome: CheckTaxRatesUSA, promanager: CheckTaxRatesUSA, args: [estData.est_data, bodyshop]})
|
||||
|
||||
// }
|
||||
// const newTotals = (
|
||||
@@ -238,8 +240,8 @@ export function JobsAvailableContainer({bodyshop, currentUser, insertAuditTrail,
|
||||
let supp = replaceEmpty({...estData.est_data});
|
||||
//IO-539 Check for Parts Rate on PAL for SGI use case.
|
||||
|
||||
InstanceRenderManager({executeFunction:true, imex: await CheckTaxRates(supp, bodyshop), rome: await CheckTaxRatesUSA(supp, bodyshop)})
|
||||
InstanceRenderManager({executeFunction:true ,rome: ResolveCCCLineIssues(supp, bodyshop) })
|
||||
await InstanceRenderManager({executeFunction:true, imex: CheckTaxRates, rome: CheckTaxRatesUSA, promanager: CheckTaxRatesUSA, args: [(supp, bodyshop)]})
|
||||
await InstanceRenderManager({executeFunction:true, rome: ResolveCCCLineIssues,promanager: ResolveCCCLineIssues ,args:[(supp, bodyshop)] })
|
||||
|
||||
delete supp.owner;
|
||||
delete supp.vehicle;
|
||||
@@ -599,7 +601,42 @@ async function CheckTaxRates(estData, bodyshop) {
|
||||
line.act_price = line.act_price + line.misc_amt;
|
||||
line.tax_part = !!line.misc_tax;
|
||||
}
|
||||
//WEB EST SPECIFIC CLEAN UP
|
||||
InstanceRenderManager({executeFunction: true, args:[], promanager: () => {
|
||||
|
||||
if (line.mod_lbr_ty === "LAET" || line.mod_lbr_ty === "LAUT") {
|
||||
line.notes += ` | ET/UT Update (prev = ${line.mod_lbr_ty})`;
|
||||
line.mod_lbr_ty = "LAR";
|
||||
}
|
||||
}})
|
||||
});
|
||||
|
||||
//Group by line no
|
||||
// For everything but the first one, strip out the price number in
|
||||
|
||||
InstanceRenderManager({executeFunction:true, args:[], promanager: () => {
|
||||
|
||||
|
||||
|
||||
const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
|
||||
Object.keys(groupedByLineRef).forEach((lineRef) => {
|
||||
groupedByLineRef[lineRef].forEach((line, index) => {
|
||||
//Let the first one keep it
|
||||
if (index === 0) return;
|
||||
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
||||
if (line.unq_seq === 0) return;
|
||||
const indexInEstData = estData.joblines.data.findIndex(
|
||||
(l) => l.unq_seq === line.unq_seq
|
||||
);
|
||||
estData.joblines.data[
|
||||
indexInEstData
|
||||
].notes += ` | Scrubbed due to the line_ref issue. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
||||
estData.joblines.data[indexInEstData].act_price = 0;
|
||||
estData.joblines.data[indexInEstData].db_price = 0;
|
||||
});
|
||||
})
|
||||
}})
|
||||
|
||||
|
||||
//Generate the list of duplicated UNQ_SEQ that will feed into the next section to scrub the lines.
|
||||
const unqSeqHash = _.groupBy(estData.joblines.data, "unq_seq");
|
||||
|
||||
Reference in New Issue
Block a user