This commit is contained in:
2020-11-03 00:30:23 +00:00
parent bdfeabe03f
commit b6fdd9292e
4 changed files with 21 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ export default {
role.SalesFull,
role.SalesLimited
],
title: "Priciest widgets",
title: "Priciest widgets (all time) ",
type: "GzDashTestListWidgetsPriciest"
},
{

View File

@@ -7,11 +7,11 @@
v-bind="$attrs"
>
<template slot="main">
<div class="ml-4 mt-1 d-flex align-center">
<div>
max list items:{{ maxListItems }}
<span class="green--text">{{ obj }}</span>
</div>
<div class="ml-4 mt-1">
<template v-for="(item, i) in obj"
><span :key="i"
>{{ localizedCurrency(item[1].v) }} - {{ item[0].v }} <br /></span
></template>
</div>
</template>
</gz-dash>
@@ -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
);
}
}
};

View File

@@ -227,6 +227,9 @@ Vue.prototype.$ay = {
},
sd: function(timestamp) {
return locale.utcDateToShortDateLocalized(timestamp);
},
cur: function(value) {
return locale.currencyLocalized(value);
}
};
new Vue({

View File

@@ -27,7 +27,6 @@
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-btn
color="primary"