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,
|
inbox_id,
|
||||||
team_id,
|
team_id,
|
||||||
sla_policy_id,
|
sla_policy_id,
|
||||||
|
label_list,
|
||||||
} = {}) {
|
} = {}) {
|
||||||
return axios.get(`${this.url}/download`, {
|
return axios.get(`${this.url}/download`, {
|
||||||
params: {
|
params: {
|
||||||
@@ -45,6 +46,7 @@ class SLAReportsAPI extends ApiClient {
|
|||||||
assigned_agent_id,
|
assigned_agent_id,
|
||||||
inbox_id,
|
inbox_id,
|
||||||
team_id,
|
team_id,
|
||||||
|
label_list,
|
||||||
sla_policy_id,
|
sla_policy_id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ describe('#SLAReports API', () => {
|
|||||||
inbox_id: 1,
|
inbox_id: 1,
|
||||||
team_id: 1,
|
team_id: 1,
|
||||||
sla_policy_id: 1,
|
sla_policy_id: 1,
|
||||||
|
label_list: ['label1'],
|
||||||
});
|
});
|
||||||
expect(axiosMock.get).toHaveBeenCalledWith(
|
expect(axiosMock.get).toHaveBeenCalledWith(
|
||||||
'/api/v1/applied_slas/download',
|
'/api/v1/applied_slas/download',
|
||||||
@@ -94,6 +95,7 @@ describe('#SLAReports API', () => {
|
|||||||
inbox_id: 1,
|
inbox_id: 1,
|
||||||
team_id: 1,
|
team_id: 1,
|
||||||
sla_policy_id: 1,
|
sla_policy_id: 1,
|
||||||
|
label_list: ['label1'],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ export default {
|
|||||||
const type = 'sla';
|
const type = 'sla';
|
||||||
try {
|
try {
|
||||||
this.$store.dispatch('slaReports/download', {
|
this.$store.dispatch('slaReports/download', {
|
||||||
fileName: generateFileName({ type, to: this.to }),
|
fileName: generateFileName({ type, to: this.activeFilter.to }),
|
||||||
...this.requestPayload,
|
...this.activeFilter,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.showAlert(this.$t('SLA_REPORTS.DOWNLOAD_FAILED'));
|
this.showAlert(this.$t('SLA_REPORTS.DOWNLOAD_FAILED'));
|
||||||
|
|||||||
Reference in New Issue
Block a user