diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index 01b11cbd..93d61196 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -1457,7 +1457,9 @@ "title": "Zellen Zuverlässigkeit Heatmap", "cell": "Zelle", "week": "Woche" - } + }, + "loadError": "Fehler beim Laden der QRM-Dashboard-Daten", + "noData": "Keine QRM-Daten verfügbar. Bitte stellen Sie sicher, dass Sie aktive Aufträge und Arbeitsgänge haben." }, "terminal": { "columns": { diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 976a6dbf..1f6fb14d 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -859,7 +859,9 @@ "title": "Cell Reliability Heatmap", "cell": "Cell", "week": "Week" - } + }, + "loadError": "Failed to load QRM dashboard data", + "noData": "No QRM data available. Please ensure you have active jobs and operations." }, "stages": { "title": "Stage Configuration", diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index a690689b..6b018504 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -1727,7 +1727,9 @@ "title": "Cel Betrouwbaarheid Heatmap", "cell": "Cel", "week": "Week" - } + }, + "loadError": "Fout bij laden van QRM dashboard gegevens", + "noData": "Geen QRM gegevens beschikbaar. Zorg ervoor dat u actieve orders en bewerkingen heeft." }, "terminal": { "columns": { diff --git a/src/pages/admin/analytics/QRMDashboard.tsx b/src/pages/admin/analytics/QRMDashboard.tsx index 968452c2..8784ee7d 100644 --- a/src/pages/admin/analytics/QRMDashboard.tsx +++ b/src/pages/admin/analytics/QRMDashboard.tsx @@ -23,9 +23,10 @@ const QRMDashboard = () => { const navigate = useNavigate(); const [dateRange, setDateRange] = useState(30); - const { data: metrics, isLoading, refetch } = useQRMDashboardMetrics(dateRange); + const { data: metrics, isLoading, isError, error, isFetching, refetch } = useQRMDashboardMetrics(dateRange); - if (isLoading || !metrics) { + // Show loading only when actually fetching + if (isLoading || isFetching) { return (
{t("common.error")}: {error?.message || t("qrm.loadError")}
+ +{t("qrm.noData")}
+ +