| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | --> |
| 18 | <div class="modal-header"> |
| 19 | <h4 class="modal-title" id="modal-basic-title">{{userTitle}}</h4> |
| 20 | <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()"> |
| 21 | <i class="fas fa-times-circle text-danger"></i> |
| 22 | </button> |
| 23 | </div> |
| 24 | <form [formGroup]="projectRoleForm" (ngSubmit)="addProjectRole()"> |
| 25 | <div class="modal-body" *ngIf="userDetails" formArrayName="project_role_mappings"> |
| 26 | <div class="form-group row p-2 bg-light text-white projects-roles-head text-white justify-content-end"> |
| 27 | <div class="col-4"> |
| 28 | <button type="button" class="btn btn-primary" (click)="addMapping()"> |
| 29 | <i class="fas fa-plus-circle"></i> {{'PAGE.USERS.ADDMAPPINGS' | translate}}</button> |
| 30 | </div> |
| 31 | </div> |
| Barath Kumar R | 42fe05d | 2021-01-29 16:02:34 +0530 | [diff] [blame] | 32 | <label class="col-sm-12 col-form-label mandatory-label" |
| 33 | [ngClass]="{'text-danger': projectRoleForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | |
| 34 | translate}}</label> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 35 | <div *ngFor="let params of getControls(); let i = index;" [formGroupName]="i"> |
| SANDHYA.JS | 5795feb | 2023-10-11 12:41:45 +0530 | [diff] [blame^] | 36 | <div class="card bg-light"> |
| 37 | <div class="card-body"> |
| 38 | <div class="form-group row"> |
| 39 | <label class="col-sm-3 col-md-3 col-form-label" for="project_{{i}}">{{'PROJECT' | translate}}*</label> |
| 40 | <div class="col-sm-8 col-md-8"> |
| 41 | <ng-select placeholder="{{'SELECT' | translate}}" [items]="projects" bindLabel="name" |
| 42 | bindValue="name" formControlName="project_name" id="project_{{i}}" |
| 43 | [ngClass]="{ 'is-invalid': submitted && params.controls.project_name.errors }"> |
| 44 | </ng-select> |
| 45 | </div> |
| 46 | <label class="col-sm-3 col-md-3 col-form-label" for="roles_{{i}}">{{'ROLES' | |
| 47 | translate}}*</label> |
| 48 | <div class="col-sm-8 col-md-8"> |
| 49 | <ng-select placeholder="{{'SELECT' | translate}}" [items]="roles" bindLabel="name" |
| 50 | bindValue="name" formControlName="role_name" id="roles_{{i}}" |
| 51 | [ngClass]="{ 'is-invalid': submitted && params.controls.role_name.errors }"></ng-select> |
| 52 | </div> |
| 53 | <div class="col-sm-1" |
| 54 | *ngIf="userDetails.project_role_mappings[i] ? userDetails.project_role_mappings[i].project_name === '' : true"> |
| 55 | <button class="button-xs" type="button" class="close" (click)="removeMapping(i)" |
| 56 | placement="right" ngbTooltip="{{ 'CANCEL' | translate }}"> |
| 57 | <i class="fas fa-minus-circle text-danger"></i> |
| 58 | </button> |
| 59 | </div> |
| 60 | <div class="col-sm-1" |
| 61 | *ngIf="userDetails.project_role_mappings[i] ? userDetails.project_role_mappings[i].project_name !== '' : false"> |
| 62 | <button class="button-xs" type="button" class="close" |
| 63 | (click)="deleteProjectAndRoleMapping(userDetails.project_role_mappings[i])" placement="right" |
| 64 | ngbTooltip="{{ 'DELETE' | translate }}"> |
| 65 | <i class="fas fa-trash-alt text-danger"></i> |
| 66 | </button> |
| 67 | </div> |
| 68 | </div> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 69 | </div> |
| 70 | </div> |
| 71 | </div> |
| 72 | </div> |
| 73 | <div class="modal-footer"> |
| 74 | <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button> |
| 75 | <button type="submit" class="btn btn-primary">{{'APPLY' | translate}}</button> |
| 76 | </div> |
| 77 | </form> |
| 78 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |