|
|
|
@ -1,6 +1,10 @@ |
|
|
|
import { useState, useEffect } from "react"; |
|
|
|
|
|
|
|
import { Table } from 'antd'; |
|
|
|
import { |
|
|
|
DeleteOutlined, |
|
|
|
} from '@ant-design/icons'; |
|
|
|
|
|
|
|
import { Button, Table } from 'antd'; |
|
|
|
|
|
|
|
import _service from '@netuno/service-client'; |
|
|
|
|
|
|
|
@ -19,6 +23,11 @@ const medicosColumns = [ |
|
|
|
title: 'CRM', |
|
|
|
dataIndex: 'crm', |
|
|
|
key: 'crm', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: 'Delete', |
|
|
|
dataIndex: 'delete', |
|
|
|
key: 'delete', |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
@ -34,6 +43,12 @@ function ListaMedicos() { |
|
|
|
_service({ |
|
|
|
url: "/services/medicos", |
|
|
|
success: (response) => { |
|
|
|
response.json.map(item => item.delete = |
|
|
|
<Button |
|
|
|
type="text" |
|
|
|
icon={<DeleteOutlined />} |
|
|
|
/> |
|
|
|
); |
|
|
|
setMedicos(response.json); |
|
|
|
}, |
|
|
|
fail: (e) => { |
|
|
|
|