Commit Graph

19 Commits

Author SHA1 Message Date
cf97a52128 Fix: Aufgaben-Formular (neu anlegen) zeigte User-Detail statt Admin-Formular
Sitepart 68 ("Bearbeitungsmaske") hatte den falschen Typ 36
(user/task_detail.php). Dadurch wurde beim Öffnen der "neue Aufgabe"-
Seite der User-Task-Detail-Action aufgerufen, die ohne assignment_id
mit "Ungültige Assignment-ID." abbricht.

Lösung: Typ 40 in intranet.php für admin/task_form.php eingetragen,
Sitepart 68 in der DB auf Typ 40 gesetzt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 13:52:05 +02:00
833c3718cf Add summary field to knowledgecenter posts
- ALTER TABLE knowledgecenter_post_versions ADD COLUMN summary TEXT NULL AFTER content
- Add summary textarea to post edit form (after Quill editor)
- Include summary in insert_post_version() and update_post_version()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:59:31 +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
887ac6a4bb Fix post save and file gallery for knowledgecenter
- Create module/shared_components/quill/ with toolbar_presets.js,
  quill_resize.js and quill_resize.css — missing files caused a JS crash
  in $(document).ready() before the save button's click handler was
  registered, so clicking save did nothing
- Fix filesgallery.php session detection to search any sid* cookie
  dynamically (site session name is 'sidawo', not the hardcoded
  'sidintranet'), fixing the popup showing the homepage instead of
  the gallery
- Revert categories_cardform.php from 3-tab layout back to original
  sidebar layout with full-width permissions section below

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:49:59 +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
4e8dd8745f knowledgecenter: add Einrichtung/Fachbereich to category permission form
categories_cardform.php now loads and displays tagify pickers for
Einrichtungen and Fachbereiche alongside the existing Mandant/Abteilung/Rolle
pickers. The saveTagifyData() function passes all 5 types to update_category_links.

Also ran DB migration: all permission data from the 5 old _link tables has been
copied into the new permission tables (mandant: 178, department: 1108,
role: 2159, einricht: 10023, fachbereich: 2722 rows).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 11:13:27 +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
38272c3b11 Intranet Cardform: zwei Nummernserien auf ein Array konsolidieren
Statt $type_array (1-basiert) + $type_name_array (0-basiert) gibt es
jetzt ein einziges assoziatives Array $types [typ_nummer => name].
input_select bekommt array_keys/array_values — keine Verhaltensänderung,
aber das Muster ist ab sofort konsistent und erweiterbar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:44:50 +02:00
197152fb97 Intranet: neue Module registrieren (Typen 28–39)
Knowledgecenter Update, Globale Suche und alle Task/Zertifikate-Seiten
(Admin + User) ab Typ 28 fortlaufend eingetragen — kein Offset mehr
zwischen Label und Case-Nummer wie im Quellprojekt.

Nicht eingetragen: my_certificates.php (Datei existiert nicht im
tasks-Modul) und Search (Modul noch nicht vorhanden).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 09:40:54 +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
2e75ff7d59 Statistik: Login-Tracking auf pro-User-Deduplizierung umstellen
main_contact_id wird jetzt mitgespeichert + UNIQUE (login_date, main_contact_id).
Damit zählt ein User der sich mehrfach ein-/ausloggt trotzdem nur einmal pro Tag.
Im Chart bleibt nur die anonyme Tagessumme sichtbar.

ALTER TABLE stat_login_daily
  ADD COLUMN main_contact_id INT NOT NULL DEFAULT 0 AFTER login_date,
  ADD UNIQUE KEY uq_user_day (login_date, main_contact_id);

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 08:59:44 +02:00
b2a3a23116 Statistik: anonyme Login-Events tracken
Neue Tabelle stat_login_daily (nur Datum, keine User-ID).
Bei jedem erfolgreichen Login wird ein Eintrag geschrieben —
egal ob über Microsoft OAuth, Dev-Bypass oder klassisches Passwort-Login.

CREATE TABLE stat_login_daily (
  id INT AUTO_INCREMENT PRIMARY KEY,
  login_date DATE NOT NULL,
  INDEX idx_login_date (login_date)
);

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 08:52:09 +02:00
c55777c089 Login: Microsoft-Auth per Env-Variable deaktivierbar machen
Im lokalen Docker-Betrieb funktioniert der Microsoft-OAuth-Flow nicht.
DISABLE_MS_AUTH=1 in docker-compose.yml schaltet ihn ab und zeigt
stattdessen ein einfaches Dev-Login-Formular (Eingabe der User-ID
aus main_contact). Auf 0 setzen, um MS-Auth wieder zu aktivieren.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 14:03:53 +02:00
5e928b982b chore von Jan I guess? 2026-06-01 14:18:35 +02:00
52ca9249c3 Refactor contact management functions and remove phpinfo.php
- Updated formatting and structure of functions in edit_contact.inc.php for better readability and consistency.
- Added comments to clarify the purpose of certain code sections, especially regarding mandant handling.
- Removed the deprecated phpinfo.php file to clean up the codebase.
2026-05-11 08:54:44 +02:00
8749bc7994 ticketcenter update 2026-02-19 16:48:26 +01:00
68f7a95fdf init 2026-02-17 14:56:23 +01:00