Alle SG erfasst

Dieser Commit ist enthalten in:
Claude Project Manager
2025-09-25 00:36:07 +02:00
Ursprung 42603d70c6
Commit 73d59ff506

Datei anzeigen

@ -199,6 +199,17 @@ function parseOrganizationFromText(text: string) {
continue continue
} }
// Sachgebiet Leitungsstab (z. B. "SG LStab 1 - ...")
const sgLStabMatch = line.match(/^SG\s+LStab\s+(\d+)/i)
if (sgLStabMatch) {
const num = sgLStabMatch[1].trim()
const sgName = line.replace(/^SG\s+LStab\s+\d+\s*-?\s*/i, '').trim() || `Sachgebiet LStab ${num}`
// Ensure Leitungsstab exists under DIR
ensure({ code: 'LStab', name: 'Leitungsstab', type: 'stabsstelle', level: 1, parentId: 'DIR', color: '#6b7280' })
ensure({ code: `SG LStab ${num}`, name: sgName, type: 'sachgebiet', level: 2, parentId: 'LStab' })
continue
}
const sgMatch = line.match(/^SG\s+([\d\.]+)/i) const sgMatch = line.match(/^SG\s+([\d\.]+)/i)
if (sgMatch) { if (sgMatch) {
const sgNum = sgMatch[1].trim() const sgNum = sgMatch[1].trim()