From b6fdd9292e017d639cb7fe14d1dc0537aa7b7759 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 3 Nov 2020 00:30:23 +0000 Subject: [PATCH] --- ayanova/src/api/dash-registry.js | 2 +- .../dash-test-list-widgets-priciest.vue | 23 ++++++++++++++----- ayanova/src/main.js | 3 +++ ayanova/src/views/home-dashboard.vue | 1 - 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ayanova/src/api/dash-registry.js b/ayanova/src/api/dash-registry.js index 70df6588..4a1dcbec 100644 --- a/ayanova/src/api/dash-registry.js +++ b/ayanova/src/api/dash-registry.js @@ -10,7 +10,7 @@ export default { role.SalesFull, role.SalesLimited ], - title: "Priciest widgets", + title: "Priciest widgets (all time) ", type: "GzDashTestListWidgetsPriciest" }, { diff --git a/ayanova/src/components/dash-test-list-widgets-priciest.vue b/ayanova/src/components/dash-test-list-widgets-priciest.vue index e738e61c..f3f52599 100644 --- a/ayanova/src/components/dash-test-list-widgets-priciest.vue +++ b/ayanova/src/components/dash-test-list-widgets-priciest.vue @@ -7,11 +7,11 @@ v-bind="$attrs" > @@ -33,7 +33,11 @@ export default { GzDash }, data() { - return { obj: [] }; + return { + obj: [], + currencyName: window.$gz.locale.getCurrencyName(), + languageName: window.$gz.locale.getBrowserFirstLanguage() + }; }, props: { maxListItems: { type: Number, default: 10 } @@ -50,6 +54,13 @@ export default { } else { this.obj = []; } + }, + localizedCurrency(value) { + return window.$gz.locale.currencyLocalized( + value, + this.languageName, + this.currencyName + ); } } }; diff --git a/ayanova/src/main.js b/ayanova/src/main.js index 957229ce..31c36d89 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -227,6 +227,9 @@ Vue.prototype.$ay = { }, sd: function(timestamp) { return locale.utcDateToShortDateLocalized(timestamp); + }, + cur: function(value) { + return locale.currencyLocalized(value); } }; new Vue({ diff --git a/ayanova/src/views/home-dashboard.vue b/ayanova/src/views/home-dashboard.vue index 47e8a530..051d74ca 100644 --- a/ayanova/src/views/home-dashboard.vue +++ b/ayanova/src/views/home-dashboard.vue @@ -27,7 +27,6 @@ -