formatting fixes
This commit is contained in:
parent
981ef674fb
commit
b344e263d0
1 changed files with 119 additions and 117 deletions
|
|
@ -83,135 +83,137 @@ export default {
|
|||
{
|
||||
resultKey: "cmsContent",
|
||||
promise: cmsContentPromise,
|
||||
},];
|
||||
},
|
||||
];
|
||||
|
||||
//use resultMap to populate layout content.
|
||||
let resultMap = await settleAllPromises(promiseResultMap);
|
||||
//use resultMap to populate layout content.
|
||||
let resultMap = await settleAllPromises(promiseResultMap);
|
||||
|
||||
next((vm) => {
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
|
||||
},
|
||||
created(){
|
||||
});
|
||||
|
||||
},
|
||||
created(){
|
||||
this.getVehiclesfromPolicyLookup();
|
||||
},
|
||||
methods:
|
||||
{
|
||||
backButtonAction() {
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
},
|
||||
methods:
|
||||
{
|
||||
backButtonAction() {
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
},
|
||||
|
||||
async forwardButtonAction()
|
||||
{
|
||||
this.mainStore.updatePolicyHolderDetails(this.customerQuestions);
|
||||
return this.navigateForward();
|
||||
},
|
||||
async forwardButtonAction()
|
||||
{
|
||||
this.mainStore.updatePolicyHolderDetails(this.customerQuestions);
|
||||
return this.navigateForward();
|
||||
},
|
||||
|
||||
navigateForward() {
|
||||
if(this.vehiclesCount > 0)
|
||||
navigateForward() {
|
||||
if(this.vehiclesCount > 0)
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED,
|
||||
this.$route,
|
||||
{},
|
||||
{},
|
||||
this.vehiclesFound
|
||||
);
|
||||
else
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED,
|
||||
this.$route,
|
||||
{},
|
||||
{},
|
||||
this.vehiclesFound
|
||||
);
|
||||
else
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED,
|
||||
this.$route
|
||||
);
|
||||
},
|
||||
getPolicyHolderDetailsFromStore() {
|
||||
return {
|
||||
addressQuestions :
|
||||
this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED,
|
||||
this.$route
|
||||
);
|
||||
},
|
||||
getPolicyHolderDetailsFromStore() {
|
||||
return {
|
||||
addressQuestions :
|
||||
{
|
||||
streetAddress: this.mainStore.order.customer.address.streetAddress,
|
||||
streetAddress2: this.mainStore.order.customer.address.streetAddress2,
|
||||
city: this.mainStore.order.customer.address.city,
|
||||
state: this.mainStore.order.customer.address.state,
|
||||
zipCode: this.mainStore.order.customer.address.zipCode,
|
||||
},
|
||||
firstName : this.mainStore.order.customer.firstName,
|
||||
lastName : this.mainStore.order.customer.lastName,
|
||||
}
|
||||
},
|
||||
async getPolicyLookupResponse(){
|
||||
const policyLookupResponse = this.mainStore.getCoveragePolicyInfo({
|
||||
accountNumber:this.mainStore.order.accountNumber.toString(),
|
||||
policyNumber:this.mainStore.order.policy.policyNumber,
|
||||
dateOfLoss:this.mainStore.order.policy.dateOfLoss});
|
||||
|
||||
// Settle promises and get results
|
||||
const promisePolicyLookupResultMap = [
|
||||
{
|
||||
streetAddress: this.mainStore.order.customer.address.streetAddress,
|
||||
streetAddress2: this.mainStore.order.customer.address.streetAddress2,
|
||||
city: this.mainStore.order.customer.address.city,
|
||||
state: this.mainStore.order.customer.address.state,
|
||||
zipCode: this.mainStore.order.customer.address.zipCode,
|
||||
},
|
||||
firstName : this.mainStore.order.customer.firstName,
|
||||
lastName : this.mainStore.order.customer.lastName,
|
||||
}
|
||||
},
|
||||
async getPolicyLookupResponse(){
|
||||
const policyLookupResponse = this.mainStore.getCoveragePolicyInfo({
|
||||
accountNumber:this.mainStore.order.accountNumber.toString(),
|
||||
policyNumber:this.mainStore.order.policy.policyNumber,
|
||||
dateOfLoss:this.mainStore.order.policy.dateOfLoss});
|
||||
|
||||
// Settle promises and get results
|
||||
const promisePolicyLookupResultMap = [
|
||||
{
|
||||
resultKey: "policyLookupResponse",
|
||||
promise: policyLookupResponse,
|
||||
}
|
||||
];
|
||||
const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap);
|
||||
return policyLookupResultMap.policyLookupResponse;
|
||||
},
|
||||
async getVehiclesfromPolicyLookup()
|
||||
{
|
||||
//call coverage policy lookup if isCoverageEnabled flag enabled
|
||||
if(this.isCoverageEnabled){
|
||||
const policyLookupResponse = await this.getPolicyLookupResponse();
|
||||
if(policyLookupResponse!=null){
|
||||
var policy = policyLookupResponse.policies?.[0];
|
||||
if(policy!=null){
|
||||
//populate policy holder details from policy lookup
|
||||
this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address;
|
||||
this.mainStore.order.customer.address.city=policy.insureds?.[0]?.city;
|
||||
this.mainStore.order.customer.address.state=policy.insureds?.[0]?.state;
|
||||
this.mainStore.order.customer.address.zipCode=policy.insureds?.[0]?.zipCode;
|
||||
this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName;
|
||||
this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName;
|
||||
|
||||
this.customerQuestions = this.getPolicyHolderDetailsFromStore();
|
||||
//populate vehicles
|
||||
this.vehiclesFound= policy.vehicles;
|
||||
}
|
||||
resultKey: "policyLookupResponse",
|
||||
promise: policyLookupResponse,
|
||||
}
|
||||
}
|
||||
},
|
||||
];
|
||||
const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap);
|
||||
return policyLookupResultMap.policyLookupResponse;
|
||||
},
|
||||
async getVehiclesfromPolicyLookup()
|
||||
{
|
||||
//call coverage policy lookup if isCoverageEnabled flag enabled
|
||||
if(this.isCoverageEnabled){
|
||||
const policyLookupResponse = await this.getPolicyLookupResponse();
|
||||
if(policyLookupResponse!=null){
|
||||
var policy = policyLookupResponse.policies?.[0];
|
||||
if(policy!=null){
|
||||
//populate policy holder details from policy lookup
|
||||
this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address;
|
||||
this.mainStore.order.customer.address.city=policy.insureds?.[0]?.city;
|
||||
this.mainStore.order.customer.address.state=policy.insureds?.[0]?.state;
|
||||
this.mainStore.order.customer.address.zipCode=policy.insureds?.[0]?.zipCode;
|
||||
this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName;
|
||||
this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName;
|
||||
|
||||
this.customerQuestions = this.getPolicyHolderDetailsFromStore();
|
||||
//populate vehicles
|
||||
this.vehiclesFound= policy.vehicles;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
computed:{
|
||||
isCoverageEnabled(){
|
||||
return this.mainStore.issConfig.isCoverageEnabled;
|
||||
},
|
||||
computed:{
|
||||
isCoverageEnabled(){
|
||||
return this.mainStore.issConfig.isCoverageEnabled;
|
||||
},
|
||||
vehiclesCount(){
|
||||
return this.vehiclesFound.length;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
siteHeader,
|
||||
siteSubHeader,
|
||||
textboxQuestion,
|
||||
addressQuestions,
|
||||
siteFooter,
|
||||
Form,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#sub-header p {
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
color: #4D5151;
|
||||
}
|
||||
vehiclesCount(){
|
||||
return this.vehiclesFound.length;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
siteHeader,
|
||||
siteSubHeader,
|
||||
textboxQuestion,
|
||||
addressQuestions,
|
||||
siteFooter,
|
||||
Form,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
#address-questions-wrapper {
|
||||
margin-top: 24px;
|
||||
}
|
||||
<style lang="scss">
|
||||
#sub-header p {
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
color: #4D5151;
|
||||
}
|
||||
|
||||
#address-questions-wrapper .alert.heading {
|
||||
line-height: 24px;
|
||||
}
|
||||
#address-questions-wrapper {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
#address-questions-wrapper .form-test-error {
|
||||
line-height: 24px;
|
||||
}
|
||||
</style>
|
||||
#address-questions-wrapper .alert.heading {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
#address-questions-wrapper .form-test-error {
|
||||
line-height: 24px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue