Merge pull request #796 from Safelite/feature/richardson/SSR-1412.2
dont add fee to local array if hidden
This commit is contained in:
commit
144eb49adb
1 changed files with 8 additions and 6 deletions
|
|
@ -6,7 +6,7 @@ import { endpoints } from '@/constants/endpoints';
|
|||
import { getDateForSavedSessionTimeout } from '@/helpers/session-helper';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import globalMethods from '@/global-methods';
|
||||
import { experimentTriggers, experimentUniverses } from '@/constants/experiments';
|
||||
import { experimentSettings, experimentTriggers, experimentUniverses } from '@/constants/experiments';
|
||||
import applicationConfig from '@/constants/application-config';
|
||||
import issPageValues from '@/router/router-constants/issPage-values';
|
||||
import damageLocationsSelected from '@/constants/damage-locations-selected';
|
||||
|
|
@ -28,7 +28,7 @@ import partNumberStrings from '@/constants/part-number-strings';
|
|||
import { findLineItemIndex, getLineItemsFlattened } from '@/helpers/line-items-helper';
|
||||
import { buildQueryStringParameterFromArrayOfComplexObjects, getLineItemQueryString, getTaxLineItemQueryString } from '@/helpers/querystring-helper';
|
||||
import coverageType from '@/constants/coverage-type';
|
||||
import { getFeatureTogglesQueryString } from '@/helpers/experiment-helper';
|
||||
import { getExperimentSettingValue, getFeatureTogglesQueryString } from '@/helpers/experiment-helper';
|
||||
import { getSessionKeyValue, getUserIdValue } from '@/helpers/cookie-helper';
|
||||
|
||||
const storeId = 'main';
|
||||
|
|
@ -1692,8 +1692,9 @@ export const useMainStore = defineStore({
|
|||
},
|
||||
|
||||
updateMobileFee(fee) {
|
||||
// Mobile Fee is only added for NO COMP or ITAC
|
||||
if (fee && this.isVerified && (this.isNoComp || this.isITAC)) {
|
||||
const isMobileFeeHidden = getExperimentSettingValue(this.experimentSettings, experimentSettings.ISS_FEATURE_TOGGLE_IS_MOBILE_FEE_HIDDEN) === 'true';
|
||||
// Mobile Fee is only added for NO COMP or ITAC and is NOT hidden
|
||||
if (fee && this.isVerified && (this.isNoComp || this.isITAC) && !isMobileFeeHidden) {
|
||||
this.addPartTypeFeeItem(fee, partTypeStrings.MOBILE_FEE);
|
||||
} else {
|
||||
this.addPartTypeFeeItem(null, partTypeStrings.MOBILE_FEE);
|
||||
|
|
@ -1701,8 +1702,9 @@ export const useMainStore = defineStore({
|
|||
},
|
||||
|
||||
updateRecycleFee(fee) {
|
||||
// Recycle Fee is only added for NO COMP or ITAC and has Windshield Replacement
|
||||
if (fee && this.isVerified && (this.isNoComp || this.isITAC) && this.hasWindshieldReplacement) {
|
||||
const isRecycleFeeHidden = getExperimentSettingValue(this.experimentSettings, experimentSettings.ISS_FEATURE_TOGGLE_IS_RECYCLE_FEE_HIDDEN) === 'true';
|
||||
// Recycle Fee is only added for NO COMP or ITAC and has Windshield Replacement and is NOT hidden
|
||||
if (fee && this.isVerified && (this.isNoComp || this.isITAC) && this.hasWindshieldReplacement && !isRecycleFeeHidden) {
|
||||
this.addPartNumberFeeItem(fee, partNumberStrings.RECYCLE_FEE);
|
||||
} else {
|
||||
this.addPartNumberFeeItem(null, partNumberStrings.RECYCLE_FEE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue