diff --git a/src/app/core/facades/account.facade.ts b/src/app/core/facades/account.facade.ts index 82b8c1a165..1b8fac8276 100644 --- a/src/app/core/facades/account.facade.ts +++ b/src/app/core/facades/account.facade.ts @@ -28,7 +28,13 @@ import { getDataRequestError, getDataRequestLoading, } from 'ish-core/store/customer/data-requests'; -import { getOrders, getOrdersLoading, getSelectedOrder, loadOrders } from 'ish-core/store/customer/orders'; +import { + getOrders, + getOrdersError, + getOrdersLoading, + getSelectedOrder, + loadOrders, +} from 'ish-core/store/customer/orders'; import { cancelRegistration, getSsoRegistrationCancelled, @@ -171,6 +177,7 @@ export class AccountFacade { selectedOrder$ = this.store.pipe(select(getSelectedOrder)); ordersLoading$ = this.store.pipe(select(getOrdersLoading)); + ordersError$ = this.store.pipe(select(getOrdersError)); // PAYMENT diff --git a/src/app/pages/account-order-history/account-order-history-page.component.html b/src/app/pages/account-order-history/account-order-history-page.component.html index 39cc9096e0..2f4639636e 100644 --- a/src/app/pages/account-order-history/account-order-history-page.component.html +++ b/src/app/pages/account-order-history/account-order-history-page.component.html @@ -1,4 +1,5 @@

{{ 'account.order_history.heading' | translate }}

+

{{ 'account.order.subtitle' | translate }}

{ await TestBed.configureTestingModule({ declarations: [ AccountOrderHistoryPageComponent, + MockComponent(ErrorMessageComponent), MockComponent(OrderListComponent), MockDirective(ServerHtmlDirective), ], diff --git a/src/app/pages/account-order-history/account-order-history-page.component.ts b/src/app/pages/account-order-history/account-order-history-page.component.ts index 22fe1fd1d5..8d770451a7 100644 --- a/src/app/pages/account-order-history/account-order-history-page.component.ts +++ b/src/app/pages/account-order-history/account-order-history-page.component.ts @@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { AccountFacade } from 'ish-core/facades/account.facade'; +import { HttpError } from 'ish-core/models/http-error/http-error.model'; import { Order } from 'ish-core/models/order/order.model'; /** @@ -15,11 +16,13 @@ import { Order } from 'ish-core/models/order/order.model'; export class AccountOrderHistoryPageComponent implements OnInit { orders$: Observable; ordersLoading$: Observable; + ordersError$: Observable; - constructor(private accountfacade: AccountFacade) {} + constructor(private accountFacade: AccountFacade) {} ngOnInit(): void { - this.orders$ = this.accountfacade.orders$({ limit: 30, include: ['commonShipToAddress'] }); - this.ordersLoading$ = this.accountfacade.ordersLoading$; + this.orders$ = this.accountFacade.orders$({ limit: 30, include: ['commonShipToAddress'] }); + this.ordersLoading$ = this.accountFacade.ordersLoading$; + this.ordersError$ = this.accountFacade.ordersError$; } }