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:
@@ -40,6 +40,7 @@ class ReportsAPI extends ApiClient {
|
||||
id,
|
||||
group_by: groupBy,
|
||||
business_hours: businessHours,
|
||||
timezone_offset: getTimeOffset(),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user