schedule clean up
add service location / schedule resets similar to FMG fix weird loader scroll bar thing on datepicker
This commit is contained in:
parent
64d85c1ddb
commit
62eea7ede3
5 changed files with 34 additions and 4 deletions
|
|
@ -734,7 +734,11 @@ export default {
|
||||||
}
|
}
|
||||||
.loader {
|
.loader {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
width: calc(100% - 1.5rem);
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
transform: unset;
|
||||||
|
right: unset;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
width: 1.5rem;
|
width: 1.5rem;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ import {
|
||||||
getRouterLinkHtmlStringFromCopy
|
getRouterLinkHtmlStringFromCopy
|
||||||
} from '@/helpers/cms-content-helper';
|
} from '@/helpers/cms-content-helper';
|
||||||
|
|
||||||
import stripRteStyle from '@/helpers/text-helper';
|
import { stripRteStyle } from '@/helpers/text-helper';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'site-sub-header',
|
name: 'site-sub-header',
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import applicationConfig from '@/constants/application-config';
|
||||||
import issPageValues from '@/router/router-constants/issPage-values';
|
import issPageValues from '@/router/router-constants/issPage-values';
|
||||||
import damageLocationsSelected from '@/constants/damage-locations-selected';
|
import damageLocationsSelected from '@/constants/damage-locations-selected';
|
||||||
import coverageStatuses from '@/constants/coverage-statuses';
|
import coverageStatuses from '@/constants/coverage-statuses';
|
||||||
|
import { deepEqual } from '@/helpers/object-helper';
|
||||||
import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from '@/constants/schedule-constants';
|
import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from '@/constants/schedule-constants';
|
||||||
import getDateDifferenceInDays from '@/helpers/date-helper';
|
import getDateDifferenceInDays from '@/helpers/date-helper';
|
||||||
|
|
||||||
|
|
@ -1259,10 +1260,18 @@ export const useMainStore = defineStore({
|
||||||
this.order.vehicle.registration.firstName = null;
|
this.order.vehicle.registration.firstName = null;
|
||||||
this.order.vehicle.registration.lastName = null;
|
this.order.vehicle.registration.lastName = null;
|
||||||
},
|
},
|
||||||
|
resetServiceLocationAndDependencies(context) {
|
||||||
|
console.log('Reset service location and dependencies...');
|
||||||
|
this.resetServiceLocationAppointmentType();
|
||||||
|
this.resetServiceLocationProvider();
|
||||||
|
this.resetSchedule();
|
||||||
|
},
|
||||||
resetServiceLocationAppointmentType() {
|
resetServiceLocationAppointmentType() {
|
||||||
|
console.log('Reset service location appointment type...');
|
||||||
this.order.serviceLocation.appointmentType = null;
|
this.order.serviceLocation.appointmentType = null;
|
||||||
},
|
},
|
||||||
resetServiceLocationProvider() {
|
resetServiceLocationProvider() {
|
||||||
|
console.log('Reset service location provider...');
|
||||||
this.order.serviceLocation.provider = {
|
this.order.serviceLocation.provider = {
|
||||||
providerNumber: null,
|
providerNumber: null,
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -1275,6 +1284,7 @@ export const useMainStore = defineStore({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
resetServiceLocationMobileAddress() {
|
resetServiceLocationMobileAddress() {
|
||||||
|
console.log('Reset service location mobile address...');
|
||||||
this.order.serviceLocation.address = null;
|
this.order.serviceLocation.address = null;
|
||||||
this.order.serviceLocation.address2 = null;
|
this.order.serviceLocation.address2 = null;
|
||||||
this.order.serviceLocation.city = null;
|
this.order.serviceLocation.city = null;
|
||||||
|
|
@ -1349,6 +1359,7 @@ export const useMainStore = defineStore({
|
||||||
this.applicationUser.pageData[issPageValues.CAPABILITY_QUESTIONS] = null;
|
this.applicationUser.pageData[issPageValues.CAPABILITY_QUESTIONS] = null;
|
||||||
},
|
},
|
||||||
resetSchedule() {
|
resetSchedule() {
|
||||||
|
console.log('Reset Schedule...');
|
||||||
this.order.schedule.date = null;
|
this.order.schedule.date = null;
|
||||||
this.order.schedule.startTime = null;
|
this.order.schedule.startTime = null;
|
||||||
this.order.schedule.endTime = null;
|
this.order.schedule.endTime = null;
|
||||||
|
|
@ -1510,6 +1521,8 @@ export const useMainStore = defineStore({
|
||||||
|| !sortedPreviousResultsArray?.every((x, i) => x.result === sortedPartQuestionAnswersArray[i].result);
|
|| !sortedPreviousResultsArray?.every((x, i) => x.result === sortedPartQuestionAnswersArray[i].result);
|
||||||
|
|
||||||
if (havePartQuestionAnswersChanged) {
|
if (havePartQuestionAnswersChanged) {
|
||||||
|
this.resetServiceLocationAndDependencies();
|
||||||
|
|
||||||
this.updateGlassParts(null);
|
this.updateGlassParts(null);
|
||||||
this.updateMoldingQuestionAnswers(null);
|
this.updateMoldingQuestionAnswers(null);
|
||||||
this.updateCapabilityQuestionAnswers(null);
|
this.updateCapabilityQuestionAnswers(null);
|
||||||
|
|
@ -1531,6 +1544,8 @@ export const useMainStore = defineStore({
|
||||||
|| !sortedPreviousResultsArray?.every((x, i) => x.result === sortedMoldingQuestionAnswersArray[i].result);
|
|| !sortedPreviousResultsArray?.every((x, i) => x.result === sortedMoldingQuestionAnswersArray[i].result);
|
||||||
|
|
||||||
if (haveMoldingQuestionAnswersChanged) {
|
if (haveMoldingQuestionAnswersChanged) {
|
||||||
|
this.resetServiceLocationAndDependencies();
|
||||||
|
|
||||||
this.updateGlassParts(null);
|
this.updateGlassParts(null);
|
||||||
this.updateSupportingItems(null);
|
this.updateSupportingItems(null);
|
||||||
this.updateCapabilityQuestionAnswers(null);
|
this.updateCapabilityQuestionAnswers(null);
|
||||||
|
|
@ -1548,6 +1563,8 @@ export const useMainStore = defineStore({
|
||||||
|| !sortedPreviousResultsArray?.every((x, i) => x.result === sortedCapabilityQuestionAnswersArray[i].result);
|
|| !sortedPreviousResultsArray?.every((x, i) => x.result === sortedCapabilityQuestionAnswersArray[i].result);
|
||||||
|
|
||||||
if (haveCapabilityQuestionAnswersChanged) {
|
if (haveCapabilityQuestionAnswersChanged) {
|
||||||
|
this.resetServiceLocationAndDependencies();
|
||||||
|
|
||||||
this.updateGlassParts(null);
|
this.updateGlassParts(null);
|
||||||
this.updateSupportingItems(null);
|
this.updateSupportingItems(null);
|
||||||
}
|
}
|
||||||
|
|
@ -1556,10 +1573,16 @@ export const useMainStore = defineStore({
|
||||||
this.updateCapabilityQuestionAnswers(capabilityQuestionAnswersArray);
|
this.updateCapabilityQuestionAnswers(capabilityQuestionAnswersArray);
|
||||||
},
|
},
|
||||||
saveGlassParts(glassParts) {
|
saveGlassParts(glassParts) {
|
||||||
|
if (!deepEqual(glassParts, this.order.lineItems.glassParts)) {
|
||||||
|
this.resetServiceLocationAndDependencies();
|
||||||
|
}
|
||||||
this.order.lineItems.glassParts = glassParts;
|
this.order.lineItems.glassParts = glassParts;
|
||||||
},
|
},
|
||||||
saveSupportingItems(supportingItems) {
|
saveSupportingItems(supportingItems) {
|
||||||
// TODO: RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES
|
if (!deepEqual(supportingItems, this.order.lineItems.supportingItems)) {
|
||||||
|
this.resetServiceLocationAndDependencies();
|
||||||
|
}
|
||||||
|
|
||||||
this.order.lineItems.supportingItems = supportingItems;
|
this.order.lineItems.supportingItems = supportingItems;
|
||||||
},
|
},
|
||||||
saveSupportingItemsSuppressingStateResetting(supportingItems) {
|
saveSupportingItemsSuppressingStateResetting(supportingItems) {
|
||||||
|
|
@ -1930,6 +1953,8 @@ export const useMainStore = defineStore({
|
||||||
this.resetGlassPartsState();
|
this.resetGlassPartsState();
|
||||||
this.resetSupportingItemsState();
|
this.resetSupportingItemsState();
|
||||||
this.resetVapsState();
|
this.resetVapsState();
|
||||||
|
|
||||||
|
this.resetServiceLocationAndDependencies();
|
||||||
},
|
},
|
||||||
|
|
||||||
resetPageFields() {
|
resetPageFields() {
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ import textBlock from '@/digital-components/text-block/text-block.vue';
|
||||||
import textLink from '@/ux-components/text-link/text-link.vue';
|
import textLink from '@/ux-components/text-link/text-link.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
// eslint-disable-next-line vue/multi-word-component-names
|
||||||
name: 'alert',
|
name: 'alert',
|
||||||
components: {
|
components: {
|
||||||
textBlock,
|
textBlock,
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
//Open an overlay to prevent page interaction
|
//Open an overlay to prevent page interaction
|
||||||
&:before {
|
&:before:not(.date-picker-hidden) {
|
||||||
content: "";
|
content: "";
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue