## What does this PR do? Loom: https://www.loom.com/share/361ca6ca9b5748079cba59ed2f348d90 Not all items on edit from update the user. This is very temp page to help Milos How to test: Login as admin user settings > admin > users search - see filtered users scroll to bottom of list - notice we refetch before you hit the bottom so you dont notice items loading delete user -> user is deleted and removed from list (radix bug in main causes dialog to freeze refresh to make this go away) edit user -> Edit users email/username/identityprovider. Not all items on this update work just yet. These will be picked up when we come to implement the proper user table.
14 lines
436 B
TypeScript
14 lines
436 B
TypeScript
import { z } from "zod";
|
|
|
|
import { optionToValueSchema } from "@calcom/prisma/zod-utils";
|
|
|
|
export const userBodySchema = z
|
|
.object({
|
|
locale: optionToValueSchema(z.string()),
|
|
role: optionToValueSchema(z.enum(["USER", "ADMIN"])),
|
|
weekStart: optionToValueSchema(z.string()),
|
|
timeFormat: optionToValueSchema(z.number()),
|
|
identityProvider: optionToValueSchema(z.enum(["CAL", "GOOGLE", "SAML"])),
|
|
})
|
|
.passthrough();
|