This commit is contained in:
@@ -8,7 +8,7 @@ Success is the ability to go from failure to failure without loss of enthusiasm
|
||||
NEXT TODOS:
|
||||
|
||||
|
||||
TODO: VIEW PERSISTANCE / STATE
|
||||
DONE (for widgetlist grid and basic views): VIEW PERSISTANCE / STATE
|
||||
- Persist view on return
|
||||
- useful info here: https://vuejsdevelopers.com/2017/04/16/vue-js-browser-button-ux/
|
||||
- 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
|
||||
- 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
|
||||
|
||||
|
||||
TODO: ADD NEW WIDGET
|
||||
- Code for new record to the server
|
||||
- Need a path to making a new record
|
||||
- ID 0 maybe
|
||||
- Add new record button to the edit form for a widget
|
||||
- Hook up new record button on top of widget list
|
||||
- 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: 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
|
||||
- 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?
|
||||
|
||||
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: 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?
|
||||
- Also Save button at bottom seems like an issue too
|
||||
|
||||
|
||||
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: 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.
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable */
|
||||
/* Xeslint-disable */
|
||||
///////////////////////////////
|
||||
// gzform
|
||||
//
|
||||
@@ -523,8 +523,6 @@ export default {
|
||||
//
|
||||
//
|
||||
setFormSettings(formKey, formSettings) {
|
||||
console.log("GZFORM: committing form settings for form " + formKey);
|
||||
console.log(formSettings);
|
||||
store.commit("setFormSettings", {
|
||||
formKey: formKey,
|
||||
formSettings: formSettings
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* eslint-disable */
|
||||
/* Xeslint-disable */
|
||||
const FORM_KEY = "inventorywidgetlist";
|
||||
|
||||
export default {
|
||||
@@ -98,8 +98,6 @@ export default {
|
||||
})
|
||||
.then(() => {
|
||||
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
|
||||
if (!storedFormSettings) {
|
||||
@@ -126,10 +124,6 @@ export default {
|
||||
appError: null,
|
||||
serverError: {}
|
||||
},
|
||||
dialogdata: {
|
||||
showeditdialog: false,
|
||||
recordId: 0
|
||||
},
|
||||
totalItems: 0,
|
||||
Items: [],
|
||||
loading: true,
|
||||
@@ -166,8 +160,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
newItem() {
|
||||
this.dialogdata.recordId = -1;
|
||||
this.dialogdata.showeditdialog = true;
|
||||
this.$router.push({
|
||||
name: "inventory-widget-edit",
|
||||
params: { id: 0 }
|
||||
});
|
||||
},
|
||||
getDataFromApi() {
|
||||
var that = this;
|
||||
@@ -196,8 +192,6 @@ export default {
|
||||
that.localFormSettings.pagination &&
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import Vuex from "vuex";
|
||||
import createPersistedState from "vuex-persistedstate";
|
||||
import _ from "./libs/lodash.min.js";
|
||||
/* eslint-disable */
|
||||
/* Xeslint-disable */
|
||||
const MaxLogLength = 100;
|
||||
|
||||
Vue.use(Vuex);
|
||||
@@ -90,13 +90,7 @@ export default new Vuex.Store({
|
||||
state.formSettings = {};
|
||||
},
|
||||
setFormSettings(state, data) {
|
||||
console.log("STORE::setFormSettings for formkey " + data.formKey);
|
||||
console.log(data.formSettings);
|
||||
state.formSettings[data.formKey] = data.formSettings;
|
||||
|
||||
console.log("STORE::setFormSettings state.formSettings is now:");
|
||||
console.log(state.formSettings);
|
||||
|
||||
},
|
||||
clearFormSettings(state, formKey) {
|
||||
delete state.formSettings[formKey];
|
||||
|
||||
@@ -273,7 +273,10 @@ export default {
|
||||
},
|
||||
created() {
|
||||
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) {
|
||||
var vm = this;
|
||||
|
||||
Reference in New Issue
Block a user