Dieser Commit ist enthalten in:
Claude Project Manager
2025-10-16 08:24:01 +02:00
Ursprung 01d0988515
Commit 4d509d255f
51 geänderte Dateien mit 5922 neuen und 1502 gelöschten Zeilen

44
shared/index.d.ts vendored
Datei anzeigen

@ -12,6 +12,11 @@ export interface User {
isActive: boolean
createdAt: Date
updatedAt: Date
powerUnitId?: string | null
powerUnitName?: string | null
powerUnitType?: OrganizationalUnitType | null
powerFunction?: PowerFunction | null
canManageEmployees?: boolean
}
export interface Skill {
@ -39,6 +44,15 @@ export interface Clearance {
issuedDate: Date
}
export type PowerFunction = 'sachgebietsleitung' | 'stellvertretende_sachgebietsleitung' | 'ermittlungskommissionsleitung' | 'dezernatsleitung' | 'abteilungsleitung'
export interface PowerFunctionDefinition {
id: PowerFunction
label: string
unitTypes: OrganizationalUnitType[]
canManageEmployees: boolean
}
export interface Employee {
id: string
firstName: string
@ -48,6 +62,11 @@ export interface Employee {
position: string
officialTitle?: string | null
department: string
departmentDescription?: string | null
departmentTasks?: string | null
primaryUnitId?: string | null
primaryUnitCode?: string | null
primaryUnitName?: string | null
email?: string | null
phone?: string | null
mobile?: string | null
@ -57,12 +76,23 @@ export interface Employee {
languages?: LanguageSkill[]
clearance?: Clearance
specializations?: string[]
currentDeputies?: EmployeeDeputySummary[]
represents?: EmployeeDeputySummary[]
createdAt: Date | string
updatedAt: Date | string
createdBy?: string
updatedBy?: string | null
}
export interface EmployeeDeputySummary {
id: string
firstName: string
lastName: string
availability?: string | null
position?: string | null
assignmentId?: string
}
export interface SkillDefinition {
id: string
name: string
@ -89,6 +119,8 @@ export interface LoginResponse {
export const ROLE_PERMISSIONS: Record<UserRole, string[]>
export const POWER_FUNCTIONS: PowerFunctionDefinition[]
export const DEFAULT_SKILLS: Record<string, string[]>
export const LANGUAGE_LEVELS: string[]
export interface SkillLevel { id: string; name: string; level?: string }
@ -122,7 +154,7 @@ export interface WorkspaceFilter {
}
// Organization
export type OrganizationalUnitType = 'direktion' | 'abteilung' | 'dezernat' | 'sachgebiet' | 'teildezernat' | 'fuehrungsstelle' | 'stabsstelle' | 'sondereinheit'
export type OrganizationalUnitType = 'direktion' | 'abteilung' | 'dezernat' | 'sachgebiet' | 'teildezernat' | 'fuehrungsstelle' | 'stabsstelle' | 'sondereinheit' | 'ermittlungskommission'
export type EmployeeUnitRole = 'leiter' | 'stellvertreter' | 'mitarbeiter' | 'beauftragter'
export interface OrganizationalUnit {
@ -216,3 +248,13 @@ export interface BookingRequest {
endTime: string
notes?: string
}
declare const shared: {
ROLE_PERMISSIONS: typeof ROLE_PERMISSIONS
POWER_FUNCTIONS: typeof POWER_FUNCTIONS
DEFAULT_SKILLS: typeof DEFAULT_SKILLS
LANGUAGE_LEVELS: typeof LANGUAGE_LEVELS
SKILL_HIERARCHY: typeof SKILL_HIERARCHY
}
export default shared

Datei anzeigen

@ -1,5 +1,13 @@
// 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',
@ -30,36 +38,41 @@ const ROLE_PERMISSIONS = {
]
}
module.exports = {
ROLE_PERMISSIONS,
DEFAULT_SKILLS: {
general: [
'Teamarbeit',
'Kommunikation',
'Projektmanagement'
],
it: [
'JavaScript',
'TypeScript',
'Node.js',
'SQL'
],
certificates: [
'Erste Hilfe',
'Brandschutzhelfer'
],
weapons: [
'WBK A',
'WBK B'
]
}
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')
module.exports.LANGUAGE_LEVELS = LANGUAGE_LEVELS
module.exports.SKILL_HIERARCHY = SKILL_HIERARCHY
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

240
shared/index.mjs Normale Datei
Datei anzeigen

@ -0,0 +1,240 @@
export 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 }
]
export 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'
]
}
export const DEFAULT_SKILLS = {
general: [
'Teamarbeit',
'Kommunikation',
'Projektmanagement'
],
it: [
'JavaScript',
'TypeScript',
'Node.js',
'SQL'
],
certificates: [
'Erste Hilfe',
'Brandschutzhelfer'
],
weapons: [
'WBK A',
'WBK B'
]
}
export const LANGUAGE_LEVELS = ['A1', 'A2', 'B1', 'B2', 'C1', 'C2', 'Muttersprache']
export const SKILL_HIERARCHY = [
{
id: 'communication',
name: 'Kommunikative Fähigkeiten',
subcategories: [
{
id: 'languages',
name: 'Fremdsprachenkenntnisse',
skills: [
{ id: 'de', name: 'Deutsch' },
{ id: 'en', name: 'Englisch' },
{ id: 'fr', name: 'Französisch' },
{ id: 'es', name: 'Spanisch' },
{ id: 'it', name: 'Italienisch' },
{ id: 'ru', name: 'Russisch' },
{ id: 'ar', name: 'Arabisch' },
{ id: 'tr', name: 'Türkisch' },
{ id: 'pl', name: 'Polnisch' },
{ id: 'zh', name: 'Chinesisch' },
{ id: 'fa', name: 'Farsi/Persisch' }
]
},
{
id: 'interpersonal',
name: 'Zwischenmenschliche Fähigkeiten',
skills: [
{ id: 'negotiation', name: 'Verhandlungsführung' },
{ id: 'presentation', name: 'Präsentationstechnik' },
{ id: 'teamwork', name: 'Teamfähigkeit' },
{ id: 'leadership', name: 'Führungskompetenz' },
{ id: 'conflict', name: 'Konfliktmanagement' }
]
}
]
},
{
id: 'technical',
name: 'Technische Fähigkeiten',
subcategories: [
{
id: 'it_general',
name: 'IT-Grundkenntnisse',
skills: [
{ id: 'office', name: 'MS Office' },
{ id: 'windows', name: 'Windows Administration' },
{ id: 'linux', name: 'Linux Administration' },
{ id: 'networks', name: 'Netzwerktechnik' }
]
},
{
id: 'programming',
name: 'Programmierung',
skills: [
{ id: 'python', name: 'Python' },
{ id: 'java', name: 'Java' },
{ id: 'javascript', name: 'JavaScript' },
{ id: 'sql', name: 'SQL/Datenbanken' },
{ id: 'r', name: 'R' }
]
},
{
id: 'security',
name: 'IT-Sicherheit',
skills: [
{ id: 'forensics', name: 'Digitale Forensik' },
{ id: 'malware', name: 'Malware-Analyse' },
{ id: 'crypto', name: 'Kryptographie' },
{ id: 'pentest', name: 'Penetrationstests' },
{ id: 'siem', name: 'SIEM-Systeme' }
]
}
]
},
{
id: 'operational',
name: 'Operative Fähigkeiten',
subcategories: [
{
id: 'investigation',
name: 'Ermittlungstechniken',
skills: [
{ id: 'surveillance', name: 'Observationstechnik' },
{ id: 'undercover', name: 'Verdeckte Ermittlung' },
{ id: 'interrogation', name: 'Vernehmungsführung' },
{ id: 'evidence', name: 'Spurensicherung' },
{ id: 'scene', name: 'Tatortarbeit' }
]
},
{
id: 'tactical',
name: 'Taktische Fähigkeiten',
skills: [
{ id: 'planning', name: 'Einsatzplanung' },
{ id: 'access', name: 'Zugriffstechniken' },
{ id: 'protection', name: 'Personenschutz' },
{ id: 'crisis', name: 'Krisenmanagement' },
{ id: 'firstaid', name: 'Erste Hilfe' }
]
}
]
},
{
id: 'analytical',
name: 'Analytische Fähigkeiten',
subcategories: [
{
id: 'data_analysis',
name: 'Datenanalyse',
skills: [
{ id: 'statistics', name: 'Statistische Analyse' },
{ id: 'osint', name: 'OSINT-Techniken' },
{ id: 'social_media', name: 'Social Media Analyse' },
{ id: 'financial', name: 'Finanzermittlungen' },
{ id: 'network_analysis', name: 'Netzwerkanalyse' }
]
},
{
id: 'intelligence',
name: 'Nachrichtendienstliche Analyse',
skills: [
{ id: 'threat', name: 'Gefährdungsbewertung' },
{ id: 'profiling', name: 'Profiling' },
{ id: 'pattern', name: 'Mustererkennung' },
{ id: 'risk', name: 'Risikoanalyse' },
{ id: 'forecasting', name: 'Prognosemodelle' }
]
}
]
},
{
id: 'certifications',
name: 'Zertifizierungen & Berechtigungen',
subcategories: [
{
id: 'security_clearance',
name: 'Sicherheitsüberprüfungen',
skills: [
{ id: 'ue1', name: 'Sicherheitsüberprüfung Ü1' },
{ id: 'ue2', name: 'Sicherheitsüberprüfung Ü2' },
{ id: 'ue3', name: 'Sicherheitsüberprüfung Ü3' }
]
},
{
id: 'weapons',
name: 'Waffen & Ausrüstung',
skills: [
{ id: 'weapons_cert', name: 'Waffensachkunde' },
{ id: 'pistol', name: 'Schießausbildung Pistole' },
{ id: 'rifle', name: 'Schießausbildung Gewehr' },
{ id: 'mp', name: 'Schießausbildung MP' },
{ id: 'sniper', name: 'Scharfschützenausbildung' }
]
},
{
id: 'vehicles',
name: 'Fahrzeuge & Transport',
skills: [
{ id: 'car_b', name: 'Führerschein Klasse B' },
{ id: 'car_c', name: 'Führerschein Klasse C' },
{ id: 'car_ce', name: 'Führerschein Klasse CE' },
{ id: 'motorcycle', name: 'Führerschein Klasse A' },
{ id: 'boat', name: 'Bootsführerschein' },
{ id: 'pilot', name: 'Flugschein PPL' }
]
}
]
}
]
const shared = {
ROLE_PERMISSIONS,
POWER_FUNCTIONS,
DEFAULT_SKILLS,
LANGUAGE_LEVELS,
SKILL_HIERARCHY
}
export default shared

Datei anzeigen

@ -4,6 +4,12 @@
"private": true,
"main": "index.js",
"types": "index.d.ts",
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.mjs",
"require": "./index.js"
}
},
"license": "UNLICENSED"
}