diff options
Diffstat (limited to 'app/assets/javascripts/analytics')
-rw-r--r-- | app/assets/javascripts/analytics/shared/utils.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/analytics/usage_trends/index.js | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/analytics/shared/utils.js b/app/assets/javascripts/analytics/shared/utils.js index 84189b675f2..52901d4c5bb 100644 --- a/app/assets/javascripts/analytics/shared/utils.js +++ b/app/assets/javascripts/analytics/shared/utils.js @@ -1,4 +1,9 @@ +import dateFormat from 'dateformat'; +import { dateFormats } from './constants'; + export const filterBySearchTerm = (data = [], searchTerm = '', filterByKey = 'name') => { if (!searchTerm?.length) return data; return data.filter((item) => item[filterByKey].toLowerCase().includes(searchTerm.toLowerCase())); }; + +export const toYmd = (date) => dateFormat(date, dateFormats.isoDate); diff --git a/app/assets/javascripts/analytics/usage_trends/index.js b/app/assets/javascripts/analytics/usage_trends/index.js index d1880b09f15..3e85832edcf 100644 --- a/app/assets/javascripts/analytics/usage_trends/index.js +++ b/app/assets/javascripts/analytics/usage_trends/index.js @@ -6,7 +6,7 @@ import UsageTrendsApp from './components/app.vue'; Vue.use(VueApollo); const apolloProvider = new VueApollo({ - defaultClient: createDefaultClient(), + defaultClient: createDefaultClient({}, { assumeImmutableResults: true }), }); export default () => { |