implement logic to select compared levels based on membershipLevel
This commit is contained in:
@@ -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(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user