ZA ist drin
Dieser Commit ist enthalten in:
@ -83,6 +83,7 @@ function parseOrganizationFromText(text: string) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Abteilung (inkl. Zentralabteilung erkennen)
|
||||
const abtMatch = line.match(/Abteilung\s+(\d+|Zentralabteilung)/i)
|
||||
if (abtMatch) {
|
||||
const abtNum = abtMatch[1] === 'Zentralabteilung' ? 'ZA' : abtMatch[1]
|
||||
@ -100,6 +101,32 @@ function parseOrganizationFromText(text: string) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Zentralabteilung alleinstehend (ohne Präfix "Abteilung")
|
||||
if (/^Zentralabteilung\b/i.test(line) || /^ZA\b/i.test(line)) {
|
||||
currentAbteilung = ensure({
|
||||
code: 'Abt ZA',
|
||||
name: 'Zentralabteilung',
|
||||
type: 'abteilung',
|
||||
level: 1,
|
||||
parentId: 'DIR',
|
||||
color: colors['ZA'] || '#6b7280',
|
||||
hasFuehrungsstelle: false
|
||||
})
|
||||
currentDezernat = null
|
||||
// nicht continue; nachfolgende Muster können weitere Details liefern
|
||||
}
|
||||
|
||||
// Dezernat ZA N (z. B. "Dez ZA 1" bis "Dez ZA 5")
|
||||
const dezZaMatch = line.match(/^(?:Dezernat|Dez)\s+ZA\s*(\d{1,2})/i)
|
||||
if (dezZaMatch) {
|
||||
const zaNum = dezZaMatch[1].trim()
|
||||
const dezName = line.replace(/^(?:Dezernat|Dez)\s+ZA\s*\d{1,2}\s*-?\s*/i, '').trim() || `Dezernat ZA ${zaNum}`
|
||||
// Ensure Abt ZA exists
|
||||
ensure({ code: 'Abt ZA', name: 'Zentralabteilung', type: 'abteilung', level: 1, parentId: 'DIR', color: colors['ZA'] || '#6b7280', hasFuehrungsstelle: false })
|
||||
currentDezernat = ensure({ code: `Dez ZA ${zaNum}`, name: dezName, type: 'dezernat', level: 2, parentId: 'Abt ZA' })
|
||||
continue
|
||||
}
|
||||
|
||||
const dezMatch = line.match(/^(?:Dezernat|Dez)\s+([\d]+)/i)
|
||||
if (dezMatch) {
|
||||
const dezNum = dezMatch[1].trim()
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren