task-l
This commit is contained in:
@@ -52,7 +52,8 @@ const businessRoleOptions = [
|
||||
{ value: 'sales', label: 'Sales' },
|
||||
{ value: 'sales_support', label: 'Sales Support' },
|
||||
{ value: 'department_manager', label: 'Department Manager' },
|
||||
{ value: 'top_manager', label: 'Top Manager' }
|
||||
{ value: 'top_manager', label: 'Top Manager' },
|
||||
{ value: 'crm_admin', label: 'CRM Admin' }
|
||||
] as const;
|
||||
|
||||
export function UserFormSheet({ user, open, onOpenChange }: UserFormSheetProps) {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
import { BUSINESS_ROLES } from '@/lib/auth/rbac';
|
||||
|
||||
export const userSchema = z.object({
|
||||
name: z.string().min(2, 'Name must be at least 2 characters'),
|
||||
email: z.string().email('Please enter a valid email'),
|
||||
@@ -11,7 +9,7 @@ export const userSchema = z.object({
|
||||
z.object({
|
||||
organizationId: z.string().min(1),
|
||||
membershipRole: z.enum(['admin', 'user']),
|
||||
businessRole: z.enum(BUSINESS_ROLES)
|
||||
businessRole: z.string().min(1)
|
||||
})
|
||||
)
|
||||
.min(1, 'Select at least one organization')
|
||||
|
||||
Reference in New Issue
Block a user