feat(task): task detail
This commit is contained in:
@@ -8,9 +8,9 @@ export default function AdminUserModal(props: {
|
||||
opened: boolean
|
||||
value: number[]
|
||||
options: Array<{ label: string; value: string }>
|
||||
onClose: (next?: number[]) => void
|
||||
onCloseAction: (next?: number[]) => void
|
||||
}) {
|
||||
const { opened, value, options, onClose } = props
|
||||
const { opened, value, options, onCloseAction } = props
|
||||
|
||||
const form = useForm({
|
||||
initialValues: { users: value.map(String) },
|
||||
@@ -25,7 +25,7 @@ export default function AdminUserModal(props: {
|
||||
return (
|
||||
<Modal
|
||||
opened={opened}
|
||||
onClose={() => onClose()}
|
||||
onClose={() => onCloseAction()}
|
||||
title="编辑项目管理员"
|
||||
centered
|
||||
size={560}>
|
||||
@@ -34,7 +34,7 @@ export default function AdminUserModal(props: {
|
||||
const next = values.users
|
||||
.map((v) => Number(v))
|
||||
.filter((v) => Number.isFinite(v))
|
||||
onClose(next)
|
||||
onCloseAction(next)
|
||||
})}>
|
||||
<Stack gap="sm">
|
||||
<MultiSelect
|
||||
@@ -46,7 +46,7 @@ export default function AdminUserModal(props: {
|
||||
onChange={(v) => form.setFieldValue("users", v)}
|
||||
/>
|
||||
<Group justify="flex-end" gap="sm">
|
||||
<Button variant="default" onClick={() => onClose()}>
|
||||
<Button variant="default" onClick={() => onCloseAction()}>
|
||||
取消
|
||||
</Button>
|
||||
<Button type="submit">保存</Button>
|
||||
|
||||
Reference in New Issue
Block a user