refactor: move document domain core to lib/document/
Moves ~25 components, utils (search, filename, groupDocuments, documentStatusLabel, validateFile), bulkSelection store, and TranscriptionSection sub-component. Fixes broken relative imports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
22
frontend/src/lib/document/documentStatusLabel.ts
Normal file
22
frontend/src/lib/document/documentStatusLabel.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
|
||||
/**
|
||||
* Maps a document status string to a localised human-readable label.
|
||||
* Falls back to "Unknown" for unrecognised values.
|
||||
*/
|
||||
export function formatDocumentStatus(status: string): string {
|
||||
switch (status) {
|
||||
case 'PLACEHOLDER':
|
||||
return m.doc_status_placeholder();
|
||||
case 'UPLOADED':
|
||||
return m.doc_status_uploaded();
|
||||
case 'TRANSCRIBED':
|
||||
return m.doc_status_transcribed();
|
||||
case 'REVIEWED':
|
||||
return m.doc_status_reviewed();
|
||||
case 'ARCHIVED':
|
||||
return m.doc_status_archived();
|
||||
default:
|
||||
return m.doc_status_unknown();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user