This commit is contained in:
2018-11-28 18:35:36 +00:00
parent 97fdab7a48
commit 5288c55d80
3 changed files with 48 additions and 16 deletions

View File

@@ -50,16 +50,44 @@
<script>
/* xeslint-disable */
/* eslint-disable */
import localeText from "../api/locale";
import pagedList from "../api/pagedlist";
import WidgetEdit from "../components/inventorywidgetedit";
export default {
init() {
localeText.fetch(["Widget", "WidgetList"]).then(() => {
// alert("inventorywidgetlist::FULLY INITIALIZED");
});
return localeText
.fetch([
"Widget",
"WidgetList",
"WidgetName",
"WidgetSerial",
"WidgetDollarAmount",
"WidgetActive",
"WidgetRoles",
"WidgetStartDate",
"WidgetEndDate",
"WidgetNotes"
])
.then(() => {
console.log(
"inventorywidgetlist::FULLY INITIALIZED, widgetSerial=" +
localeText.get("WidgetSerial")
);
});
},
ltKeysRequired: [
"Widget",
"WidgetList",
"WidgetName",
"WidgetSerial",
"WidgetDollarAmount",
"WidgetActive",
"WidgetRoles",
"WidgetStartDate",
"WidgetEndDate",
"WidgetNotes"
],
components: {
WidgetEdit
},
@@ -76,10 +104,10 @@ export default {
selected: [],
headers: [
{
text: "Widget",
text: this.lt("Widget"),
value: "name"
},
{ text: "Serial", value: "serial" },
{ text: this.lt("WidgetSerial"), value: "serial" },
{ text: "Price", value: "dollarAmount" },
{ text: "Active", value: "active" },
{ text: "Roles", value: "roles" },
@@ -106,17 +134,17 @@ export default {
}
},
mounted() {
console.log("MOUNTED");
this.getDataFromApi();
},
computed: {},
methods: {
// init() {
// localeText.fetch(["Widget", "WidgetList"]).then(() => {
// alert("inventorywidgetlist::FULLY INITIALIZED");
// });
// },
lt: function(key) {
return localeText.get(key);
console.log("Calling LT for " + key);
var v = localeText.get(key);
console.log("LT: returning " + v);
return v;
//return localeText.get(key);
},
newItem() {
this.dialogdata.recordId = -1;