|
|
|
@ -72,8 +72,10 @@ const ProjectType = ({ params }) => {
|
|
|
|
|
|
|
|
|
|
if (listDivions && listDivions.data && listDivions.data.code == 200) { |
|
|
|
|
let arr = [] |
|
|
|
|
for (const v in listDivions.data.data) { |
|
|
|
|
arr.push(listDivions.data.data[v]) |
|
|
|
|
let dataRes = listDivions.data.data; |
|
|
|
|
const filteredData = dataRes.filter(item => item.parent === null); |
|
|
|
|
for (const v in filteredData) { |
|
|
|
|
arr.push(filteredData[v]) |
|
|
|
|
} |
|
|
|
|
setDataDivisions(arr); |
|
|
|
|
} else { |
|
|
|
@ -183,7 +185,8 @@ const ProjectType = ({ params }) => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleOpenDialog = (type) => { |
|
|
|
|
setOpenDialog(true) |
|
|
|
|
setOpenDialog(true) |
|
|
|
|
getListDivision(); |
|
|
|
|
setTypeDialog(type) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|