Merge pull request #540 from Safelite/feature/digital/SSR-792.4
Feature/digital/ssr 792.4
This commit is contained in:
commit
b5a39258bd
5 changed files with 18 additions and 8 deletions
|
|
@ -354,7 +354,7 @@ export default {
|
||||||
addressLine2 += zipCode;
|
addressLine2 += zipCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const addressLine1 = this.toTitleCase(provider?.address?.streetAddress);
|
const addressLine1 = toTitleCase(provider?.address?.streetAddress);
|
||||||
const joinString = addressLine1.length > 0 && addressLine2.length > 0 ? ', ' : '';
|
const joinString = addressLine1.length > 0 && addressLine2.length > 0 ? ', ' : '';
|
||||||
return [addressLine1, addressLine2].join(joinString);
|
return [addressLine1, addressLine2].join(joinString);
|
||||||
},
|
},
|
||||||
|
|
@ -376,6 +376,9 @@ export default {
|
||||||
this.mapZipCode = this.zipCode;
|
this.mapZipCode = this.zipCode;
|
||||||
},
|
},
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
|
if (this.selectedProviderIsSafeliteShop) {
|
||||||
|
useMainStore().updateIsSafeliteProvider(true);
|
||||||
|
}
|
||||||
const scenario = this.selectedProviderIsSafeliteShop
|
const scenario = this.selectedProviderIsSafeliteShop
|
||||||
? this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE_SHOP
|
? this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE_SHOP
|
||||||
: this.navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP;
|
: this.navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP;
|
||||||
|
|
@ -390,7 +393,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getShopButtonDataFromProvider(provider) {
|
getShopButtonDataFromProvider(provider) {
|
||||||
const cellNumber = this.toDisplayPhoneNumber(provider?.phoneNumber);
|
const cellNumber = toDisplayPhoneNumber(provider?.phoneNumber);
|
||||||
const distance = provider?.distanceInMiles !== null && !Number.isNaN(parseFloat(provider?.distanceInMiles))
|
const distance = provider?.distanceInMiles !== null && !Number.isNaN(parseFloat(provider?.distanceInMiles))
|
||||||
? +provider.distanceInMiles.toFixed(1)
|
? +provider.distanceInMiles.toFixed(1)
|
||||||
: null;
|
: null;
|
||||||
|
|
@ -403,9 +406,7 @@ export default {
|
||||||
buttonBodyCopy: `${this.getProviderAddress(provider)}<br>${cellNumber ?? ''}`,
|
buttonBodyCopy: `${this.getProviderAddress(provider)}<br>${cellNumber ?? ''}`,
|
||||||
value: provider?.providerNumber ?? ''
|
value: provider?.providerNumber ?? ''
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
toDisplayPhoneNumber,
|
|
||||||
toTitleCase
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -242,8 +242,11 @@ export default {
|
||||||
methods:
|
methods:
|
||||||
{
|
{
|
||||||
setSections() {
|
setSections() {
|
||||||
|
const vehicleScenario = useMainStore().isPolicyVehicle
|
||||||
|
? this.navigationScenarios.EDIT_POLICY_VEHICLE
|
||||||
|
: this.navigationScenarios.EDIT_VEHICLE;
|
||||||
this.sections = [
|
this.sections = [
|
||||||
this.getSection(this.widget.subheader.vehicle, this.getVehicleLines, this.navigationScenarios.EDIT_VEHICLE),
|
this.getSection(this.widget.subheader.vehicle, this.getVehicleLines, vehicleScenario),
|
||||||
this.getSection(this.widget.subheader.damage, this.getDamageLines, this.navigationScenarios.EDIT_DAMAGE),
|
this.getSection(this.widget.subheader.damage, this.getDamageLines, this.navigationScenarios.EDIT_DAMAGE),
|
||||||
this.getSection(this.widget.subheader.shop, this.getPreferredShopLines, this.navigationScenarios.EDIT_PREFERRED_SHOP),
|
this.getSection(this.widget.subheader.shop, this.getPreferredShopLines, this.navigationScenarios.EDIT_PREFERRED_SHOP),
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ const navigationScenarios = Object.freeze({
|
||||||
CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP: 'CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP',
|
CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP: 'CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP',
|
||||||
|
|
||||||
// TPA Submit
|
// TPA Submit
|
||||||
|
EDIT_POLICY_VEHICLE: 'EDIT_POLICY_VEHICLE',
|
||||||
EDIT_VEHICLE: 'EDIT_VEHICLE',
|
EDIT_VEHICLE: 'EDIT_VEHICLE',
|
||||||
EDIT_DAMAGE: 'EDIT_DAMAGE',
|
EDIT_DAMAGE: 'EDIT_DAMAGE',
|
||||||
EDIT_PREFERRED_SHOP: 'EDIT_PREFERRED_SHOP',
|
EDIT_PREFERRED_SHOP: 'EDIT_PREFERRED_SHOP',
|
||||||
|
|
|
||||||
|
|
@ -641,6 +641,10 @@ const routingTable = () => [
|
||||||
{
|
{
|
||||||
issPageValue: issPageValues.TPA_SUBMIT,
|
issPageValue: issPageValues.TPA_SUBMIT,
|
||||||
maps: [
|
maps: [
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.EDIT_POLICY_VEHICLE,
|
||||||
|
destinationIssPageValue: issPageValues.POLICY_VEHICLES
|
||||||
|
},
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.EDIT_VEHICLE,
|
scenario: navigationScenarios.EDIT_VEHICLE,
|
||||||
destinationIssPageValue: issPageValues.VEHICLE_SELECTION
|
destinationIssPageValue: issPageValues.VEHICLE_SELECTION
|
||||||
|
|
@ -651,11 +655,11 @@ const routingTable = () => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.EDIT_PREFERRED_SHOP,
|
scenario: navigationScenarios.EDIT_PREFERRED_SHOP,
|
||||||
destinationIssPageValue: issPageValues.TPA_SEARCH
|
destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.EDIT_CONTACT_DETAILS,
|
scenario: navigationScenarios.EDIT_CONTACT_DETAILS,
|
||||||
destinationIssPageValue: issPageValues.CONTACT_DETAILS
|
destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_BACK,
|
scenario: navigationScenarios.CLICKED_BACK,
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,7 @@ export const useMainStore = defineStore({
|
||||||
payment: (state) => state.order.payment,
|
payment: (state) => state.order.payment,
|
||||||
policy: (state) => state.order.policy,
|
policy: (state) => state.order.policy,
|
||||||
hasExactlyOneChip: () => state.order.damage.numberOfChips === 1,
|
hasExactlyOneChip: () => state.order.damage.numberOfChips === 1,
|
||||||
|
isPolicyVehicle: () => state.order.vehicle.policyVehicleId != null,
|
||||||
hasAnyNonWindshieldGlassParts: (s) => !s.order.policy.isDamageGlassOnly,
|
hasAnyNonWindshieldGlassParts: (s) => !s.order.policy.isDamageGlassOnly,
|
||||||
isMobileAppointment: (state) => state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE
|
isMobileAppointment: (state) => state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE
|
||||||
|| state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP,
|
|| state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue