CSR-2181 remove labor2 logic from parts
CSR-2181 remove labor2 logic from parts since it will now be returned in supporting items collection. also, base part number is required to get labor2 if applicable.
This commit is contained in:
parent
a6c9ea67de
commit
86badc76e6
3 changed files with 11 additions and 13 deletions
|
|
@ -9,7 +9,6 @@ const partTypeStrings = {
|
|||
REPAIR_FEE: "REPAIR FEE",
|
||||
EARLY_BIRD: "EARLY BIRD",
|
||||
SERVICE_PACKAGE_DISCOUNT: "SERVICE PACKAGE DISCOUNT",
|
||||
LABOR2: "LABOR2",
|
||||
};
|
||||
|
||||
export { partTypeStrings };
|
||||
|
|
|
|||
|
|
@ -135,18 +135,16 @@ export default {
|
|||
glassName: g.glassName,
|
||||
glassLocation: g.glassLocation,
|
||||
colorAnswers: g.parts?.reduce((arr, p) => {
|
||||
if (p.partType != partTypeStrings.LABOR2) {
|
||||
arr.push({
|
||||
ColorAnswerText: p.color,
|
||||
FeatureAnswers: [
|
||||
{
|
||||
FeatureAnswerText:
|
||||
p.description === "" ? p.color : p.description,
|
||||
PartNumber: p.partNumber,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
arr.push({
|
||||
ColorAnswerText: p.color,
|
||||
FeatureAnswers: [
|
||||
{
|
||||
FeatureAnswerText:
|
||||
p.description === "" ? p.color : p.description,
|
||||
PartNumber: p.partNumber,
|
||||
},
|
||||
],
|
||||
});
|
||||
return arr;
|
||||
}, []),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export default {
|
|||
const singlePart = glass.parts[0];
|
||||
reducedGlassParts.push({
|
||||
partNumber: singlePart.partNumber,
|
||||
basePartNumber: singlePart.basePartNumber,
|
||||
description: singlePart.description,
|
||||
color: singlePart.color,
|
||||
partType: singlePart.partType,
|
||||
|
|
|
|||
Loading…
Reference in a new issue