diff --git a/src/store/index.js b/src/store/index.js index 4bfac477..1e402c09 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -377,49 +377,49 @@ export const useMainStore = defineStore({ method: endpoints.RegisterClaim.method, endpoint: endpoints.RegisterClaim.url, payload: - { - correlationId: placeHolderCorrelationId, - accountNumber: this.issConfig.accountNumber?.toString() ?? '', - insured: { - firstName: this.order.customer.firstName, - lastName: this.order.customer.lastName, - address: { - addressLine1: this.order.customer.address.streetAddress, - addressLine2: this.order.customer.address.streetAddress2, - city: this.order.customer.address.city, - state: this.order.customer.address.state, - zipCode: this.order.customer.address.zipCode, - country: 'US' // TODO set from store - }, - homePhone: { - number: this.order.customer.phoneNumber.replaceAll('-', '') - } - }, - caller: { - homePhone: {} - }, - policyInfo: { - policyNumber: this.order.policy.policyNumber, - safelitePolicy: { - policies: [] - } - }, - lossInfo: { - dateOfLoss: this.order.policy.dateOfLoss, - location: { - city: this.order.policy.damageCity, - state: this.order.policy.damageState, - country: 'US' // TODO set from store - }, - vehicle: { - year: this.order.vehicle.year?.toString() ?? '', - make: this.order.vehicle.make, - model: this.order.vehicle.model, - vin: this.order.vehicle.vin - } - }, - damageDescription: this.order.policy.damageCause - } + { + correlationId: placeHolderCorrelationId, + accountNumber: this.issConfig.accountNumber?.toString() ?? '', + insured: { + firstName: this.order.customer.firstName, + lastName: this.order.customer.lastName, + address: { + addressLine1: this.order.customer.address.streetAddress, + addressLine2: this.order.customer.address.streetAddress2, + city: this.order.customer.address.city, + state: this.order.customer.address.state, + zipCode: this.order.customer.address.zipCode, + country: 'US' // TODO set from store + }, + homePhone: { + number: this.order.customer.phoneNumber.replaceAll('-', '') + } + }, + caller: { + homePhone: {} + }, + policyInfo: { + policyNumber: this.order.policy.policyNumber, + safelitePolicy: { + policies: [] + } + }, + lossInfo: { + dateOfLoss: this.order.policy.dateOfLoss, + location: { + city: this.order.policy.damageCity, + state: this.order.policy.damageState, + country: 'US' // TODO set from store + }, + vehicle: { + year: this.order.vehicle.year?.toString() ?? '', + make: this.order.vehicle.make, + model: this.order.vehicle.model, + vin: this.order.vehicle.vin + }, + damageDescription: this.order.policy.damageCause + } + } }).then((response) => { const registerClaimFailed = response.data.isError; this.order.payment.insuranceCoverage.isVerified = !registerClaimFailed;