Skip to content

Commit

Permalink
Fixing SonarQube issues for RDD
Browse files Browse the repository at this point in the history
  • Loading branch information
SherwinVarghese committed Jun 30, 2023
1 parent afc9a3d commit 514fc65
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class DeliveryModeDatePickerComponent implements OnInit, OnDestroy {
protected eventService: EventService,
protected translation: TranslationService,
protected globalMessageService: GlobalMessageService,
@Optional() protected deliveryOutlet?: OutletContextData<any>
@Optional() protected deliveryOutlet?: OutletContextData
) {}

protected cartEntry: Cart = {};
Expand Down Expand Up @@ -102,17 +102,17 @@ export class DeliveryModeDatePickerComponent implements OnInit, OnDestroy {
}

setRequestedDeliveryDate() {
let userId = this.cartEntry?.user?.uid || '';
let cartId = this.cartEntry?.code || '';
let requestedDate =
const userId = this.cartEntry?.user?.uid || '';
const cartId = this.cartEntry?.code || '';
const requestedDate =
this.form?.get('requestDeliveryDate')?.value ||
this.requestedRetrievalAt ||
'';

if (
userId.length === 0 ||
cartId.length === 0 ||
requestedDate.length == 0
requestedDate.length === 0
) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { Component, OnDestroy, OnInit, Optional } from '@angular/core';
import { TranslationService } from '@spartacus/core';
import { Order } from '@spartacus/order/root';
import { Card, OutletContextData } from '@spartacus/storefront';
import { Observable } from 'rxjs';
import { Subscription } from 'rxjs/internal/Subscription';
import { Observable, Subscription } from 'rxjs';
import { filter, map } from 'rxjs/operators';

@Component({
Expand All @@ -19,7 +18,7 @@ import { filter, map } from 'rxjs/operators';
export class OrderOverviewDeliveryDateComponent implements OnInit, OnDestroy {
constructor(
protected translation: TranslationService,
@Optional() protected orderOutlet?: OutletContextData<any>
@Optional() protected orderOutlet?: OutletContextData
) {}

protected subscription = new Subscription();
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"start:pwa": "cd ./dist/storefrontapp/ && http-server --silent --proxy http://localhost:4200? -p 4200",
"test": "nx test",
"test:libs": "concurrently \"nx test core --code-coverage\" \"nx test storefrontlib --code-coverage\" \"nx test cart --code-coverage\" \"nx test organization --code-coverage\" \"nx test storefinder --code-coverage\" \"nx test smartedit --code-coverage\" \"nx test asm --code-coverage\" \"nx test qualtrics --code-coverage\" \"nx test product --code-coverage\" \"nx test product-configurator --code-coverage\" \"nx test customer-ticketing --code-coverage\" \"nx test cdc --code-coverage\" \"nx test setup --code-coverage\" \"nx test checkout --code-coverage\" \"nx test order --code-coverage\" \"nx test digital-payments --code-coverage\" \"nx test epd-visualization --code-coverage\" \"nx test pickup-in-store --code-coverage\" \"nx test s4om --code-coverage\" \"nx test requested-delivery-date --code-coverage\"",
"test:rdd": "nx test requested-delivery-date --code-coverage",
"test:storefront:lib": "nx test storefrontlib --source-map --code-coverage",
"dev:ssr": "env-cmd --no-override -e dev,b2c,$SPA_ENV cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 nx run storefrontapp:serve-ssr",
"serve:ssr": "node dist/storefrontapp-server/main.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const REQUESTED_DELIVERY_DATE_FEATURE_NAME_CONSTANT =
'REQUESTED_DELIVERY_DATE_FEATURE';
export const REQUESTED_DELIVERY_DATE_FOLDER_NAME = 'requested-delivery-date';
export const REQUESTED_DELIVERY_DATE_TRANSLATIONS =
'requestedDeliveryDateTranslations'; //TODO
'requestedDeliveryDateTranslations';
export const REQUESTED_DELIVERY_DATE_TRANSLATION_CHUNKS_CONFIG =
'requestedDeliveryDateTranslationChunksConfig';
export const REQUESTED_DELIVERY_DATE_ROOT_MODULE =
Expand Down

0 comments on commit 514fc65

Please sign in to comment.