Add new getters to support dynamic CMS text
This commit is contained in:
parent
7b36aa05dd
commit
9ddb0d35fb
1 changed files with 17 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
|||
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
|
||||
import { deepEqual } from "@/helpers/object-helper";
|
||||
import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from "@/constants/schedule-constants";
|
||||
import { partTypeStrings } from "@/constants/part-type-strings";
|
||||
|
||||
// Export State
|
||||
const getDefaultState = () => {
|
||||
|
|
@ -533,6 +534,22 @@ export const getters = {
|
|||
);
|
||||
return !!nonWindshieldItems?.length;
|
||||
},
|
||||
isRecalibrationOnOrder: (state) => {
|
||||
const itemsToCheck = [
|
||||
...(state.order.lineItems.glassParts ?? []),
|
||||
...(state.order.lineItems.supportingItems ?? []),
|
||||
];
|
||||
|
||||
return itemsToCheck.some(
|
||||
(lineItem) =>
|
||||
lineItem.partType.toUpperCase() === partTypeStrings.RECALIBRATION.toUpperCase()
|
||||
);
|
||||
},
|
||||
areRearWipersOnOrder: (state) => {
|
||||
return !!state.order.lineItems.vaps?.some(
|
||||
(vap) => vap.partType.toUpperCase() === partTypeStrings.REAR_WIPER.toUpperCase()
|
||||
);
|
||||
},
|
||||
lineItems: (state) => state.order.lineItems,
|
||||
pageData: (state) => (page) => {
|
||||
return state.applicationUser.pageData[page];
|
||||
|
|
|
|||
Loading…
Reference in a new issue