Skip to content

Commit bf735eb

Browse files
author
vikasrohit
authored
Merge pull request #1325 from appirio-tech/feature/project-listing-updates#1268
Feature/project listing updates#1268
2 parents ec994e1 + f97d482 commit bf735eb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/projects/list/components/Projects/ProjectCardBody.jsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ function ProjectCardBody({ project, duration, currentMemberRole, descLinesCount
1717
const canEdit = isManager || (currentMemberRole
1818
&& (_.indexOf([PROJECT_ROLE_COPILOT], currentMemberRole) > -1))
1919

20+
const progress = _.get(process, 'percent', 0)
21+
2022
return (
2123
<div className="project-card-body">
2224
<TextTruncate
@@ -27,7 +29,7 @@ function ProjectCardBody({ project, duration, currentMemberRole, descLinesCount
2729
textTruncateChild={<span><Link className="read-more-link" to={`/projects/${project.id}/specification`}> read more </Link></span>}
2830
/>
2931
<div className="project-status">
30-
{(duration && duration.percent === 0) &&
32+
{(project.status !== PROJECT_STATUS_ACTIVE || progress === 0) &&
3133
<EnhancedProjectStatus
3234
status={project.status}
3335
showText
@@ -38,9 +40,9 @@ function ProjectCardBody({ project, duration, currentMemberRole, descLinesCount
3840
onChangeStatus={onChangeStatus}
3941
/>
4042
}
41-
{(project.status === PROJECT_STATUS_ACTIVE && duration && duration.percent !== 0) &&
42-
<ProjectProgress {...duration} viewType={ProjectProgress.ViewTypes.CIRCLE} percent={46}>
43-
<span className="progress-text">{duration.percent}% completed</span>
43+
{(project.status === PROJECT_STATUS_ACTIVE && progress !== 0) &&
44+
<ProjectProgress {...duration} viewType={ProjectProgress.ViewTypes.CIRCLE} percent={progress}>
45+
<span className="progress-text">{progress}% completed</span>
4446
</ProjectProgress>
4547
}
4648
</div>

0 commit comments

Comments
 (0)