feat: Add conversations summary CSV export (#13110)
# Pull Request Template ## Description This PR adds support for exporting conversation summary reports as CSV. Previously, the Conversations report incorrectly showed an option to download agent reports; this has now been fixed to export conversation-level data instead. Fixes https://linear.app/chatwoot/issue/CW-6176/conversation-reports-export-button-exports-agent-reports-instead ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? ### Screenshot <img width="1859" height="1154" alt="image" src="https://github.com/user-attachments/assets/419d26f4-fda9-4782-aea6-55ffad0c37ab" /> ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -76,14 +76,14 @@ export default {
|
||||
businessHours,
|
||||
};
|
||||
},
|
||||
downloadAgentReports() {
|
||||
downloadConversationReports() {
|
||||
const { from, to } = this;
|
||||
const fileName = generateFileName({
|
||||
type: 'agent',
|
||||
type: 'conversation',
|
||||
to,
|
||||
businessHours: this.businessHours,
|
||||
});
|
||||
this.$store.dispatch('downloadAgentReports', {
|
||||
this.$store.dispatch('downloadConversationsSummaryReports', {
|
||||
from,
|
||||
to,
|
||||
fileName,
|
||||
@@ -109,10 +109,10 @@ export default {
|
||||
<template>
|
||||
<ReportHeader :header-title="$t('REPORT.HEADER')">
|
||||
<V4Button
|
||||
:label="$t('REPORT.DOWNLOAD_AGENT_REPORTS')"
|
||||
:label="$t('REPORT.DOWNLOAD_CONVERSATION_REPORTS')"
|
||||
icon="i-ph-download-simple"
|
||||
size="sm"
|
||||
@click="downloadAgentReports"
|
||||
@click="downloadConversationReports"
|
||||
/>
|
||||
</ReportHeader>
|
||||
<div class="flex flex-col gap-3">
|
||||
|
||||
Reference in New Issue
Block a user