fix(registratura): add 'certificat' to deadline-add-dialog CATEGORIES array

This commit is contained in:
AI Assistant
2026-02-27 16:53:06 +02:00
parent 80e41d4842
commit 5b99ad0400
2 changed files with 4 additions and 11 deletions
@@ -82,9 +82,7 @@ export function CloseGuardDialog({
const selectedEntry = allEntries.find((e) => e.id === selectedEntryId);
const canSubmit =
mode === "link"
? selectedEntryId !== ""
: reason.trim().length >= 5;
mode === "link" ? selectedEntryId !== "" : reason.trim().length >= 5;
const handleSubmit = () => {
if (!canSubmit) return;
@@ -124,19 +122,14 @@ export function CloseGuardDialog({
const def = getDeadlineType(dl.typeId);
const isOverdue = new Date(dl.dueDate) < new Date();
return (
<div
key={dl.id}
className="flex items-center gap-2 text-sm"
>
<div key={dl.id} className="flex items-center gap-2 text-sm">
<Badge
variant={isOverdue ? "destructive" : "outline"}
className="text-[10px] shrink-0"
>
{isOverdue ? "Depășit" : "Activ"}
</Badge>
<span className="font-medium">
{def?.label ?? dl.typeId}
</span>
<span className="font-medium">{def?.label ?? dl.typeId}</span>
<span className="text-muted-foreground text-xs ml-auto">
scadent {dl.dueDate}
</span>
@@ -21,7 +21,7 @@ interface DeadlineAddDialogProps {
type Step = 'category' | 'type' | 'date';
const CATEGORIES: DeadlineCategory[] = ['avize', 'completari', 'analiza', 'autorizare', 'publicitate'];
const CATEGORIES: DeadlineCategory[] = ['certificat', 'avize', 'completari', 'analiza', 'autorizare', 'publicitate'];
export function DeadlineAddDialog({ open, onOpenChange, entryDate, onAdd }: DeadlineAddDialogProps) {
const [step, setStep] = useState<Step>('category');