All files / projects/organization-management/src/app/pages/users users-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 771x                                                                                                                                                        
<div class="d-md-flex align-items-center">
  <div class="d-flex flex-row align-items-center">
    <h1 class="pe-2">
      {{ 'account.organization.user_management' | translate }}
    </h1>
    <ish-budget-info [suffix]="'account.organization.budget_price_type.admin.info'" />
  </div>
  <div class="ms-auto py-2">
    @if (!!(error$ | async) === false) {
    <a routerLink="create" class="btn btn-secondary" data-testing-id="add-user-link">{{
      'account.user.list.link.add_user' | translate
    }}</a>
    }
  </div>
</div>
 
<ish-error-message [error]="error$ | async" />
 
<div class="section">
  <div class="list-body" data-testing-id="user-list">
    @for (user of users$ | async; track user.email) { @if (user) {
    <div class="list-item-row row mx-0">
      <div class="col-6 col-sm-2 list-item order-1">
        <a [routerLink]="[user.login]" class="d-block">{{ user.firstName }} {{ user.lastName }}</a>
        @if (user.active === false) {
        <span class="input-help">{{ 'account.user.list.status.inactive' | translate }}</span>
        }
      </div>
      <div class="col-5 col-sm-4 list-item order-2">
        <dl [attr.data-testing-id]="'user-roles-' + user.login">
          <ish-user-roles-badges [roleIDs]="user.roleIDs" />
        </dl>
      </div>
      <div class="col-12 col-sm-5 list-item order-4 order-sm-3">
        @if ('services.OrderApprovalServiceDefinition.runnable' | ishServerSetting) {
        <ish-user-budget [budget]="user.userBudget" [attr.data-testing-id]="'user-budget-' + user.login" />
        }
      </div>
      <div class="col-1 list-item text-end order-sm-4 order-3">
        @if (user.login !== (currentUser$ | async)?.login) {
        <div class="float-end">
          <button
            type="button"
            class="btn-tool btn-link"
            title="{{
              'account.user.delete_user_dialog.header' | translate : { '0': user.firstName + ' ' + user.lastName }
            }}"
            (click)="modalDialog.show(user)"
            data-testing-id="remove-user"
          >
            <i class="bi bi-trash-fill"></i>
          </button>
 
          <ish-modal-dialog
            #modalDialog
            [options]="{
              titleText:
                'account.user.delete_user_dialog.header' | translate : { '0': user.firstName + ' ' + user.lastName },
              confirmText: 'account.user.delete_user_dialog.delete_button.text' | translate,
              rejectText: 'account.user.delete_user_dialog.cancel_button.text' | translate
            }"
            (confirmed)="deleteUser($event)"
          >
            <p>{{ 'account.user.delete_user_dialog.are_you_sure_paragraph' | translate }}</p>
          </ish-modal-dialog>
        </div>
        }
      </div>
    </div>
    } }
  </div>
</div>
 
@if (loading$ | async) {
<ish-loading />
}