This commit is contained in:
2019-03-07 00:58:08 +00:00
parent c6dc2e949d
commit c3020ac34a
4 changed files with 13 additions and 18 deletions

View File

@@ -12,14 +12,8 @@ TODO CLIENT STUFF
#### A PHONE IS PROBABLY NOT THE MOST COMMON SIZE FORM FACTOR THAT WILL BE USED. SUPPORT PHONES, YES, BUT DON'T GET HUNG UP ON IT TO THE POINT WHERE IT RUINS THE EXPERIENCE ON A FULL COMPUTER OR TABLET
LODASH using _.has, _.forEach, _.drop
TODO NEXT
Make a decision on standard procedure like in Inventorywidgetlist form and loading locale text and what to do if there is an issue.
- Just thinking maybe it's best to show form in either case of error or not because at least it's working even if the lt has an issue
- Simpler is better
-
TODO NEXT
Test if a deliberate error thrown in the locale text will properly still show the content of the pages that rely on it i.e. inventory, inventorywidgetedit, log
DATETIME
- Test on mobile and desktop all browsers before moving on, it must be solid with error handling (required, after before etc) and etc and then if all is well we can move on to the other field types

View File

@@ -20,7 +20,6 @@
<v-icon>fa-ellipsis-v</v-icon>
</v-btn>
</v-toolbar>
<v-data-table
v-model="selected"
:headers="headers"
@@ -81,7 +80,6 @@ export default {
throw err;
});
},
data() {
return {
formReady: false,
@@ -127,14 +125,12 @@ export default {
this.dialogdata.showeditdialog = true;
},
getDataFromApi() {
//debugger;
var listOptions = {
offset: 0,
limit: 5,
sort: "name",
asc: true
};
if (this.pagination.rowsPerPage && this.pagination.rowsPerPage > 0) {
listOptions.offset =
(this.pagination.page - 1) * this.pagination.rowsPerPage;
@@ -142,12 +138,9 @@ export default {
}
listOptions.sort = this.pagination.sortBy;
listOptions.asc = !this.pagination.descending;
this.loading = true;
//debugger;
var listUrl = "Widget/ListWidgets?" + this.$gzapi.buildQuery(listOptions);
this.$gzapi.get(listUrl).then(res => {
// debugger;
this.loading = false;
this.Items = res.data;
this.totalItems = res.paging.count;

View File

@@ -1,5 +1,5 @@
<template>
<v-layout column wrap class="my-5" align-center>
<v-layout column wrap class="my-5" align-center v-if="this.formReady">
<v-flex xs12>
<v-container grid-list-xl>
<v-layout row wrap align-top>
@@ -39,7 +39,12 @@ import PartAssemblyTop from "../components/inventorypartassemblytop";
export default {
beforeCreate() {
this.$gzlocale.fetch(["Inventory"]);
this.$gzlocale
.fetch(["Inventory"])
.then(() => (this.formReady = true))
.catch(err => {
throw err;
});
},
components: {
WidgetList,
@@ -49,7 +54,9 @@ export default {
PartAssemblyTop
},
data() {
return {};
return {
formReady: false
};
}
};
</script>

View File

@@ -21,6 +21,7 @@ export default {
.fetch(["Log"])
.then(() => (this.formReady = true))
.catch(err => {
this.formReady = true;
throw err;
});
},