|
|
@ -16,6 +16,7 @@ import { useTranslation } from 'react-i18next'; |
|
|
|
import { async } from '@dabeng/react-orgchart'; |
|
|
|
import { async } from '@dabeng/react-orgchart'; |
|
|
|
import { Link } from 'react-router-dom'; |
|
|
|
import { Link } from 'react-router-dom'; |
|
|
|
import { use } from 'i18next'; |
|
|
|
import { use } from 'i18next'; |
|
|
|
|
|
|
|
import _ from 'lodash'; |
|
|
|
const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName }) => { |
|
|
|
const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName }) => { |
|
|
|
const token = localStorage.getItem("token") |
|
|
|
const token = localStorage.getItem("token") |
|
|
|
const HEADER = { |
|
|
|
const HEADER = { |
|
|
@ -154,7 +155,8 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek |
|
|
|
.catch((error) => error.response); |
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
|
|
if (result && result.status == 200) { |
|
|
|
if (result && result.status == 200) { |
|
|
|
setDataHierarchy(result.data.data); |
|
|
|
const sortedData = _.orderBy(result.data.data, ['name'], ['asc']); |
|
|
|
|
|
|
|
setDataHierarchy(sortedData); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
NotificationManager.error(`Data gantt project gagal terload silahkan coba lagi!`, 'Failed!!'); |
|
|
|
NotificationManager.error(`Data gantt project gagal terload silahkan coba lagi!`, 'Failed!!'); |
|
|
|
} |
|
|
|
} |
|
|
|