This commit is contained in:
2018-11-28 18:38:20 +00:00
parent 5288c55d80
commit d398e489ae
2 changed files with 4 additions and 34 deletions

View File

@@ -50,32 +50,11 @@
<script>
/* eslint-disable */
/* Xeslint-disable */
import localeText from "../api/locale";
import pagedList from "../api/pagedlist";
import WidgetEdit from "../components/inventorywidgetedit";
export default {
init() {
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",
@@ -134,17 +113,12 @@ export default {
}
},
mounted() {
console.log("MOUNTED");
this.getDataFromApi();
},
computed: {},
methods: {
lt: function(key) {
console.log("Calling LT for " + key);
var v = localeText.get(key);
console.log("LT: returning " + v);
return v;
//return localeText.get(key);
return localeText.get(key);
},
newItem() {
this.dialogdata.recordId = -1;

View File

@@ -37,7 +37,7 @@
</template>
<script>
/* eslint-disable */
/* Xeslint-disable */
import WidgetList from "../components/inventorywidgetlist";
import WarehouseTop from "../components/inventorywarehousetop";
import POTop from "../components/inventorypotop";
@@ -70,13 +70,9 @@ export default {
return {};
},
beforeRouteEnter(to, from, next) {
//get lt, roles, populate top level components accordingly
//Cache all required lt keys
var ltKeysRequired = ["Inventory"].concat(WidgetList.ltKeysRequired);
console.log("Inventory.vue, ltKeysRequiredIs:");
console.log(ltKeysRequired);
lt.fetch(ltKeysRequired).then(() => {
// //init widgetlist
// WidgetList.init().then(next());
next();
});
},