Visual changes
This commit is contained in:
parent
a5f9f0343d
commit
d107245f73
2 changed files with 101 additions and 15 deletions
|
|
@ -80,6 +80,10 @@ export const pageProgressMapper = {
|
||||||
percent: 98.5,
|
percent: 98.5,
|
||||||
step: 4,
|
step: 4,
|
||||||
},
|
},
|
||||||
|
"payment-adyen": {
|
||||||
|
percent: 98.5,
|
||||||
|
step: 4,
|
||||||
|
},
|
||||||
confirmation: {
|
confirmation: {
|
||||||
percent: 100,
|
percent: 100,
|
||||||
step: 4,
|
step: 4,
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm">
|
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm">
|
||||||
<div class="container-fluid">
|
<funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" />
|
||||||
<div class="row justify-content-center">
|
<div class="container">
|
||||||
<div class="col-md-6">
|
<div class="row">
|
||||||
<funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" />
|
<div class="col-12">
|
||||||
</div>
|
<div id="card-container">
|
||||||
</div>
|
<div id="payment-container">
|
||||||
<div class="row justify-content-center">
|
<funnelSubHeader class="py-5" cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<div class="col-md-6 col-xl-4">
|
<div id="adyen-container"></div>
|
||||||
<funnelSubHeader class="pb-4" cmsWidgetName="FunnelSubHeaderWidget" />
|
</div>
|
||||||
<!--
|
|
||||||
... Page code goes here.
|
<div id="cart-container">
|
||||||
-->
|
<cart
|
||||||
<div id="adyen-container"></div>
|
ref="cart"
|
||||||
|
:damage="damageInfo"
|
||||||
|
:availableVaps="[]"
|
||||||
|
:allowItemRemoval="false"
|
||||||
|
v-model="lineItems"
|
||||||
|
servicePackageOptionsCmsName="ServicePackageTitle"
|
||||||
|
recyclingModalCmsWidgetName="RecycleModal"
|
||||||
|
:isInsurance="isInsurance"
|
||||||
|
:insuranceDeductible="currentDeductible"
|
||||||
|
:insuranceCompanyName="insuranceCompanyName"
|
||||||
|
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
||||||
|
:isItac="isItac"
|
||||||
|
:isNoComp="isNoComp"
|
||||||
|
:isCollapsible="false" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<navbar
|
<navbar
|
||||||
cmsWidgetName="FunnelFooterWidget"
|
cmsWidgetName="FunnelFooterWidget"
|
||||||
ref="navbar"
|
ref="navbar"
|
||||||
|
|
@ -46,6 +62,10 @@ import { paymentMethods } from "@/constants/payment-method-constants";
|
||||||
|
|
||||||
import "@adyen/adyen-web/styles/adyen.css";
|
import "@adyen/adyen-web/styles/adyen.css";
|
||||||
import { mapAdyenToFmgPaymentMethod } from "../../helpers/adyen-helper";
|
import { mapAdyenToFmgPaymentMethod } from "../../helpers/adyen-helper";
|
||||||
|
import { showFmgLoadingModal } from "../../helpers/loading-modal-helper";
|
||||||
|
import cart from "@/fmg-components/cart/cart";
|
||||||
|
import { coverageStatus } from "@/constants/insurance";
|
||||||
|
import { deepClone } from "@/helpers/object-helper";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "payment-adyen",
|
name: "payment-adyen",
|
||||||
|
|
@ -162,8 +182,8 @@ export default {
|
||||||
},
|
},
|
||||||
environment: "test", // Change this to "live" when you're ready to accept live PayPal payments
|
environment: "test", // Change this to "live" when you're ready to accept live PayPal payments
|
||||||
countryCode: "US", // Only needed for test. This will be automatically retrieved when you are in production.
|
countryCode: "US", // Only needed for test. This will be automatically retrieved when you are in production.
|
||||||
blockPayPalVenmoButton: false,
|
blockPayPalVenmoButton: true,
|
||||||
//blockPayPalPayLaterButton: true
|
blockPayPalPayLaterButton: true,
|
||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
hasHolderName: true,
|
hasHolderName: true,
|
||||||
|
|
@ -190,6 +210,8 @@ export default {
|
||||||
console.log(`Get session payload =`);
|
console.log(`Get session payload =`);
|
||||||
console.log(paymentSessionRequest);
|
console.log(paymentSessionRequest);
|
||||||
|
|
||||||
|
showFmgLoadingModal(true);
|
||||||
|
|
||||||
const response = await globalMethods.callHttpClient({
|
const response = await globalMethods.callHttpClient({
|
||||||
method: endpoints.GetAdyenSessionResult.method,
|
method: endpoints.GetAdyenSessionResult.method,
|
||||||
endpoint: endpoints.GetAdyenSessionResult.url,
|
endpoint: endpoints.GetAdyenSessionResult.url,
|
||||||
|
|
@ -411,6 +433,40 @@ export default {
|
||||||
adyenPriceTotal() {
|
adyenPriceTotal() {
|
||||||
return this.amountDue * 100;
|
return this.amountDue * 100;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Cart info
|
||||||
|
damageInfo() {
|
||||||
|
return this.$store.getters.damage;
|
||||||
|
},
|
||||||
|
isInsurance() {
|
||||||
|
return this.$store.getters.payment.isInsurance;
|
||||||
|
},
|
||||||
|
isNoComp() {
|
||||||
|
return this.$store.getters.policy.isNoComp;
|
||||||
|
},
|
||||||
|
isItac() {
|
||||||
|
return this.$store.getters.policy.isItac;
|
||||||
|
},
|
||||||
|
showInsuranceCoverageAs() {
|
||||||
|
if (!this.isInsurance) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.isNoComp || this.isItac) {
|
||||||
|
return coverageStatus.NOCOMP;
|
||||||
|
} else {
|
||||||
|
return this.$store.getters.payment.insuranceCoverage.coverageStatus;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
currentDeductible() {
|
||||||
|
return this.$store.getters.policy.currentDeductible;
|
||||||
|
},
|
||||||
|
insuranceCompanyName() {
|
||||||
|
return this.$store.getters.policy.insuranceCompanyName;
|
||||||
|
},
|
||||||
|
lineItems() {
|
||||||
|
return deepClone(this.$store.getters.lineItems);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -422,6 +478,32 @@ export default {
|
||||||
funnelHeader,
|
funnelHeader,
|
||||||
funnelSubHeader,
|
funnelSubHeader,
|
||||||
navbar,
|
navbar,
|
||||||
|
cart,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
#card-container {
|
||||||
|
display: flex;
|
||||||
|
& > #payment-container {
|
||||||
|
flex-basis: 55%;
|
||||||
|
margin-right: 9%;
|
||||||
|
}
|
||||||
|
& > #cart-container {
|
||||||
|
flex-basis: 36%;
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include media-breakpoint-down(lg) {
|
||||||
|
flex-direction: column;
|
||||||
|
& > #payment-container {
|
||||||
|
flex-basis: auto;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
& > #cart-container {
|
||||||
|
flex-basis: auto;
|
||||||
|
margin: 0 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue