mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
fix: inconsistent usage of snake_case and camelCase (#6824)
This commit is contained in:
@@ -14,8 +14,8 @@ class ReportsAPI extends ApiClient {
|
|||||||
to,
|
to,
|
||||||
type = 'account',
|
type = 'account',
|
||||||
id,
|
id,
|
||||||
group_by,
|
groupBy,
|
||||||
business_hours,
|
businessHours,
|
||||||
}) {
|
}) {
|
||||||
return axios.get(`${this.url}`, {
|
return axios.get(`${this.url}`, {
|
||||||
params: {
|
params: {
|
||||||
@@ -24,22 +24,22 @@ class ReportsAPI extends ApiClient {
|
|||||||
until: to,
|
until: to,
|
||||||
type,
|
type,
|
||||||
id,
|
id,
|
||||||
group_by,
|
group_by: groupBy,
|
||||||
business_hours,
|
business_hours: businessHours,
|
||||||
timezone_offset: getTimeOffset(),
|
timezone_offset: getTimeOffset(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getSummary(since, until, type = 'account', id, group_by, business_hours) {
|
getSummary(since, until, type = 'account', id, groupBy, businessHours) {
|
||||||
return axios.get(`${this.url}/summary`, {
|
return axios.get(`${this.url}/summary`, {
|
||||||
params: {
|
params: {
|
||||||
since,
|
since,
|
||||||
until,
|
until,
|
||||||
type,
|
type,
|
||||||
id,
|
id,
|
||||||
group_by,
|
group_by: groupBy,
|
||||||
business_hours,
|
business_hours: businessHours,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,8 +254,8 @@ export default {
|
|||||||
reportType: 'conversations',
|
reportType: 'conversations',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchFilterItems(group_by) {
|
fetchFilterItems(groupBy) {
|
||||||
switch (group_by) {
|
switch (groupBy) {
|
||||||
case GROUP_BY_FILTER[2].period:
|
case GROUP_BY_FILTER[2].period:
|
||||||
return this.$t('REPORT.GROUP_BY_WEEK_OPTIONS');
|
return this.$t('REPORT.GROUP_BY_WEEK_OPTIONS');
|
||||||
case GROUP_BY_FILTER[3].period:
|
case GROUP_BY_FILTER[3].period:
|
||||||
|
|||||||
@@ -308,8 +308,8 @@ export default {
|
|||||||
reportType: this.type,
|
reportType: this.type,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchFilterItems(group_by) {
|
fetchFilterItems(groupBy) {
|
||||||
switch (group_by) {
|
switch (groupBy) {
|
||||||
case GROUP_BY_FILTER[2].period:
|
case GROUP_BY_FILTER[2].period:
|
||||||
return this.$t('REPORT.GROUP_BY_WEEK_OPTIONS');
|
return this.$t('REPORT.GROUP_BY_WEEK_OPTIONS');
|
||||||
case GROUP_BY_FILTER[3].period:
|
case GROUP_BY_FILTER[3].period:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const actions = {
|
|||||||
},
|
},
|
||||||
fetchAccountConversationHeatmap({ commit }, reportObj) {
|
fetchAccountConversationHeatmap({ commit }, reportObj) {
|
||||||
commit(types.default.TOGGLE_HEATMAP_LOADING, true);
|
commit(types.default.TOGGLE_HEATMAP_LOADING, true);
|
||||||
Report.getReports({ ...reportObj, group_by: 'hour' }).then(heatmapData => {
|
Report.getReports({ ...reportObj, groupBy: 'hour' }).then(heatmapData => {
|
||||||
let { data } = heatmapData;
|
let { data } = heatmapData;
|
||||||
data = clampDataBetweenTimeline(data, reportObj.from, reportObj.to);
|
data = clampDataBetweenTimeline(data, reportObj.from, reportObj.to);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user