summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/roles/new-role/new-role.component.html
blob: f3a7f8ea5355d017ce4388f817d3cb1ee8a24d94 (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
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
<!--
  ============LICENSE_START==========================================
  ONAP Portal SDK
  ===================================================================
  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
  ===================================================================
 
  Unless otherwise specified, all software contained herein is licensed
  under the Apache License, Version 2.0 (the "License");
  you may not use this software except in compliance with the License.
  You may obtain a copy of the License at
 
              http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 
  Unless otherwise specified, all documentation contained herein is licensed
  under the Creative Commons License, Attribution 4.0 Intl. (the "License");
  you may not use this documentation except in compliance with the License.
  You may obtain a copy of the License at
 
              https://creativecommons.org/licenses/by/4.0/
 
  Unless required by applicable law or agreed to in writing, documentation
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 
  ============LICENSE_END============================================
   
  -->
<div class="container">
  <!--Modal Headers-->
  <div class="modal-header">
    <h4 class="modal-title">Role</h4>
    <button type="button" class="close" aria-label="Close" (click)="activeModal.dismiss('Cross')">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>

  <!--Modal Body goes here-->
  <div class="modal-body">
    <span class="ecomp-spinner" *ngIf="showSpinner"></span>
    <div class="role-properties-main">
        <form id="role-details-form" name="roleDetails" novalidate  autocomplete="off" method="post"> 
          <div class="elementsDiv">
            <div class="item required role-name">         
              <div class="item-label">Name :</div>
              <input id="role-details-input-name" class="table-search-field"
                  type="text" name="rolename"
                  [(ngModel)]="role.name"
                  ng-pattern="/^[\w -]*$/" maxlength="100" required />
            </div>
            <div>  
              <div class="item-label">Priority :</div>
              <input id="role-details-input-priority" class="table-search-field"
                  type="text"
                  ng-change="accountAddDetails.updateUsername()" name="priority"
                  [(ngModel)]="role.priority"/>
            </div>  
          </div> 
        </form>    
      </div>

      <!-- Role Functions List--> 
      <div *ngIf="isEditMode" class="role-functions-title">Role Functions</div>
      <div *ngIf="isEditMode" class="rolefunctionTable">
        <table mat-table [dataSource]="roleFunctionDataSource">
          <ng-container matColumnDef="roleFunctionName">
            <th mat-header-cell *matHeaderCellDef id="heading1">Function Name</th>
            <td mat-cell *matCellDef="let rowData"> {{rowData.name}} </td>
          </ng-container>
      
          <!--<ng-container matColumnDef="remove">
            <th mat-header-cell *matHeaderCellDef  id="heading1">Remove</th>
            <td id="rowheader_t1_{{i}}" mat-cell *matCellDef="let rowData; let i=index;">
              <span class="icon-trash" id="{{i}}-button-role-remove" (click)="delRoleFunctionConfirmPopUp(rowData,role.id)">
                <i class="icon ion-md-trash"></i>
              </span>
            </td>
          </ng-container>-->

          <!-- Active Column -->
          <ng-container matColumnDef="active">
            <th id="col3" mat-header-cell *matHeaderCellDef>Active ?</th>
            <td id="rowheader_t1_{{i}}-userId" mat-cell *matCellDef="let element; let i=index;">
                <mat-slide-toggle [(ngModel)]="element.selected" (change)="toggleRoleFunction(element)"></mat-slide-toggle>
            </td>
          </ng-container>

          <tr mat-header-row *matHeaderRowDef="roleFunctionTableHeaders"></tr>
          <tr mat-row *matRowDef="let rowData; columns: roleFunctionTableHeaders;">
        </table>
      </div>
   </div>
   <!--Modal Footer goes Here-->
   <div class="modal-footer">
     <button type="button" class="btn btn-primary" (click)="saveChanges()">Save</button> &nbsp;
     <button type="button" class="btn btn-primary" (click)="activeModal.close('Close')">Cancel</button>
   </div>
</div>