diff --git a/app/javascript/dashboard/i18n/locale/en/integrations.json b/app/javascript/dashboard/i18n/locale/en/integrations.json index a39165268..a6f3ef2f2 100644 --- a/app/javascript/dashboard/i18n/locale/en/integrations.json +++ b/app/javascript/dashboard/i18n/locale/en/integrations.json @@ -427,8 +427,8 @@ "HINT": "Share of handled conversations escalated to a human agent." }, "HOURS_SAVED": { - "LABEL": "Hours saved", - "HINT": "Estimate: Captain replies times the team's average response time. Directional, not measured labor." + "LABEL": "Time saved", + "HINT": "Estimate: Captain replies times ~2 minutes of assumed agent effort per reply. Directional, not measured labor." }, "REOPEN": { "LABEL": "Reopen rate", diff --git a/app/javascript/dashboard/routes/dashboard/captain/assistants/overview/Index.vue b/app/javascript/dashboard/routes/dashboard/captain/assistants/overview/Index.vue index 687e97286..b9cc6ae35 100644 --- a/app/javascript/dashboard/routes/dashboard/captain/assistants/overview/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/captain/assistants/overview/Index.vue @@ -49,6 +49,11 @@ const resolveTrendGood = (trendValue, direction) => { // :point, and a plain number for :absolute counts like conversation depth. const TREND_SUFFIX = { percent: '%', point: ' pts', absolute: '' }; +// Hours-saved is reported in hours, but large values read better as days. Past +// 100h we switch the unit so the card stays legible. +const formatDuration = hours => + hours >= 100 ? `${Math.round(hours / 24)}d` : `${hours}h`; + const metricFor = (statKey, formatValue, direction, trendKind = 'percent') => { const data = stats.value?.[statKey]; if (!data) return { value: '—', trend: '', trendGood: null }; @@ -84,7 +89,7 @@ const metrics = computed(() => [ key: 'hoursSaved', label: t('CAPTAIN.OVERVIEW.METRICS.HOURS_SAVED.LABEL'), hint: t('CAPTAIN.OVERVIEW.METRICS.HOURS_SAVED.HINT'), - ...metricFor('hours_saved', v => `${v}h`, 'up'), + ...metricFor('hours_saved', formatDuration, 'up'), }, { key: 'reopen', @@ -121,7 +126,7 @@ const metrics = computed(() => [