From a9b00b9a86126f27308ecfdb06abd618d63792f4 Mon Sep 17 00:00:00 2001 From: Roger Gutierrez Date: Mon, 30 Oct 2023 11:18:55 -0600 Subject: [PATCH] feat: ftd message added to checkout page for first time lenders --- src/assets/images/checkout/ftds_sparkle.svg | 6 ++++ src/components/Checkout/FtdsDisclaimer.vue | 22 ++++++++++++++ src/components/Checkout/FtdsMessage.vue | 21 +++++++++++++ .../query/checkout/initializeCheckout.graphql | 15 ++++++++++ src/graphql/query/thanksPage.graphql | 4 +-- src/pages/Checkout/CheckoutPage.vue | 30 ++++++++++++++++++- 6 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 src/assets/images/checkout/ftds_sparkle.svg create mode 100644 src/components/Checkout/FtdsDisclaimer.vue create mode 100644 src/components/Checkout/FtdsMessage.vue diff --git a/src/assets/images/checkout/ftds_sparkle.svg b/src/assets/images/checkout/ftds_sparkle.svg new file mode 100644 index 0000000000..0a2b27f250 --- /dev/null +++ b/src/assets/images/checkout/ftds_sparkle.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/Checkout/FtdsDisclaimer.vue b/src/components/Checkout/FtdsDisclaimer.vue new file mode 100644 index 0000000000..2702853a71 --- /dev/null +++ b/src/components/Checkout/FtdsDisclaimer.vue @@ -0,0 +1,22 @@ + + + diff --git a/src/components/Checkout/FtdsMessage.vue b/src/components/Checkout/FtdsMessage.vue new file mode 100644 index 0000000000..2f15ddf0fe --- /dev/null +++ b/src/components/Checkout/FtdsMessage.vue @@ -0,0 +1,21 @@ + + + diff --git a/src/graphql/query/checkout/initializeCheckout.graphql b/src/graphql/query/checkout/initializeCheckout.graphql index e4dd9d7ba6..21775cc7a1 100644 --- a/src/graphql/query/checkout/initializeCheckout.graphql +++ b/src/graphql/query/checkout/initializeCheckout.graphql @@ -20,6 +20,9 @@ query initializeCheckout($basketId: String) { } } } + loans { + totalCount + } } general { activeLoginDuration: configSetting(key: "login_timeouts.www.active_login") { @@ -31,6 +34,18 @@ query initializeCheckout($basketId: String) { value description } + ftd_message_enable: uiConfigSetting(key: "ftd_message_enable") { + key + value + } + ftd_amount: uiConfigSetting(key: "ftd_message_amount") { + key + value + } + ftd_date_time: uiConfigSetting(key: "ftd_message_valid_date") { + key + value + } } shop (basketId: $basketId) { id diff --git a/src/graphql/query/thanksPage.graphql b/src/graphql/query/thanksPage.graphql index 298272b2a6..1123bee1c4 100644 --- a/src/graphql/query/thanksPage.graphql +++ b/src/graphql/query/thanksPage.graphql @@ -132,11 +132,11 @@ query checkoutReceipt($checkoutId: Int!, $visitorId: String) { key value } - ftd_message_enable: uiConfigSetting(key: "thanks_page_ftd_message_enable") { + ftd_message_enable: uiConfigSetting(key: "ftd_message_enable") { key value } - ftd_amount: uiConfigSetting(key: "thanks_page_ftd_amount") { + ftd_amount: uiConfigSetting(key: "ftd_message_amount") { key value } diff --git a/src/pages/Checkout/CheckoutPage.vue b/src/pages/Checkout/CheckoutPage.vue index 87ecce4949..2ab50d0aa2 100644 --- a/src/pages/Checkout/CheckoutPage.vue +++ b/src/pages/Checkout/CheckoutPage.vue @@ -24,6 +24,12 @@ Your basket
+ +
@@ -195,6 +201,12 @@ id="updating-overlay" class="updating-totals-overlay tw-z-overlay tw-bg-white" /> + +
loan.id); }, + showFtdMessage() { + return !this.lenderTotalLoans && this.enableFtdMessage && this.ftdCreditAmount && this.ftdValidDate; + } }, methods: { openMatchedLoansLightbox() {