diff --git a/controllers/dashboard.controller.js b/controllers/dashboard.controller.js index aef143e..ee8df9b 100644 --- a/controllers/dashboard.controller.js +++ b/controllers/dashboard.controller.js @@ -8,6 +8,7 @@ async function showDashboard(req, res) { const waitingPatients = await getWaitingPatients(db); res.render("dashboard", { + user: req.session.user, waitingPatients }); diff --git a/controllers/medication.controller.js b/controllers/medication.controller.js index 8c844ea..69926ab 100644 --- a/controllers/medication.controller.js +++ b/controllers/medication.controller.js @@ -5,7 +5,7 @@ function listMedications(req, res, next) { const { q, onlyActive } = req.query; let sql = ` - SELECT + SELECT v.id, m.id AS medication_id, m.name AS medication, @@ -44,8 +44,9 @@ function listMedications(req, res, next) { res.render("medications", { title: "Medikamentenübersicht", - sidebarPartial: "partials/sidebar-empty", // ✅ schwarzer Balken links - active: "medications", + + // ✅ IMMER patient-sidebar verwenden + sidebarPartial: "partials/patient-sidebar", rows, query: { q, onlyActive }, diff --git a/locales/de.json b/locales/de.json index 23dc9b1..8fb2d82 100644 --- a/locales/de.json +++ b/locales/de.json @@ -26,7 +26,34 @@ "nodata":"keine Daten", "month":"Monat", "patientcash":"Umsatz pro Patient", - "patient":"Patient" + "patient":"Patient", + "systeminfo":"Systeminformationen", + "table":"Tabelle", + "lines":"Zeilen", + "size":"Grösse", + "errordatabase":"Fehler beim Auslesen der Datenbankinfos:", + "welcome":"Willkommen", + "waitingroomtext":"Wartezimmer-Monitor", + "waitingroomtextnopatient":"Keine Patienten im Wartezimmer.", + "gender":"Geschlecht", + "birthday":"Geburtstag", + "email":"E-Mail", + "phone":"Telefon", + "address":"Adresse", + "country":"Land", + "notice":"Notizen", + "create":"Erstellt", + "change":"Geändert", + "reset2":"Zurücksetzen", + "edit":"Bearbeiten", + "selection":"Auswahl", + "waiting":"Wartet bereits", + "towaitingroom":"Ins Wartezimmer", + "overview":"Übersicht", + "upload":"Hochladen", + "lock":"Sperren", + "unlock":"Enrsperren", + "name":"Name" }, "sidebar": { "patients": "Patienten", @@ -75,6 +102,15 @@ "port":"Port", "database":"Datenbank", "password":"Password", - "connectiontest":"Verbindung testen" + "connectiontest":"Verbindung testen", + "tablecount":"Anzahl Tabellen", + "databasesize":"Datenbankgrösse", + "tableoverview":"Tabellenübersicht" + }, + + "patienteoverview": { + "patienttitle": "Patientenübersicht", + "newpatient":"Neuer Patient", + "nopatientfound":"Keine Patienten gefunden" } } diff --git a/locales/es.json b/locales/es.json index 6fb5da9..f9b5db4 100644 --- a/locales/es.json +++ b/locales/es.json @@ -26,8 +26,36 @@ "nodata":"sin datos", "month":"mes", "patientcash":"Ingresos por paciente", - "patient":"paciente" + "patient":"paciente", + "systeminfo":"Información del sistema", + "table":"tablas", + "lines":"líneas", + "size":"Tamaño", + "errordatabase":"Error al leer la información de la base de datos:", + "welcome":"Bienvenido", + "waitingroomtext":"Monitor de sala de espera", + "waitingroomtextnopatient":"No hay pacientes en la sala de espera.", + "gender":"Sexo", + "birthday":"Fecha de nacimiento", + "email":"Correo electrónico", + "phone":"Teléfono", + "address":"AdreDirecciónsse", + "country":"País", + "notice":"Notas", + "create":"Creado", + "change":"Modificado", + "reset2":"Restablecer", + "edit":"editar", + "selection":"Selección", + "waiting":"Ya está esperando", + "towaitingroom":"A la sala de espera", + "overview":"Resumen", + "upload":"Cargar", + "lock":"bloquear", + "unlock":"desbloquear", + "name":"Nombre" }, + "sidebar": { "patients": "Pacientes", "medications": "Medicamentos", @@ -75,6 +103,15 @@ "database":"Base de datos", "password":"Contraseña", "connectiontest":"Probar conexión", - "text":"Aquí puedes probar y guardar la conexión a la base de datos. " + "text":"Aquí puedes probar y guardar la conexión a la base de datos. ", + "tablecount":"Número de tablas", + "databasesize":"Tamaño de la base de datos", + "tableoverview":"Resumen de tablas" + }, + + "patienteoverview": { + "patienttitle": "Resumen de pacientes", + "newpatient":"Paciente nuevo", + "nopatientfound":"No se han encontrado pacientes." } } diff --git a/mysql-apt-config_0.8.30-1_all.deb b/mysql-apt-config_0.8.30-1_all.deb new file mode 100644 index 0000000..083f256 Binary files /dev/null and b/mysql-apt-config_0.8.30-1_all.deb differ diff --git a/services/auth.service.js b/services/auth.service.js index 43a596b..14a63cc 100644 --- a/services/auth.service.js +++ b/services/auth.service.js @@ -40,7 +40,10 @@ async function loginUser(db, username, password, lockTimeMinutes) { resolve({ id: user.id, username: user.username, - role: user.role + role: user.role, + title: user.title, + firstname: user.first_name, + lastname: user.last_name }); } ); diff --git a/views/admin/database.ejs b/views/admin/database.ejs index 5a5650b..c728073 100644 --- a/views/admin/database.ejs +++ b/views/admin/database.ejs @@ -132,13 +132,13 @@
<%= systemInfo.error %>| Tabelle | -Zeilen | -Größe (MB) | +<%=t.global.table%> | +<%=t.global.lines%> | +<%=t.global.size%> (MB) | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ID | -Name | +<%=t.global.name%> | N.I.E. / DNI | -Geschlecht | -Geburtstag | -Telefon | -Adresse | -Land | -Status | -Notizen | -Erstellt | -Geändert | -Aktionen | +<%=t.global.gender%> | +<%=t.global.birthday%> | +<%=t.global.email%> | +<%=t.global.phone%> | +<%=t.global.address%> | +<%=t.global.country%> | +<%=t.global.status%> | +<%=t.global.notice%> | +<%=t.global.create%> | +<%=t.global.change%> | +<%=t.global.action%> | ||
| - Keine Patienten gefunden + <%=t.patientoverview.nopatientfound%> |
| |||||||||||||||||||||||||