Merged in feat/LOY-232-DTMC-API-INTEGRATION (pull request #2454)
feat(LOY-232): DTMC API Integration * feat(LOY-232): DTMC API Integration * feat(LOY-232): use employment data in team member card * refactor(LOY-232): remove static data, return employment details in parsed response & fix tests * refactor(LOY-232): improve DTMC API Linking error control flow + make res type safe * fix(LOY-232): remove unused utils * fix(LOY-232): error vars Approved-by: Christian Andolf Approved-by: Erik Tiekstra
This commit is contained in:
@@ -32,3 +32,19 @@ export function getSteppedUpLevel(
|
||||
}
|
||||
return values[currentIndex + stepsUp]
|
||||
}
|
||||
|
||||
export function isEmployeeLinked(user: User): boolean {
|
||||
return !!user.employmentDetails?.employeeId
|
||||
}
|
||||
|
||||
export function getEmployeeInfo(user: User) {
|
||||
const employment = user.employmentDetails
|
||||
if (!employment) return null
|
||||
|
||||
return {
|
||||
employeeId: employment.employeeId,
|
||||
location: employment.location,
|
||||
country: employment.country,
|
||||
retired: employment.retired,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user