{kpis.map((kpi) => {
const Icon = kpi.icon;
const isPositive = kpi.trendValue >= 0;
return (
{kpi.title}
{kpi.value}
);
})}
{isPositive ? "+" : ""}
{kpi.trendValue}%
vs last month
{/* Purchase */}
Purchases
{total_p}
Across all statuses
{/* Sale */}
Sales
{total_s}
Across all statuses
{/* Shipment */}
Shipments
{total_sh}
Across all statuses
{/* Lot */}
Lots
{total_l}
Across all statuses
{/* Analytics Card (Rows written style) */}
{/*
*/}
{/* Card Last News (taille standard card) */}
Curve
{/* Cards KPI */}
{cards.map((card) => {
const Icon = card.icon;
const bar_data = [
{ label: "Invoiced", value: card.amountInvoiced },
{ label: "30 days", value: card.amount30Days },
{ label: "60 days", value: card.amount60Days },
];
return (
{card.title}
{card.value}
{card.trend}
{/* */}
);
})}
{purchaseData.map((item, i) => (
))}
{purchaseData.map((item) => (
{item.status}
({item.count} / {((item.count / total_p) * 100).toFixed(1)}%)
))}
{saleData.map((item, i) => (
))}
{saleData.map((item) => (
{item.status}
({item.count} / {((item.count / total_s) * 100).toFixed(1)}%)
))}
{shipmentData.map((item, i) => (
))}
{shipmentData.map((item) => (
{item.status}
({item.count} / {((item.count / total_sh) * 100).toFixed(1)}%)
))}
{lotData.map((item, i) => (
))}
{lotData.map((item) => (
{item.status}
({item.count} / {((item.count / total_l) * 100).toFixed(1)}%)
))}
Rows written
-3.9%
83,197
from 86,580
16/04/2024
16/05/2024
{news.map((n, idx) => {
return (
);
})}
{n.type}
{n.label}
{n.trend && (
{n.trend}
)}
{n.date}