diff --git a/backend/routes/compliance.js b/backend/routes/compliance.js index 5d2a970..502e2c7 100644 --- a/backend/routes/compliance.js +++ b/backend/routes/compliance.js @@ -238,7 +238,10 @@ function groupByHostname(rows, noteHostnames) { if ((row.seen_count || 1) > dev.seen_count) dev.seen_count = row.seen_count; if (row.first_seen && (!dev.first_seen || row.first_seen < dev.first_seen)) dev.first_seen = row.first_seen; if (row.last_seen && (!dev.last_seen || row.last_seen > dev.last_seen)) dev.last_seen = row.last_seen; - if (row.resolution_date && !dev.resolution_date) dev.resolution_date = row.resolution_date; + if (row.resolution_date && !dev.resolution_date) { + const rd = row.resolution_date; + dev.resolution_date = typeof rd === 'string' ? rd.slice(0, 10) : (rd instanceof Date ? rd.toISOString().slice(0, 10) : rd); + } if (row.remediation_plan && !dev.remediation_plan) dev.remediation_plan = row.remediation_plan; } return Object.values(deviceMap).map(({ _seenMetricIds, ...dev }) => dev); diff --git a/frontend/src/components/pages/CompliancePage.js b/frontend/src/components/pages/CompliancePage.js index 2322da7..60fb3b0 100644 --- a/frontend/src/components/pages/CompliancePage.js +++ b/frontend/src/components/pages/CompliancePage.js @@ -881,7 +881,7 @@ function DeviceRow({ device, selected, onClick }) { {/* Resolution Date */}