mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00
fix: Add more filters for SLA download reports (#9231)
Co-authored-by: iamsivin <iamsivin@gmail.com>
This commit is contained in:
@@ -37,6 +37,7 @@ class SLAReportsAPI extends ApiClient {
|
||||
inbox_id,
|
||||
team_id,
|
||||
sla_policy_id,
|
||||
label_list,
|
||||
} = {}) {
|
||||
return axios.get(`${this.url}/download`, {
|
||||
params: {
|
||||
@@ -45,6 +46,7 @@ class SLAReportsAPI extends ApiClient {
|
||||
assigned_agent_id,
|
||||
inbox_id,
|
||||
team_id,
|
||||
label_list,
|
||||
sla_policy_id,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -83,6 +83,7 @@ describe('#SLAReports API', () => {
|
||||
inbox_id: 1,
|
||||
team_id: 1,
|
||||
sla_policy_id: 1,
|
||||
label_list: ['label1'],
|
||||
});
|
||||
expect(axiosMock.get).toHaveBeenCalledWith(
|
||||
'/api/v1/applied_slas/download',
|
||||
@@ -94,6 +95,7 @@ describe('#SLAReports API', () => {
|
||||
inbox_id: 1,
|
||||
team_id: 1,
|
||||
sla_policy_id: 1,
|
||||
label_list: ['label1'],
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -94,8 +94,8 @@ export default {
|
||||
const type = 'sla';
|
||||
try {
|
||||
this.$store.dispatch('slaReports/download', {
|
||||
fileName: generateFileName({ type, to: this.to }),
|
||||
...this.requestPayload,
|
||||
fileName: generateFileName({ type, to: this.activeFilter.to }),
|
||||
...this.activeFilter,
|
||||
});
|
||||
} catch (error) {
|
||||
this.showAlert(this.$t('SLA_REPORTS.DOWNLOAD_FAILED'));
|
||||
|
||||
Reference in New Issue
Block a user