feat: add role fetching functionality to DetailUser component
This commit is contained in:
@@ -4,7 +4,14 @@ import { Modal, Form, Input, Select, Row, Col } from 'antd';
|
||||
const { TextArea } = Input;
|
||||
const { Option } = Select;
|
||||
|
||||
const DetailRole = memo(function DetailRole({ visible, onCancel, onOk, form, editingKey, readOnly }) {
|
||||
const DetailRole = memo(function DetailRole({
|
||||
visible,
|
||||
onCancel,
|
||||
onOk,
|
||||
form,
|
||||
editingKey,
|
||||
readOnly,
|
||||
}) {
|
||||
const getModalTitle = () => {
|
||||
if (readOnly) return 'Detail Role';
|
||||
if (editingKey) return 'Edit Role';
|
||||
@@ -22,12 +29,7 @@ const DetailRole = memo(function DetailRole({ visible, onCancel, onOk, form, edi
|
||||
width={600}
|
||||
cancelButtonProps={{ style: readOnly ? { display: 'none' } : {} }}
|
||||
>
|
||||
<Form
|
||||
form={form}
|
||||
layout="vertical"
|
||||
name="roleForm"
|
||||
disabled={readOnly}
|
||||
>
|
||||
<Form form={form} layout="vertical" name="roleForm" disabled={readOnly}>
|
||||
<Row gutter={16}>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
@@ -61,6 +63,7 @@ const DetailRole = memo(function DetailRole({ visible, onCancel, onOk, form, edi
|
||||
<Option value={1}>Level 1</Option>
|
||||
<Option value={2}>Level 2</Option>
|
||||
<Option value={3}>Level 3</Option>
|
||||
<Option value={4}>Level 4</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
||||
Reference in New Issue
Block a user