diff --git a/src/components/admin/AdminDashboard.jsx b/src/components/admin/AdminDashboard.jsx index 8fae3ae..ecc21a2 100644 --- a/src/components/admin/AdminDashboard.jsx +++ b/src/components/admin/AdminDashboard.jsx @@ -140,7 +140,7 @@ export const AdminDashboard = () => { const econ = economics || {}; const statusPieData = (statusDist || []).map(s => ({ - name: STATUS_LABELS[s.delivery_status] || s.delivery_status, + name: STATUS_LABELS[s.delivery_status] || (s.delivery_status ? `Неизвестно (${s.delivery_status})` : 'Неизвестно'), value: s.count, status: s.delivery_status, })).filter(d => d.value > 0); diff --git a/src/services/orderGroupViews.js b/src/services/orderGroupViews.js index d831178..3633176 100644 --- a/src/services/orderGroupViews.js +++ b/src/services/orderGroupViews.js @@ -141,7 +141,7 @@ export const isOrderGroupAgreedForDelivery = (group) => { }; export const getOrderGroupDeliveryStatusLabel = (status) => - DELIVERY_GROUP_STATUS_LABELS[status] || status || "Неизвестно"; + DELIVERY_GROUP_STATUS_LABELS[status] || (status ? `Неизвестно (${status})` : "Неизвестно"); export const getOrderGroupDisplayStatusLabel = (group) => { const deliveryStatus = group?.deliveryStatus || group?.delivery_status; @@ -339,7 +339,7 @@ export const ORDER_GROUP_DISPLAY_STATUS_OPTIONS = [ ]; export const getOrderGroupStatusLabel = (status) => - ORDER_GROUP_STATUS_LABELS[status] || status || "Неизвестно"; + ORDER_GROUP_STATUS_LABELS[status] || (status ? `Неизвестно (${status})` : "Неизвестно"); export const getOrderGroupDeliveryStatusTone = (status) => { switch (status) {