Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CXINT-1850: Requested Delivery Date feature library #17598

Merged
merged 32 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7b980da
CXINT-1850: Requested Delivery Date feature library
SherwinVarghese Jun 30, 2023
afc9a3d
Add license header
github-actions[bot] Jun 30, 2023
514fc65
Fixing SonarQube issues for RDD
SherwinVarghese Jun 30, 2023
96817dd
Triigger build
SherwinVarghese Jul 1, 2023
aea5fc3
Updating unit tests
SherwinVarghese Jul 5, 2023
03bcc4d
Updating unit tests - 2
SherwinVarghese Jul 5, 2023
0b60ca6
Adding E2Es for RDD
SherwinVarghese Jul 8, 2023
e6574fc
Add license header
github-actions[bot] Jul 8, 2023
849a72b
CXINT-1850: Improving schematics for S4OM, improved error handling an…
SherwinVarghese Jul 21, 2023
67c936d
CXINT-1850: Requested Delivery Date feature library
SherwinVarghese Jun 30, 2023
43061a9
Add license header
github-actions[bot] Jun 30, 2023
87fd9c6
Fixing SonarQube issues for RDD
SherwinVarghese Jun 30, 2023
b4c0326
Triigger build
SherwinVarghese Jul 1, 2023
d43aafe
Updating unit tests
SherwinVarghese Jul 5, 2023
674ecba
Updating unit tests - 2
SherwinVarghese Jul 5, 2023
d061fc8
Adding E2Es for RDD
SherwinVarghese Jul 8, 2023
0618646
Add license header
github-actions[bot] Jul 8, 2023
08e0e6a
Merge branch 'feature/CXINT-1850' of github.com:SAP/spartacus into fe…
SherwinVarghese Jul 21, 2023
79cccc6
Updating package versions to 6.3.0-1
SherwinVarghese Jul 21, 2023
4d4782a
Adding RDD dependency in S4OM Root module, minor code improvements
SherwinVarghese Jul 25, 2023
ff5128e
Updating package.json
SherwinVarghese Jul 25, 2023
5503aae
Merge branch 'develop-6.4.x' into feature/CXINT-1850
SherwinVarghese Jul 25, 2023
4e0f5ca
Adding S4OM to schematics package.json
SherwinVarghese Jul 30, 2023
3558eda
Adding Requested Delivery Date to S4OM .env-cmdrc
SherwinVarghese Jul 31, 2023
5c7daa3
CXINT-1850: Requested Delivery Date - Addressing review comments
SherwinVarghese Aug 4, 2023
fa50d58
Merge branch 'develop-6.4.x' into feature/CXINT-1850
SherwinVarghese Aug 4, 2023
dba92b3
CXINT-1850: RDD adopting review comments
SherwinVarghese Aug 4, 2023
7f993a0
Trigger Build before merge
SherwinVarghese Aug 7, 2023
6e92c0f
Merge branch 'develop-6.4.x' into feature/CXINT-1850
Matejk00 Aug 8, 2023
965f2d5
CXINT-1850: Adopting review comments from core team
SherwinVarghese Aug 9, 2023
ac1ed02
Merge branch 'develop-6.4.x' into feature/CXINT-1850
Matejk00 Aug 9, 2023
83577f5
Merge branch 'develop-6.4.x' into feature/CXINT-1850
SherwinVarghese Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .env-cmdrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@
"CX_B2B": "true"
},
"s4om": {
"CX_BASE_URL": "https://backoffice.c2twgq1sul-sapcxteam1-d11-public.model-t.myhybris.cloud",
"CX_CDC": "false",
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s8-public.model-t.myhybris.cloud",
"CX_B2B": "true",
"CX_S4OM": "true"
"CX_S4OM": "true",
"CX_REQUESTED_DELIVERY_DATE": "true"
},
"requested-delivery-date": {
"CX_BASE_URL": "https://api.cg79x9wuu9-eccommerc1-s8-public.model-t.myhybris.cloud",
"CX_REQUESTED_DELIVERY_DATE": "true"
}
}
15 changes: 15 additions & 0 deletions core-libs/setup/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
"@spartacus/requested-delivery-date/assets": [
"../../feature-libs/requested-delivery-date/assets/public_api"
],
"@spartacus/requested-delivery-date/core": [
"../../feature-libs/requested-delivery-date/core/public_api"
],
"@spartacus/requested-delivery-date": [
"../../feature-libs/requested-delivery-date/public_api"
],
"@spartacus/requested-delivery-date/occ": [
"../../feature-libs/requested-delivery-date/occ/public_api"
],
"@spartacus/requested-delivery-date/root": [
"../../feature-libs/requested-delivery-date/root/public_api"
],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
Expand Down
9 changes: 8 additions & 1 deletion extra-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ module.exports = {
'@spartacus/asm': path.join(__dirname, 'feature-libs/asm'),
'@spartacus/smartedit': path.join(__dirname, 'feature-libs/smartedit'),
'@spartacus/qualtrics': path.join(__dirname, 'feature-libs/qualtrics'),
'@spartacus/requested-delivery-date': path.join(
__dirname,
'feature-libs/requested-delivery-date'
),
'@spartacus/tracking': path.join(__dirname, 'feature-libs/tracking'),
'@spartacus/cart': path.join(__dirname, 'feature-libs/cart'),
'@spartacus/order': path.join(__dirname, 'feature-libs/order'),
Expand All @@ -53,7 +57,10 @@ module.exports = {
__dirname,
'feature-libs/customer-ticketing'
),
'@spartacus/pickup-in-store': path.join(__dirname, 'feature-libs/pickup-in-store'),
'@spartacus/pickup-in-store': path.join(
__dirname,
'feature-libs/pickup-in-store'
),
'@spartacus/s4om': path.join(__dirname, 'integration-libs/s4om'),
},
},
Expand Down
15 changes: 15 additions & 0 deletions feature-libs/asm/tsconfig.schematics.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
"@spartacus/requested-delivery-date/assets": [
"../../feature-libs/requested-delivery-date/assets/public_api"
],
"@spartacus/requested-delivery-date/core": [
"../../feature-libs/requested-delivery-date/core/public_api"
],
"@spartacus/requested-delivery-date": [
"../../feature-libs/requested-delivery-date/public_api"
],
"@spartacus/requested-delivery-date/occ": [
"../../feature-libs/requested-delivery-date/occ/public_api"
],
"@spartacus/requested-delivery-date/root": [
"../../feature-libs/requested-delivery-date/root/public_api"
],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
Expand Down
2 changes: 2 additions & 0 deletions feature-libs/cart/base/root/models/cart-outlets.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ export enum CartOutlets {
ADD_TO_CART_CONTAINER = 'cx-add-to-cart-container',
PICKUP_INFO = 'cx-pickup-info',
ADD_TO_CART_PICKUP_OPTION = 'cx-add-to-cart-pickup-option',
DELIVERY_MODE = 'cx-delivery-mode',
ORDER_OVERVIEW = 'cx-order-overview',
}
15 changes: 15 additions & 0 deletions feature-libs/cart/tsconfig.schematics.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
"@spartacus/requested-delivery-date/assets": [
"../../feature-libs/requested-delivery-date/assets/public_api"
],
"@spartacus/requested-delivery-date/core": [
"../../feature-libs/requested-delivery-date/core/public_api"
],
"@spartacus/requested-delivery-date": [
"../../feature-libs/requested-delivery-date/public_api"
],
"@spartacus/requested-delivery-date/occ": [
"../../feature-libs/requested-delivery-date/occ/public_api"
],
"@spartacus/requested-delivery-date/root": [
"../../feature-libs/requested-delivery-date/root/public_api"
],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,33 @@ <h2 class="cx-review-title d-none d-lg-block d-xl-block">
<!-- DELIVERY MODE SECTION -->
<ng-template #deliveryMode>
<div class="cx-review-summary-card cx-review-card-shipping">
<cx-card
*ngIf="deliveryMode$ | async as deliveryMode"
[content]="getDeliveryModeCard(deliveryMode) | async"
></cx-card>
<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'!6.4'">
<cx-card
*ngIf="deliveryMode$ | async as deliveryMode"
[content]="getDeliveryModeCard(deliveryMode) | async"
>
</cx-card>
</ng-container>
<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'6.4'">
<div>
<cx-card
*ngIf="deliveryMode$ | async as deliveryMode"
[content]="getDeliveryModeCard(deliveryMode) | async"
>
</cx-card>
<ng-template
[cxOutlet]="cartOutlets.DELIVERY_MODE"
[cxOutletContext]="{
item: cart$ | async,
readonly: true
}"
>
</ng-template>
</div>
</ng-container>

