Skip to content

Commit

Permalink
fix: account overview as root account page
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Haehnlein authored and shauke committed Dec 11, 2019
1 parent e4e524c commit 89a1ed1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
9 changes: 2 additions & 7 deletions src/app/pages/account/account-page.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const accountPageRoutes: Routes = [
loadChildren: () => import('../account-order/account-order-page.module').then(m => m.AccountOrderPageModule),
},
{
path: 'overview',
data: { breadcrumbData: [{ key: 'account.overview.link' }] },
path: '',
data: { breadcrumbData: [] },
component: AccountOverviewPageModule.component,
},
{
Expand Down Expand Up @@ -73,11 +73,6 @@ const accountPageRoutes: Routes = [
m => m.QuoteRequestEditPageModule
),
},
{
path: '',
pathMatch: 'full',
redirectTo: 'overview',
},
],
},
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<ng-container *ngIf="!isMobileView; else mobileNavigation">
<ul id="AccountNav" class="account-navigation list-unstyled" data-testing-id="myaccount-navigation">
<ng-container *ngFor="let item of navigationItems">
<ng-container *ngFor="let item of navigationItems; let first = first">
<ng-container *ngIf="item.feature; else unrestricted">
<li *ishFeature="item.feature" routerLinkActive="active">
<a [routerLink]="item.link">{{ item.localizationKey | translate }}</a>
</li>
</ng-container>
<ng-template #unrestricted>
<li routerLinkActive="active">
<li routerLinkActive="active" [routerLinkActiveOptions]="{ exact: first }">
<a [routerLink]="item.link" [attr.data-testing-id]="item.dataTestingId">{{
item.localizationKey | translate
}}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class AccountNavigationComponent implements OnInit, OnChanges {
* Manages the Account Navigation items.
*/
navigationItems: { link: string; localizationKey: string; dataTestingId?: string; feature?: string }[] = [
{ link: '/account/overview', localizationKey: 'account.my_account.link' },
{ link: '/account', localizationKey: 'account.my_account.link' },
{ link: '/account/orders', localizationKey: 'account.order_history.link' },
{ link: '/account/addresses', localizationKey: 'account.saved_addresses.link', dataTestingId: 'addresses-link' },
{ link: '/account/profile', localizationKey: 'account.profile.link' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
>

<li *ngIf="account" class="breadcrumbs-list">
<a class="breadcrumbs-list-link" routerLink="/account">{{ 'account.my_account.link' | translate }}</a
><span class="breadcrumb-list-separator">{{ separator }}</span>
<ng-container *ngIf="!trail.length; else AccountLink">
{{ 'account.my_account.link' | translate }}
</ng-container>
<ng-template #AccountLink>
<a class="breadcrumbs-list-link" routerLink="/account">{{ 'account.my_account.link' | translate }}</a
><span class="breadcrumb-list-separator">{{ separator }}</span>
</ng-template>
</li>

<li
Expand Down

0 comments on commit 89a1ed1

Please sign in to comment.