diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2d74239f..eb233057 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -3,7 +3,7 @@ NEXT UP: Build, deploy and test all this block with all devices / browsers, see the test protocol.txt file for how to TODO: - - Delete works but triggers navigation guard when record has been edited and is dirty and it attempts to navigate away after deletion automatically + - DONE Delete works but triggers navigation guard when record has been edited and is dirty and it attempts to navigate away after deletion automatically - Dirty delete should clear dirty after successful delete then move away or whatever - About form when you go to log doesn't update the title bar showing log, still seems to say about ayanova - TechFull user should be edit own but can't navigate to inventory form to test when not going directly from a link ?! diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index 34cb5fa5..e43c0d2f 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -13,8 +13,7 @@ transition="scale-transition" class="multi-line" outline - >{{ formState.errorBoxMessage }} + >{{ formState.errorBoxMessage }} READY: {{ formState.ready }} -
+
LOADING: {{ formState.loading }} -
+
DIRTY: {{ formState.dirty }} -
+
VALID: {{ formState.valid }} -
+
READONLY: {{ formState.readOnly }} -
+
@@ -229,7 +228,7 @@ function generateMenu(vm, readOnly) { vm.$gzevent.$emit("menu-change", menuOptions); } -var JUST_DELETED=false; +var JUST_DELETED = false; export default { beforeCreate() { @@ -433,25 +432,11 @@ export default { vm.formState.serverError = res.error; vm.$gzform.setErrorBoxErrors(vm); } else { - JUST_DELETED=true; - // navigate backwards - vm.$router.go(-1); - - - // //es-lint-disable-next-line - // console.log(vm.$gzform.setFormState); - // //success set to not dirty so navigation guard is not triggered - // var that=vm; - // that.$gzform - // .setFormState({ - // vm: that, - // dirty: false - // }) - // .then(() =>{ - // // navigate backwards - // that.$router.go(-1); - // } - // ); + //workaround to prevent warning about leaving dirty record + //For some reason I couldn't just reset isdirty in formstate + JUST_DELETED = true; + // navigate backwards + vm.$router.go(-1); } }) .catch(function handleGetDataFromAPIError(error) { diff --git a/ayanova/src/views/log.vue b/ayanova/src/views/log.vue index c7783820..55e093b4 100644 --- a/ayanova/src/views/log.vue +++ b/ayanova/src/views/log.vue @@ -10,11 +10,9 @@ transition="scale-transition" class="multi-line" outline - >{{ formState.errorBoxMessage }} + >{{ formState.errorBoxMessage }}
-

{{ this.$gzlocale.get("Log") }}

@@ -24,6 +22,21 @@ /* Xeslint-disable */ export default { created() { + this.$gzevent.$emit("menu-change", { + isMain: false, + icon: "fa-info-circle", + title: this.$gzlocale.get("Log"), + menuItems: [ + // { + // title: this.$gzlocale.get("Log"), + // icon: "glasses", + // surface: true, + // key: "app:nav:log", + // data: "log" + // } + ] + }); + var outText = ""; this.$_.forEach(this.$store.state.logArray, function appendLogItem(value) { outText += value + "\n";