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