Files
SkillMate/shared/index.js
Claude Project Manager 4d509d255f Update changes
2025-10-16 08:24:01 +02:00

79 Zeilen
1.9 KiB
JavaScript

// Runtime constants and helpers shared across projects
const POWER_FUNCTIONS = [
{ id: 'sachgebietsleitung', label: 'Sachgebietsleitung', unitTypes: ['sachgebiet'], canManageEmployees: true },
{ id: 'stellvertretende_sachgebietsleitung', label: 'Stellvertretende Sachgebietsleitung', unitTypes: ['sachgebiet'], canManageEmployees: true },
{ id: 'ermittlungskommissionsleitung', label: 'Ermittlungskommissionsleitung', unitTypes: ['ermittlungskommission'], canManageEmployees: true },
{ id: 'dezernatsleitung', label: 'Dezernatsleitung', unitTypes: ['dezernat'], canManageEmployees: false },
{ id: 'abteilungsleitung', label: 'Abteilungsleitung', unitTypes: ['abteilung'], canManageEmployees: false }
]
const ROLE_PERMISSIONS = {
admin: [
'admin:panel:access',
'users:create',
'users:read',
'users:update',
'users:delete',
'employees:create',
'settings:read',
'settings:update',
'employees:read',
'employees:update',
'skills:read',
'skills:update'
],
superuser: [
'admin:panel:access',
'users:read',
'employees:create',
'employees:read',
'employees:update',
'skills:read',
'skills:update'
],
user: [
'employees:read',
'skills:read'
]
}
const DEFAULT_SKILLS = {
general: [
'Teamarbeit',
'Kommunikation',
'Projektmanagement'
],
it: [
'JavaScript',
'TypeScript',
'Node.js',
'SQL'
],
certificates: [
'Erste Hilfe',
'Brandschutzhelfer'
],
weapons: [
'WBK A',
'WBK B'
]
}
exports.ROLE_PERMISSIONS = ROLE_PERMISSIONS
exports.POWER_FUNCTIONS = POWER_FUNCTIONS
exports.DEFAULT_SKILLS = DEFAULT_SKILLS
// Re-export skill constants
try {
const { LANGUAGE_LEVELS, SKILL_HIERARCHY } = require('./skills')
exports.LANGUAGE_LEVELS = LANGUAGE_LEVELS
exports.SKILL_HIERARCHY = SKILL_HIERARCHY
} catch (e) {
// no-op if skills.js not present
}
module.exports = exports
exports.__esModule = true
exports.default = exports