Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default class UcdlibIamPageSeparationSingle extends Mixin(LitElement)
this.employeeId = ad?.employeeId || '';
this.employeeUserId = ad?.employeeUserId || '';
this.department = ad?.departmentName || '';
this.departmentHead = this.getDepartmentHead();
this.rtTicketId = payload.rtTicketId || '';
this.separationDate = dtUtls.fmtDatetime(payload.separationDate, {dateOnly: true, UTC: true, includeDayOfWeek: true});
this.supervisorId = payload.supervisorId || '';
Expand Down Expand Up @@ -154,6 +155,17 @@ export default class UcdlibIamPageSeparationSingle extends Mixin(LitElement)
this.querySelector('#ss-iam-deprovision-modal').show();
}

/**
* @description Gets Department Head from the separation request payload. Returns empty string if not found
* @returns {String}
*/
getDepartmentHead(){
let groups = this.request?.additionalData?.groups || [];

let deptHead = groups.find(g => {return (g.type === 'Department' && g.partOfOrg)});
return deptHead.isHead ? 'Yes' : 'No';
}
Comment on lines +162 to +167

/**
* @description Called after user confirms deprovisioning of employee from library iam system
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function render() {
<div><label class='u-inline'>Employee User ID:</label> ${this.employeeUserId}</div>
<div><label class='u-inline'>Department:</label> ${this.department}</div>
<div><label class='u-inline'>Separation Date:</label> ${this.separationDate}</div>
<div><label class='u-inline'>Is Department Head:</label> ${this.departmentHead}</div>
</div>
<div class="panel panel--icon panel--icon-custom o-box panel--icon-delta">
<h2 class="panel__title"><span class="panel__custom-icon fas fa-sitemap"></span>Supervisor</h2>
Expand Down