This commit is contained in:
2019-05-06 22:43:12 +00:00
parent ec3631c833
commit 354a6f365e
3 changed files with 29 additions and 31 deletions

View File

@@ -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 NEXT UP: Build, deploy and test all this block with all devices / browsers, see the test protocol.txt file for how to
TODO: 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 - 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 - 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 ?! - TechFull user should be edit own but can't navigate to inventory form to test when not going directly from a link ?!

View File

@@ -13,8 +13,7 @@
transition="scale-transition" transition="scale-transition"
class="multi-line" class="multi-line"
outline outline
>{{ formState.errorBoxMessage }}</v-alert >{{ formState.errorBoxMessage }}</v-alert>
>
</v-flex> </v-flex>
<v-flex xs12 sm6 lg4 xl3 px-2> <v-flex xs12 sm6 lg4 xl3 px-2>
<v-text-field <v-text-field
@@ -141,15 +140,15 @@
<v-layout align-left justify-center row wrap mt-5> <v-layout align-left justify-center row wrap mt-5>
<v-flex xs6 sm4> <v-flex xs6 sm4>
READY: {{ formState.ready }} READY: {{ formState.ready }}
<br /> <br>
LOADING: {{ formState.loading }} LOADING: {{ formState.loading }}
<br /> <br>
DIRTY: {{ formState.dirty }} DIRTY: {{ formState.dirty }}
<br /> <br>
VALID: {{ formState.valid }} VALID: {{ formState.valid }}
<br /> <br>
READONLY: {{ formState.readOnly }} READONLY: {{ formState.readOnly }}
<br /> <br>
</v-flex> </v-flex>
</v-layout> </v-layout>
</v-form> </v-form>
@@ -229,7 +228,7 @@ function generateMenu(vm, readOnly) {
vm.$gzevent.$emit("menu-change", menuOptions); vm.$gzevent.$emit("menu-change", menuOptions);
} }
var JUST_DELETED=false; var JUST_DELETED = false;
export default { export default {
beforeCreate() { beforeCreate() {
@@ -433,25 +432,11 @@ export default {
vm.formState.serverError = res.error; vm.formState.serverError = res.error;
vm.$gzform.setErrorBoxErrors(vm); vm.$gzform.setErrorBoxErrors(vm);
} else { } else {
JUST_DELETED=true; //workaround to prevent warning about leaving dirty record
// navigate backwards //For some reason I couldn't just reset isdirty in formstate
vm.$router.go(-1); 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);
// }
// );
} }
}) })
.catch(function handleGetDataFromAPIError(error) { .catch(function handleGetDataFromAPIError(error) {

View File

@@ -10,11 +10,9 @@
transition="scale-transition" transition="scale-transition"
class="multi-line" class="multi-line"
outline outline
>{{ formState.errorBoxMessage }}</v-alert >{{ formState.errorBoxMessage }}</v-alert>
>
</v-flex> </v-flex>
<v-flex> <v-flex>
<h1>{{ this.$gzlocale.get("Log") }}</h1>
<v-textarea v-model="logText" full-width readonly auto-grow></v-textarea> <v-textarea v-model="logText" full-width readonly auto-grow></v-textarea>
</v-flex> </v-flex>
</v-layout> </v-layout>
@@ -24,6 +22,21 @@
/* Xeslint-disable */ /* Xeslint-disable */
export default { export default {
created() { 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 = ""; var outText = "";
this.$_.forEach(this.$store.state.logArray, function appendLogItem(value) { this.$_.forEach(this.$store.state.logArray, function appendLogItem(value) {
outText += value + "\n"; outText += value + "\n";