From ee79869df3222cb63fcb16e5d37eb9eed0ce7019 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 26 Oct 2025 18:08:05 +1100 Subject: [PATCH] [UI] Shipments dashboard widget (#10679) - Add widget which displays number of pending shipments --- src/frontend/lib/enums/ModelInformation.tsx | 3 ++- .../src/components/dashboard/DashboardWidgetLibrary.tsx | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/frontend/lib/enums/ModelInformation.tsx b/src/frontend/lib/enums/ModelInformation.tsx index 2db30b4b59..ba73e5ddf3 100644 --- a/src/frontend/lib/enums/ModelInformation.tsx +++ b/src/frontend/lib/enums/ModelInformation.tsx @@ -170,9 +170,10 @@ export const ModelInformationDict: ModelDict = { salesordershipment: { label: () => t`Sales Order Shipment`, label_multiple: () => t`Sales Order Shipments`, + url_overview: '/sales/index/shipments', url_detail: '/sales/shipment/:pk/', api_endpoint: ApiEndpoints.sales_order_shipment_list, - icon: 'sales_orders' + icon: 'shipment' }, returnorder: { label: () => t`Return Order`, diff --git a/src/frontend/src/components/dashboard/DashboardWidgetLibrary.tsx b/src/frontend/src/components/dashboard/DashboardWidgetLibrary.tsx index 17a9cf739f..7c5268faac 100644 --- a/src/frontend/src/components/dashboard/DashboardWidgetLibrary.tsx +++ b/src/frontend/src/components/dashboard/DashboardWidgetLibrary.tsx @@ -125,6 +125,13 @@ export function BuiltinQueryCountWidgets(): DashboardWidgetProps[] { modelType: ModelType.salesorder, params: { assigned_to_me: true, outstanding: true } }), + QueryCountDashboardWidget({ + title: t`Pending Shipments`, + label: 'pnd-shp', + description: t`Show the number of pending sales order shipments`, + modelType: ModelType.salesordershipment, + params: { order_outstanding: true, shipped: false } + }), QueryCountDashboardWidget({ title: t`Active Purchase Orders`, label: 'act-po',