8 Commits

Author SHA1 Message Date
3aa523870f fix(wiki): Betriebsrat-UI vollständig korrigiert
- categories_posts_listform.php: brCategoryFilter entfernt, Betriebsrat
  sieht alle Kategorien (nur "Beitrag erstellen"-Button gefiltert)
- post_cardform_article.php: Bearbeiten- und "Neue Version"-Button jetzt
  über \$canEditPost gesteuert statt hart auf r-wiki geprüft
- post_cardform.php: Settings-Tab-Link und -Inhalt ebenfalls über
  \$canEditPost freigegeben
- post_cardform_settings.php: Kategorie-Whitelist wird für Betriebsrat
  auf freigegebene Kategorien gefiltert (inkl. Vererbung);
  Speichern-Button und JS-Handler über \$canEditPost gesteuert

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 08:09:19 +02:00
a0698d621e feat(wiki): Betriebsrat-Berechtigung (r-wiki-br)
Neue Permission r-wiki-br ermöglicht eingeschränkte Wiki-Bearbeitung:

- Neue Permission in main_permission (ID 30: r-wiki-br)
- Neue Spalte betriebsrat_editable in knowledgecenter_categories_update
- Checkbox "Für Betriebsrat bearbeitbar" in der Kategorie-Verwaltung
  (nur für r-wiki-Redakteure sichtbar und speicherbar)

Berechtigungslogik:
- r-wiki schlägt immer: Wer beide Rechte hat, verhält sich wie Redakteur
- Betriebsrat sieht nur Kategorien mit betriebsrat_editable=1
- "Beitrag erstellen"-Button nur in freigegebenen Kategorien sichtbar
- Neue Posts/Bearbeitungen auf betriebsrat_editable-Kategorien beschränkt
- Settings-Tab und Kategorieverwaltung weiterhin r-wiki-only
- Ajax-Endpoints (save_post_files, delete_post_file, upload_inline_image)
  prüfen Kategorie-Berechtigung serverseitig

File Gallery:
- Betriebsrat ist per kc_lock_path auf den Post-eigenen Ordner beschränkt
- Redakteur kann frei navigieren (kein Lock)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 13:16:36 +02:00
952b3e2efc Remove topic table query from post_cardform.php
The forum module (topic table) does not exist. Remove the comment count
query to prevent a fatal crash when loading a post detail page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:52:42 +02:00
0a0196bd89 knowledgecenter: remove forum/product tabs and fix new-post errors
- post_cardform.php: remove Diskussion tab (forum module doesn't exist)
- post_cardform_contacts.php: guard get_contact_cards AJAX so it doesn't
  fire with post_id=0 on new posts (caused "Ungültige Beitrags-ID" error)
- post_cardform_settings.php: remove Produkte section entirely — the
  product/product_translation tables don't exist in this installation,
  which caused a fatal crash when opening the settings tab

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:30:05 +02:00
d1b9e89df3 knowledgecenter: tab layout for category form + fix post discussion crash
categories_cardform.php now uses a 3-tab layout (Allgemein / Berechtigungen /
Unterkategorien) instead of a content+sidebar layout. The permissions section
spans full width with a 6-column grid: Mandanten/Abteilungen/Rollen each in
2 cols, Einrichtungen/Fachbereiche each in 3 cols for more space.

post_cardform.php: the Diskussion tab crashed with a fatal require_once when
the forum module doesn't exist. Now guarded with file_exists() and shows a
placeholder message for new posts and missing modules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:25:15 +02:00
eb3aa75615 Add Einrichtung and Fachbereich as permission/filter types (knowledgecenter + tasks)
- Create knowledgecenter_category_einricht, _fachbereich, knowledgecenter_post_einricht,
  knowledgecenter_post_fachbereich tables; extend task_target_rule with main_einricht_id
  and main_bereich_id columns
- Middleware: load main_einricht_id/main_bereich_id from main_contact_department,
  expose $allowedEinrichts/$allowedFachbereiche globals (same pattern as existing 3 types)
- Ajax: add update_category/post_einrichts/fachbereiche functions, extend
  update_category_links() and search filter query
- Views: add einricht/fachbereich LEFT JOINs and WHERE filters in all 5 query sites
  (categories_posts_listform, category_posts_widget, post_announcement_listform,
  post_cardform userHasAccessForPost, Ajax search)
- post_cardform_settings: add Einrichtungen/Fachbereiche tagify pickers with save/load
- Tasks: add listEinrichts/listFachbereiche to repo+service, add UI selects in task_form,
  extend target-rule normalization and upsert builder, extend AssignmentResolverService
  scope loading and matchesAnyRule to include einricht/fachbereich matching

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:03:53 +02:00
e2837b3288 Adapt main_contact_link queries to use main_contact_department
The new tasks and knowledgecenter_update modules were built against a
main_contact_link table that does not exist in this system. All 7 active
query sites now target main_contact_department (same column names,
active_d → active).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 10:22:20 +02:00
743476f64a Module tasks + knowledgecenter_update aus Kundenprojekt übernehmen (bereinigt)
Beide Module wurden aus einem anderen Kundenprojekt kopiert und bereinigt:

Knowledgecenter:
- Bild-Cache (1.985 Dateien) geleert, Ordnerstruktur mit .gitkeep behalten
- Files-Gallery-Lizenzschlüssel entfernt (config.php)
- Kundenspezifische Kategorien gelöscht: Teil I/II/III QM-Struktur,
  nummerierte QM-Kapitel, Gremien (Präsidium/Finanzausschuss/Landesausschuss),
  Sitzungsservice-Serie, Protokoll-Abteilungen, Testeinträge
- 56 generische Kategorien bleiben (Downloads, Onboarding, Personalthemen …)

Tasks:
- Alle Betriebsdaten gelöscht (114 Tasks, 914 Submissions, 579 Assignments)
- Task-Definitionen und Verlinkungen geleert
- Kategoriestruktur bleibt (Allgemein, IT, Personal, Buchhaltung …)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:20:02 +02:00