diff --git a/src/fmg-components/donation-block/donation-block.vue b/src/fmg-components/donation-block/donation-block.vue
index b5b78d21e..f62e0d817 100644
--- a/src/fmg-components/donation-block/donation-block.vue
+++ b/src/fmg-components/donation-block/donation-block.vue
@@ -65,6 +65,7 @@ export default {
name: "donationBlock",
props: {
cmsWidgetName: String,
+ modelValue: String,
},
computed: {
DonationHeadline() {
@@ -91,6 +92,14 @@ export default {
LogoImage() {
return this.getCmsContent("DonationWidget", "Image");
},
+ selectedValue: {
+ get: function () {
+ return this.modelValue?.toString();
+ },
+ set: function (newValue) {
+ this.$emit("update:modelValue", newValue);
+ },
+ },
},
data() {
return {
diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue
index a612bcf2c..6af0ba56e 100644
--- a/src/layouts/confirmation/confirmation.vue
+++ b/src/layouts/confirmation/confirmation.vue
@@ -65,12 +65,17 @@
:isNoComp="isNoComp" />
-
+
- donationAdded: {{ donationAdded }}
-
-
+ donationAmount: {{ donationAmount }}
+
+
@@ -456,7 +461,10 @@ export default {
);
}
},
- donationAdded() {
+ donationValues() {
+ return [1,3,5];
+ },
+ donationAmount() {
const donationItems = this.submittedOrder?.lineItems?.supportingItems?.filter(
(item) => item.partNumber === "DONATION"
);
@@ -507,13 +515,22 @@ export default {
forwardButtonAction() {
window.location.assign(location.protocol + "//" + location.host);
},
- addDonation(amount) {
- baseMixin.methods.dispatchStoreAction(
+ async addDonation(amount) {
+ // try to call API to add donation to order
+
+ // TODO - change the following to check the response from the call
+ const donationResponse = await baseMixin.methods.dispatchStoreAction(
storeActions.ADD_DONATION_TO_SUBMITTED_ORDER,
amount,
false
);
- }
+ },
+ },
+ watch: {
+ donationAmount(newValue) {
+ console.log("WATCHED donationAmount changed: ", newValue)
+ this.addDonation(newValue);
+ },
},
components: {
funnelHeader,
diff --git a/src/layouts/insurance-company/insurance-company.vue b/src/layouts/insurance-company/insurance-company.vue
index 452484e48..6069d2de5 100644
--- a/src/layouts/insurance-company/insurance-company.vue
+++ b/src/layouts/insurance-company/insurance-company.vue
@@ -22,7 +22,7 @@
linkType="text"
:text="payWithCashButtonCopy"
href="javascript:void(0)"
- @click-event="backButtonAction(foreceCashSelectionOnQuote = true)" />
+ @click-event="backButtonAction((foreceCashSelectionOnQuote = true))" />
{
mockTierOnePrice = 505;
const { wrapper } = setupMocks({});
-
//Act
await quote.beforeRouteEnter.call(
wrapper.vm,
- { query: { fmgPage: "quote",
- isInsuranceSelected: true,
- isCashSelected: true,
- } },
+ { query: { fmgPage: "quote", isInsuranceSelected: true, isCashSelected: true } },
undefined,
(c) => c(wrapper.vm)
);
diff --git a/src/layouts/service-zip/service-zip.vue b/src/layouts/service-zip/service-zip.vue
index ae7609da8..9528d50bc 100644
--- a/src/layouts/service-zip/service-zip.vue
+++ b/src/layouts/service-zip/service-zip.vue
@@ -206,8 +206,7 @@ export default {
if (!this.emailOrSms) {
await this.dispatchStoreAction(storeActions.SAVE_PHONE_NUMBER, "", false);
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, "", false);
- }
- else {
+ } else {
if (vinPagesMixin.methods.isPhoneNumber(this.emailOrSms)) {
const phone = this.emailOrSms.replace(/[()]/g, "");
await this.dispatchStoreAction(storeActions.SAVE_PHONE_NUMBER, phone, false);
diff --git a/src/store/index.js b/src/store/index.js
index 6d03b65a4..1691c8080 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -3157,22 +3157,21 @@ export const actions = {
},
addDonationToSubmittedOrder(context, donationAmount) {
-
- console.log("running addDonationToSubmittedOrder()... donationAmount: ", donationAmount)
+ console.log("running addDonationToSubmittedOrder()... donationAmount: ", donationAmount);
const submittedOrder = deepClone(baseMixin.methods.getSubmittedOrder());
submittedOrder.lineItems.supportingItems.push({
- "partNumber": "DONATION",
- "description": null,
- "partType": "DONATION",
- "isInsurable": false,
- "isChildPart": false,
- "laborAmount": 0,
- "sellingPrice": donationAmount,
- "kitPrice": 0,
- "salesTax": null,
- "id": "donation-" + donationAmount,
+ partNumber: "DONATION",
+ description: null,
+ partType: "DONATION",
+ isInsurable: false,
+ isChildPart: false,
+ laborAmount: 0,
+ sellingPrice: donationAmount,
+ kitPrice: 0,
+ salesTax: null,
+ id: "donation-" + donationAmount,
});
// set to local storage
diff --git a/vue.config.js b/vue.config.js
index d8cb42355..f3112f2d1 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,4 +1,4 @@
-process.env.VUE_APP_CONSUMER_CF_DISTRO = "https://digitalapi.dev.safelite.io";
+process.env.VUE_APP_CONSUMER_CF_DISTRO = "https://digitalapi.qa.safelite.io";
//process.env.VUE_APP_HERITAGE_FUNNEL = "http://localhost:38000/default.aspx";
process.env.VUE_APP_HERITAGE_FUNNEL = "https://fixmyglassdev.safelite.com/default.aspx";
process.env.VUE_APP_GOOGLE_PLACES_API_KEY = "AIzaSyDptGCkOPgN2uWJOy4ou4M33phRD4MAoJo";