{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
{lot_al}
Across all statuses
{/* Analytics Card (Rows written style) */}
{/*
*/}
{/* Card Last News (taille standard card) */}
Forex
d.value)) * 0.99}
maxValue={Math.max(...data.map(d => d.value)) * 1.01}
/>
{/* {cards.map((card) => {
const Icon = card.icon;
const bar_data = [
{ label: "Invoiced", invoiced: card.amountInvoiced },
{ label: "30 days", pay30: card.amount30Days },
{ label: "60 days", pay60: card.amount60Days },
];
return (
{card.title}
{card.value}
{card.trend}
);
})} */}
Purchase Invoices
Sale Invoices
Payments
{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 / lot_al) * 100).toFixed(1)}%)
))}
Rows written
-3.9%
83,197
from 86,580
16/04/2024
16/05/2024
{news.map((n, idx) => {
return (
{/* SEPARATOR */}
openInTryton("currency.currency", 2, ["form"])}
>
);
})}
{/* LIGNE PRINCIPALE */}
{/* PAIRE */}
{n.pair}
{/* VALEUR */}
{n.value?.toFixed(4)}
{/* DATE */}
{n.date}
{/* BADGE CENTRÉ */}
{n.trendValue !== null && (
= 0
? "bg-green-50 text-green-700 border-green-200 dark:bg-green-900/30 dark:text-green-400 dark:border-green-800"
: "bg-red-50 text-red-700 border-red-200 dark:bg-red-900/30 dark:text-red-400 dark:border-red-800"
}
`}
>
{n.trendValue >= 0 ? "+" : ""}
{n.trendValue.toFixed(2)}%
)}
{/* TO VALIDATE */}
{/* POSTED */}