This commit is contained in:
2019-06-05 17:29:48 +00:00
parent 1ef6f6bbd9
commit 47d037dc76
5 changed files with 22 additions and 35 deletions

View File

@@ -8,7 +8,7 @@ Success is the ability to go from failure to failure without loss of enthusiasm
NEXT TODOS: NEXT TODOS:
TODO: VIEW PERSISTANCE / STATE DONE (for widgetlist grid and basic views): VIEW PERSISTANCE / STATE
- Persist view on return - Persist view on return
- useful info here: https://vuejsdevelopers.com/2017/04/16/vue-js-browser-button-ux/ - useful info here: https://vuejsdevelopers.com/2017/04/16/vue-js-browser-button-ux/
- there's another item like this below somewhere. - there's another item like this below somewhere.
@@ -27,25 +27,19 @@ TODO: VIEW PERSISTANCE / STATE
- On the other hand the scroll position should not survive a session and should be cleared - On the other hand the scroll position should not survive a session and should be cleared
- We don't need to worry about this for the pages in theory as there is a built in method used in router to enable it which seems flakey but it's the way to do it - We don't need to worry about this for the pages in theory as there is a built in method used in router to enable it which seems flakey but it's the way to do it
- Focus only on the type that survives a session for now, the rest as required - Focus only on the type that survives a session for now, the rest as required
TODO: ADD NEW WIDGET TODO: ADD NEW WIDGET
- Code for new record to the server - Add new record button to the edit form for a widget
- Need a path to making a new record - Hook up new record button on top of widget list
- ID 0 maybe - Code for new record to the server
- Need a path to making a new record
- ID 0 maybe
TODO: Fill selection boxes, autocomplete etc TODO: Fill selection boxes, autocomplete etc
TODO: NOW THAT FORM IS THERE MOSTLY, CLEAN UP CODE FOR RE-USE in many other forms TODO: NOW THAT FORM IS THERE MOSTLY, CLEAN UP CODE FOR RE-USE in many other forms
- Don't need to replicate common code so put it somewhere else - Don't need to replicate common code so put it somewhere else
- formstate shit is also menu shit really so can they be combined somehow, like present two sets of menu options one read only and one fully read-write? - formstate shit is also menu shit really so can they be combined somehow, like present two sets of menu options one read only and one fully read-write?
- some forms will have special needs but could handle them outside of the regular boilerplate shit? - some forms will have special needs but could handle them outside of the regular boilerplate shit?
TODO: Add toast popup or however it's supposed to happen to the gzmenu handler where popups are processed
TODO: INVESTIGATE - DO I need to institute a back button? (in APP MODE?? installed to "desktop" on device will I be able to easily navigate without back and forward buttons) TODO: INVESTIGATE - DO I need to institute a back button? (in APP MODE?? installed to "desktop" on device will I be able to easily navigate without back and forward buttons)
TODO: Delete widget button and rights stuff
TODO: History button, other AyaNova 7 example buttons all need to be there or their equivalent, do we need a top menu type thing? TODO: History button, other AyaNova 7 example buttons all need to be there or their equivalent, do we need a top menu type thing?
- Also Save button at bottom seems like an issue too
TODO: TAGS!!! Do tags mofo TODO: TAGS!!! Do tags mofo
TODO: //todo: timezone doesn't match, offer to fix it in initialize.js there needs to be a prompt and autofix TODO: //todo: timezone doesn't match, offer to fix it in initialize.js there needs to be a prompt and autofix
TODO: Automated testing of UI by driving web interaction, that needs to be instituted asap TODO: Automated testing of UI by driving web interaction, that needs to be instituted asap
@@ -64,7 +58,11 @@ TODO: Outstanding case with vuetify bug in clear button when readonly, check if
TODO: code the user options with the currency symbol etc on the server and then update client to fetch them. Use static values instad in locale. TODO: code the user options with the currency symbol etc on the server and then update client to fetch them. Use static values instad in locale.
Locale should fetch those settings the first time it sees they are not present so that they are refreshed upon use and are not stored in localstorage Locale should fetch those settings the first time it sees they are not present so that they are refreshed upon use and are not stored in localstorage
(or should they be? anyway, can work that out later) (or should they be? anyway, can work that out later)
TODO: License trial handling front end code to make my life easier
TODO: Local user settings page / UI where can
- set locale choices and values
- Reset to default form settings
- Other shit I can't think of right now but there will be a lot