<div class="cx-review-summary-edit-step">
<a
[attr.aria-label]="'checkoutReview.editDeliveryMode' | cxTranslate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from '@spartacus/checkout/base/components';
import {
CmsConfig,
FeaturesConfigModule,
I18nModule,
provideDefaultConfig,
UrlModule,
Expand All @@ -35,6 +36,7 @@ import { B2BCheckoutReviewSubmitComponent } from './checkout-review-submit.compo
PromotionsModule,
IconModule,
OutletModule,
FeaturesConfigModule,
],
providers: [
provideDefaultConfig(<CmsConfig>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ <h2 class="cx-checkout-title d-none d-lg-block d-xl-block">
</label>
</div>
</div>
<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'6.4'">
<ng-template
[cxOutlet]="CartOutlets.DELIVERY_MODE"
[cxOutletContext]="{
item: activeCartFacade.getActive() | async
}"
>
</ng-template>
</ng-container>
</div>
</ng-container>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { By } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router';
import {
ActiveCartFacade,
Cart,
DeliveryMode,
OrderEntry,
} from '@spartacus/cart/base/root';
Expand Down Expand Up @@ -60,6 +61,14 @@ class MockCheckoutStepService implements Partial<CheckoutStepService> {
getBackBntText = createSpy().and.returnValue('common.back');
}

const mockCart: Cart = {
code: '123456789',
description: 'testCartDescription',
name: 'testCartName',
};

const cart$ = new BehaviorSubject<Cart>(mockCart);

const mockActivatedRoute = {
snapshot: {
url: ['checkout', 'delivery-mode'],
Expand Down Expand Up @@ -91,6 +100,7 @@ class MockCartService implements Partial<ActiveCartFacade> {
getDeliveryEntries = () => deliveryEntries$.asObservable();
hasPickupItems = () => hasPickupItems$.asObservable();
getPickupEntries = createSpy().and.returnValue(of([]));
getActive = () => cart$.asObservable();
}

class MockGlobalMessageService implements Partial<GlobalMessageService> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import {
CmsConfig,
FeaturesConfigModule,
I18nModule,
provideDefaultConfig,
FeaturesConfigModule,
} from '@spartacus/core';
import {
OutletModule,
Expand All @@ -31,6 +31,7 @@ import { CheckoutDeliveryModeComponent } from './checkout-delivery-mode.componen
OutletModule,
PageComponentModule,
FeaturesConfigModule,
FeaturesConfigModule,
],
providers: [
provideDefaultConfig(<CmsConfig>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,33 @@ <h2 class="cx-review-title d-none d-lg-block d-xl-block">
<!-- DELIVERY MODE SECTION -->
<ng-template #deliveryMode>
<div class="cx-review-summary-card cx-review-card-shipping">
<cx-card
*ngIf="deliveryMode$ | async as deliveryMode"
[content]="getDeliveryModeCard(deliveryMode) | async"
></cx-card>
<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'!6.4'">
<cx-card
*ngIf="deliveryMode$ | async as deliveryMode"
[content]="getDeliveryModeCard(deliveryMode) | async"
>
</cx-card>
</ng-container>
<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'6.4'">
<div>
<cx-card
*ngIf="deliveryMode$ | async as deliveryMode"
[content]="getDeliveryModeCard(deliveryMode) | async"
>
</cx-card>
<ng-template
[cxOutlet]="cartOutlets.DELIVERY_MODE"
[cxOutletContext]="{
item: cart$ | async,
readonly: true
}"
>
</ng-template>
</div>
</ng-container>

<div class="cx-review-summary-edit-step">
<a
[attr.aria-label]="'checkoutReview.editDeliveryMode' | cxTranslate"
Expand Down
15 changes: 15 additions & 0 deletions feature-libs/checkout/tsconfig.schematics.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
"@spartacus/requested-delivery-date/assets": [
"../../feature-libs/requested-delivery-date/assets/public_api"
],
"@spartacus/requested-delivery-date/core": [
"../../feature-libs/requested-delivery-date/core/public_api"
],
"@spartacus/requested-delivery-date": [
"../../feature-libs/requested-delivery-date/public_api"
],
"@spartacus/requested-delivery-date/occ": [
"../../feature-libs/requested-delivery-date/occ/public_api"
],
"@spartacus/requested-delivery-date/root": [
"../../feature-libs/requested-delivery-date/root/public_api"
],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
Expand Down
15 changes: 15 additions & 0 deletions feature-libs/customer-ticketing/tsconfig.schematics.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
"@spartacus/requested-delivery-date/assets": [
"../../feature-libs/requested-delivery-date/assets/public_api"
],
"@spartacus/requested-delivery-date/core": [
"../../feature-libs/requested-delivery-date/core/public_api"
],
"@spartacus/requested-delivery-date": [
"../../feature-libs/requested-delivery-date/public_api"
],
"@spartacus/requested-delivery-date/occ": [
"../../feature-libs/requested-delivery-date/occ/public_api"
],
"@spartacus/requested-delivery-date/root": [
"../../feature-libs/requested-delivery-date/root/public_api"
],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
) | async
"
></cx-card>

<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'6.4'">
<ng-template
[cxOutlet]="cartOutlets.ORDER_OVERVIEW"
[cxOutletContext]="{ item: order, readonly: true }"
>
</ng-template>
</ng-container>
</div>
</ng-container>

Expand All @@ -56,6 +65,15 @@
<cx-card
[content]="getOrderStatusCardContent(order.statusDisplay) | async"
></cx-card>

<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'6.4'">
<ng-template
[cxOutlet]="cartOutlets.ORDER_OVERVIEW"
[cxOutletContext]="{ item: order, readonly: true }"
>
</ng-template>
</ng-container>
</div>
</ng-template>

Expand Down Expand Up @@ -153,6 +171,15 @@
<cx-card
[content]="getOrderStatusCardContent(order.statusDisplay) | async"
></cx-card>

<!-- TODO:(CXINT-2309) for next major release remove feature level -->
<ng-container *cxFeatureLevel="'6.4'">
<ng-template
[cxOutlet]="cartOutlets.ORDER_OVERVIEW"
[cxOutletContext]="{ item: order, readonly: true }"
>
</ng-template>
</ng-container>
</div>
<cx-order-detail-billing></cx-order-detail-billing>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/

import { ChangeDetectionStrategy, Component } from '@angular/core';
import { DeliveryMode, PaymentDetails } from '@spartacus/cart/base/root';
import {
CartOutlets,
DeliveryMode,
PaymentDetails,
} from '@spartacus/cart/base/root';
import {
Address,
CmsOrderDetailOverviewComponent,
Expand All @@ -23,6 +27,8 @@ import { OrderDetailsService } from '../order-details.service';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class OrderOverviewComponent {
readonly cartOutlets = CartOutlets;

order$: Observable<any> = this.orderDetailsService.getOrderDetails();
isOrderLoading$: Observable<boolean> =
typeof this.orderDetailsService.isOrderDetailsLoading === 'function'
Expand Down
Loading
Loading