updated zenova custom report
This commit is contained in:
parent
e084690999
commit
d027721a73
|
|
@ -1,12 +1,14 @@
|
|||
export const REPORT_TIMEOUT = 120000;
|
||||
|
||||
const DAY_METRICS = ['GLIPIQ Total Rx', 'ABSI Camp Count', 'Patients Screened Count', 'Sitazit Total RX'];
|
||||
const DAY_METRICS = ['Glipiq Total Invoice Count', 'Obesity Strength Invoice Count', 'ABSI Camp Count', 'Patients Screened Count', 'Sitazit Total RX'];
|
||||
const PERIOD_METRICS = [
|
||||
'GLIPIQ Total Rx',
|
||||
'Glipiq Total Invoice Count',
|
||||
'Obesity Strength Invoice Count',
|
||||
'GLIPIQ New Conversion',
|
||||
'ABSI Camp Count',
|
||||
'Patients Screened Count',
|
||||
'GLIPIQ Total POB Units',
|
||||
'Obesity Strength POB Units',
|
||||
'Sitazit Total RX',
|
||||
'Sitazit New Conversions',
|
||||
'Sitazit Total POB Units',
|
||||
|
|
@ -14,9 +16,9 @@ const PERIOD_METRICS = [
|
|||
const GEO_TYPES = ['Zone', 'Region', 'Area'];
|
||||
|
||||
export function reportMonths(now = new Date()) {
|
||||
const startYear = now.getMonth() >= 3 ? now.getFullYear() : now.getFullYear() - 1;
|
||||
const startYear = now.getMonth() >= 9 ? now.getFullYear() : now.getFullYear() - 1;
|
||||
const months = [];
|
||||
const cursor = new Date(startYear, 3, 1);
|
||||
const cursor = new Date(startYear, 9, 1);
|
||||
const end = new Date(now.getFullYear(), now.getMonth(), 1);
|
||||
while (cursor <= end) {
|
||||
const value = `${cursor.getFullYear()}-${String(cursor.getMonth() + 1).padStart(2, '0')}`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue