updated a project status in numbers on projectCard.
This commit is contained in:
parent
05a3b13a0e
commit
308ac5af48
@ -32,6 +32,9 @@ const ProjectCard = ({ projectData }) => {
|
|||||||
const getProgress = (planned, completed) => {
|
const getProgress = (planned, completed) => {
|
||||||
return (completed * 100) / planned + "%";
|
return (completed * 100) / planned + "%";
|
||||||
};
|
};
|
||||||
|
const getProgressInNumber = (planned, completed) => {
|
||||||
|
return (completed * 100) / planned ;
|
||||||
|
};
|
||||||
|
|
||||||
const handleClose = () => setShowModal( false );
|
const handleClose = () => setShowModal( false );
|
||||||
|
|
||||||
@ -233,8 +236,8 @@ const ProjectCard = ({ projectData }) => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="d-flex justify-content-between align-items-center mb-2">
|
<div className="d-flex justify-content-between align-items-center mb-2">
|
||||||
<small className="text-body">Task: 290/344</small>
|
<small className="text-body">Task: {projectInfo.completedWork} / { projectInfo.plannedWork}</small>
|
||||||
<small className="text-body">95% Completed</small>
|
<small className="text-body">{Math.floor(getProgressInNumber(projectInfo.plannedWork,projectInfo.completedWork)) || 0} % Completed</small>
|
||||||
</div>
|
</div>
|
||||||
<div className="progress mb-4 rounded" style={{ height: "8px" }}>
|
<div className="progress mb-4 rounded" style={{ height: "8px" }}>
|
||||||
<div
|
<div
|
||||||
|
Loading…
x
Reference in New Issue
Block a user