These functions describe DocumentStatus display logic (dot colours, readable labels) and belong in the document domain. They were incorrectly placed in personFormat.ts. Moving them to documentStatusLabel.ts removes the person → document dependency and prepares the codebase for the boundaries/dependencies ESLint rule. Refs #410 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
427 B
Svelte
23 lines
427 B
Svelte
<script lang="ts">
|
|
import {
|
|
statusDotClass,
|
|
statusLabel,
|
|
type DocumentStatus
|
|
} from '$lib/document/documentStatusLabel';
|
|
|
|
type Props = {
|
|
status: DocumentStatus;
|
|
};
|
|
|
|
let { status }: Props = $props();
|
|
|
|
const dotClass = $derived(statusDotClass(status));
|
|
const label = $derived(statusLabel(status));
|
|
</script>
|
|
|
|
<span
|
|
class="hidden shrink-0 md:block {dotClass} h-4 w-4 rounded-full"
|
|
title={label}
|
|
aria-label={label}
|
|
></span>
|