From 0742c248c0e72feb031f4e79a909eeca322a6cc3 Mon Sep 17 00:00:00 2001 From: Mateusz Kolasa Date: Mon, 18 Mar 2024 12:45:16 +0100 Subject: [PATCH] feat: Add pickup in store support for GooglePay Closes: CXSPA-5537 --- .../quote-cart-guard.component.module.ts | 9 +- .../quote-request-button.component.html | 1 + .../quote-request-button.component.spec.ts | 30 ++- .../quote-request-button.component.ts | 10 +- .../quote-request-button.module.ts | 8 +- .../apple-pay/apple-pay.component.spec.ts | 1 + .../google-pay/google-pay.service.spec.ts | 78 +++--- .../google-pay/google-pay.service.ts | 222 ++++++++++++------ .../opf-quick-buy.service.spec.ts | 2 + .../opf-quick-buy/opf-quick-buy.service.ts | 16 ++ .../opf/base/core/services/index.ts | 1 + ...pf-pickup-in-store-handler.service.spec.ts | 56 +++++ .../opf-pickup-in-store-handler.service.ts | 64 +++++ .../base/root/model/opf-quick-buy.model.ts | 9 +- integration-libs/opf/package.json | 1 + integration-libs/opf/tsconfig.lib.json | 16 +- package.json | 2 +- projects/schematics/src/dependencies.json | 1 + .../src/shared/utils/graph-utils_spec.ts | 2 +- 19 files changed, 391 insertions(+), 138 deletions(-) create mode 100644 integration-libs/opf/base/core/services/opf-pickup-in-store-handler.service.spec.ts create mode 100644 integration-libs/opf/base/core/services/opf-pickup-in-store-handler.service.ts diff --git a/feature-libs/quote/components/cart-guard/quote-cart-guard.component.module.ts b/feature-libs/quote/components/cart-guard/quote-cart-guard.component.module.ts index 046f1f67220..e1e07e9db19 100644 --- a/feature-libs/quote/components/cart-guard/quote-cart-guard.component.module.ts +++ b/feature-libs/quote/components/cart-guard/quote-cart-guard.component.module.ts @@ -6,12 +6,7 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { - AuthGuard, - CmsConfig, - I18nModule, - provideDefaultConfig, -} from '@spartacus/core'; +import { CmsConfig, I18nModule, provideDefaultConfig } from '@spartacus/core'; import { QuoteCartGuardComponent } from './quote-cart-guard.component'; import { QuoteCartGuard } from './quote-cart.guard'; @@ -22,7 +17,7 @@ import { QuoteCartGuard } from './quote-cart.guard'; cmsComponents: { QuoteCartGuardComponent: { component: QuoteCartGuardComponent, - guards: [AuthGuard, QuoteCartGuard], + guards: [QuoteCartGuard], }, }, }), diff --git a/feature-libs/quote/components/request-button/quote-request-button.component.html b/feature-libs/quote/components/request-button/quote-request-button.component.html index 06d70a3204f..fa849b3c8f4 100644 --- a/feature-libs/quote/components/request-button/quote-request-button.component.html +++ b/feature-libs/quote/components/request-button/quote-request-button.component.html @@ -1,4 +1,5 @@