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 100 101 102 103 104 105 106 107 108 109 110 1112x                                                                                                                                                                                                                            
<!-- account navigation with hierarchy -->
<ng-container *ngIf="!(deviceType === 'mobile' || deviceType === 'tablet'); else mobileNavigation">
  <ul class="account-navigation list-unstyled">
    <ish-account-user-info role="listitem" />
    <ng-container *ngFor="let item of navItems">
      <ng-container *ishIsAuthorizedTo="item.permission || 'always'">
        <ng-container *ishHasNotRole="item.notRole">
          <ng-container
            *ngIf="(item.feature || 'always' | ishFeature) && (item.serverSetting || 'always' | ishServerSetting)"
          >
            <ng-container *ngIf="item.children; else noChildren">
              <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>
                  <fa-icon *ngIf="item.faIcon" [icon]="item.faIcon" />
                  {{ item.localizationKey | translate }}
                </span>
              </li>
              <li [ngbCollapse]="item.isCollapsed">
                <ul class="account-navigation list-unstyled">
                  <ng-container *ngFor="let subItem of item.children">
                    <ng-container *ishIsAuthorizedTo="subItem.permission || 'always'">
                      <ng-container *ishHasNotRole="subItem.notRole">
                        <ng-container
                          *ngIf="
                            (subItem.feature || 'always' | ishFeature) &&
                            (subItem.serverSetting || 'always' | ishServerSetting)
                          "
                        >
                          <li
                            [routerLinkActive]="activeClass"
                            [routerLinkActiveOptions]="{ exact: false }"
                            (isActiveChange)="activeChanged($event, subItem)"
                          >
                            <a [routerLink]="subItem.routerLink" [attr.data-testing-id]="subItem.id + '-nav-link'">
                              {{ subItem.localizationKey | translate }}
                            </a>
                          </li>
                        </ng-container>
                      </ng-container>
                    </ng-container>
                  </ng-container>
                </ul>
              </li>
            </ng-container>
 
            <ng-template #noChildren>
              <li
                [routerLinkActive]="activeClass"
                [routerLinkActiveOptions]="{ exact: item.routerLink === '/account' ? true : false }"
              >
                <a [routerLink]="item.routerLink" [attr.data-testing-id]="item.id + '-nav-link'">
                  <fa-icon *ngIf="item.faIcon" [icon]="item.faIcon" />
                  {{ item.localizationKey | translate }}
                </a>
              </li>
            </ng-template>
          </ng-container>
        </ng-container>
      </ng-container>
    </ng-container>
  </ul>
</ng-container>
 
<!-- mobile account navigation select box -->
<ng-template #mobileNavigation>
  <select (change)="navigateTo($event.target)" class="form-control">
    <ng-container *ngFor="let item of navItems">
      <ng-container *ishIsAuthorizedTo="item.permission || 'always'">
        <ng-container *ishHasNotRole="item.notRole">
          <ng-container
            *ngIf="(item.feature || 'always' | ishFeature) && (item.serverSetting || 'always' | ishServerSetting)"
          >
            <ng-container *ngIf="item.children; else noOptgroup">
              <optgroup [label]="item.localizationKey | translate"></optgroup>
              <ng-container *ngFor="let subItem of item.children">
                <ng-container *ishIsAuthorizedTo="subItem.permission || 'always'">
                  <ng-container *ishHasNotRole="subItem.notRole">
                    <ng-container
                      *ngIf="
                        (subItem.feature || 'always' | ishFeature) &&
                        (subItem.serverSetting || 'always' | ishServerSetting)
                      "
                    >
                      <option [value]="subItem.routerLink" [attr.selected]="isSelected(subItem)">
                        {{ subItem.localizationKey | translate }}
                      </option>
                    </ng-container>
                  </ng-container>
                </ng-container>
              </ng-container>
            </ng-container>
 
            <ng-template #noOptgroup>
              <option [value]="item.routerLink" [attr.selected]="isSelected(item)">
                {{ item.localizationKey | translate }}
              </option>
            </ng-template>
          </ng-container>
        </ng-container>
      </ng-container>
    </ng-container>
  </select>
</ng-template>