- you're on track to hit it by
-
July 2029
+
+
+
+
+ {roiSummary.roiPercentage}% ROI with payback
+ in just {roiSummary.paybackPeriod} months
-
-
-
-
Total Cost Incurred
-
- ₹
- {roiSummary.totalCost}
-
+
+
+
+
+ you're on track to hit it by
+
July 2029
-
- Revenue Generated
-
- ₹
+
+
+
+
+ Total Cost Incurred
+
+ ₹
+ {roiSummary.totalCost}
+
+
+
+ Revenue Generated
+
+ ₹
- {roiSummary.revenueGenerated}
-
+ {roiSummary.revenueGenerated}
+
+
+
0 ? "profit" : "loss"}`}
+ >
+
+ ↑
+ Net Profit
+
+
+ ₹
+ {roiSummary.netProfit > 0
+ ? roiSummary.netProfit
+ : roiSummary.netLoss}
+
+
+
+
+
+
+
+
+ Cost Breakdown
+
+
+
+
+
0 ? "profit" : "loss"}`}
+ className={`breakdown-table-wrapper ${isTableOpen ? "open" : "closed"
+ }`}
+ style={{
+ transition: "max-height 0.3s ease-in-out",
+ overflow: "hidden",
+ }}
>
-
- ↑
- Net Profit
-
-
- ₹
- {roiSummary.netProfit > 0
- ? roiSummary.netProfit
- : roiSummary.netLoss}
-
-
-
-
-
-
-
-
- Cost Breakdown
-
-
-
-
-
-
-
-
-
-
- Item |
- Unit Cost |
- Labor Cost |
- Total Cost |
- Selling Price |
-
-
-
- {roiSummaryData.costBreakdown.map((row, index) => (
-
- {row.item} |
- {row.unitCost} |
- {row.laborCost} |
- {row.totalCost} |
- {row.sellingPrice} |
+
+
+
+ Item |
+ Unit Cost |
+ Labor Cost |
+ Total Cost |
+ Selling Price |
- ))}
-
-
+
+
+ {roiSummaryData.costBreakdown.map((row, index) => (
+
+ {row.item} |
+ {row.unitCost} |
+ {row.laborCost} |
+ {row.totalCost} |
+ {row.sellingPrice} |
+
+ ))}
+
+
+
-
- {/*
+ {/*
@@ -232,13 +239,14 @@ const ROISummary = ({
Get ROI Boost Tips
*/}
- >
- ) : (
-
- //
No Data
- )}
-
-
+ >
+ ) : (
+
+ //
No Data
+ )}
+
+
}
+ >
);
};
diff --git a/app/src/components/ui/analysis/ThroughputSummary.tsx b/app/src/components/ui/analysis/ThroughputSummary.tsx
index bf570f9..254efd3 100644
--- a/app/src/components/ui/analysis/ThroughputSummary.tsx
+++ b/app/src/components/ui/analysis/ThroughputSummary.tsx
@@ -30,72 +30,73 @@ const ProductionCapacity = ({
const [isLoading, setIsLoading] = useState(false);
useEffect(() => {
- if (throughputData >= 0) {
- // console.log('machineActiveTime: ', machineActiveTime);
- // console.log('materialCycleTime: ', materialCycleTime);
- // console.log('throughputData: ', throughputData);
- // console.log('productionCapacityData: ', productionCapacityData);
+ console.log('throughputData: ', throughputData > 0);
+ if (throughputData > 0) {
+ setIsLoading(false);
+ } else {
setIsLoading(true);
}
}, [throughputData])
return (
-
-
-
-
-
Throughput Summary
-
- {timeRange.startTime} - {timeRange.endTime}
+ <>
+ {!isLoading &&
+
+
+
+
Throughput Summary
+
+ {timeRange.startTime} - {timeRange.endTime}
+
+
+
+
-
-
-
+ {!isLoading ? (
+ <>
+
+
+ {throughputData} Units/hour
+
+
+
+ {/* Dynamic Progress Bar */}
+
+ {[...Array(totalBars)].map((_, i) => (
+
+ {i < barsToFill ? (
+
+ ) : i === barsToFill ? (
+
+ ) : null}
+
+ ))}
+
+
+
+
+
+ Avg. Process Time
+ {materialCycleTime} secs/unit
+
+
+ Machine Utilization
+ {machineActiveTime}
+ {/* {machineActiveTime} */}
+
+
+ >
+ ) : (
+
+ )}
- {isLoading ? (
- <>
-
-
- {throughputData} Units/hour
-
-
-
- {/* Dynamic Progress Bar */}
-
- {[...Array(totalBars)].map((_, i) => (
-
- {i < barsToFill ? (
-
- ) : i === barsToFill ? (
-
- ) : null}
-
- ))}
-
-
-
-
-
- Avg. Process Time
- {materialCycleTime} secs/unit
-
-
- Machine Utilization
- {machineActiveTime}
- {/* {machineActiveTime} */}
-
-
- >
- ) : (
-
- )}
-
-
+
}
+ >
);
};