Enhance login functionality in AuthController and AuthService; add optional action parameter to login method, execute corresponding actions post-login, and handle action warnings. Update frontend components to trigger data refresh on successful login and display warnings if actions fail. Adjust SQL query in TimeEntryService for improved grouping.

This commit is contained in:
Torsten Schulz (local)
2025-10-20 07:48:53 +02:00
parent e55f20367d
commit 648a94c4da
8 changed files with 261 additions and 14 deletions

View File

@@ -0,0 +1,48 @@
-- Migration: Füge start_date und end_date zu timewish Tabelle hinzu
-- Datum: 2025-10-20
-- Beschreibung: Erweitert die timewish Tabelle um Gültigkeitsbereiche
-- Prüfe ob Spalten bereits existieren (für Sicherheit)
SET @col_exists = (
SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'timewish'
AND COLUMN_NAME = 'start_date'
);
-- Füge start_date hinzu, falls nicht vorhanden
SET @sql = IF(@col_exists = 0,
'ALTER TABLE `timewish` ADD COLUMN `start_date` DATE NOT NULL DEFAULT "2000-01-01" COMMENT "Ab welchem Datum gilt dieser Timewish"',
'SELECT "Spalte start_date existiert bereits" AS Info'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
-- Prüfe ob end_date bereits existiert
SET @col_exists = (
SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'timewish'
AND COLUMN_NAME = 'end_date'
);
-- Füge end_date hinzu, falls nicht vorhanden
SET @sql = IF(@col_exists = 0,
'ALTER TABLE `timewish` ADD COLUMN `end_date` DATE DEFAULT NULL COMMENT "Bis welchem Datum gilt dieser Timewish (NULL = unbegrenzt)"',
'SELECT "Spalte end_date existiert bereits" AS Info'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
-- Zeige Ergebnis
SELECT
'Migration abgeschlossen!' AS Status,
'start_date und end_date zur timewish Tabelle hinzugefügt' AS Details;
-- Zeige aktuelle Tabellenstruktur
DESCRIBE timewish;