|
|
|
@ -7,7 +7,7 @@ import 'antd/dist/antd.css';
|
|
|
|
|
import { useTranslation } from 'react-i18next'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdit }) => { |
|
|
|
|
const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdit, company_id }) => { |
|
|
|
|
const [id, setId] = useState(0) |
|
|
|
|
const [name, setName] = useState('') |
|
|
|
|
const [description, setDescription] = useState('') |
|
|
|
@ -31,7 +31,8 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
|
|
|
|
|
if (typeDialog === "Save") { |
|
|
|
|
data = { |
|
|
|
|
name: name, |
|
|
|
|
description |
|
|
|
|
description, |
|
|
|
|
company_id |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
closeDialog('save', data); |
|
|
|
@ -39,7 +40,8 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
|
|
|
|
|
data = { |
|
|
|
|
id, |
|
|
|
|
name: name, |
|
|
|
|
description |
|
|
|
|
description, |
|
|
|
|
company_id |
|
|
|
|
} |
|
|
|
|
closeDialog('edit', data); |
|
|
|
|
} |
|
|
|
|