v3-ui #99

Merged
Vishnu merged 28 commits from v3-ui into main 2025-06-12 04:27:40 +00:00
2 changed files with 8 additions and 8 deletions
Showing only changes of commit a316413e23 - Show all commits

View File

@ -91,13 +91,13 @@ const ThroughputSummary: React.FC = () => {
const [isLoading, setIsLoading] = useState(true);
useEffect(() => {
// console.log('productionCapacityData > 0: ', productionCapacityData > 0);
//
if (productionCapacityData > 0) {
setTimeout(() => {
setIsLoading(false);
}, 3000)
console.log("productionCapacityData: ", productionCapacityData);
} else {
setIsLoading(true);
}

View File

@ -92,7 +92,7 @@ export default function ThroughPutData() {
totalItems += sequence.length;
});
console.log(totalActiveTime);
setMachineCount(totalItems);
setMachineActiveTime(totalActiveTime);
let arr = process.map((item: any) => ({
@ -161,7 +161,7 @@ export default function ThroughPutData() {
const allInactive = !anyArmActive && !anyVehicleActive && !anyMachineActive;
if (allInactive && materials.length === 0 && materialHistory.length > 0) {
console.log("inside allInactive condition");
let totalCycleTimeSum = 0;
let cycleCount = 0;
@ -190,14 +190,14 @@ export default function ThroughPutData() {
useEffect(() => {
if (machineActiveTime > 0 && materialCycleTime > 0 && machineCount > 0) {
console.log('machineActiveTime: ', machineActiveTime);
console.log('materialCycleTime: ', materialCycleTime);
console.log('machineCount: ', machineCount);
const utilization = machineActiveTime / 3600; // Active time per hour
const unitsPerMachinePerHour = 3600 / materialCycleTime;
const throughput = unitsPerMachinePerHour * machineCount * utilization;
setThroughputData(Number(throughput.toFixed(2))); // Keep as number
// console.log('throughput ', Number(throughput.toFixed(2)));
//
}
}, [machineActiveTime, materialCycleTime, machineCount]);