setAnimating(true)}
@@ -360,22 +1047,8 @@ const DashboardProject = (args) => {
Project
- {isReadyProjectDetail &&
- isReadyGantt ? (
- (() => {
- let parentNames = "";
- if (item.hierarchy.length > 0)
- {
- for ( let i = item.hierarchy.length - 1; i >= 0; i--) {
- parentNames += " - ";
- parentNames += item.hierarchy[i].name;
- }
- }
- return item.project.nama +
- parentNames +
- " - " +
- version_gantt
- })()
+ {item.project ? (
+ item.project.nama + "-" + item.project.gantt.name_version
) : (
)}
@@ -424,7 +1097,7 @@ const DashboardProject = (args) => {
Project Manager
- {isReadyProjectDetail ? (
+ {item.project_manager ? (
item.project_manager
) : (
@@ -471,7 +1144,7 @@ const DashboardProject = (args) => {
Customer
- {isReadyProjectDetail ? (
+ {item.project ? (
item.project.company
) : (
@@ -527,12 +1200,8 @@ const DashboardProject = (args) => {
Planned Start
- {isReadyProjectDetail ? (
- item.activity.planned_start ? (
- moment(item.activity.planned_start).format("D MMMM YYYY")
- ) : (
- "-"
- )
+ {item.activity ? (
+ item.activity.planned_start
) : (
)}
@@ -550,12 +1219,8 @@ const DashboardProject = (args) => {
Actual Start
- {isReadyProjectDetail ? (
- item.activity.start_date ? (
- moment(item.activity.start_date).format("D MMMM YYYY")
- ) : (
- "-"
- )
+ {item.activity ? (
+ item.activity.start_date
) : (
)}
@@ -573,12 +1238,8 @@ const DashboardProject = (args) => {
Planned Finish
- {isReadyProjectDetail ? (
- item.activity.planned_end ? (
- moment(item.activity.planned_end).format("D MMMM YYYY")
- ) : (
- "-"
- )
+ {item.activity ? (
+ item.activity.planned_end
) : (
)}
@@ -596,12 +1257,8 @@ const DashboardProject = (args) => {
Estimated Finish
- {isReadyProjectDetail ? (
- item.activity.end_date ? (
- moment(item.activity.end_date).format("D MMMM YYYY")
- ) : (
- "-"
- )
+ {item.activity ? (
+ item.activity.end_date
) : (
)}
@@ -705,22 +1362,22 @@ const DashboardProject = (args) => {
>
Progress
- {isReadySCurve ? (
+ {item.activity ? (
100 ? 100 : SetplanningProgress}
+ progress={item.activity.planning > 100 ? 100 : item.activity.planning}
/>
) : (
)}
- {isReadySCurve ? (
+ {item.activity ? (
100 || SetactualProgress > 100
+ item.activity.planning > 100 || item.activity.actual > 100
? parseFloat(
- (SetactualProgress / SetplanningProgress) * 100
+ (item.activity.actual / item.activity.planning) * 100
).toFixed(0)
- : SetactualProgress
+ : item.activity.actual
}
/>
) : (
@@ -739,11 +1396,11 @@ const DashboardProject = (args) => {
marginRight: 2,
}}
>
- {isReadyOverdueActivities && (
+ {item.project.budget_health && (
)}
- {isReadySCurve && (
-
+ {item.project.schedule_health && (
+
)}
@@ -782,7 +1439,7 @@ const DashboardProject = (args) => {
marginRight: 2,
}}
>
- Assigned: {item.assigned && assignedList.length}
+ Assigned: {item.assigned}
@@ -856,74 +1513,50 @@ const DashboardProject = (args) => {
className="custom-scroll"
style={{ maxHeight: "37vh", overflow: "auto" }}
>
- {activeTabCommentIdx === 0 && (
-
- {isReadyOverdueActivities && item.overdueActivities != [] && item.overdueActivities.length > 0 ? (
- item.overdueActivities.map((overdueItem, idx) => {
- let end_date;
- let planned_end;
- let diffDays = 0;
- let message = "";
-
- if (overdueItem.end_date && overdueItem.end_date !== null) {
- end_date = moment(overdueItem.end_date);
- planned_end = moment(overdueItem.planned_end);
- diffDays = end_date.diff(planned_end, "days");
-
- if (isNaN(diffDays)) {
- return null;
- } else {
- if (diffDays > 0) {
- message = `Overdue by ${diffDays + 1} days`;
- } else {
- return null;
- }
- }
- }
-
- return
;
- })
- ) : (
-
- No overdue activity found.
-
- )}
-
+ {activeTabCommentIdx === 0 && (
+
+ No overdue activity found.
+
)}
- {activeTabCommentIdx === 1 &&(
-
- {item.project_comment && item.project_comment != [] ? (
- item.project_comment.map((commentItem, idx) => {
-
- return
- })
- ) : (
-
- No comments found.
-
- )}
-
+ {activeTabCommentIdx === 1 && (
+ <>
+
+
+ No comments found.
+
+ >
)}
@@ -950,7 +1583,7 @@ const DashboardProject = (args) => {
{...args}
>
diff --git a/src/views/SimproV2/CreatedProyek/DialogHierarchy.js b/src/views/SimproV2/CreatedProyek/DialogHierarchy.js
index feeedf9..2bb089d 100644
--- a/src/views/SimproV2/CreatedProyek/DialogHierarchy.js
+++ b/src/views/SimproV2/CreatedProyek/DialogHierarchy.js
@@ -47,7 +47,7 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
setLoading(true);
getdataHierarchy();
}
- }, [saveHierarchy, idTask, openDialog, closeDialog, openDialogFormGantt])
+ }, [idTask, openDialog, closeDialog, openDialogFormGantt])
useEffect(() => {
if (!openDialog) {