Merge pull request #818 from Safelite/defect/digital/SSR-1383
SSR-1383 Use provider number instead of zipcodectu
This commit is contained in:
commit
5c3b28e1bc
1 changed files with 9 additions and 7 deletions
|
|
@ -131,6 +131,7 @@ export const getDefaultState = () => ({
|
|||
state: null,
|
||||
zipCode: null,
|
||||
zipCodeCtu: null,
|
||||
defaultProviderNumber: null,
|
||||
appointmentType: null,
|
||||
isVehicleProtected: null,
|
||||
IsSafeliteProvider: null,
|
||||
|
|
@ -294,6 +295,7 @@ export const useMainStore = defineStore({
|
|||
isUnverified: (s) => s.order.insuranceCoverage.coverageStatus !== coverageStatuses.VERIFIED,
|
||||
isVerified: (state) => state.order.insuranceCoverage.coverageStatus === coverageStatuses.VERIFIED,
|
||||
isPendingClaimRegistration: (state) => state.order.insuranceCoverage.coverageStatus === coverageStatuses.PENDING,
|
||||
providerNumber: (state) => state.order.serviceLocation.provider.providerNumber || state.order.serviceLocation.defaultProviderNumber,
|
||||
eventBusItem: (state) => (eventCategory, eventSubCategory) => {
|
||||
const matchedEvent = state.applicationUser.eventBus.find(({ category, subCategory }) => category === eventCategory && subCategory === eventSubCategory);
|
||||
return matchedEvent?.eventValue;
|
||||
|
|
@ -382,7 +384,7 @@ export const useMainStore = defineStore({
|
|||
funnelServiceZipCode: s.order.serviceLocation.zipCode,
|
||||
funnelServiceZipCodeCtu: ctuToUse,
|
||||
funnelParentAccountNumber: s.order.parentAccountNumber,
|
||||
funnelProviderNumber: s.order.serviceLocation.provider.providerNumber,
|
||||
funnelProviderNumber: s.providerNumber,
|
||||
funnelIsCoverageVerified: s.isVerified,
|
||||
funnelHasRecalibrationPart: getHasRecalibrationPart(s),
|
||||
funnelSelectedMultiGlass: s.order.damage.glassToReplace?.length > 1,
|
||||
|
|
@ -1094,7 +1096,7 @@ export const useMainStore = defineStore({
|
|||
ZipCode: policy.policyZipCode
|
||||
},
|
||||
Provider: {
|
||||
ProviderNumber: serviceLocation.zipCodeCtu,
|
||||
ProviderNumber: this.providerNumber,
|
||||
ProviderCtuNumber: serviceLocation.zipCodeCtu
|
||||
},
|
||||
Vehicle: {
|
||||
|
|
@ -1323,7 +1325,7 @@ export const useMainStore = defineStore({
|
|||
isVehicleProtected: serviceLocation.isVehicleProtected,
|
||||
provider: {
|
||||
IsSafeliteProvider: serviceLocation?.IsSafeliteProvider,
|
||||
providerNumber: serviceLocation.provider?.providerNumber,
|
||||
providerNumber: this.providerNumber,
|
||||
address: {
|
||||
streetAddress: serviceLocation.provider?.address?.streetAddress,
|
||||
city: serviceLocation.provider?.address?.city,
|
||||
|
|
@ -2041,7 +2043,6 @@ export const useMainStore = defineStore({
|
|||
async getTaxOrderItems(pricedLineItems) {
|
||||
const { order } = this;
|
||||
const { serviceLocation } = order;
|
||||
const { providerNumber } = serviceLocation.provider;
|
||||
const { appointmentType } = serviceLocation;
|
||||
const serviceLocationCity = serviceLocation.city;
|
||||
const serviceLocationState = serviceLocation.state;
|
||||
|
|
@ -2055,7 +2056,7 @@ export const useMainStore = defineStore({
|
|||
queryString =
|
||||
`ParentAccountNumber=${this.order.parentAccountNumber}`
|
||||
+ `&BillToAccountNumber=${this.billToAccountNumber}`
|
||||
+ `&ProviderNumber=${providerNumber}`
|
||||
+ `&ProviderNumber=${this.providerNumber}`
|
||||
+ `&AppointmentType=${appointmentType}`
|
||||
+ `&ServiceLocation.City=${serviceLocationCity}`
|
||||
+ `&ServiceLocation.State=${serviceLocationState}`
|
||||
|
|
@ -2065,7 +2066,7 @@ export const useMainStore = defineStore({
|
|||
queryString =
|
||||
`ParentAccountNumber=${this.order.parentAccountNumber}`
|
||||
+ `&BillToAccountNumber=${this.billToAccountNumber}`
|
||||
+ `&ProviderNumber=${providerNumber}`
|
||||
+ `&ProviderNumber=${this.providerNumber}`
|
||||
+ `&AppointmentType=${appointmentType}`
|
||||
+ `${lineItemsQueryString}`;
|
||||
}
|
||||
|
|
@ -2310,6 +2311,7 @@ export const useMainStore = defineStore({
|
|||
const zipInfo = response.data;
|
||||
if (zipInfo?.isValid === true) {
|
||||
this.order.serviceLocation.zipCodeCtu = zipInfo.zipCodeCtu;
|
||||
this.order.serviceLocation.defaultProviderNumber = zipInfo.providerNumber;
|
||||
return Promise.resolve(zipInfo);
|
||||
}
|
||||
|
||||
|
|
@ -2324,7 +2326,7 @@ export const useMainStore = defineStore({
|
|||
try {
|
||||
const params = new URLSearchParams({
|
||||
parentAccountNumber: issConfig.parentAccountNumber.toString(),
|
||||
providerNumber: order.serviceLocation.zipCodeCtu.toString(),
|
||||
providerNumber: this.providerNumber,
|
||||
typeOfClaim: 'GLASS ONLY',
|
||||
lineOfBusiness: 'PERSONAL',
|
||||
isItac: this.isITAC
|
||||
|
|
|
|||
Loading…
Reference in a new issue