fix: inconsistency in report and summary for metric counts (#6817)

* feat: include timezone offset in summary calculation

* fix: exlcude end in date range

* test: explicit end of day

* fix: test for report builder

* fix: reports.spec.js

---------

Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com>
This commit is contained in:
Shivam Mishra
2023-04-20 12:55:04 +05:30
committed by GitHub
parent d1584eea72
commit 6b2736aa63
6 changed files with 36 additions and 28 deletions

View File

@@ -40,6 +40,7 @@ class ReportsAPI extends ApiClient {
id,
group_by: groupBy,
business_hours: businessHours,
timezone_offset: getTimeOffset(),
},
});
}

View File

@@ -42,9 +42,13 @@ describe('#Reports API', () => {
'/api/v2/reports/summary',
{
params: {
business_hours: undefined,
group_by: undefined,
id: undefined,
since: 1621103400,
until: 1621621800,
timezone_offset: -0,
type: 'account',
until: 1621621800,
},
}
);