diff --git a/docs/concepts/configuration.md b/docs/concepts/configuration.md index b7a109ac99..ea9e50f740 100644 --- a/docs/concepts/configuration.md +++ b/docs/concepts/configuration.md @@ -164,7 +164,6 @@ Of course, the ICM server must supply appropriate REST resources to leverage fun | **B2B Features** | | | businessCustomerRegistration | Create business customers on registration | | costCenters | Cost center feature | -| messageToMerchant | Write a message to the merchant at checkout | | orderTemplates | Order template feature | | punchout | Punchout feature | | quickorder | Quick order page and direct add to cart input | diff --git a/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.html b/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.html index af77deffa4..19c7585eaa 100644 --- a/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.html +++ b/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.html @@ -43,7 +43,7 @@

{{ 'approval.detailspage.order_details.heading' | translate }}

-
+
diff --git a/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.spec.ts b/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.spec.ts index f03f173ca7..e07c7c85e4 100644 --- a/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.spec.ts +++ b/projects/requisition-management/src/app/pages/requisition-detail/requisition-detail-page.component.spec.ts @@ -2,12 +2,12 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { TranslateModule } from '@ngx-translate/core'; -import { MockComponent, MockDirective } from 'ng-mocks'; +import { MockComponent, MockDirective, MockPipe } from 'ng-mocks'; import { of } from 'rxjs'; import { instance, mock, when } from 'ts-mockito'; import { AuthorizationToggleDirective } from 'ish-core/directives/authorization-toggle.directive'; -import { FeatureToggleModule } from 'ish-core/feature-toggle.module'; +import { ServerSettingPipe } from 'ish-core/pipes/server-setting.pipe'; import { findAllCustomElements } from 'ish-core/utils/dev/html-query-utils'; import { AddressComponent } from 'ish-shared/components/address/address/address.component'; import { BasketCostSummaryComponent } from 'ish-shared/components/basket/basket-cost-summary/basket-cost-summary.component'; @@ -34,7 +34,7 @@ describe('Requisition Detail Page Component', () => { context = mock(RequisitionContextFacade); await TestBed.configureTestingModule({ - imports: [FeatureToggleModule.forTesting('messageToMerchant'), RouterTestingModule, TranslateModule.forRoot()], + imports: [RouterTestingModule, TranslateModule.forRoot()], declarations: [ MockComponent(AddressComponent), MockComponent(BasketCostSummaryComponent), @@ -47,6 +47,7 @@ describe('Requisition Detail Page Component', () => { MockComponent(RequisitionRejectDialogComponent), MockComponent(RequisitionSummaryComponent), MockDirective(AuthorizationToggleDirective), + MockPipe(ServerSettingPipe, path => path === 'shipping.messageToMerchant'), RequisitionDetailPageComponent, ], }) diff --git a/src/app/pages/account-order/account-order/account-order.component.html b/src/app/pages/account-order/account-order/account-order.component.html index 9949eed772..2187475b73 100644 --- a/src/app/pages/account-order/account-order/account-order.component.html +++ b/src/app/pages/account-order/account-order/account-order.component.html @@ -48,7 +48,7 @@

{{ 'account.orderdetails.heading.default' | translate }}

- + diff --git a/src/app/pages/account-order/account-order/account-order.component.spec.ts b/src/app/pages/account-order/account-order/account-order.component.spec.ts index 35e6e8a919..9d4e2106f6 100644 --- a/src/app/pages/account-order/account-order/account-order.component.spec.ts +++ b/src/app/pages/account-order/account-order/account-order.component.spec.ts @@ -5,6 +5,7 @@ import { MockComponent, MockPipe } from 'ng-mocks'; import { FeatureToggleModule } from 'ish-core/feature-toggle.module'; import { DatePipe } from 'ish-core/pipes/date.pipe'; +import { ServerSettingPipe } from 'ish-core/pipes/server-setting.pipe'; import { BasketMockData } from 'ish-core/utils/dev/basket-mock-data'; import { AddressComponent } from 'ish-shared/components/address/address/address.component'; import { BasketCostSummaryComponent } from 'ish-shared/components/basket/basket-cost-summary/basket-cost-summary.component'; @@ -32,8 +33,9 @@ describe('Account Order Component', () => { MockComponent(InfoBoxComponent), MockComponent(LineItemListComponent), MockPipe(DatePipe), + MockPipe(ServerSettingPipe, path => path === 'shipping.messageToMerchant'), ], - imports: [FeatureToggleModule.forTesting('messageToMerchant'), TranslateModule.forRoot()], + imports: [FeatureToggleModule.forTesting(), TranslateModule.forRoot()], }).compileComponents(); }); diff --git a/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.html b/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.html index 1904678864..54d1087985 100644 --- a/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.html +++ b/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.html @@ -3,7 +3,7 @@ - + diff --git a/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.spec.ts b/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.spec.ts index 501e36091a..eb8c66f005 100644 --- a/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.spec.ts +++ b/src/app/pages/checkout-receipt/checkout-receipt/checkout-receipt.component.spec.ts @@ -1,9 +1,10 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { TranslateModule } from '@ngx-translate/core'; -import { MockComponent } from 'ng-mocks'; +import { MockComponent, MockPipe } from 'ng-mocks'; import { FeatureToggleModule } from 'ish-core/feature-toggle.module'; +import { ServerSettingPipe } from 'ish-core/pipes/server-setting.pipe'; import { BasketMockData } from 'ish-core/utils/dev/basket-mock-data'; import { findAllCustomElements } from 'ish-core/utils/dev/html-query-utils'; import { AddressComponent } from 'ish-shared/components/address/address/address.component'; @@ -31,8 +32,9 @@ describe('Checkout Receipt Component', () => { MockComponent(FaIconComponent), MockComponent(InfoBoxComponent), MockComponent(LineItemListComponent), + MockPipe(ServerSettingPipe, path => path === 'shipping.messageToMerchant'), ], - imports: [FeatureToggleModule.forTesting('messageToMerchant'), TranslateModule.forRoot()], + imports: [FeatureToggleModule.forTesting(), TranslateModule.forRoot()], }).compileComponents(); }); diff --git a/src/app/pages/checkout-review/checkout-review/checkout-review.component.html b/src/app/pages/checkout-review/checkout-review/checkout-review.component.html index 4f4b40815f..e2761bff75 100644 --- a/src/app/pages/checkout-review/checkout-review/checkout-review.component.html +++ b/src/app/pages/checkout-review/checkout-review/checkout-review.component.html @@ -36,7 +36,7 @@

