@@ -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