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 selectedEntry = allEntries.find((e) => e.id === selectedEntryId);
|
||||||
|
|
||||||
const canSubmit =
|
const canSubmit =
|
||||||
mode === "link"
|
mode === "link" ? selectedEntryId !== "" : reason.trim().length >= 5;
|
||||||
? selectedEntryId !== ""
|
|
||||||
: reason.trim().length >= 5;
|
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
if (!canSubmit) return;
|
if (!canSubmit) return;
|
||||||
@@ -124,19 +122,14 @@ export function CloseGuardDialog({
|
|||||||
const def = getDeadlineType(dl.typeId);
|
const def = getDeadlineType(dl.typeId);
|
||||||
const isOverdue = new Date(dl.dueDate) < new Date();
|
const isOverdue = new Date(dl.dueDate) < new Date();
|
||||||
return (
|
return (
|
||||||
<div
|
<div key={dl.id} className="flex items-center gap-2 text-sm">
|
||||||
key={dl.id}
|
|
||||||
className="flex items-center gap-2 text-sm"
|
|
||||||
>
|
|
||||||
<Badge
|
<Badge
|
||||||
variant={isOverdue ? "destructive" : "outline"}
|
variant={isOverdue ? "destructive" : "outline"}
|
||||||
className="text-[10px] shrink-0"
|
className="text-[10px] shrink-0"
|
||||||
>
|
>
|
||||||
{isOverdue ? "Depășit" : "Activ"}
|
{isOverdue ? "Depășit" : "Activ"}
|
||||||
</Badge>
|
</Badge>
|
||||||
<span className="font-medium">
|
<span className="font-medium">{def?.label ?? dl.typeId}</span>
|
||||||
{def?.label ?? dl.typeId}
|
|
||||||
</span>
|
|
||||||
<span className="text-muted-foreground text-xs ml-auto">
|
<span className="text-muted-foreground text-xs ml-auto">
|
||||||
scadent {dl.dueDate}
|
scadent {dl.dueDate}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ interface DeadlineAddDialogProps {
|
|||||||
|
|
||||||
type Step = 'category' | 'type' | 'date';
|
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) {
|
export function DeadlineAddDialog({ open, onOpenChange, entryDate, onAdd }: DeadlineAddDialogProps) {
|
||||||
const [step, setStep] = useState<Step>('category');
|
const [step, setStep] = useState<Step>('category');
|
||||||
|
|||||||
Reference in New Issue
Block a user