This commit is contained in:
2025-12-30 17:06:03 +01:00
parent b20ca307fa
commit 4458a8c5be

View File

@@ -92,19 +92,19 @@ const data = [
const purchaseData = [ const purchaseData = [
{ status: "Draft", count: draft_p, color: "bg-teal-500", onClick: () => openInTryton("purchase.purchase", undefined, ['tree', 'form'],[['state', '=', 'draft']])}, { status: "Draft", count: draft_p, color: "bg-teal-500", onClick: () => openInTryton("purchase.purchase", undefined, ['tree', 'form'],[['state', '=', 'draft']])},
{ status: "Validated", count: val_p, color: "bg-gray-500", onClick: () => openInTryton("purchase.purchase", undefined, ['tree', 'form'],[['state', '=', 'quotation']]) }, { status: "Validated", count: val_p, color: "bg-gray-400", onClick: () => openInTryton("purchase.purchase", undefined, ['tree', 'form'],[['state', '=', 'quotation']]) },
{ status: "Confirmed", count: conf_p, color: "bg-sky-600", onClick: () => openInTryton("purchase.purchase", undefined, ['tree', 'form'],[['state', '=', 'confirmed']]) }, { status: "Confirmed", count: conf_p, color: "bg-sky-600", onClick: () => openInTryton("purchase.purchase", undefined, ['tree', 'form'],[['state', '=', 'confirmed']]) },
]; ];
const saleData = [ const saleData = [
{ status: "Draft", count: draft_s, color: "bg-teal-500", onClick: () => openInTryton("sale.sale", undefined, ['tree', 'form'],[['state', '=', 'draft']])}, { status: "Draft", count: draft_s, color: "bg-teal-500", onClick: () => openInTryton("sale.sale", undefined, ['tree', 'form'],[['state', '=', 'draft']])},
{ status: "Validated", count: val_s, color: "bg-gray-500", onClick: () => openInTryton("sale.sale", undefined, ['tree', 'form'],[['state', '=', 'quotation']]) }, { status: "Validated", count: val_s, color: "bg-gray-400", onClick: () => openInTryton("sale.sale", undefined, ['tree', 'form'],[['state', '=', 'quotation']]) },
{ status: "Confirmed", count: conf_s, color: "bg-sky-600", onClick: () => openInTryton("sale.sale", undefined, ['tree', 'form'],[['state', '=', 'confirmed']]) }, { status: "Confirmed", count: conf_s, color: "bg-sky-600", onClick: () => openInTryton("sale.sale", undefined, ['tree', 'form'],[['state', '=', 'confirmed']]) },
]; ];
const shipmentData = [ const shipmentData = [
{ status: "Draft", count: shipment_d, color: "bg-teal-500", onClick: () => openInTryton("stock.shipment.in", undefined, ['tree', 'form'],[['state', '=', 'draft']])}, { status: "Draft", count: shipment_d, color: "bg-teal-500", onClick: () => openInTryton("stock.shipment.in", undefined, ['tree', 'form'],[['state', '=', 'draft']])},
{ status: "Started", count: shipment_s, color: "bg-gray-500", onClick: () => openInTryton("stock.shipment.in", undefined, ['tree', 'form'],[['state', '=', 'started']]) }, { status: "Started", count: shipment_s, color: "bg-gray-400", onClick: () => openInTryton("stock.shipment.in", undefined, ['tree', 'form'],[['state', '=', 'started']]) },
{ status: "Received", count: shipment_r, color: "bg-sky-600", onClick: () => openInTryton("stock.shipment.in", undefined, ['tree', 'form'],[['state', '=', 'received']]) }, { status: "Received", count: shipment_r, color: "bg-sky-600", onClick: () => openInTryton("stock.shipment.in", undefined, ['tree', 'form'],[['state', '=', 'received']]) },
]; ];
@@ -118,7 +118,7 @@ const lotData = [
wh: 'all', wh: 'all',
group: 'by_physic' group: 'by_physic'
})}, })},
{ status: "Available", count: lot_a, color: "bg-gray-500", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') }, { status: "Available", count: lot_a, color: "bg-gray-400", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') },
{ status: "All", count: lot_al, color: "bg-sky-600", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') }, { status: "All", count: lot_al, color: "bg-sky-600", onClick: () => openInTryton("lot.report", undefined, ['tree', 'form'],[['id', '>', 0]],'exec_window') },
]; ];
@@ -188,7 +188,7 @@ const cards = [
id: "purchase_invoices", id: "purchase_invoices",
title: "Purchase Invoices", title: "Purchase Invoices",
value: inv_p, value: inv_p,
trend: "-2% this week", trend: "All invoices",
icon: Receipt, icon: Receipt,
amountInvoiced: 100523, amountInvoiced: 100523,
amount30Days: 456147, amount30Days: 456147,
@@ -199,24 +199,24 @@ const cards = [
id: "sale_invoices", id: "sale_invoices",
title: "Sale Invoices", title: "Sale Invoices",
value: inv_s, value: inv_s,
trend: "+2% this week", trend: "All invoices",
icon: FileText, icon: FileText,
amountInvoiced: 100523, amountInvoiced: 100523,
amount30Days: 456147, amount30Days: 456147,
amount60Days: 847512, amount60Days: 847512,
action: () => openInTryton("account.invoice", undefined, ['tree','form'],[['type', '=', 'out']]) action: () => openInTryton("account.invoice", undefined, ['tree','form'],[['type', '=', 'out']])
}, },
{ // {
id: "payments_to_validate", // id: "payments_to_validate",
title: "Payments To Validate", // title: "Payments To Validate",
value: move_cash, // value: move_cash,
trend: "+12% this week", // trend: "All payments",
icon: HandCoins, // icon: HandCoins,
amountInvoiced: 100523, // amountInvoiced: 100523,
amount30Days: 456147, // amount30Days: 456147,
amount60Days: 847512, // amount60Days: 847512,
action: () => openInTryton("account.move", undefined, ['tree','form'],[['journal', '=', 3]]) // action: () => openInTryton("account.move", undefined, ['tree','form'],[['journal', '=', 3]])
}, // },
// { // {
// id: "prepayments", // id: "prepayments",
// title: "Prepayments To Validate", // title: "Prepayments To Validate",
@@ -579,6 +579,26 @@ export default function App() {
</Card> </Card>
); );
})} })}
<Card
className="p-4 rounded-xl border border-gray-200 dark:border-gray-700 shadow-md bg-white dark:bg-gray-800 hover:shadow-lg transition"
>
<div className="flex justify-between items-center mb-4">
<Title className="text-base">Payments</Title>
<HandCoins className="w-6 h-6" />
</div>
<Text className="text-3xl font-bold mb-1">move_cash</Text>
<Text className="text-xs text-gray-500 mb-4">To validate</Text>
<div className="w-full h-1 bg-gray-200 dark:bg-gray-600 mb-4"></div>
<Text className="text-3xl font-bold mb-1">move_cash</Text>
<Text className="text-xs text-gray-500 mb-4">All</Text>
<button onClick={card.action} className="mt-4 text-xs text-teal-600 underline">
View details
</button>
</Card>
</div> </div>
</main> </main>
</div> </div>