Add getter to support cms.

This commit is contained in:
Chloe Herd 2023-07-25 15:12:35 -04:00
parent 1bb50e349e
commit 7aa9cb6e0c

View file

@ -528,6 +528,9 @@ export const getters = {
},
eventBus: (state) => state.applicationUser.eventBus,
damage: (state) => state.order.damage,
hasExactlyOneChip: (state) => {
return state.order.damage?.numberOfChips === 1;
},
hasAnyNonWindshieldGlassParts: (state) => {
const nonWindshieldItems = state.order.damage.glassToReplace?.filter(
(glassToReplace) => glassToReplace.glassLocation != "Windshield"