|  |  |  | 
|---|
|  |  |  | const [drawerVal, setDrawerVal] = useState(false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const CreateTaskButton = () => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  | const refresh = useRefresh(); | 
|---|
|  |  |  | const { selectedIds, onUnselectItems, data } = useListContext(); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const CreateTaskRowButton = () => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const refresh = useRefresh(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const createTask = (event) => { | 
|---|
|  |  |  | 
|---|
|  |  |  | setSource([record]) | 
|---|
|  |  |  | refresh() | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | <Button onClick={(event) => createTask(event)} label={"toolbar.createTask"}> | 
|---|
|  |  |  | 
|---|
|  |  |  | <CreateTaskButton /> | 
|---|
|  |  |  | {/* <BulkDeleteButton mutationMode={OPERATE_MODE} /> */} | 
|---|
|  |  |  | </>} | 
|---|
|  |  |  | rowClick='edit' | 
|---|
|  |  |  | rowClick={false} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo']} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <NumberField source="id" /> | 
|---|