Skip to content

Commit

Permalink
Merge pull request #202 from bcgov/oleksandrbohuslavskyi
Browse files Browse the repository at this point in the history
DSS-314 - Able to approve same user twice
  • Loading branch information
OleksandrBohuslavskyi authored Apr 22, 2024
2 parents 3a8e19b + 2cb9eb3 commit 27c0afa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
irreversible.</strong>
<div class="spacer-hr"></div>
<div class="actions">
<button pButton name="submit-dialog-btn" id="submit-dialog-btn"
<button pButton [disabled]="disableApproveButton" name="submit-dialog-btn" id="submit-dialog-btn"
(click)="onApprove(approveOrgTypeElem,approveOrgNameElem)">Submit</button>
<button pButton name="cancel-dialog-btn" id="cancel-dialog-btn" class="outline-btn"
(click)="onPopupClose()">Cancel</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class UserManagementComponent implements OnInit {
searchTerm: '',
}

disableApproveButton = false;
showApprovePopup = false;
showRejectPopup = false;

Expand Down Expand Up @@ -84,6 +85,7 @@ export class UserManagementComponent implements OnInit {
}

onApprovePopup(accessRequest: AccessRequestTableItem): void {
this.disableApproveButton = false;
this.currentTableItem = accessRequest;
this.showApprovePopup = true;
}
Expand All @@ -102,6 +104,8 @@ export class UserManagementComponent implements OnInit {
}

onApprove(_orgTypeIdElem: Dropdown, orgId: Dropdown): void {
this.disableApproveButton = true;

const model = {
userIdentityId: this.currentTableItem.userIdentityId,
representedByOrganizationId: orgId.value,
Expand Down

0 comments on commit 27c0afa

Please sign in to comment.