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