All files / projects/organization-management/src/app/pages/user-detail user-detail-page.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 901x                                                                                                                                                                                  
@if (user$ | async; as user) {
  <h1>
    {{ 'account.user.details.heading' | translate }}
  </h1>
 
  <div class="row section">
    <div class="col-10 col-lg-8">
      <h2 class="h3">{{ 'account.user.details.profile.heading' | translate }}</h2>
      <div class="row">
        <div class="col-md-12">
          <dl class="row dl-horizontal dl-separator">
            <dt class="col-md-4">{{ 'account.user.details.profile.name' | translate }}</dt>
            <dd class="col-md-8" data-testing-id="name-field">
              @if (user.title) {
                {{ user.title }}
              }
              {{ user.firstName }} {{ user.lastName }}
              @if (user.active === false) {
                <span class="input-help">{{ 'account.user.list.status.inactive' | translate }}</span>
              }
            </dd>
            <dt class="col-md-4">{{ 'account.user.details.profile.email' | translate }}</dt>
            <dd class="col-md-8" data-testing-id="email-field">{{ user.email }}</dd>
            <dt class="col-md-4">{{ 'account.user.details.profile.phone' | translate }}</dt>
            @if (user.phoneHome) {
              <dd class="col-md-8">{{ user.phoneHome }}</dd>
            }
          </dl>
        </div>
      </div>
    </div>
 
    <div class="col-2 col-lg-4">
      <a
        class="btn-tool"
        data-testing-id="edit-user"
        routerLink="profile"
        [title]="'account.profile.update.link' | translate: { '0': 'account.user.details.profile.heading' | translate }"
      >
        <i class="bi bi-pencil-fill"></i>
      </a>
    </div>
  </div>
 
  @if (user.roleIDs?.length) {
    <div class="row section">
      <div class="col-10 col-lg-8">
        <h2 class="h3">{{ 'account.user.details.profile.role_permissions.heading' | translate }}</h2>
        <div class="row">
          <div class="col-md-12" data-testing-id="user-roles-fields">
            @for (role of roles$ | async; track role.id) {
              <dl class="row dl-horizontal dl-separator">
                <dt class="col-md-4">{{ role.displayName }}</dt>
                <dd class="col-md-8">
                  <ul class="ps-3">
                    @for (p of role.permissionDisplayNames; track p) {
                      <li>{{ p }}</li>
                    }
                  </ul>
                </dd>
              </dl>
            }
          </div>
        </div>
      </div>
 
      <div class="col-2 col-lg-4">
        <a
          class="btn-tool"
          data-testing-id="edit-roles"
          routerLink="roles"
          [title]="
            'account.profile.update.link'
              | translate: { '0': 'account.user.details.profile.role_permissions.heading' | translate }
          "
        >
          <i class="bi bi-pencil-fill"></i>
        </a>
      </div>
    </div>
  }
  @if ('services.OrderApprovalServiceDefinition.runnable' | ishServerSetting) {
    <ish-user-detail-budget [budget]="user.userBudget" />
  }
}
 
<a data-testing-id="back-to-user-management" routerLink="..">{{
  'account.organization.user_management.back_to_list' | translate
}}</a>