|
|
|
@ -10,7 +10,7 @@ import InputColor from "./InputColor";
|
|
|
|
|
import "./styles.css"; |
|
|
|
|
import "rc-color-picker/assets/index.css"; |
|
|
|
|
const { Option } = Select |
|
|
|
|
const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdit, dataDivisions }) => { |
|
|
|
|
const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdit, dataDivisions, company_id }) => { |
|
|
|
|
const [id, setId] = useState(0) |
|
|
|
|
const [name, setName] = useState('') |
|
|
|
|
const [parent, setParent] = useState(null) |
|
|
|
@ -51,7 +51,8 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
|
|
|
|
|
name, |
|
|
|
|
description, |
|
|
|
|
parent, |
|
|
|
|
color |
|
|
|
|
color, |
|
|
|
|
company_id |
|
|
|
|
} |
|
|
|
|
closeDialog('save', data); |
|
|
|
|
} else { |
|
|
|
@ -60,7 +61,8 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi
|
|
|
|
|
name, |
|
|
|
|
description, |
|
|
|
|
parent, |
|
|
|
|
color |
|
|
|
|
color, |
|
|
|
|
company_id |
|
|
|
|
} |
|
|
|
|
closeDialog('edit', data); |
|
|
|
|
} |
|
|
|
|