diff --git a/src/components/reports/Progress.jsx b/src/components/reports/Progress.jsx index 89d1dfca..3625ff19 100644 --- a/src/components/reports/Progress.jsx +++ b/src/components/reports/Progress.jsx @@ -8,7 +8,7 @@ const Progress = ({ total = 0, height = 100, width = 100, - completed =0, + completed = 0, }) => { const options = { chart: { @@ -24,16 +24,19 @@ const Progress = ({ value: { show: true, fontSize: "13px", - width:"12px", - textWrap:"wrap", + width: "12px", + textWrap: "wrap", color: color, fontWeight: 400, offsetY: 7, - formatter: () => `${formatFigure(completed,{notation:"compact"})} / ${formatFigure(total,{notation:"compact"})}`, + formatter: () => + `${formatFigure(completed, { + notation: "compact", + })} / ${formatFigure(total, { notation: "compact" })}`, + }, + style: { + textWrap: "wrap", }, - style:{ - textWrap:"wrap", - } }, }, }, @@ -54,7 +57,6 @@ const Progress = ({ }; export default Progress; - // const Progress = ({ // completed = 0, // inProgress = 0, diff --git a/src/components/reports/ReportsDonutCard.jsx b/src/components/reports/ReportsDonutCard.jsx index 3565934a..a6d0dcdb 100644 --- a/src/components/reports/ReportsDonutCard.jsx +++ b/src/components/reports/ReportsDonutCard.jsx @@ -10,10 +10,10 @@ const ReportsDonutCard = ({ footer = "Team members present on the site", chartColor, legend1 = "Completed", - legend2 = "Pending" + legend2 = "Pending", }) => { return ( -
+

{title}

@@ -26,10 +26,7 @@ const ReportsDonutCard = ({ completed={value} total={total} /> - +
@@ -56,7 +53,6 @@ export const ReportsCard = ({
-
@@ -67,5 +63,3 @@ export const ReportsCard = ({
); }; - - diff --git a/src/components/reports/report-dpr.jsx b/src/components/reports/report-dpr.jsx index 24ae3a81..adcfc8cf 100644 --- a/src/components/reports/report-dpr.jsx +++ b/src/components/reports/report-dpr.jsx @@ -4,6 +4,7 @@ import Progress from "./Progress"; import { formatUTCToLocalTime } from "../../utils/dateUtils"; import { localToUtc } from "../../utils/appUtils"; import ReportsDonutCard, { ReportsCard } from "./ReportsDonutCard"; +import { SpinnerLoader } from "../common/Loader"; const ReportDPR = ({ project, date }) => { const { data, isLoading, isError, error } = useProjectReportByProject( @@ -12,94 +13,117 @@ const ReportDPR = ({ project, date }) => { ); return ( <> -
+
Project Status Reported - Generated at{" "} {formatUTCToLocalTime(data?.date, true)}
{/*