import React, { useState } from "react"; import { CostBreakDownIcon, LightBulpIcon, ROISummaryIcon, ROISummaryProductName, SonarCrownIcon, } from "../../icons/analysis"; import SemiCircleProgress from "./SemiCircleProgress"; import { ArrowIcon } from "../../icons/ExportCommonIcons"; const ROISummary = ({ roiSummaryData = { productName: "Product name", roiPercentage: 133, paybackPeriod: 50.3, totalCost: "₹ 1,20,000", revenueGenerated: "₹ 2,80,000", netProfit: "₹ 1,60,000", costBreakdown: [ { item: "Raw Material A", unitCost: "₹ 10/unit", laborCost: "₹ 0", totalCost: "₹ 1000", sellingPrice: "₹ 1500", }, { item: "Labor", unitCost: "₹ 10/unit", laborCost: "₹ 500", totalCost: "₹ 500", sellingPrice: "N/A", }, { item: "Product 1", unitCost: "₹ 10/unit", laborCost: "₹ 200", totalCost: "₹ 200", sellingPrice: "₹ 2000", }, { item: "Machine", unitCost: "-", laborCost: "-", totalCost: "₹ 20,000", sellingPrice: "N/A", }, { item: "Total", unitCost: "-", laborCost: "-", totalCost: "₹ 1,20,000", sellingPrice: "-", }, { item: "Net Profit", unitCost: "-", laborCost: "-", totalCost: "₹ 1,60,000", sellingPrice: "-", }, ], }, }) => { const [isTableOpen, setIsTableOpen] = useState(false); // State to handle the table open/close // Function to toggle the breakdown table visibility const toggleTable = () => { setIsTableOpen(!isTableOpen); }; return (
Item | Unit Cost | Labor Cost | Total Cost | Selling Price |
---|---|---|---|---|
{row.item} | {row.unitCost} | {row.laborCost} | {row.totalCost} | {row.sellingPrice} |