From 774890a633662c9debfea385673718464489eec4 Mon Sep 17 00:00:00 2001 From: Annika Holmqvist Date: Thu, 23 Apr 2026 16:54:35 +0200 Subject: [PATCH 01/10] fix: correct typos and update labels for consistency in AdminDashboard page --- frontend/src/pages/AdminDashboard.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/AdminDashboard.jsx b/frontend/src/pages/AdminDashboard.jsx index f42f6f0..d0ce14e 100644 --- a/frontend/src/pages/AdminDashboard.jsx +++ b/frontend/src/pages/AdminDashboard.jsx @@ -172,7 +172,7 @@ const AdminDashboard = ({ userName, initialTab = 'USERS' }) => {
-

Admininstratörer

+

Administratörer

{stats.admins}

@@ -208,7 +208,7 @@ const AdminDashboard = ({ userName, initialTab = 'USERS' }) => { activeTab === 'LOGS' ? 'bg-white text-slate-900 shadow-sm' : 'text-slate-400' }`} > - Audit Log + Aktivitetslogg From f034c94f0e352ad7ca44f22b5166c5439dac96d7 Mon Sep 17 00:00:00 2001 From: Annika Holmqvist Date: Thu, 23 Apr 2026 16:54:42 +0200 Subject: [PATCH 02/10] fix: replace action text formatting with getActionLabel for consistency in AuditLogView --- frontend/src/components/admin/AuditLogView.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/admin/AuditLogView.jsx b/frontend/src/components/admin/AuditLogView.jsx index df47c71..f59ade5 100644 --- a/frontend/src/components/admin/AuditLogView.jsx +++ b/frontend/src/components/admin/AuditLogView.jsx @@ -8,6 +8,7 @@ import { User as UserIcon, AlertCircle } from 'lucide-react'; +import { getActionLabel } from '../../utils/statusHelper'; const AuditLogView = ({ logs = [], loading }) => { @@ -52,7 +53,7 @@ const AuditLogView = ({ logs = [], loading }) => {

- {log.action.replace('_', ' ')} + {getActionLabel(log.action)}

{date} From 5cf346a99837ac9e61cb86a6ae84d96bfdf0f822 Mon Sep 17 00:00:00 2001 From: Annika Holmqvist Date: Thu, 23 Apr 2026 16:54:48 +0200 Subject: [PATCH 03/10] fix: use ACTIVE_STATUS_KEYS for dynamic status dropdown options in CaseDetail --- frontend/src/pages/CaseDetail.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/CaseDetail.jsx b/frontend/src/pages/CaseDetail.jsx index 339f8c3..889fdc7 100644 --- a/frontend/src/pages/CaseDetail.jsx +++ b/frontend/src/pages/CaseDetail.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useRef } from 'react'; import { commentService, activityService, attachmentService, medicalRecordService } from '../services/api'; -import { STATUS_MAP } from '../utils/statusHelper'; +import { STATUS_MAP, ACTIVE_STATUS_KEYS } from '../utils/statusHelper'; import { Stethoscope, Lock, FileText, CheckCircle, Upload, Trash2, ExternalLink } from 'lucide-react'; const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole }) => { @@ -206,9 +206,9 @@ const CaseDetail = ({ caseData, onBack, onGoToPet, currentUserId, userRole }) => onChange={(e) => handleStatusChange(e.target.value)} className="bg-slate-800 border border-slate-700 text-sm font-bold rounded-xl px-4 py-2 outline-none focus:ring-2 focus:ring-vet-accent transition-all cursor-pointer" > - - - + {ACTIVE_STATUS_KEYS.map((key) => ( + + ))}