add user profile, profile vibe and trip vibe and social signal

This commit is contained in:
2026-05-08 19:20:27 +07:00
parent 3228ef712f
commit 7f419638b5
39 changed files with 1361 additions and 192 deletions
+9
View File
@@ -1,6 +1,7 @@
import { z } from "zod/v4";
import { LIMITS } from "@/lib/limits";
import { ACTIVITY_CATEGORIES } from "@/lib/activity-category";
import { VIBES } from "@/lib/vibe";
import type { ActivityCategory } from "@/app/generated/prisma/enums";
import {
isTripDepartureDayPast,
@@ -146,6 +147,14 @@ export const createTripSchema = z
)
.optional()
),
vibe: z.preprocess(
(val) => {
if (val == null) return undefined;
const s = String(val).trim();
return s === "" ? undefined : s;
},
z.enum([...VIBES]).optional()
),
})
.superRefine((data, ctx) => {
const dep = tripStoredInstantFromYmd(data.date);