This commit is contained in:
@@ -10,7 +10,7 @@ export default {
|
||||
role.SalesFull,
|
||||
role.SalesLimited
|
||||
],
|
||||
title: "Priciest widgets",
|
||||
title: "Priciest widgets (all time) ",
|
||||
type: "GzDashTestListWidgetsPriciest"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -227,6 +227,9 @@ Vue.prototype.$ay = {
|
||||
},
|
||||
sd: function(timestamp) {
|
||||
return locale.utcDateToShortDateLocalized(timestamp);
|
||||
},
|
||||
cur: function(value) {
|
||||
return locale.currencyLocalized(value);
|
||||
}
|
||||
};
|
||||
new Vue({
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
</v-card-text>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="primary"
|
||||
|
||||
Reference in New Issue
Block a user