feat(registratura): atomic numbering, reserved slots, audit trail, API endpoints + theme toggle animation

Registratura module:
- Atomic sequence numbering (BTG-2026-IN-00125 format) via PostgreSQL upsert
- Reserved monthly slots (2/company/month) for late registrations
- Append-only audit trail with diff tracking
- REST API: /api/registratura (CRUD), /api/registratura/reserved, /api/registratura/audit
- Auth: NextAuth session + Bearer API key support
- New "intern" direction type with UI support (form, filters, table, detail panel)
- Prisma models: RegistrySequence, RegistryAudit

Theme toggle:
- SVG mask-based sun/moon morph with 360° spin animation
- Inverted logic (sun in dark mode, moon in light mode)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-10 07:54:32 +02:00
parent f94529c380
commit a0dd35a066
15 changed files with 1354 additions and 124 deletions
@@ -2,6 +2,7 @@
import {
ArrowDownToLine,
ArrowRightLeft,
ArrowUpFromLine,
Calendar,
CheckCircle2,
@@ -64,6 +65,12 @@ 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 = {
@@ -76,6 +83,10 @@ const STATUS_CONFIG = {
label: "Închis",
class: "bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400",
},
reserved: {
label: "Rezervat",
class: "bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300",
},
} as const;
const RESOLUTION_LABELS: Record<string, string> = {