feat/page-cleaning: adjust role var naming
This commit is contained in:
No files matched your search
+12
-10
@@ -1,14 +1,16 @@
|
||||
export const medicalPositions = ['emp|doc', 'emp|lab', 'emp|mid', 'emp|nur', 'emp|nut', 'emp|pha', 'emp|reg']
|
||||
const verificatorRole = 'verificator'
|
||||
import { medicalRoles, respPosCode } from '~/const/common/role'
|
||||
|
||||
export function getPositionAs(roleAccess: string): string {
|
||||
if (roleAccess.includes('|')) {
|
||||
if (medicalPositions.includes(roleAccess)) {
|
||||
return 'medical'
|
||||
}
|
||||
if (roleAccess.includes(verificatorRole)) {
|
||||
export function getServicePosition(role?: string): string {
|
||||
if(!role) {
|
||||
return 'none'
|
||||
}
|
||||
if (medicalRoles.includes(role)) {
|
||||
return 'medical'
|
||||
} else if (role === 'emp|reg') {
|
||||
return 'registration'
|
||||
} else if (role.includes('|resp')) {
|
||||
return 'verificator'
|
||||
}
|
||||
} else {
|
||||
return 'none'
|
||||
}
|
||||
return 'none'
|
||||
}
|
||||
Reference in New Issue
Block a user