Skip to content

Commit

Permalink
added id for the components
Browse files Browse the repository at this point in the history
Signed-off-by: GOKULRAJ136 <[email protected]>
  • Loading branch information
GOKULRAJ136 committed Feb 13, 2024
1 parent e8e022c commit 28ad5b9
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 15 deletions.
4 changes: 2 additions & 2 deletions pmp-ui/src/app/core/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ <h3 class="mat-h1">
</div>
<div class="row">
<div class="col s4">Upload Certificate</div>
<div class="col s8"><button id="createButton" mat-raised-button (click)="redirecttoupload()">Upload</button></div>
<div class="col s8"><button id="uploadCertificate" mat-raised-button (click)="redirecttoupload()">Upload</button></div>
</div>
<div class="row">
<div class="col s4">View Certificate</div>
<div class="col s8"><button id="createButton" mat-raised-button (click)="viewCertificate()">View</button></div>
<div class="col s8"><button id="viewCertificate" mat-raised-button (click)="viewCertificate()">View</button></div>
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions pmp-ui/src/app/core/side-menu/side-menu.component.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<ul>
<li class="nav-header" *ngIf = "item?.children">
<a mat-list-item class="menu-list-item" [style.marginTop.px]="index == 0 ? 25:0" (click)="toggleCollapse()">
<a mat-list-item id="policymenugroup" class="menu-list-item" [style.marginTop.px]="index == 0 ? 25:0" (click)="toggleCollapse()">
<span *ngIf="item?.icon" class="routeIcon"><img src="{{item?.icon}}" style="margin-right: 5px;width:16px;" alt="Icon"></span>&nbsp;
<span class="menu-list-text">{{ item?.displayName | translate }}</span>
</a>
<ul class="nav nav-list" *ngIf="!isCollapsed">
<ng-container *ngFor="let subItem of item?.children;let i=index">
<li *ngIf="rolesService.checkRole(subItem)"><a mat-list-item [routerLink]="[subItem?.route]" routerLinkActive="list-item-active"
<li *ngIf="rolesService.checkRole(subItem)"><a mat-list-item id="{{subItem.route}}" [routerLink]="[subItem?.route]" routerLinkActive="list-item-active"
(click)="onItemSelected(subItem)" class="menu-list-item">
<span class="menu-list-text-children padding-left">{{subItem?.displayName | translate }}</span>
</a>
Expand All @@ -15,7 +15,7 @@
</ul>
</li>
<li class="nav-header" *ngIf = "!item?.children">
<a mat-list-item [routerLink]="[item?.route]" routerLinkActive="list-item-active" (click)="onItemSelected(item)"
<a id="{{item.route}}" mat-list-item [routerLink]="[item?.route]" routerLinkActive="list-item-active" (click)="onItemSelected(item)"
class="menu-list-item" [style.marginTop.px]="index == 0 ? 25:0">
<span *ngIf="item?.icon" class="routeIcon"><img src="{{item?.icon}}" style="margin-right: 5px;width:16px;" alt="Icon"></span>&nbsp;
<span class="menu-list-text">{{ item?.displayName | translate }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<p class="mat-form1" *ngFor="let field of fields; let i = index">
<mat-form-field *ngIf="field.showInSingleView === 'true' && field.inputType === 'text'">
<input
id="{{field.name}}"
#keyboardRef
#{{field.name}}
(keyup)="captureValue($event, field.name, 'primary')"
Expand All @@ -17,6 +18,7 @@
</mat-form-field>
<mat-form-field style="width:950px" *ngIf="field.showInSingleView === 'true' && field.inputType === 'textarea' && primaryData[field.name] === '{}'">
<textarea
id="{{field.name}}"
#keyboardRef
#{{field.name}}
(blur)="captureValue($event, field.name, 'primary')"
Expand All @@ -31,6 +33,7 @@
</mat-form-field>
<mat-form-field style="width:950px" *ngIf="field.showInSingleView === 'true' && field.inputType === 'textarea' && primaryData[field.name] !== '{}'">
<textarea
id="{{field.name}}"
#keyboardRef
#{{field.name}}
(blur)="captureValue($event, field.name, 'primary')"
Expand All @@ -45,6 +48,7 @@
</mat-form-field>
<mat-form-field *ngIf="field.showInSingleView === 'true' && field.inputType === 'dropdown'">
<mat-select
id="{{field.name}}"
[value]="primaryData[field.name]"
placeholder="{{ field.label[primaryLang] }}"
required
Expand All @@ -62,6 +66,7 @@
</mat-form-field>
<mat-form-field *ngIf="field.showInSingleView === 'true' && field.inputType === 'dropdownpartner'">
<mat-select
id="{{field.name}}"
[value]="primaryData[field.name]"
placeholder="{{ field.label[primaryLang] }}"
required
Expand All @@ -80,6 +85,7 @@
</mat-form-field>
<mat-form-field *ngIf="field.showInSingleView === 'true' && field.inputType === 'calendar'">
<input
id="{{field.name}}"
matInput
[min]="minDate"
[matDatepicker]="picker"
Expand All @@ -100,6 +106,7 @@
<p class="mat-form1" *ngFor="let field of fields; let i = index">
<mat-form-field *ngIf="field.showInSingleView === 'true' && field.inputType === 'text'">
<input
id="{{field.name}}"
#keyboardRef
#{{field.name}}
(keyup)="captureValue($event, field.name, 'primary')"
Expand All @@ -114,6 +121,7 @@
</mat-form-field>
<mat-form-field *ngIf="field.showInSingleView === 'true' && field.inputType === 'dropdown'">
<mat-select
id="{{field.name}}"
[value]="primaryData[field.name]"
placeholder="{{ field.label[primaryLang] }}"
required
Expand All @@ -139,6 +147,7 @@
<td width="30%">
<mat-form-field>
<input
id="apiKeyLabel"
#keyboardRef
matInput
placeholder="Label"
Expand All @@ -149,7 +158,7 @@
</mat-form-field>
</td>
<td width="20%">
<button id="createButton" mat-raised-button (click)="generateAPIKey()">
<button id="generateAPIKey" mat-raised-button (click)="generateAPIKey()">
Generate
</button>
</td>
Expand Down Expand Up @@ -188,6 +197,7 @@
<mat-form-field>
<mat-select
placeholder="SBIVersion"
id="SBIVersion"
required
>
<mat-option
Expand All @@ -203,7 +213,7 @@
</mat-form-field>
</td>
<td width="20%">
<button id="createButton" mat-raised-button (click)="mapSBIVersion()">
<button id="mapSBIVersion" mat-raised-button (click)="mapSBIVersion()">
Map SBI
</button>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<!-- <span *ngIf="data['isActive'] != true"> -->
<span *ngIf="data['statusCode'] !== 'rejected'">
<span *ngIf="data['statusCode'] !== 'approved'">
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="ellipsisAction(data)">
<button mat-icon-button [matMenuTriggerFor]="menu" id="ellipsis-button{{i}}" (click)="ellipsisAction(data)">
<mat-icon>more_vert</mat-icon>
</button>
</span>
Expand All @@ -56,7 +56,7 @@
<span *ngIf="showapilistbutton === true">
<span *ngIf="data['statusCode'] !== 'rejected'">
<span *ngIf="data['statusCode'] === 'approved'">
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="ellipsisAction(data)">
<button mat-icon-button [matMenuTriggerFor]="menu" id="ellipsis-button{{i}}" (click)="ellipsisAction(data)">
<mat-icon>more_vert</mat-icon>
</button>
</span>
Expand All @@ -69,7 +69,7 @@
</span> -->
</span>
<span *ngIf="this.currentRoute === 'partner'">
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="ellipsisAction(data)">
<button mat-icon-button [matMenuTriggerFor]="menu" id="ellipsis-button{{i}}" (click)="ellipsisAction(data)">
<mat-icon>more_vert</mat-icon>
</button>
</span>
Expand All @@ -79,6 +79,7 @@
mat-menu-item
*ngFor="let button of ellipsisList"
(click)="selectedRow(data, button)"
id={{button.buttonName.eng}}{{i}}
>
<span>{{ button.buttonName[lang] }}</span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*ngFor="let button of buttonList; index as i"
[ngStyle]="{ margin: '10px'}"
(click)="actionEvent(button)"
id={{button.buttonName.eng}}
[ngClass]="{
'button-style': button.buttonName.eng != 'Filter',
'filter-button-style': button.buttonName.eng === 'Filter'
Expand Down
9 changes: 6 additions & 3 deletions pmp-ui/src/app/shared/dialog/dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ <h2 class="filter-heading">{{ "filters.titleTxt" | translate }}</h2>
type="submit"
mat-button
class="footer-button"
id="applyTxt"
style="background-color:#FF4081; color:white;"
>
{{ "filters.footerButtons.applyTxt" | translate }}
Expand Down Expand Up @@ -210,7 +211,7 @@ <h2 class="filter-heading">{{ "filters.titleTxt" | translate }}</h2>
</div>
<div mat-dialog-actions class="pop-up-footer">
<span
><button mat-button [mat-dialog-close]="!confirm">
><button mat-button [mat-dialog-close]="!confirm" id="noBtnTxt">
{{ input.noBtnTxt }}
</button></span
>
Expand All @@ -220,6 +221,7 @@ <h2 class="filter-heading">{{ "filters.titleTxt" | translate }}</h2>
mat-button
[mat-dialog-close]="confirm"
cdkFocusInitial
id="yesBtnTxt"
>
{{ input.yesBtnTxt }}
</button></span
Expand All @@ -243,7 +245,7 @@ <h2 class="filter-heading">{{ "filters.titleTxt" | translate }}</h2>
</button>
</span>
<span
><button mat-button [mat-dialog-close]="!confirm">
><button mat-button [mat-dialog-close]="!confirm" id="noBtnTxt">
{{ input.noBtnTxt }}
</button></span
>
Expand All @@ -253,6 +255,7 @@ <h2 class="filter-heading">{{ "filters.titleTxt" | translate }}</h2>
mat-button
[mat-dialog-close]="confirm"
cdkFocusInitial
id="confirmpopup"
>
{{ input.yesBtnTxt }}
</button></span
Expand Down Expand Up @@ -307,7 +310,7 @@ <h2 class="filter-heading">{{ "filters.titleTxt" | translate }}</h2>
</div>
<div mat-dialog-actions class="pop-up-footer">
<span
><button mat-button cdkFocusInitial (click)="dismiss()">
><button mat-button cdkFocusInitial (click)="dismiss()" id="dismiss">
OK
</button></span
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</span>
<mat-menu #menu="matMenu" backdropClass="profile">
<ng-container *ngFor="let item of dataList">
<button (click)="onItem()" mat-menu-item>{{buttonName | translate }}</button>
<button (click)="onItem()" mat-menu-item id={{buttonName}}>{{buttonName | translate }}</button>
</ng-container>
</mat-menu>
</div>
Expand All @@ -28,7 +28,7 @@
</button>
<mat-menu #menu="matMenu" backdropClass="elipses">
<ng-container *ngFor="let item of dataList">
<button (click)="onItem()" mat-menu-item>{{buttonName}}</button>
<button (click)="onItem()" mat-menu-item id={{buttonName}}>{{buttonName}}</button>
</ng-container>
</mat-menu>
</div>
Expand Down

0 comments on commit 28ad5b9

Please sign in to comment.