Fix to un-conflate driver and passenger side items.

This commit is contained in:
Chloe Herd 2023-07-25 16:42:12 -04:00
parent 21914908a3
commit b48e3c5004

View file

@ -92,10 +92,9 @@ export default {
driverSideCopy() {
const answerContent = this.getLocationAnswer(damageLocationsSelected.DRIVER);
const damageAnswers = this.getAnswersNullSafe(answerContent?.SubWidgetName);
const driverSideItems = this.getGlassPieces(damageLocationsSelected.DRIVER);
const damageAnswersOnOrder = damageAnswers?.filter((answer) =>
this.damage?.glassToReplace?.some(
(glassPiece) => answer.Name === glassPiece.glassName
)
driverSideItems?.some((glassPiece) => answer.Name === glassPiece.glassName)
);
if (this.hasDriverSideDamage) {
@ -110,10 +109,9 @@ export default {
passengerSideCopy() {
const answerContent = this.getLocationAnswer(damageLocationsSelected.PASSENGER);
const damageAnswers = this.getAnswersNullSafe(answerContent?.SubWidgetName);
const passengerSideItems = this.getGlassPieces(damageLocationsSelected.PASSENGER);
const damageAnswersOnOrder = damageAnswers?.filter((answer) =>
this.damage?.glassToReplace?.some(
(glassPiece) => answer.Name === glassPiece.glassName
)
passengerSideItems?.some((glassPiece) => answer.Name === glassPiece.glassName)
);
if (this.hasPassengerSideDamage) {