15 lines
400 B
TypeScript
15 lines
400 B
TypeScript
const standartRoles = ['emp|doc', 'emp|nur', 'emp|reg', 'emp|pha', 'emp|pay', 'emp|mng']
|
|
const verificatorRole = 'verificator'
|
|
|
|
export function getPositionAs(roleAccess: string): string {
|
|
if (roleAccess.includes('|')) {
|
|
if (standartRoles.includes(roleAccess)) {
|
|
return 'medical'
|
|
}
|
|
if (roleAccess.includes(verificatorRole)) {
|
|
return 'verificator'
|
|
}
|
|
}
|
|
return 'none'
|
|
}
|