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