View File

@@ -1,4 +1,4 @@
/* eslint-disable */ /* Xeslint-disable */
/////////////////////////////// ///////////////////////////////
// gzform // gzform
// //
@@ -523,8 +523,6 @@ export default {
// //
// //
setFormSettings(formKey, formSettings) { setFormSettings(formKey, formSettings) {
console.log("GZFORM: committing form settings for form " + formKey);
console.log(formSettings);
store.commit("setFormSettings", { store.commit("setFormSettings", {
formKey: formKey, formKey: formKey,
formSettings: formSettings formSettings: formSettings

View File

@@ -71,7 +71,7 @@
</template> </template>
<script> <script>
/* eslint-disable */ /* Xeslint-disable */
const FORM_KEY = "inventorywidgetlist"; const FORM_KEY = "inventorywidgetlist";
export default { export default {
@@ -98,8 +98,6 @@ export default {
}) })
.then(() => { .then(() => {
var storedFormSettings = that.$gzform.getFormSettings(FORM_KEY); var storedFormSettings = that.$gzform.getFormSettings(FORM_KEY);
console.log("IWL:beforeCreate storedFormSettings:");
console.log(storedFormSettings);
//set default values for form settings if they are not present yet //set default values for form settings if they are not present yet
if (!storedFormSettings) { if (!storedFormSettings) {
@@ -126,10 +124,6 @@ export default {
appError: null, appError: null,
serverError: {} serverError: {}
}, },
dialogdata: {
showeditdialog: false,
recordId: 0
},
totalItems: 0, totalItems: 0,
Items: [], Items: [],
loading: true, loading: true,
@@ -166,8 +160,10 @@ export default {
}, },
methods: { methods: {
newItem() { newItem() {
this.dialogdata.recordId = -1; this.$router.push({
this.dialogdata.showeditdialog = true; name: "inventory-widget-edit",
params: { id: 0 }
});
}, },
getDataFromApi() { getDataFromApi() {
var that = this; var that = this;
@@ -196,8 +192,6 @@ export default {
that.localFormSettings.pagination && that.localFormSettings.pagination &&
that.localFormSettings.pagination.rowsPerPage that.localFormSettings.pagination.rowsPerPage
) { ) {
console.log("IWL: setting local formsettings as there is data:");
console.log(that.localFormSettings);
that.$gzform.setFormSettings(FORM_KEY, that.localFormSettings); that.$gzform.setFormSettings(FORM_KEY, that.localFormSettings);
} }

View File

@@ -2,7 +2,7 @@ import Vue from "vue";
import Vuex from "vuex"; import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate"; import createPersistedState from "vuex-persistedstate";
import _ from "./libs/lodash.min.js"; import _ from "./libs/lodash.min.js";
/* eslint-disable */ /* Xeslint-disable */
const MaxLogLength = 100; const MaxLogLength = 100;
Vue.use(Vuex); Vue.use(Vuex);
@@ -90,13 +90,7 @@ export default new Vuex.Store({
state.formSettings = {}; state.formSettings = {};
}, },
setFormSettings(state, data) { setFormSettings(state, data) {
console.log("STORE::setFormSettings for formkey " + data.formKey);
console.log(data.formSettings);
state.formSettings[data.formKey] = data.formSettings; state.formSettings[data.formKey] = data.formSettings;
console.log("STORE::setFormSettings state.formSettings is now:");
console.log(state.formSettings);
}, },
clearFormSettings(state, formKey) { clearFormSettings(state, formKey) {
delete state.formSettings[formKey]; delete state.formSettings[formKey];

View File

@@ -273,7 +273,10 @@ export default {
}, },
created() { created() {
this.$gzevent.$on("menu-click", clickHandler); this.$gzevent.$on("menu-click", clickHandler);
this.getDataFromApi(); //id 0 means create a new record don't load one
if (this.$route.params.id != 0) {
this.getDataFromApi();
}
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
var vm = this; var vm = this;