implement logic to select compared levels based on membershipLevel

This commit is contained in:
Arvid Norlin
2024-06-05 15:28:51 +02:00
parent 79af3dba65
commit 24810eaee6
8 changed files with 125 additions and 48 deletions

View File

@@ -1,5 +1,7 @@
import { z } from "zod"
import { membershipLevels } from "@/constants/membershipLevels"
import { countriesMap } from "@/components/TempDesignSystem/Form/Country/countries"
export const getUserSchema = z.object({
@@ -14,14 +16,16 @@ export const getUserSchema = z.object({
firstName: z.string(),
language: z.string(),
lastName: z.string(),
membership: z
.object({
memberships: z.array(
z.object({
currentPoints: z.number(),
expirationDate: z.string(),
membershipNumber: z.string(),
membershipLevel: z.enum(["L1", "L2", "L3", "L4", "L5", "L6", "L7"]),
memberSince: z.string(),
membershipType: z.string(),
})
.optional(),
),
phoneNumber: z.string(),
profileId: z.string(),
})