All files / projects/organization-management/src/app/pages/cost-center-buyers cost-center-buyers-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 681x                                                                                                                                      
<h1>{{ 'account.costcenter.details.buyers.heading' | translate }}</h1>
 
<!--
    in ICM versions lower than 7.10.38 the cost center admin is not allowed to read the list of users for the customer
    keep-localization-pattern: ^subject.has.no.permission.assigned$
  -->
<ish-error-message [error]="error$ | async" />
 
@if (buyers$ | async; as buyers) { @if (buyers.length) {
<div>
  <div class="container">
    <div class="row list-header d-none d-md-flex">
      <div class="col-md-2 list-header-item no-seperator">
        <button type="button" (click)="toggleItemSelection()" class="btn btn-link">
          @if (selectAll) {
          {{ 'account.costcenter.details.buyers.list.header.selectall' | translate }}
          } @else {
          {{ 'account.costcenter.details.buyers.list.header.clearall' | translate }}
          }
        </button>
      </div>
      <div class="col-md-3 list-header-item no-seperator">
        {{ 'account.costcenter.details.buyers.list.header.name' | translate }}
      </div>
      <div class="col-md-7 list-header-item no-seperator">
        {{ 'account.costcenter.details.buyers.list.header.orderspendlimit' | translate }}
      </div>
    </div>
 
    <form [formGroup]="form" (ngSubmit)="submitForm()" #buyersForm="ngForm" novalidate>
      <div class="list-body">
        <formly-form [model]="model" [fields]="fields" [form]="form" class="pt-1" />
      </div>
      <div class="row">
        <div class="button-group w-100 gx-0 clearfix">
          <div class="float-md-end">
            <button
              type="submit"
              class="btn btn-primary"
              [disabled]="formDisabled || (buyersForm.submitted && form.invalid)"
              data-testing-id="add-buyers-submit"
            >
              {{ 'account.costcenter.details.buyers.action.add' | translate }}
            </button>
            <a routerLink="../" class="btn btn-secondary" data-testing-id="add-cost-center-buyers-cancel">{{
              'account.cancel.link' | translate
            }}</a>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
} @else { @if (!!(error$ | async) === false) {
<p data-testing-id="empty-buyer-list">
  {{ 'account.costcenter.details.add.buyers.list.empty' | translate }}
</p>
}
 
<div class="section text-end">
  <a routerLink="../" class="btn btn-secondary" data-testing-id="add-cost-center-buyers-cancel">{{
    'account.cancel.link' | translate
  }}</a>
</div>
} } @if (loading$ | async) {
<ish-loading />
}