- + { MockComponent(LineItemListComponent), MockComponent(ModalDialogLinkComponent), MockDirective(ServerHtmlDirective), + MockPipe(ServerSettingPipe, path => path === 'shipping.messageToMerchant'), ], imports: [ - FeatureToggleModule.forTesting('messageToMerchant'), + FeatureToggleModule.forTesting(), FormlyModule.forRoot({ types: [{ name: 'ish-checkout-review-tac-field', component: CheckoutReviewTacFieldComponent }], }), diff --git a/src/app/pages/checkout-shipping/checkout-shipping-page.component.html b/src/app/pages/checkout-shipping/checkout-shipping-page.component.html index 3c643c0382..dc76ed57f7 100644 --- a/src/app/pages/checkout-shipping/checkout-shipping-page.component.html +++ b/src/app/pages/checkout-shipping/checkout-shipping-page.component.html @@ -32,7 +32,7 @@

{{ 'checkout.shipping_method.selection.heading' | translate }}

- + diff --git a/src/app/pages/checkout-shipping/checkout-shipping-page.component.spec.ts b/src/app/pages/checkout-shipping/checkout-shipping-page.component.spec.ts index 53a179da2d..849768e301 100644 --- a/src/app/pages/checkout-shipping/checkout-shipping-page.component.spec.ts +++ b/src/app/pages/checkout-shipping/checkout-shipping-page.component.spec.ts @@ -1,13 +1,13 @@ import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; -import { MockComponent, MockDirective } from 'ng-mocks'; +import { MockComponent, MockDirective, MockPipe } from 'ng-mocks'; import { of } from 'rxjs'; import { anything, instance, mock, verify, when } from 'ts-mockito'; import { ServerHtmlDirective } from 'ish-core/directives/server-html.directive'; import { AccountFacade } from 'ish-core/facades/account.facade'; import { CheckoutFacade } from 'ish-core/facades/checkout.facade'; -import { FeatureToggleModule } from 'ish-core/feature-toggle.module'; +import { ServerSettingPipe } from 'ish-core/pipes/server-setting.pipe'; import { makeHttpError } from 'ish-core/utils/dev/api-service-utils'; import { BasketMockData } from 'ish-core/utils/dev/basket-mock-data'; import { BasketAddressSummaryComponent } from 'ish-shared/components/basket/basket-address-summary/basket-address-summary.component'; @@ -39,8 +39,9 @@ describe('Checkout Shipping Page Component', () => { MockComponent(CheckoutShippingComponent), MockComponent(ErrorMessageComponent), MockDirective(ServerHtmlDirective), + MockPipe(ServerSettingPipe, path => path === 'shipping.messageToMerchant'), ], - imports: [FeatureToggleModule.forTesting('messageToMerchant'), TranslateModule.forRoot()], + imports: [TranslateModule.forRoot()], providers: [ { provide: AccountFacade, useFactory: () => instance(mock(AccountFacade)) }, { provide: CheckoutFacade, useFactory: () => instance(checkoutFacade) }, diff --git a/src/environments/environment.b2b.ts b/src/environments/environment.b2b.ts index 7d96d18eab..a6fc503c0f 100644 --- a/src/environments/environment.b2b.ts +++ b/src/environments/environment.b2b.ts @@ -13,7 +13,6 @@ export const environment: Environment = { 'businessCustomerRegistration', 'costCenters', 'maps', - 'messageToMerchant', 'punchout', 'quickorder', 'quoting', diff --git a/src/environments/environment.model.ts b/src/environments/environment.model.ts index 1cb85fd21b..c2020e7d7d 100644 --- a/src/environments/environment.model.ts +++ b/src/environments/environment.model.ts @@ -35,7 +35,6 @@ export interface Environment { /* B2B features */ | 'businessCustomerRegistration' | 'costCenters' - | 'messageToMerchant' | 'quoting' | 'quickorder' | 'orderTemplates'