diff --git a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json index bf9610f634aa2ba8da837cde247c49971c7851dc..628434d61c659c84af57a5730a0acad5baeafb32 100644 --- a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json @@ -28,7 +28,7 @@ "@username": "@username", "@username_message": "@username <message>", "#channel": "#channel", - "%_of_conversations": "%% of Conversations", + "%_of_conversations": "% of Conversations", "0_Errors_Only": "0 - Errors Only", "1_Errors_and_Information": "1 - Errors and Information", "2_Erros_Information_and_Debug": "2 - Errors, Information and Debug", diff --git a/apps/meteor/server/services/omnichannel-analytics/ChartData.ts b/apps/meteor/server/services/omnichannel-analytics/ChartData.ts index 044dca954c6d0b8d3da0759502328d558539cdbe..f2b1f21b5b9aef73c8428b608fb9c8a75cf0e9b4 100644 --- a/apps/meteor/server/services/omnichannel-analytics/ChartData.ts +++ b/apps/meteor/server/services/omnichannel-analytics/ChartData.ts @@ -8,7 +8,9 @@ type ChartDataValidActions = | 'Avg_chat_duration' | 'Total_messages' | 'Avg_first_response_time' - | 'Avg_reaction_time'; + | 'Avg_reaction_time' + | 'Best_first_response_time' + | 'Avg_response_time'; type DateParam = { gte: Date; @@ -22,7 +24,15 @@ export class ChartData { if (!action) { return false; } - return ['Total_conversations', 'Avg_chat_duration', 'Total_messages', 'Avg_first_response_time', 'Avg_reaction_time'].includes(action); + return [ + 'Total_conversations', + 'Avg_chat_duration', + 'Total_messages', + 'Avg_first_response_time', + 'Avg_reaction_time', + 'Best_first_response_time', + 'Avg_response_time', + ].includes(action); } callAction<T extends ChartDataValidActions>(action: T, ...args: [DateParam, string?, Filter<IOmnichannelRoom>?]) { @@ -37,6 +47,10 @@ export class ChartData { return this.Avg_first_response_time(...args); case 'Avg_reaction_time': return this.Avg_reaction_time(...args); + case 'Best_first_response_time': + return this.Best_first_response_time(...args); + case 'Avg_response_time': + return this.Avg_response_time(...args); default: throw new Error('Invalid action'); }