Fixing merge conflicts
This commit is contained in:
commit
4088cd599e
4 changed files with 28 additions and 7 deletions
|
|
@ -338,12 +338,12 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return !!useMainStore().vehicle.vin;
|
return !!useMainStore().vehicle.carId;
|
||||||
},
|
},
|
||||||
async initializeComponent() {
|
async initializeComponent() {
|
||||||
if (this.policyLookupSuccessful
|
if (this.policyLookupSuccessful
|
||||||
&& useMainStore().isClaimRegistrationRequired
|
&& useMainStore().isClaimRegistrationRequired
|
||||||
&& this.coveredAndServicePriceAboveOrEqualDeductible) {
|
&& (this.coveredAndServicePriceAboveOrEqualDeductible || this.verifiedITAC)) {
|
||||||
await useMainStore().registerClaim()?.catch(() => {});
|
await useMainStore().registerClaim()?.catch(() => {});
|
||||||
}
|
}
|
||||||
this.$refs.loadingModal.hideModal();
|
this.$refs.loadingModal.hideModal();
|
||||||
|
|
@ -362,6 +362,7 @@ export default {
|
||||||
{ [routerParams.SAVE_SESSION_SYNCHRONOUS]: true }
|
{ [routerParams.SAVE_SESSION_SYNCHRONOUS]: true }
|
||||||
);
|
);
|
||||||
} else if (this.verifiedITAC || this.verifiedNoComp) {
|
} else if (this.verifiedITAC || this.verifiedNoComp) {
|
||||||
|
useMainStore().updateIsSafeliteProvider(this.selectedProvider === 'Safelite');
|
||||||
if (this.selectedProvider === 'Safelite') {
|
if (this.selectedProvider === 'Safelite') {
|
||||||
this.mainStore.saveSupportingItems(this.supportingItems);
|
this.mainStore.saveSupportingItems(this.supportingItems);
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
|
|
|
||||||
|
|
@ -174,11 +174,13 @@ export default {
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
if (this.selectedVehicleVin !== vehicleSelectionOptions.VEHICLE_NOT_LISTED) {
|
if (this.selectedVehicleVin !== vehicleSelectionOptions.VEHICLE_NOT_LISTED) {
|
||||||
const vehicleLookupResponse = await this.lookupVehicleByVin(this.selectedVehicleVin);
|
const vehicleLookupResponse = await this.lookupVehicleByVin(this.selectedVehicleVin);
|
||||||
|
const vehicle = this.policyVehicles.find((pv) => pv.vin === this.selectedVehicleVin);
|
||||||
|
|
||||||
if (vehicleLookupResponse.error) {
|
if (vehicleLookupResponse.error) {
|
||||||
if (vehicleLookupResponse.status === 404) {
|
if (vehicleLookupResponse.status === 404) {
|
||||||
const vehicle = this.policyVehicles.find((pv) => pv.vin === this.selectedVehicleVin);
|
|
||||||
this.mainStore.resetVehicleState();
|
this.mainStore.resetVehicleState();
|
||||||
useMainStore().updateVehicle({
|
useMainStore().updateVehicle({
|
||||||
|
policyVehicleId: vehicle.id,
|
||||||
carId: '0',
|
carId: '0',
|
||||||
category: '',
|
category: '',
|
||||||
year: vehicle.vehicleYear || '',
|
year: vehicle.vehicleYear || '',
|
||||||
|
|
@ -200,6 +202,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.vehicleFromLookup = Object.assign(vehicleLookupResponse.data, {
|
this.vehicleFromLookup = Object.assign(vehicleLookupResponse.data, {
|
||||||
|
policyVehicleId: vehicle.id,
|
||||||
vin: this.selectedVehicleVin,
|
vin: this.selectedVehicleVin,
|
||||||
noCoverage: this.noCoverageForSelectedVehicle,
|
noCoverage: this.noCoverageForSelectedVehicle,
|
||||||
deductible: this.deductibleForSelectedVehicle,
|
deductible: this.deductibleForSelectedVehicle,
|
||||||
|
|
|
||||||
|
|
@ -184,9 +184,11 @@ export default {
|
||||||
let scenario = null;
|
let scenario = null;
|
||||||
switch (this.selectedProvider) {
|
switch (this.selectedProvider) {
|
||||||
case options.SAFELITE:
|
case options.SAFELITE:
|
||||||
|
this.mainStore.updateIsSafeliteProvider(true);
|
||||||
scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
|
scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
|
||||||
break;
|
break;
|
||||||
case options.TPA:
|
case options.TPA:
|
||||||
|
this.mainStore.updateIsSafeliteProvider(false);
|
||||||
if (this.mainStore.issConfig.enableTPAFlow) {
|
if (this.mainStore.issConfig.enableTPAFlow) {
|
||||||
if (this.mainStore.hasRecalibrationPart) {
|
if (this.mainStore.hasRecalibrationPart) {
|
||||||
this.$refs.TPARecalModal.openModal();
|
this.$refs.TPARecalModal.openModal();
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ function getTimeSlotsAdditionalEventData(
|
||||||
const getDefaultState = () => ({
|
const getDefaultState = () => ({
|
||||||
order: {
|
order: {
|
||||||
vehicle: {
|
vehicle: {
|
||||||
|
policyVehicleId: null,
|
||||||
year: null,
|
year: null,
|
||||||
make: null,
|
make: null,
|
||||||
model: null,
|
model: null,
|
||||||
|
|
@ -75,10 +76,11 @@ const getDefaultState = () => ({
|
||||||
repair: null, // numerical value; how much customer owes on deductible in repair case
|
repair: null, // numerical value; how much customer owes on deductible in repair case
|
||||||
replace: null // numerical value; how much customer owes on deductible in replace case,
|
replace: null // numerical value; how much customer owes on deductible in replace case,
|
||||||
},
|
},
|
||||||
isITAC: null,
|
isITAC: false,
|
||||||
vehicles: [],
|
vehicles: [],
|
||||||
endorsements: [],
|
endorsements: [],
|
||||||
endorsementQuestionAnswers: null
|
endorsementQuestionAnswers: null,
|
||||||
|
policyData: null
|
||||||
},
|
},
|
||||||
customer: {
|
customer: {
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -102,6 +104,7 @@ const getDefaultState = () => ({
|
||||||
zipCodeCtu: null,
|
zipCodeCtu: null,
|
||||||
appointmentType: null,
|
appointmentType: null,
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
|
IsSafeliteProvider: null,
|
||||||
provider: {
|
provider: {
|
||||||
providerNumber: null,
|
providerNumber: null,
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -419,6 +422,7 @@ export const useMainStore = defineStore({
|
||||||
|
|
||||||
// populate additional fields
|
// populate additional fields
|
||||||
order.serviceLocation.zipCode = insured?.zipCode?.toString();
|
order.serviceLocation.zipCode = insured?.zipCode?.toString();
|
||||||
|
order.policy.policyData = responsePolicy.policyData;
|
||||||
|
|
||||||
// populate vehicles
|
// populate vehicles
|
||||||
order.policy.vehicles = responsePolicy.vehicles ?? [];
|
order.policy.vehicles = responsePolicy.vehicles ?? [];
|
||||||
|
|
@ -441,6 +445,8 @@ export const useMainStore = defineStore({
|
||||||
{
|
{
|
||||||
referralCorrelationId: this.order.referralCorrelationId,
|
referralCorrelationId: this.order.referralCorrelationId,
|
||||||
accountNumber: this.issConfig.parentAccountNumber?.toString() ?? '',
|
accountNumber: this.issConfig.parentAccountNumber?.toString() ?? '',
|
||||||
|
policyData: this.order.policy.policyData,
|
||||||
|
isItac: this.order.policy.isITAC,
|
||||||
insured: {
|
insured: {
|
||||||
firstName: this.order.customer.firstName,
|
firstName: this.order.customer.firstName,
|
||||||
lastName: this.order.customer.lastName,
|
lastName: this.order.customer.lastName,
|
||||||
|
|
@ -477,6 +483,7 @@ export const useMainStore = defineStore({
|
||||||
country: 'US' // TODO set from store
|
country: 'US' // TODO set from store
|
||||||
},
|
},
|
||||||
vehicle: {
|
vehicle: {
|
||||||
|
id: this.order.vehicle.id?.toString() ?? '',
|
||||||
year: this.order.vehicle.year?.toString() ?? '',
|
year: this.order.vehicle.year?.toString() ?? '',
|
||||||
make: this.order.vehicle.make,
|
make: this.order.vehicle.make,
|
||||||
model: this.order.vehicle.model,
|
model: this.order.vehicle.model,
|
||||||
|
|
@ -1009,7 +1016,9 @@ export const useMainStore = defineStore({
|
||||||
noCoverage: policy.noCoverage,
|
noCoverage: policy.noCoverage,
|
||||||
policyLookupSuccessful: policy.policyLookupSuccessful,
|
policyLookupSuccessful: policy.policyLookupSuccessful,
|
||||||
originalDeductible: this.order.originalDeductible,
|
originalDeductible: this.order.originalDeductible,
|
||||||
currentDeductible: this.order.currentDeductible
|
currentDeductible: this.order.currentDeductible,
|
||||||
|
IsItac: this.order.policy.isITAC,
|
||||||
|
OemEndorsement: policy.endorsements?.indexOf('OEM Approved') !== -1 ?? false
|
||||||
},
|
},
|
||||||
customer: {
|
customer: {
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -1051,6 +1060,7 @@ export const useMainStore = defineStore({
|
||||||
? AppointmentTypeStrings.MOBILE : serviceLocation.appointmentType,
|
? AppointmentTypeStrings.MOBILE : serviceLocation.appointmentType,
|
||||||
isVehicleProtected: serviceLocation.isVehicleProtected,
|
isVehicleProtected: serviceLocation.isVehicleProtected,
|
||||||
provider: {
|
provider: {
|
||||||
|
IsSafeliteProvider: serviceLocation?.IsSafeliteProvider,
|
||||||
providerNumber: serviceLocation.provider?.providerNumber,
|
providerNumber: serviceLocation.provider?.providerNumber,
|
||||||
address: {
|
address: {
|
||||||
streetAddress: serviceLocation.provider?.address?.streetAddress,
|
streetAddress: serviceLocation.provider?.address?.streetAddress,
|
||||||
|
|
@ -1336,6 +1346,7 @@ export const useMainStore = defineStore({
|
||||||
updateVehicle(vehicle) {
|
updateVehicle(vehicle) {
|
||||||
// Assuming that the method caller pass all the properties.
|
// Assuming that the method caller pass all the properties.
|
||||||
// otherwise need to check for undefined for every property.
|
// otherwise need to check for undefined for every property.
|
||||||
|
this.vehicle.policyVehicleId = vehicle.policyVehicleId;
|
||||||
this.vehicle.carId = vehicle.carId;
|
this.vehicle.carId = vehicle.carId;
|
||||||
this.order.vehicle.category = vehicle.category;
|
this.order.vehicle.category = vehicle.category;
|
||||||
this.order.vehicle.year = vehicle.year;
|
this.order.vehicle.year = vehicle.year;
|
||||||
|
|
@ -1369,6 +1380,7 @@ export const useMainStore = defineStore({
|
||||||
},
|
},
|
||||||
|
|
||||||
resetVehicleState() {
|
resetVehicleState() {
|
||||||
|
this.order.vehicle.policyVehicleId = null;
|
||||||
this.order.vehicle.year = null;
|
this.order.vehicle.year = null;
|
||||||
this.order.vehicle.make = null;
|
this.order.vehicle.make = null;
|
||||||
this.order.vehicle.model = null;
|
this.order.vehicle.model = null;
|
||||||
|
|
@ -1545,6 +1557,9 @@ export const useMainStore = defineStore({
|
||||||
updatePolicyITACFlag(isITAC) {
|
updatePolicyITACFlag(isITAC) {
|
||||||
this.order.policy.isITAC = isITAC;
|
this.order.policy.isITAC = isITAC;
|
||||||
},
|
},
|
||||||
|
updateIsSafeliteProvider(isSafelite) {
|
||||||
|
this.order.serviceLocation.IsSafeliteProvider = isSafelite;
|
||||||
|
},
|
||||||
savePartQuestionAnswers(partQuestionAnswersArray) {
|
savePartQuestionAnswers(partQuestionAnswersArray) {
|
||||||
// if part question answers have changed, reset subsequent question answers
|
// if part question answers have changed, reset subsequent question answers
|
||||||
const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue(this.order.damage.partQuestionAnswers, 'result');
|
const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue(this.order.damage.partQuestionAnswers, 'result');
|
||||||
|
|
@ -1995,7 +2010,7 @@ export const useMainStore = defineStore({
|
||||||
this.order.policy.damageCause = null;
|
this.order.policy.damageCause = null;
|
||||||
this.order.policy.damageCity = null;
|
this.order.policy.damageCity = null;
|
||||||
this.order.policy.damageState = null;
|
this.order.policy.damageState = null;
|
||||||
this.order.policy.isITAC = null;
|
this.order.policy.isITAC = false;
|
||||||
this.order.customer.phoneNumber = null;
|
this.order.customer.phoneNumber = null;
|
||||||
this.order.customer.emailAddress = null;
|
this.order.customer.emailAddress = null;
|
||||||
this.order.customer.firstName = null;
|
this.order.customer.firstName = null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue