Merge pull request #407 from Safelite/refactor/preferdefault2

Refactor/preferdefault2
This commit is contained in:
Jeremy-Z 2023-08-10 12:18:39 -04:00 committed by GitHub
commit f0374818a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 23 additions and 22 deletions

View file

@ -9,4 +9,4 @@ const cookieNames = {
SESSION_KEY: 'skey'
};
export { cookieNames };
export default Object.freeze(cookieNames);

View file

@ -1,7 +1,7 @@
const coverageStatuses = {
const coverageStatuses = Object.freeze({
PENDING: 'Pending',
NO_COMP: 'No Comp',
VERIFIED: 'Verified'
};
});
export { coverageStatuses };
export default coverageStatuses;

View file

@ -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;

View file

@ -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;

View file

@ -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';

View file

@ -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() {

View file

@ -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 {

View file

@ -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',

View file

@ -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));

View file

@ -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

View file

@ -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',

View file

@ -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 {

View file

@ -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';

View file

@ -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;