Browse Source

update dashboard customer

pull/1/head
wahyuun 1 year ago
parent
commit
dbe80c5523
  1. 12
      src/views/SimproV2/CreatedProyek/index.js

12
src/views/SimproV2/CreatedProyek/index.js

@ -266,8 +266,8 @@ const CreatedProyek = ({ params, ...props }) => {
}
};
const handleDashboard = async (text) => {
const URL = `${BASE_OSPRO}/api/project/detail/${text.id}`;
const handleDashboard = async (id) => {
const URL = `${BASE_OSPRO}/api/project/detail/${id}`;
const result = await axios
.get(URL, HEADER)
.then((res) => res)
@ -285,7 +285,7 @@ const CreatedProyek = ({ params, ...props }) => {
return;
} else if (result.status == 200 && result.data.data) {
history.push(
`dashboard-customer/${text.id}/${result.data.gantt}/1`
`/dashboard-customer/${id}/${result.data.gantt}/1`
);
}
};
@ -596,6 +596,10 @@ const CreatedProyek = ({ params, ...props }) => {
getProjectDetail(data.id);
};
const handleDashboardCustomer = async (data) => {
handleDashboard(data.id);
};
const handleOpenReport = async (data) => {
setOpenDialogRA(true);
setProjectId(data.id);
@ -1615,7 +1619,7 @@ const CreatedProyek = ({ params, ...props }) => {
<Tooltip title="Dashboard Project">
<Button
size="small"
onClick={() => handleDashboard(text)}
onClick={() => handleDashboardCustomer(text)}
type="link"
style={{ color: "green" }}
>

Loading…
Cancel
Save