Skip to content

Commit

Permalink
Merge pull request #933 from tmobile/acl
Browse files Browse the repository at this point in the history
Enable edit icon based on service level permission
  • Loading branch information
devsatishm authored Mar 19, 2019
2 parents a5cf22d + fab5bbc commit 14c4463
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<div class="metadata-heading-wrap">
<div class="metadata-heading" [ngClass]="showGeneralField ? 'update-color' : ''">
General
<div class="edit-div" *ngIf="!showGeneralField" (click)="onEditGeneral()">
<div class="edit-div" *ngIf="!showGeneralField" [class.disable-icon]="!isAdminAccess" (click)="onEditGeneral()">
<img class="pre-image" src="/assets/erser/icon-edit.svg" />
</div>
<div *ngIf="showGeneralField" class="down-btn-wrap">
Expand Down Expand Up @@ -174,11 +174,11 @@
</ul>
</div>
<div class='metadata-column' *ngIf="service.serviceType == 'function' ">

<div class="metadata-heading-wrap">
<div class="metadata-heading" [ngClass]="!disp_show2 ? 'update-color' : ''">
Events
<div class="edit-div" *ngIf="!editEvents &&
<div class="edit-div" [class.disable-icon]="!isAdminAccess" *ngIf="!editEvents &&
service.eventScheduleEnablePresent" (click)="onEditEvents()">
<img class="pre-image" src="/assets/erser/icon-edit.svg" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1447,4 +1447,9 @@ btn-jazz-primary {

.update-color {
background-color: #ed008c !important;
}
}

.disable-icon {
cursor: not-allowed;
opacity: 0.4;
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ export class ServiceOverviewComponent implements OnInit {
}

onEditGeneral(){
if (this.isAdminAccess) {
this.onCancelClick();
this.showGeneralField = true;
}
}

private isCronObjValid(cronObj) {
Expand Down Expand Up @@ -1215,9 +1217,11 @@ export class ServiceOverviewComponent implements OnInit {
}

onEditEvents(){
this.onCancelClick();
this.editEvents = true;
this.disp_show2 = false;
if (this.isAdminAccess) {
this.onCancelClick();
this.editEvents = true;
this.disp_show2 = false;
}
}


Expand Down

0 comments on commit 14c4463

Please sign in to comment.