feat: Add date-range filter on CSAT Reports (#2622)
This commit is contained in:
parent
a5bc81b304
commit
3d18ec9e40
10 changed files with 175 additions and 120 deletions
|
@ -6,12 +6,16 @@ class CSATReportsAPI extends ApiClient {
|
|||
super('csat_survey_responses', { accountScoped: true });
|
||||
}
|
||||
|
||||
get({ page } = {}) {
|
||||
return axios.get(this.url, { params: { page } });
|
||||
get({ page, from, to } = {}) {
|
||||
return axios.get(this.url, {
|
||||
params: { page, since: from, until: to, sort: '-created_at' },
|
||||
});
|
||||
}
|
||||
|
||||
getMetrics() {
|
||||
return axios.get(`${this.url}/metrics`);
|
||||
getMetrics({ from, to } = {}) {
|
||||
return axios.get(`${this.url}/metrics`, {
|
||||
params: { since: from, until: to },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue