From 71901c90ca052b6ccc3f2bf6da4fb6b15b5fc9e5 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 6 Nov 2019 01:06:27 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 2 +- ayanova/src/api/errorhandler.js | 3 +- ayanova/src/api/initialize.js | 4 +- .../src/components/inventorywidgetlist.vue | 17 ++++--- ayanova/src/main.js | 5 +- ayanova/src/plugins/vuetify.js | 51 ++++--------------- ayanova/src/views/login.vue | 2 + 7 files changed, 28 insertions(+), 56 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 5b702e24..66904ac6 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -53,7 +53,7 @@ http://localhost:8080/login -Implemented all changes to bring up to 2.x AFAIK, now need to fixup layout then get into edit form and grid again. +Grid not taking 25, 99 etc, stuck at 5 initial value for rows per page and that's what fetches off the server as well Vuetify dialog changes - https://github.com/yariksav/vuetify-dialog/issues/46 diff --git a/ayanova/src/api/errorhandler.js b/ayanova/src/api/errorhandler.js index 61f19b98..a436f016 100644 --- a/ayanova/src/api/errorhandler.js +++ b/ayanova/src/api/errorhandler.js @@ -1,4 +1,4 @@ -/* Xeslint-disable */ +/* eslint-disable */ var devModeShowErrors = false; @@ -7,6 +7,7 @@ var devModeShowErrors = false; // Localize, Log and optionally display errors // return localized message in case caller needs it function dealWithError(msg, vm) { + debugger; msg = window.$gz.locale.translateString(msg); //In some cases the error may not be localizable, if this is not a debug run then it should show without the ?? that localizing puts in keys not found //so it's not as wierd looking to the user diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index fe7d6885..7e2dbc29 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -1,4 +1,4 @@ -/* xeslint-disable */ +/* Xeslint-disable */ function addNavItem(title, icon, route) { window.$gz.store.commit("addNavItem", { @@ -144,7 +144,7 @@ export default function initialize() { if (res.data.timeZoneOffset != localOffset) { //TODO: localize message and also actually have a fix for it here //so this should be a confirm prompt but for now will just show it - + //for now just show the message window.$gz.eventBus.$emit( "notify-info", diff --git a/ayanova/src/components/inventorywidgetlist.vue b/ayanova/src/components/inventorywidgetlist.vue index 7ea25134..b50fbc1e 100644 --- a/ayanova/src/components/inventorywidgetlist.vue +++ b/ayanova/src/components/inventorywidgetlist.vue @@ -143,13 +143,13 @@ Actual in inspector browser code: */ //set default values for form settings if they are not present yet - if (!formSettings.saved || !formSettings.saved.rowsPerPage) { + if (!formSettings.saved || !formSettings.saved.itemsPerPage) { that.localFormSettings = { pagination: {} }; } else { that.localFormSettings.pagination = { - rowsPerPage: formSettings.saved.rowsPerPage, + itemsPerPage: formSettings.saved.itemsPerPage, sortBy: [formSettings.saved.sortBy], descending: formSettings.saved.descending }; @@ -232,6 +232,7 @@ Actual in inspector browser code: //console.log(this.selected); }, getDataFromApi() { + //debugger; var that = this; var listOptions = { offset: 0, @@ -241,13 +242,13 @@ Actual in inspector browser code: }; if ( - this.localFormSettings.pagination.rowsPerPage && - this.localFormSettings.pagination.rowsPerPage > 0 + this.localFormSettings.pagination.itemsPerPage && + this.localFormSettings.pagination.itemsPerPage > 0 ) { listOptions.offset = (this.localFormSettings.pagination.page - 1) * - this.localFormSettings.pagination.rowsPerPage; - listOptions.limit = this.localFormSettings.pagination.rowsPerPage; + this.localFormSettings.pagination.itemsPerPage; + listOptions.limit = this.localFormSettings.pagination.itemsPerPage; } listOptions.sort = this.localFormSettings.pagination.sortBy; listOptions.asc = !this.localFormSettings.pagination.descending; @@ -256,12 +257,12 @@ Actual in inspector browser code: if ( that.localFormSettings && that.localFormSettings.pagination && - that.localFormSettings.pagination.rowsPerPage + that.localFormSettings.pagination.itemsPerPage ) { window.$gz.form.setFormSettings(FORM_KEY, { temp: { page: that.localFormSettings.pagination.page }, saved: { - rowsPerPage: that.localFormSettings.pagination.rowsPerPage, + itemsPerPage: that.localFormSettings.pagination.itemsPerPage, sortBy: that.localFormSettings.pagination.sortBy, descending: that.localFormSettings.pagination.descending } diff --git a/ayanova/src/main.js b/ayanova/src/main.js index e2c7b1aa..afdc0b88 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -1,4 +1,4 @@ -/* XXXeslint-disable */ +/* eslint-disable */ import "@babel/polyfill"; import "@fortawesome/fontawesome-free/css/all.css"; import "typeface-roboto/index.css"; @@ -167,6 +167,7 @@ Vue.component("gz-date-time-picker", dateTimeControl); Vue.component("gz-tag-picker", tagPicker); Vue.component("gz-custom-fields", customFieldsControl); + //////////////////////////////////////////////////////// //3rd party ui components // @@ -189,7 +190,7 @@ Vue.directive("focus", { }); // console.log(Vue); -// console.log(Vuetify); +// console.log(Vuetify.lang); // debugger; ///////////////////////////////////////////////////////////////// diff --git a/ayanova/src/plugins/vuetify.js b/ayanova/src/plugins/vuetify.js index c5b9844e..08fd63f0 100644 --- a/ayanova/src/plugins/vuetify.js +++ b/ayanova/src/plugins/vuetify.js @@ -1,38 +1,13 @@ -/* Xeslint-disable */ - -// import Vue from "vue"; -// import Vuetify from "vuetify"; -// import "vuetify/dist/vuetify.min.css"; - -// Vue.use(Vuetify, { -// iconfont: "fa", -// theme: { -// primary: "#00205B", //Canucks dark blue -// secondary: "#00843D", //canucks green - -// accent: "#db7022", //lighter orangey red, more friendly looking though not as much clarity it seems -// //error: "#b71c1c", //dark red, easy to read but not error-y enough possibly - -// //accent: "#BD491A", //dark orangey red, more clarity, less friendly looking -// error: "#ff5252", //lighter red, have to see if it's good for all screens and sizes as it's a bit light but it stands out as an error condition better - -// disabled: "#e0e0e0" -// } -// }); - -// v2.0 -// src/plugins/vuetify.js +/* xeslint-disable */ import Vue from "vue"; import Vuetify from "vuetify/lib"; - -// console.log(Vue); -// console.log(Vuetify); -// debugger; +import myLang from "../api/en"; Vue.use(Vuetify); export default new Vuetify({ + lang: { locales: { myLang }, current: "myLang" }, theme: { themes: { light: { @@ -54,17 +29,9 @@ export default new Vuetify({ } }); -/** - * -export default new Vuetify({ - theme: { - themes: { - light: { - primary: colors.red.darken1, // #E53935 - secondary: colors.red.lighten4, // #FFCDD2 - accent: colors.indigo.base, // #3F51B5 - }, - }, - }, -}) - */ +// export default new Vuetify({ +// lang: { +// locales: { zhHans, pl, sv }, +// current: 'zhHans', +// }, +// }) diff --git a/ayanova/src/views/login.vue b/ayanova/src/views/login.vue index 45f308c2..b8b00d3d 100644 --- a/ayanova/src/views/login.vue +++ b/ayanova/src/views/login.vue @@ -91,6 +91,8 @@ export default { if (this.input.username != "" && this.input.password != "") { this.errorBadCreds = false; var vm = this; + // eslint-disable-next-line no-debugger + debugger; auth .authenticate(this.input.username, this.input.password) .then(() => {