feat: migrate showcase to Next.js and overhaul CRM UI
- rebuild the public site on the Next.js App Router with static export, per-section SEO pages, metadata, sitemap, robots and a generated OG image - add full-screen scroll-snap regions, staged scroll reveals, a hash-free tab navigation with a sliding indicator and region-by-region menu scrolling - replace the theme text toggle with animated sun/moon icons - restructure the CRM API into config, middleware, models, routes, services and utils layers - redesign the CRM shell with a single surface, tab rail, full-width blurred DataTable, record dialogs and mask-based icons - update Docker/Nginx publishing, Makefile targets, shared UI polish and docs
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { z } from "zod";
|
||||
import { AppError } from "@cohaise/server";
|
||||
|
||||
/** Identifiant UUID v4 tel que stocké par les tables du CRM. */
|
||||
export const uuidSchema = z
|
||||
.string()
|
||||
.regex(
|
||||
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,
|
||||
"Identifiant invalide.",
|
||||
);
|
||||
|
||||
/** Erreur 400 homogène pour un corps JSON invalide. */
|
||||
export const invalidBody = (error: z.ZodError): AppError => {
|
||||
const issue = error.issues[0];
|
||||
return AppError.badRequest(
|
||||
issue
|
||||
? `${issue.path.join(".") || "corps"} : ${issue.message}`
|
||||
: "Corps invalide.",
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user