* wip attribut weights * edit sheet and display in table * add shrink so badges dont split * push changes to support weights on csv export * fix typing issue * type error * fall back to 100 weight --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
17 lines
453 B
TypeScript
17 lines
453 B
TypeScript
import { z } from "zod";
|
|
|
|
const attributeSchema = z.object({
|
|
id: z.string(),
|
|
options: z
|
|
.array(z.object({ label: z.string().optional(), value: z.string(), weight: z.number().optional() }))
|
|
.optional(),
|
|
value: z.string().optional(),
|
|
});
|
|
|
|
export const assignUserToAttributeSchema = z.object({
|
|
userId: z.number(),
|
|
attributes: attributeSchema.array(),
|
|
});
|
|
|
|
export type ZAssignUserToAttribute = z.infer<typeof assignUserToAttributeSchema>;
|