From 794150b33de825dc2b648965b7a20388b4bf6b4a Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 7 Nov 2023 11:22:51 -0500 Subject: [PATCH 01/35] Revamp of non-packaged cart-items to display all of them in the loop instead of making separate cart item markup for fees etc --- src/fmg-components/cart/cart.vue | 116 ++++++++---------- src/layouts/payment-method/payment-method.vue | 1 - 2 files changed, 54 insertions(+), 63 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index a6290e46c..d05c8816e 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -18,10 +18,7 @@ -
+
{{ cartItem.name }} -
- {{ cartItem.name }} + :key="i" + class="non-packaged-cart-item" + :class="[ + i % 2 == 0 ? 'even' : 'odd', + cartItem.isRemovable ? 'removable-cart-item' : '', + ]"> + {{ cartItem.name }} - {{ currencyFormatter.format(cartItem.subTotal) }} -
- - -
- {{ currencyFormatter.format(recycleFeeCartItem.subTotal) }} + {{ currencyFormatter.format(cartItem.subTotal) }}
-
- {{ mobileFeeCartItem.name }}{{ currencyFormatter.format(mobileFeeCartItem.subTotal) }} -
- -
- {{ premiumAppointmentDiscountCartItem.name }} - - {{ - currencyFormatter.format(premiumAppointmentDiscountCartItem.subTotal) - }} -
-
@@ -336,13 +308,13 @@ export default { const nonpackageCartItems = []; this.cartItems.forEach((cartItem) => { - if ( - cartItem == this.recycleFeeCartItem || - cartItem == this.mobileFeeCartItem || - cartItem == this.premiumAppointmentDiscountCartItem - ) { - return; - } + // if ( + // cartItem == this.recycleFeeCartItem || + // cartItem == this.mobileFeeCartItem || + // cartItem == this.premiumAppointmentDiscountCartItem + // ) { + // return; + // } if (!this.packageCartItems.find((packageCartItem) => packageCartItem == cartItem)) { if (cartItem.isDisplayed) { @@ -441,6 +413,7 @@ export default { category: cartItemCategories.VAPS, cartItemType: cartItemTypes.RAIN_DEFENSE, isDisplayed: true, + isRemovable: true, subTotal: 0, salesTax: 0, lineItems: [], @@ -469,6 +442,7 @@ export default { category: cartItemCategories.GLASS_PARTS, cartItemType: cartItemTypes.GLASS_PARTS, isDisplayed: false, + isRemovable: false, subTotal: (lineItem.kitPrice ?? 0) + (lineItem.laborAmount ?? 0) + @@ -511,6 +485,7 @@ export default { category: cartItemCategories.SUPPORTING_ITEMS, cartItemType: cartItemTypes.RECYCLE_FEE, isDisplayed: true, + isRemovable: false, subTotal: 0, salesTax: 0, lineItems: [], @@ -545,6 +520,7 @@ export default { category: cartItemCategories.SUPPORTING_ITEMS, cartItemType: cartItemTypes.MOBILE_FEE, isDisplayed: true, + isRemovable: false, subTotal: 0, salesTax: 0, lineItems: [], @@ -579,6 +555,7 @@ export default { category: cartItemCategories.SUPPORTING_ITEMS, cartItemType: cartItemTypes.SUPPORTING_ITEMS, isDisplayed: false, + isRemovable: false, subTotal: 0, salesTax: 0, lineItems: [], @@ -714,9 +691,9 @@ export default { display: flex; justify-content: space-between; padding: 0.5rem 1.5rem; - &:nth-child(odd) { - background-color: #f5f5f5; - } + // &:nth-child(odd) { + // background-color: #f5f5f5; + // } &:nth-last-child(-n + 3) { background-color: #e3f2ea; } @@ -725,7 +702,12 @@ export default { color: #ffffff; } } - .vaps { + .service-type { + background-color: #f5f5f5; + //padding-left: 2.5rem; + align-items: center; + } + .packaged-cart-item { background-color: #f5f5f5; padding-left: 2.5rem; align-items: center; @@ -743,6 +725,28 @@ export default { font-size: 0.875rem; } } + .non-packaged-cart-item { + &.odd { + background: var(--neutrals-gray-100, #f4f4f4); + } + } + .non-packaged-cart-item { + &.even { + background-color: var(--neutrals-white, #fff); + } + } + // Custom order/wrap for removable nonpackaged Cart Items + .removable-cart-item { + flex-wrap: wrap; + span { + display: flex; + justify-content: space-between; + } + a { + order: 3; + margin-right: 100%; + } + } .package-type, .service-type { //background-color: #f5f5f5; @@ -764,18 +768,6 @@ export default { padding: 0; } } - // Custom order/wrap for nonpackaged Cart Items - .premium-appt-cart-item { - flex-wrap: wrap; - span { - display: flex; - justify-content: space-between; - } - a { - order: 3; - margin-right: 100%; - } - } } .vin-toggle { &:after { diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 8a5f3a21d..d0d83c498 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -27,7 +27,6 @@ :allowItemRemoval="true" v-model="lineItems" servicePackageOptionsCmsName="ServicePackageTitle" - @cart-remove="cartRemove" recyclingModalCmsWidgetName="RecycleModal" />
From ccbb9b18efc4d277e5efa7f4b179265cd9fb4cf6 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Wed, 8 Nov 2023 16:38:18 +0530 Subject: [PATCH 02/35] Appointment EndTime Appointment end time for Inshop and Dropoff Schedules --- src/layouts/confirmation/confirmation.vue | 6 +++++- src/layouts/payment-method/payment-method.vue | 2 +- src/layouts/payment/payment.vue | 2 +- src/layouts/review/review.vue | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index 177e0ff93..1cd2fa4fb 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -238,7 +238,11 @@ export default { const schedule = store.getters.order.schedule; const scheduleReqs = !!(schedule.date && schedule.startTime && schedule.endTime); - return serviceLocationReqs && scheduleReqs; + // Customer + const customer = store.getters.order.customer; + const customerReqs = !!customer.emailAddress; + + return serviceLocationReqs && scheduleReqs && customerReqs; }, forwardButtonAction() { window.location.assign("//www.safelite.com/"); diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 867dbb3fd..9f9df5f52 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -266,7 +266,7 @@ export default { const scheduleReqs = !!( schedule.date && schedule.startTime && - (!isMobile || schedule.endTime) && + schedule.endTime && schedule.jobMaxMinutes && schedule.jobMinMinutes ); diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 6cae579ce..a6340b5db 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -312,7 +312,7 @@ export default { const scheduleReqs = !!( schedule.date && schedule.startTime && - (!isMobile || schedule.endTime) && + schedule.endTime && schedule.jobMaxMinutes && schedule.jobMinMinutes ); diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue index 0011e79f7..d6ad0aa82 100644 --- a/src/layouts/review/review.vue +++ b/src/layouts/review/review.vue @@ -207,7 +207,7 @@ export default { const scheduleReqs = !!( schedule.date && schedule.startTime && - (!isMobile || schedule.endTime) && + schedule.endTime && schedule.jobMaxMinutes && schedule.jobMinMinutes ); From f345973d7793043e5cbc21e0b8b32d33209b33ef Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 8 Nov 2023 07:20:01 -0500 Subject: [PATCH 03/35] Tech review changes --- src/fmg-components/cart/cart.vue | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index d05c8816e..a8ddb99a5 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -3,15 +3,15 @@
+ :class="[isExpanded ? 'expanded' : '']" + @click="toggleIsExpanded()">
{{ amountDueText }}{{ currencyFormatter.format(amountDue) }}
-
+
{{ currencyFormatter.format(packagePrice) }} @@ -106,8 +106,7 @@ export default { }, data() { return { - isActive: false, - packageWithVAPS: false, + isExpanded: false, currencyFormatter: new Intl.NumberFormat("en-US", { style: "currency", currency: "USD", @@ -119,8 +118,8 @@ export default { openModal(modalName) { this.$refs[modalName].openModal(); }, - toggleClass: function (event) { - this.isActive = !this.isActive; + toggleIsExpanded() { + this.isExpanded = !this.isExpanded; }, getVapsPrice(packageName) { const vapsItems = this.getVapsCartItemsForSelectedPackage(packageName); @@ -308,14 +307,6 @@ export default { const nonpackageCartItems = []; this.cartItems.forEach((cartItem) => { - // if ( - // cartItem == this.recycleFeeCartItem || - // cartItem == this.mobileFeeCartItem || - // cartItem == this.premiumAppointmentDiscountCartItem - // ) { - // return; - // } - if (!this.packageCartItems.find((packageCartItem) => packageCartItem == cartItem)) { if (cartItem.isDisplayed) { nonpackageCartItems.push(cartItem); @@ -476,7 +467,7 @@ export default { let cartItem = null; const recycleFeeLineItem = this.supportingItems.find( - (supportingItem) => supportingItem.partNumber == partTypeStrings.RECYCLE_FEE + (supportingItem) => supportingItem.partType == partTypeStrings.RECYCLE_FEE ); if (recycleFeeLineItem) { @@ -784,10 +775,10 @@ export default { margin: 1rem 0 1rem 1rem; cursor: pointer; } - &.active:after { + &.expanded:after { transform: rotate(180deg); } - &.active + .price-table { + &.expanded + .price-table { max-height: 650px; transition: all 350ms ease-in; overflow: hidden; From 1f602079838d246fbb48961f09fcade73ab67fe2 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 8 Nov 2023 10:20:11 -0500 Subject: [PATCH 04/35] CSR-1391 update window height and styles for Afterpay. --- public/css/site-2020Styling.css | 15 +++++++++++++++ public/scss/site-2020Styling.scss | 19 +++++++++++++++++++ src/layouts/payment/payment.vue | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/public/css/site-2020Styling.css b/public/css/site-2020Styling.css index d42d3a81d..beb4c3ec5 100644 --- a/public/css/site-2020Styling.css +++ b/public/css/site-2020Styling.css @@ -87,6 +87,21 @@ display: none; } +#afterpay__iframe-checkout-container { + width: 100%; +} +#afterpay__iframe-checkout-container .style_closeWrapper__lIHJe { + display: none; +} + +.buy-container-closer { + display: none; +} + +.buy-backdrop { + background-color: rgba(0, 0, 0, 0.3) !important; +} + @keyframes rotate { 0% { transform: rotate(0); diff --git a/public/scss/site-2020Styling.scss b/public/scss/site-2020Styling.scss index fd716f6ee..395eebcb2 100644 --- a/public/scss/site-2020Styling.scss +++ b/public/scss/site-2020Styling.scss @@ -90,6 +90,25 @@ } } +// AfterPay Styles + +#afterpay__iframe-checkout-container { + width: 100%; + .style_closeWrapper__lIHJe { + display: none; + } +} + +.buy-container-closer { + display: none; +} + +.buy-backdrop { + background-color: rgba(0,0,0,.3)!important; +} + +// Modal Spinner + @keyframes rotate { 0% { transform: rotate(0)} 100% { transform: rotate(360deg)} diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index a6340b5db..513a9318e 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -474,7 +474,7 @@ export default {