Merge pull request #1940 from Safelite/feature/CSR-2181

CSR-2181 remove labor2 logic from parts
This commit is contained in:
CarlNation 2024-08-15 07:28:41 -04:00 committed by GitHub
commit 42990f9040
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 13 deletions

View file

@ -9,7 +9,6 @@ const partTypeStrings = {
REPAIR_FEE: "REPAIR FEE",
EARLY_BIRD: "EARLY BIRD",
SERVICE_PACKAGE_DISCOUNT: "SERVICE PACKAGE DISCOUNT",
LABOR2: "LABOR2",
};
export { partTypeStrings };

View file

@ -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;
}, []),
};

View file

@ -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,