From 03b4c31bb68d6c5848ef0a6abe6c43c91b935ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Thu, 28 Oct 2021 09:16:38 +0200 Subject: [PATCH] fix: update category order, add new relative period --- src/settingsCategories.js | 2 +- src/settingsKeyMapping.js | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/settingsCategories.js b/src/settingsCategories.js index a62b4792..81acab83 100644 --- a/src/settingsCategories.js +++ b/src/settingsCategories.js @@ -2,6 +2,7 @@ import i18n from '@dhis2/d2-i18n' export const categoryOrder = [ 'general', + 'analytics', 'server', 'appearance', 'email', @@ -9,7 +10,6 @@ export const categoryOrder = [ 'calendar', 'import', 'sync', - 'monitoring', 'oauth2', ] diff --git a/src/settingsKeyMapping.js b/src/settingsKeyMapping.js index 3201eca1..0a0e16cb 100644 --- a/src/settingsKeyMapping.js +++ b/src/settingsKeyMapping.js @@ -119,35 +119,36 @@ const settingsKeyMapping = { label: i18n.t('Default relative period for analysis'), type: 'dropdown', options: { + THIS_WEEK: i18n.t('This week'), + LAST_WEEK: i18n.t('Last week'), + LAST_4_WEEKS: i18n.t('Last 4 weeks'), + LAST_12_WEEKS: i18n.t('Last 12 weeks'), + LAST_52_WEEKS: i18n.t('Last 52 weeks'), THIS_MONTH: i18n.t('This month'), LAST_MONTH: i18n.t('Last month'), + MONTHS_THIS_YEAR: i18n.t('Months this year'), + MONTHS_LAST_YEAR: i18n.t('Months last year'), + LAST_3_MONTHS: i18n.t('Last 3 months'), + LAST_6_MONTHS: i18n.t('Last 6 months'), + LAST_12_MONTHS: i18n.t('Last 12 months'), THIS_BIMONTH: i18n.t('This bi-month'), LAST_BIMONTH: i18n.t('Last bi-month'), + LAST_6_BIMONTHS: i18n.t('Last 6 bi-months'), THIS_QUARTER: i18n.t('This quarter'), LAST_QUARTER: i18n.t('Last quarter'), + QUARTERS_THIS_YEAR: i18n.t('Quarters this year'), + QUARTERS_LAST_YEAR: i18n.t('Quarters last year'), + LAST_4_QUARTERS: i18n.t('Last 4 quarters'), THIS_SIX_MONTH: i18n.t('This six-month'), LAST_SIX_MONTH: i18n.t('Last six-month'), - MONTHS_THIS_YEAR: i18n.t('Months this year'), - QUARTERS_THIS_YEAR: i18n.t('Quarters this year'), + LAST_2_SIXMONTHS: i18n.t('Last 2 six-months'), THIS_YEAR: i18n.t('This year'), - MONTHS_LAST_YEAR: i18n.t('Months last year'), - QUARTERS_LAST_YEAR: i18n.t('Quarters last year'), LAST_YEAR: i18n.t('Last year'), LAST_5_YEARS: i18n.t('Last 5 years'), - LAST_12_MONTHS: i18n.t('Last 12 months'), - LAST_6_MONTHS: i18n.t('Last 6 months'), - LAST_3_MONTHS: i18n.t('Last 3 months'), - LAST_6_BIMONTHS: i18n.t('Last 6 bi-months'), - LAST_4_QUARTERS: i18n.t('Last 4 quarters'), - LAST_2_SIXMONTHS: i18n.t('Last 2 six-months'), + LAST_10_YEARS: i18n.t('Last 10 years'), THIS_FINANCIAL_YEAR: i18n.t('This financial year'), LAST_FINANCIAL_YEAR: i18n.t('Last financial year'), LAST_5_FINANCIAL_YEARS: i18n.t('Last 5 financial years'), - THIS_WEEK: i18n.t('This week'), - LAST_WEEK: i18n.t('Last week'), - LAST_4_WEEKS: i18n.t('Last 4 weeks'), - LAST_12_WEEKS: i18n.t('Last 12 weeks'), - LAST_52_WEEKS: i18n.t('Last 52 weeks'), }, }, keyHideDailyPeriods: {