Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
894f9fd159
commit
626593d68c
@@ -101,6 +101,11 @@ function CaseDetail() {
|
||||
<div className="flex items-center gap-3 mb-1">
|
||||
<span className="text-xs uppercase tracking-widest text-muted-foreground">{data.case_number}</span>
|
||||
<Badge variant="outline" className={statusBadgeClass(data.status)}>{data.status.replace("_", " ")}</Badge>
|
||||
{data.archived_at && (
|
||||
<Badge variant="outline" className="bg-muted text-muted-foreground">
|
||||
<Archive className="h-3 w-3 mr-1" /> Archived
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
<h1 className="font-serif text-3xl">{data.title}</h1>
|
||||
<p className="text-sm text-muted-foreground mt-1">
|
||||
@@ -129,6 +134,18 @@ function CaseDetail() {
|
||||
<SelectItem value="closed">Closed</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={async () => {
|
||||
if (await setArchived("cases", caseId, !data.archived_at)) load();
|
||||
}}
|
||||
>
|
||||
{data.archived_at ? (
|
||||
<><ArchiveRestore className="h-4 w-4 mr-2" /> Restore</>
|
||||
) : (
|
||||
<><Archive className="h-4 w-4 mr-2" /> Archive</>
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user