ZA ist wirklich drin mit SG
Dieser Commit ist enthalten in:
@ -143,6 +143,19 @@ function parseOrganizationFromText(text: string) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Sachgebiet ZA X.Y (z. B. "SG ZA 3.1 - ...")
|
||||
const sgZaMatch = line.match(/^SG\s+ZA\s+(\d+)\.(\d+)/i)
|
||||
if (sgZaMatch) {
|
||||
const main = sgZaMatch[1].trim()
|
||||
const sub = sgZaMatch[2].trim()
|
||||
const sgName = line.replace(/^SG\s+ZA\s+\d+\.\d+\s*-?\s*/i, '').trim() || `Sachgebiet ZA ${main}.${sub}`
|
||||
// Ensure Abt ZA and Dez ZA X
|
||||
ensure({ code: 'Abt ZA', name: 'Zentralabteilung', type: 'abteilung', level: 1, parentId: 'DIR', color: colors['ZA'] || '#6b7280', hasFuehrungsstelle: false })
|
||||
ensure({ code: `Dez ZA ${main}`, name: `Dezernat ZA ${main}`, type: 'dezernat', level: 2, parentId: 'Abt ZA' })
|
||||
ensure({ code: `SG ZA ${main}.${sub}`, name: sgName, type: 'sachgebiet', level: 3, parentId: `Dez ZA ${main}` })
|
||||
continue
|
||||
}
|
||||
|
||||
const sgMatch = line.match(/^SG\s+([\d\.]+)/i)
|
||||
if (sgMatch) {
|
||||
const sgNum = sgMatch[1].trim()
|
||||
@ -163,6 +176,19 @@ function parseOrganizationFromText(text: string) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Teildezernat ZA X.Y (z. B. "TD ZA 2.1 - ...")
|
||||
const tdZaMatch = line.match(/^TD\s+ZA\s+(\d+)\.(\d+)/i)
|
||||
if (tdZaMatch) {
|
||||
const main = tdZaMatch[1].trim()
|
||||
const sub = tdZaMatch[2].trim()
|
||||
const tdName = line.replace(/^TD\s+ZA\s+\d+\.\d+\s*-?\s*/i, '').trim() || `Teildezernat ZA ${main}.${sub}`
|
||||
// Ensure Abt ZA and Dez ZA X
|
||||
ensure({ code: 'Abt ZA', name: 'Zentralabteilung', type: 'abteilung', level: 1, parentId: 'DIR', color: colors['ZA'] || '#6b7280', hasFuehrungsstelle: false })
|
||||
ensure({ code: `Dez ZA ${main}`, name: `Dezernat ZA ${main}`, type: 'dezernat', level: 2, parentId: 'Abt ZA' })
|
||||
ensure({ code: `TD ZA ${main}.${sub}`, name: tdName, type: 'teildezernat', level: 3, parentId: `Dez ZA ${main}` })
|
||||
continue
|
||||
}
|
||||
|
||||
const tdMatch = line.match(/^TD\s+([\d\.]+)/i)
|
||||
if (tdMatch) {
|
||||
const tdNum = tdMatch[1].trim()
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren