feat : update
CI / Verify (push) Successful in 1m5s
CI / Build immutable images and deploy (push) Successful in 2m2s

This commit is contained in:
2026-09-04 22:02:57 +07:00 Unverified
parent 513e37ad83
commit 5f74ce1de6
10 changed files with 3833 additions and 44 deletions
+15 -6
View File
@@ -131,16 +131,25 @@ export const teamSectionSchema = z.strictObject({
})).max(30),
});
const hexColor = z.string().regex(/^#[0-9a-fA-F]{6}$/, "กรุณาเลือกสีที่ถูกต้อง");
const extraRowSchema = z.strictObject({
mediaId: z.string().uuid().nullable(),
heading: z.string().trim().min(1).max(200),
body: z.string().trim().max(2_000),
percent: percent.nullable(),
backgroundColor: hexColor.nullable().default(null),
textColor: hexColor.nullable().default(null),
}).refine(
(row) => (row.backgroundColor === null) === (row.textColor === null),
{ message: "ต้องเลือกสีพื้นหลังและสีข้อความพร้อมกัน", path: ["backgroundColor"] },
);
export const extraSectionSchema = z.strictObject({
expectedVersion: z.number().int().positive(),
sections: z.array(z.strictObject({
title: z.string().trim().min(1).max(160),
rows: z.array(z.strictObject({
mediaId: z.string().uuid().nullable(),
heading: z.string().trim().min(1).max(200),
body: z.string().trim().max(2_000),
percent: percent.nullable(),
})).max(50),
rows: z.array(extraRowSchema).max(50),
})).max(20),
});