|
|
@ -21,7 +21,6 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi |
|
|
|
const { t } = useTranslation() |
|
|
|
const { t } = useTranslation() |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
console.log('dataEdit', dataEdit); |
|
|
|
|
|
|
|
if (typeDialog === "Edit") { |
|
|
|
if (typeDialog === "Edit") { |
|
|
|
setId(dataEdit.id) |
|
|
|
setId(dataEdit.id) |
|
|
|
setCode(dataEdit.code) |
|
|
|
setCode(dataEdit.code) |
|
|
@ -54,7 +53,6 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi |
|
|
|
type, |
|
|
|
type, |
|
|
|
allocation |
|
|
|
allocation |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('data', data); |
|
|
|
|
|
|
|
closeDialog('save', data); |
|
|
|
closeDialog('save', data); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
data = { |
|
|
|
data = { |
|
|
@ -66,7 +64,6 @@ const DialogForm = ({ openDialog, closeDialog, toggleDialog, typeDialog, dataEdi |
|
|
|
type, |
|
|
|
type, |
|
|
|
allocation |
|
|
|
allocation |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('data', data); |
|
|
|
|
|
|
|
closeDialog('edit', data); |
|
|
|
closeDialog('edit', data); |
|
|
|
} |
|
|
|
} |
|
|
|
handleClear() |
|
|
|
handleClear() |
|
|
|