All files / src/app/pages/account/account-navigation account-navigation.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1002x                                                                                                                                                                                                      
<!-- account navigation with hierarchy -->
@if (!(deviceType === 'mobile' || deviceType === 'tablet')) {
<ul class="account-navigation list-unstyled">
  <ish-account-user-info role="listitem" />
  @for (item of navItems; track item.id) {
  <ng-container *ishIsAuthorizedTo="item.permission || 'always'">
    <ng-container *ishHasNotRole="item.notRole">
      @if ((item.feature || 'always' | ishFeature) && (item.serverSetting || 'always' | ishServerSetting)) { @if
      (item.children) {
      <li
        (click)="toggleCollapse(item)"
        (keydown.enter)="toggleCollapse(item)"
        tabindex="0"
        class="account-nav-header"
        [attr.aria-expanded]="!item.isCollapsed"
        [attr.data-testing-id]="item.id + '-nav-link'"
      >
        <span>
          @if (item.icon) {
          <i class="bi" [class]="item.icon"></i>
          }
          {{ item.localizationKey | translate }}
        </span>
      </li>
      <li [ngbCollapse]="item.isCollapsed">
        <ul class="account-navigation list-unstyled">
          @for (subItem of item.children; track subItem.id) {
          <ng-container *ishIsAuthorizedTo="subItem.permission || 'always'">
            <ng-container *ishHasNotRole="subItem.notRole">
              @if ( (subItem.feature || 'always' | ishFeature) && (subItem.serverSetting || 'always' | ishServerSetting)
              ) {
              <li
                [routerLinkActive]="activeClass"
                [routerLinkActiveOptions]="{ exact: false }"
                (isActiveChange)="activeChanged($event, subItem)"
              >
                <a
                  [routerLink]="subItem.routerLink"
                  class="link-decoration-hover"
                  [attr.data-testing-id]="subItem.id + '-nav-link'"
                  >{{ subItem.localizationKey | translate }}</a
                >
              </li>
              }
            </ng-container>
          </ng-container>
          }
        </ul>
      </li>
      } @else {
      <li
        [routerLinkActive]="activeClass"
        [routerLinkActiveOptions]="{ exact: item.routerLink === '/account' ? true : false }"
      >
        <a [routerLink]="item.routerLink" class="link-decoration-hover" [attr.data-testing-id]="item.id + '-nav-link'">
          @if (item.icon) {
          <i class="bi" [class]="item.icon"></i>
          }{{ item.localizationKey | translate }}
        </a>
      </li>
      } }
    </ng-container>
  </ng-container>
  }
</ul>
} @else {
<select
  (change)="navigateTo($event.target)"
  class="form-control"
  [attr.aria-label]="'account.menu.select.label' | translate"
>
  @for (item of navItems; track item.id) {
  <ng-container *ishIsAuthorizedTo="item.permission || 'always'">
    <ng-container *ishHasNotRole="item.notRole">
      @if ((item.feature || 'always' | ishFeature) && (item.serverSetting || 'always' | ishServerSetting)) { @if
      (item.children) {
      <optgroup [label]="item.localizationKey | translate"></optgroup>
      @for (subItem of item.children; track subItem.id) {
      <ng-container *ishIsAuthorizedTo="subItem.permission || 'always'">
        <ng-container *ishHasNotRole="subItem.notRole">
          @if ( (subItem.feature || 'always' | ishFeature) && (subItem.serverSetting || 'always' | ishServerSetting) ) {
          <option [value]="subItem.routerLink" [selected]="isSelected(subItem)">
            {{ subItem.localizationKey | translate }}
          </option>
          }
        </ng-container>
      </ng-container>
      } } @else {
      <option [value]="item.routerLink" [selected]="isSelected(item)">
        {{ item.localizationKey | translate }}
      </option>
      } }
    </ng-container>
  </ng-container>
  }
</select>
}
 
<!-- mobile account navigation select box -->