feat(webui): enforce reviewer role restrictions in the UI

This commit is contained in:
yiling
2026-06-07 09:51:33 +08:00
parent 9370c6b255
commit d06b523dc7
15 changed files with 449 additions and 303 deletions
+13 -11
View File
@@ -52,7 +52,7 @@ function SortableFieldItem({ field, index, onVisibilityChange }: SortableFieldIt
type FieldsManagerProps = {
projectId: string
onManageFields: () => void
onManageFields?: () => void
onSave?: () => void
}
@@ -288,16 +288,18 @@ export function FieldsManager({ projectId, onManageFields, onSave }: FieldsManag
</DragDropProvider>
</div>
<div className="mt-4 space-y-2">
<Button variant="secondary" className="w-full" onClick={onManageFields}>
<Settings className="h-4 w-4 mr-2" />
Manage Fields
</Button>
<Button className="w-full" onClick={() => setView('create')}>
<Plus className="h-4 w-4 mr-2" />
New Field
</Button>
</div>
{onManageFields && (
<div className="mt-4 space-y-2">
<Button variant="secondary" className="w-full" onClick={onManageFields}>
<Settings className="h-4 w-4 mr-2" />
Manage Fields
</Button>
<Button className="w-full" onClick={() => setView('create')}>
<Plus className="h-4 w-4 mr-2" />
New Field
</Button>
</div>
)}
</div>
)
}