aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/searchMembersModal/members-table/elements-table.component.html
blob: 036a1240ff8c96e367cb7e8c15f6160a84add2e4 (plain)
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
<div class="table-header">
  <div class="left-header">
    <span class="title-header">{{modalInformation.description}}</span>
    <div class="sub-title-header">
      <span class="vnf-match-your-criteria" class="total" [attr.data-tests-id]="'total-amount'" style="margin-right: 5px;"><span
        [attr.data-tests-id]="'numberOfNotHideRows'">{{membersTableService.numberOfNotHideRows}}</span> {{modalInformation.type}}s match your criteria |</span>
      <span class="vnf-selected" class="total" [attr.data-tests-id]="'total-selected'"><span
        [attr.data-tests-id]="'numberOfSelectedRows'">{{membersTableService.numberOfSelectedRows}}</span> {{modalInformation.type}}{{membersTableService.numberOfSelectedRows>1?'s':'' }} selected</span>
    </div>
  </div>

  <div class="search-container">
    <sdc-filter-bar
      [placeHolder]="'Filter'"
      [debounceTime]="250"
      [testId]="'vnf-members-search'"
      (valueChange)="search($event)">
    </sdc-filter-bar>
  </div>
</div>
<table id="member-table" class="table table-bordered"  style="table-layout: fixed" *ngIf="data?.length > 0">
  <thead class="thead-dark">
  <tr>
    <th class="allCheckboxAreSelected" style="position: relative;">
      <sdc-checkbox
        [disabled]="membersTableService.isCheckAllDisabled(modalInformation.maxSelectRow)"
        [(checked)]="membersTableService.allCheckboxAreSelected"
        [testId]="'all-checkbox-selected'"
        (checkedChange)="changeAllCheckboxStatus($event)"
      ></sdc-checkbox>
    </th>
    <th class="header-title" *ngFor="let header of headers">{{header.displayName}}</th>
  </tr>
  </thead>
  <tbody>
  <tr class="member-table-row" *ngFor="let item of membersTableService.filteredMembers">
    <td class="sdcCheckboxMember" style="position: relative;" [attr.data-tests-id]="item[membersTableService.staticUniqObjectField]">
      <sdc-checkbox
        [disabled]="membersTableService.isRowDisabled( membersTableService.allElementsStatusMap[item[membersTableService.staticUniqObjectField]]?.isSelected, modalInformation.maxSelectRow)"
        [checked]="membersTableService.allElementsStatusMap[item[membersTableService.staticUniqObjectField]]?.isSelected"
        [testId]="item[membersTableService.staticUniqObjectField]"
        (checkedChange)="changeCheckboxStatus(item[membersTableService.staticUniqObjectField])"
      ></sdc-checkbox></td>

    <td *ngFor="let tdInformation of modalInformation.tableContent" [id]="tdInformation.id">
      <div *ngIf="tdInformation.contents[0].type === 'LIST'; else noList">
        <custom-ellipsis
          *ngFor="let tdInformationItem of getTdListInformationItemValue(tdInformation.contents[0], item) "
          [id]="tdInformationItem"
          [value]="tdInformationItem"
          [breakWord]="true"
          [hightlight]="filterValue"></custom-ellipsis>
      </div>
      <ng-template #noList>
        <custom-ellipsis
          *ngFor="let tdInformationItem of tdInformation.contents; index as i"
          [id]="getTdInformationItemId(tdInformationItem, item)"
          [value]="getTdInformationItemValue(tdInformationItem, item)"
          [ngClass]="{'second-line' : i%2 === 1}"
          [breakWord]="true"
          [hightlight]="filterValue"></custom-ellipsis>
      </ng-template>

    </td>
  </tr>

  </tbody>
</table>
<div class="no-result" *ngIf="data?.length == 0">{{modalInformation?.noElementsMsg}}</div>