From 6786ac07d1654b060120d74ba42d7166f01d7702 Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Tue, 10 Mar 2026 08:01:29 +0200 Subject: [PATCH] =?UTF-8?q?fix(registratura):=20remove=20intern=20directio?= =?UTF-8?q?n=20=E2=80=94=20only=20intrat/iesit=20are=20valid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- src/app/api/registratura/route.ts | 1 - .../components/registry-entry-detail.tsx | 7 ------- .../components/registry-entry-form.tsx | 14 -------------- .../registratura/components/registry-filters.tsx | 1 - .../registratura/components/registry-table.tsx | 7 ++----- .../services/reserved-slots-service.ts | 2 +- src/modules/registratura/types.ts | 3 +-- 7 files changed, 4 insertions(+), 31 deletions(-) diff --git a/src/app/api/registratura/route.ts b/src/app/api/registratura/route.ts index 0ac298a..472cd53 100644 --- a/src/app/api/registratura/route.ts +++ b/src/app/api/registratura/route.ts @@ -166,7 +166,6 @@ export async function GET(req: NextRequest) { const dirMap: Record = { IN: "intrat", OUT: "iesit", - INT: "intern", }; const dir = dirMap[type.toUpperCase()]; if (dir) entries = entries.filter((e) => e.direction === dir); diff --git a/src/modules/registratura/components/registry-entry-detail.tsx b/src/modules/registratura/components/registry-entry-detail.tsx index c4eb9f3..f0259d3 100644 --- a/src/modules/registratura/components/registry-entry-detail.tsx +++ b/src/modules/registratura/components/registry-entry-detail.tsx @@ -2,7 +2,6 @@ import { ArrowDownToLine, - ArrowRightLeft, ArrowUpFromLine, Calendar, CheckCircle2, @@ -65,12 +64,6 @@ const DIRECTION_CONFIG = { class: "bg-orange-100 text-orange-800 dark:bg-orange-900/40 dark:text-orange-300", }, - intern: { - label: "Intern", - icon: ArrowRightLeft, - class: - "bg-purple-100 text-purple-800 dark:bg-purple-900/40 dark:text-purple-300", - }, } as const; const STATUS_CONFIG = { diff --git a/src/modules/registratura/components/registry-entry-form.tsx b/src/modules/registratura/components/registry-entry-form.tsx index 2e014ed..2b13651 100644 --- a/src/modules/registratura/components/registry-entry-form.tsx +++ b/src/modules/registratura/components/registry-entry-form.tsx @@ -15,7 +15,6 @@ import { Globe, ArrowDownToLine, ArrowUpFromLine, - ArrowRightLeft, HardDrive, FolderOpen, Link2, @@ -555,19 +554,6 @@ export function RegistryEntryForm({ Ieșit -
diff --git a/src/modules/registratura/components/registry-filters.tsx b/src/modules/registratura/components/registry-filters.tsx index 881c252..3a0d8b5 100644 --- a/src/modules/registratura/components/registry-filters.tsx +++ b/src/modules/registratura/components/registry-filters.tsx @@ -41,7 +41,6 @@ export function RegistryFilters({ filters, onUpdate }: RegistryFiltersProps) { Toate Intrat Ieșit - Intern diff --git a/src/modules/registratura/components/registry-table.tsx b/src/modules/registratura/components/registry-table.tsx index e280d54..a604b8a 100644 --- a/src/modules/registratura/components/registry-table.tsx +++ b/src/modules/registratura/components/registry-table.tsx @@ -82,7 +82,7 @@ const COLUMNS: ColumnDef[] = [ id: "direction", label: "Dir.", tooltip: - "Direcție: Intrat = primit, Ieșit = trimis, Intern = intern", + "Direcție: Intrat = primit, Ieșit = trimis", defaultVisible: true, }, { @@ -141,7 +141,6 @@ const STORAGE_KEY = "registratura:visible-columns"; const DIRECTION_LABELS: Record = { intrat: "Intrat", iesit: "Ieșit", - intern: "Intern", }; function getDocTypeLabel(type: string): string { @@ -331,9 +330,7 @@ export function RegistryTable({ variant={ entry.direction === "intrat" ? "default" - : entry.direction === "intern" - ? "outline" - : "secondary" + : "secondary" } className="text-xs" > diff --git a/src/modules/registratura/services/reserved-slots-service.ts b/src/modules/registratura/services/reserved-slots-service.ts index 2556804..08a0f84 100644 --- a/src/modules/registratura/services/reserved-slots-service.ts +++ b/src/modules/registratura/services/reserved-slots-service.ts @@ -6,7 +6,7 @@ * - end-of-month (~last day, snapped to nearest previous working day) * * Slots use the IN sequence by default. When a late IN document arrives, - * it claims the slot's number. OUT/INT docs get new typed numbers instead. + * it claims the slot's number. OUT docs get new typed numbers instead. */ import { v4 as uuid } from "uuid"; diff --git a/src/modules/registratura/types.ts b/src/modules/registratura/types.ts index 71800e8..e3c94e8 100644 --- a/src/modules/registratura/types.ts +++ b/src/modules/registratura/types.ts @@ -2,13 +2,12 @@ import type { Visibility } from "@/core/module-registry/types"; import type { CompanyId } from "@/core/auth/types"; /** Document direction */ -export type RegistryDirection = "intrat" | "iesit" | "intern"; +export type RegistryDirection = "intrat" | "iesit"; /** Maps direction to the numbering type code */ export const DIRECTION_TYPE_CODE: Record = { intrat: "IN", iesit: "OUT", - intern: "INT", }; /** New-format company prefixes for registry numbering */