Merge pull request #407 from Safelite/refactor/preferdefault2
Refactor/preferdefault2
This commit is contained in:
commit
f0374818a4
14 changed files with 23 additions and 22 deletions
|
|
@ -9,4 +9,4 @@ const cookieNames = {
|
|||
SESSION_KEY: 'skey'
|
||||
};
|
||||
|
||||
export { cookieNames };
|
||||
export default Object.freeze(cookieNames);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const coverageStatuses = {
|
||||
const coverageStatuses = Object.freeze({
|
||||
PENDING: 'Pending',
|
||||
NO_COMP: 'No Comp',
|
||||
VERIFIED: 'Verified'
|
||||
};
|
||||
});
|
||||
|
||||
export { coverageStatuses };
|
||||
export default coverageStatuses;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
const damageLocationsCms = {
|
||||
const damageLocationsCms = Object.freeze({
|
||||
WINDSHIELD: 'WINDSHIELD',
|
||||
SIDEDOOR: 'SIDEDOOR',
|
||||
REARWINDOW: 'REARWINDOW',
|
||||
DRIVERSIDE: 'DRIVERSIDE',
|
||||
PASSENGERSIDE: 'PASSENGERSIDE'
|
||||
};
|
||||
});
|
||||
|
||||
export { damageLocationsCms };
|
||||
export default damageLocationsCms;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const damageLocationsSelected = {
|
||||
const damageLocationsSelected = Object.freeze({
|
||||
WINDSHIELD: 'Windshield',
|
||||
SIDEDOOR: 'SideDoor',
|
||||
REARWINDOW: 'RearWindow',
|
||||
|
|
@ -16,6 +16,6 @@ const damageLocationsSelected = {
|
|||
PASSENGERSIDE: 'PassengerSide',
|
||||
STATIONARY: 'Stationary',
|
||||
SLIDER: 'Slider'
|
||||
};
|
||||
});
|
||||
|
||||
export { damageLocationsSelected };
|
||||
export default damageLocationsSelected;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { cookieNames } from '@/constants/cookie-names';
|
||||
import cookieNames from '@/constants/cookie-names';
|
||||
import applicationConfig from '@/constants/application-config';
|
||||
import { useMainStore } from '@/store';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import damageCustomLabels from '@/constants/damage-custom-labels';
|
||||
import { damageLocationsSelected } from '@/constants/damage-locations-selected';
|
||||
import damageLocationsSelected from '@/constants/damage-locations-selected';
|
||||
import { useMainStore } from '@/store';
|
||||
|
||||
export function getDamageString() {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { navigationScenarios } from '@/router/router-constants/navigation-scenar
|
|||
import { RouterLinkStub } from '@vue/test-utils';
|
||||
import { vehicleCategories } from '@/constants/vehicle-categories.js';
|
||||
import { issPageValues } from '@/router/router-constants/issPage-values';
|
||||
import { cookieNames } from '@/constants/cookie-names';
|
||||
import cookieNames from '@/constants/cookie-names';
|
||||
import { Form } from 'vee-validate';
|
||||
import baseMixin from '@/mixins/base-mixin';
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -13,11 +13,12 @@
|
|||
<script>
|
||||
import buttonQuestion from '@/digital-components/button-question/button-question';
|
||||
import { processIfStatements } from '@/helpers/cms-content-helper';
|
||||
import { damageLocationsSelected as glassLocations } from '@/constants/damage-locations-selected';
|
||||
import damageLocationsSelected from '@/constants/damage-locations-selected';
|
||||
import servicePackageRadio from '@/layouts/service-packages/service-package-question/service-package-radio/service-package-radio';
|
||||
import { partTypeStrings } from '@/constants/part-type-strings';
|
||||
import { useMainStore } from '@/store';
|
||||
import { allGlassPartsAndItemsHavePrices } from '@/layouts/service-packages/service-package-helper/service-package-helper';
|
||||
const glassLocations = damageLocationsSelected;
|
||||
|
||||
const packageNames = {
|
||||
TIER_ONE: 'TierOne',
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import replaceOptionsQuestion from '@/layouts/vehicle-damage/replace-options-que
|
|||
import { defineRule } from 'vee-validate';
|
||||
import { required } from '@/helpers/validation-rules';
|
||||
import { errorMessages } from '@/constants/error-messages';
|
||||
import { damageLocationsSelected } from '@/constants/damage-locations-selected';
|
||||
import damageLocationsSelected from '@/constants/damage-locations-selected';
|
||||
|
||||
// DEFINE VALIDATION RULES
|
||||
defineRule('damage-side-required', required(errorMessages.DAMAGE_SIDE_REQUIRED));
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ import { settleAllPromises } from '@/helpers/layout-helper';
|
|||
import { Form, defineRule } from 'vee-validate';
|
||||
import { required } from '@/helpers/validation-rules';
|
||||
import { errorMessages } from '@/constants/error-messages';
|
||||
import { damageLocationsCms } from '@/constants/damage-locations-cms.js';
|
||||
import { damageLocationsSelected } from '@/constants/damage-locations-selected.js';
|
||||
import damageLocationsCms from '@/constants/damage-locations-cms.js';
|
||||
import damageLocationsSelected from '@/constants/damage-locations-selected.js';
|
||||
import { useMainStore } from '@/store';
|
||||
|
||||
// DEFINE VALIDATION RULES
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ import alert from '@/ux-components/alert/alert';
|
|||
import { defineRule } from 'vee-validate';
|
||||
import { required } from '@/helpers/validation-rules';
|
||||
import { errorMessages } from '@/constants/error-messages';
|
||||
import { damageLocationsSelected } from '@/constants/damage-locations-selected.js';
|
||||
import damageLocationsSelected from '@/constants/damage-locations-selected.js';
|
||||
|
||||
// DEFINE VALIDATION RULES
|
||||
defineRule('windshield-damage-type-required',
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import {
|
|||
GaEvents,
|
||||
ValueToLogTypes
|
||||
} from '@/constants/analytics';
|
||||
import { cookieNames } from '@/constants/cookie-names';
|
||||
import cookieNames from '@/constants/cookie-names';
|
||||
import { useMainStore } from '@/store';
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import globalMethods from '@/global-methods';
|
|||
import { experimentTriggers } from '@/constants/experiments';
|
||||
import applicationConfig from '@/constants/application-config';
|
||||
import { issPageValues } from '@/router/router-constants/issPage-values';
|
||||
import { damageLocationsSelected } from '@/constants/damage-locations-selected';
|
||||
import { coverageStatuses } from '@/constants/coverage-statuses';
|
||||
import damageLocationsSelected from '@/constants/damage-locations-selected';
|
||||
import coverageStatuses from '@/constants/coverage-statuses';
|
||||
|
||||
const storeId = 'main';
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useMainStore } from '@/store/index.js';
|
|||
import { setActivePinia, createPinia } from 'pinia';
|
||||
import globalMethods from '@/global-methods.js';
|
||||
import { getRandomString, getRandomGuid, getRandomInt, getRandomBoolean } from '@/helpers/data-generation.js';
|
||||
import { coverageStatuses } from '@/constants/coverage-statuses.js';
|
||||
import coverageStatuses from '@/constants/coverage-statuses.js';
|
||||
|
||||
describe('Store', () => {
|
||||
let store;
|
||||
|
|
|
|||
Loading…
Reference in a new issue