fix(registratura): add 'certificat' to deadline-add-dialog CATEGORIES array
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user