From 7a22c1faf29ffaf0282113c2ec8af8261cef7e6f Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 5 May 2026 18:04:21 +0200 Subject: [PATCH] refactor(document): remove statusLabel() alias, use formatDocumentStatus directly statusLabel() was a one-line alias for formatDocumentStatus() with no additional behaviour. Remove it and update DocumentStatusChip.svelte to call formatDocumentStatus() directly. Remove the corresponding alias test suite from the spec file. Co-Authored-By: Claude Sonnet 4.6 --- .../lib/document/DocumentStatusChip.svelte | 4 ++-- .../lib/document/documentStatusLabel.spec.ts | 24 +------------------ .../src/lib/document/documentStatusLabel.ts | 4 ---- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/frontend/src/lib/document/DocumentStatusChip.svelte b/frontend/src/lib/document/DocumentStatusChip.svelte index e0cc1ec7..f3fc3de8 100644 --- a/frontend/src/lib/document/DocumentStatusChip.svelte +++ b/frontend/src/lib/document/DocumentStatusChip.svelte @@ -1,7 +1,7 @@ { it('maps PLACEHOLDER to correct label', () => { @@ -48,25 +48,3 @@ describe('statusDotClass', () => { expect(statusDotClass('ARCHIVED')).toBe('bg-emerald-600'); }); }); - -describe('statusLabel', () => { - it('PLACEHOLDER → "Platzhalter"', () => { - expect(statusLabel('PLACEHOLDER')).toBe('Platzhalter'); - }); - - it('UPLOADED → "Hochgeladen"', () => { - expect(statusLabel('UPLOADED')).toBe('Hochgeladen'); - }); - - it('TRANSCRIBED → "Transkribiert"', () => { - expect(statusLabel('TRANSCRIBED')).toBe('Transkribiert'); - }); - - it('REVIEWED → "Geprüft"', () => { - expect(statusLabel('REVIEWED')).toBe('Geprüft'); - }); - - it('ARCHIVED → "Archiviert"', () => { - expect(statusLabel('ARCHIVED')).toBe('Archiviert'); - }); -}); diff --git a/frontend/src/lib/document/documentStatusLabel.ts b/frontend/src/lib/document/documentStatusLabel.ts index d84e4b48..67e4ff34 100644 --- a/frontend/src/lib/document/documentStatusLabel.ts +++ b/frontend/src/lib/document/documentStatusLabel.ts @@ -33,7 +33,3 @@ export function statusDotClass(status: DocumentStatus): string { return 'bg-emerald-600'; } } - -export function statusLabel(status: string): string { - return formatDocumentStatus(status); -}