chore: Report improvements (#4392)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Aswin Dev P.S 2022-04-11 20:57:22 +05:30 committed by GitHub
parent 31cdc63e18
commit c64e2e3bc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 86 additions and 65 deletions

View file

@ -50,16 +50,6 @@ export const actions = {
el =>
reportObj.to - el.timestamp > 0 && el.timestamp - reportObj.from >= 0
);
if (
reportObj.metric === 'avg_first_response_time' ||
reportObj.metric === 'avg_resolution_time'
) {
data = data.map(element => {
/* eslint-disable operator-assignment */
element.value = (element.value / 3600).toFixed(2);
return element;
});
}
commit(types.default.SET_ACCOUNT_REPORTS, data);
commit(types.default.TOGGLE_ACCOUNT_REPORT_LOADING, false);
});