chore: build
This commit is contained in:
@@ -86,6 +86,8 @@ export interface ProductStat {
|
||||
quantity: number;
|
||||
order_count: number;
|
||||
revenue: number;
|
||||
category: string;
|
||||
category_color: string;
|
||||
}
|
||||
|
||||
export interface AdminStats {
|
||||
|
||||
@@ -402,7 +402,7 @@ export default function StatsScreen() {
|
||||
{sortedProducts.length === 0 ? (
|
||||
<Text style={styles.emptyText}>Aucune donnée produit</Text>
|
||||
) : (
|
||||
sortedProducts.map((p, i) => {
|
||||
sortedProducts.map((p) => {
|
||||
const val =
|
||||
prodSort === "orders" ? p.order_count
|
||||
: prodSort === "revenue" ? p.revenue
|
||||
@@ -411,18 +411,13 @@ export default function StatsScreen() {
|
||||
prodSort === "revenue" ? fmtEuro(p.revenue)
|
||||
: prodSort === "orders" ? `${p.order_count} cmd`
|
||||
: `×${fmtNum(p.quantity)}`;
|
||||
const color =
|
||||
i === 0 ? CHART_AMBER
|
||||
: i === 1 ? "#94a3b8"
|
||||
: i === 2 ? "#b45309"
|
||||
: CHART_ACCENT;
|
||||
return (
|
||||
<HBar
|
||||
key={p.product_id}
|
||||
label={p.name}
|
||||
value={val}
|
||||
max={prodMax}
|
||||
color={color}
|
||||
color={p.category_color || CHART_ACCENT}
|
||||
right={rightLabel}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user