Refactor personal log system with centralized service class and optimized display - #132
Conversation
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
|
@copilot Now the log and comments should be separated in display so comments can be viewed with a better focus |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Done in commit 056d89f. The display is now separated into two sections: Kommentare/Notizen - Manual comments and notes (types 0, 1, 2)
Systemprotokoll - Auto-generated system logs (types 4, 5, 6, 7)
The PersonalLogManager now has |
|
@copilot Die Darstellung des Systemprotokolls sollte weniger prägnant sein, es ist sehr groß und "störend". Entweder es muss etwas nebensächlicher werden oder es muss neben oder unter den Kommentaren angezeigt werden |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Done in commit 6283ad7. The system log is now less prominent and positioned below the comments in the same column: Layout changes:
Visual styling:
The system log is now much less visually dominant while remaining accessible when needed. Users can collapse it entirely to focus solely on comments. |
|
@copilot Can you make it so the summary is closed by default |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
|
@copilot If &logpage=X then the summary should be open |
Co-authored-by: itshypax <33388336+itshypax@users.noreply.github.com>
Done in commit 6c63c5d. The system log section now automatically opens when the |
Employee profile logs mixed hardcoded HTML strings and SQL across multiple files with magic numbers (0-7) for types. No structured data storage for log context. Comments and system logs were displayed together, making it difficult to focus on relevant information.
Changes
New
PersonalLogManagerservice classTYPE_NOTE,TYPE_RANK_CHANGE,TYPE_DOCUMENT, etc.logRankChange(),logQualificationChange(), etc.getComments()andgetSystemLogs()for category-based retrievalDatabase migration
metadataTEXT column tointra_mitarbeiter_logOptimized display sections
<details>element) to reduce visual clutterlogpageURL parameter is present for better navigation UXpageandlogpageparameters)Refactored files
mitarbeiter/profile.php- 6 hardcoded log insertions → service calls, optimized layout with collapsible system log (collapsed by default, auto-expands with logpage parameter)mitarbeiter/create.php,comment-delete.php- service callsassets/components/profiles/comments/main.php- displays only comments, usesgetComments()assets/components/profiles/logs/main.php- new file for system logs displayassets/functions/documents/create-custom.php- metadata supportassets/css/personal.css- compact styling for less prominent logs sectionExample
Before:
After:
The service handles HTML escaping, prepared statements, and metadata automatically. All type codes preserved for compatibility.
Warning
<issue_title>Personal-Log überarbeiten</issue_title>
<issue_description>## Bezieht sich die Anfrage einer Funktion auf ein Problem? Bitte beschreiben.
Kommentare und Log-Einträge (im Mitarbeiter-Profil) sind in einer Tabelle gemeinsam vertreten. Log-Einträge werden dabei fest definiert und der gesamte Code für Verlinkungen oder Texte ist im Log selbst vorgegeben.
Beschreibung der gewünschten Lösung
Das System sollte überarbeitet werden, um technisch und funktionell auf neuerem Stand zu sein.
Zusätzlicher Kontext
//</issue_description>
Comments on the Issue (you are @copilot in this section)
<issue_title>Personal-Log überarbeiten</issue_title>
<issue_title>Personal-Log überarbeiten</issue_title>
<issue_title>Personal-Log überarbeiten</issue_title>
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.