This commit is contained in:
2019-04-22 19:30:12 +00:00
parent 47b46796c6
commit c2f84bd5c4
2 changed files with 33 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
# CLIENT TODO (J.F.C. - Just fucking code it already) # CLIENT TODO (J.F.C. - Just fucking code it already)
Happy monday, some fun items to start the week...
All platforms and browsers All platforms and browsers
- IN PROGRESS: Initially outdated, had to force a refresh to make it load the latest version - IN PROGRESS: Initially outdated, had to force a refresh to make it load the latest version
@@ -39,7 +39,7 @@ All platforms and browsers
- DONE That way we can put anything into the data key again because in future might need whole objects etc (almost certainly will) - DONE That way we can put anything into the data key again because in future might need whole objects etc (almost certainly will)
- DONE Move ABOUT item to just above HELP in menu and remove from main NAV and make it navigate properly on click - DONE Move ABOUT item to just above HELP in menu and remove from main NAV and make it navigate properly on click
- DONE Make about contextual and insert a menu item to view log - DONE Make about contextual and insert a menu item to view log
### HERE --->>> - WIRE up save menu item and add code to disable save on broken rules (and make red, disabled etc) - WIRE up save menu item and add code to disable save on broken rules (and make red, disabled etc)
- Wire up delete menu item - Wire up delete menu item
- api code is stubbed out for delete, need to write that as well - api code is stubbed out for delete, need to write that as well
- DONE TODO navigating through menu doesn't "back" properly when clicking back on browser controls - DONE TODO navigating through menu doesn't "back" properly when clicking back on browser controls

View File

@@ -112,7 +112,7 @@
</v-flex> </v-flex>
</v-layout> </v-layout>
<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>
<v-btn small @click="remove">{{ this.$gzlocale.get("Delete")}}</v-btn> <v-btn small @click="remove">{{ this.$gzlocale.get("Delete")}}</v-btn>
</v-flex> </v-flex>
@@ -122,7 +122,7 @@
<v-flex xs6 sm4> <v-flex xs6 sm4>
<v-btn small @click="submit">{{ this.$gzlocale.get("Save")}}</v-btn> <v-btn small @click="submit">{{ this.$gzlocale.get("Save")}}</v-btn>
</v-flex> </v-flex>
</v-layout> </v-layout>-->
</v-form> </v-form>
</v-flex> </v-flex>
</v-layout> </v-layout>
@@ -131,9 +131,26 @@
<script> <script>
/* xeslint-disable */ /* xeslint-disable */
function clickHandler(menuItem) { function clickHandler(menuItem) {
if (!menuItem) {
return;
}
var item = this.$gzmenu.parseMenuItem(menuItem); var item = this.$gzmenu.parseMenuItem(menuItem);
if (item.owner == "inventory-widget-edit" && !item.disabled) { if (item.owner == "inventory-widget-edit" && !item.disabled) {
alert("inventory-widget-edit.vue::context click: " + item.key); switch (item.key) {
case "save":
this.submit();
break;
case "delete":
this.remove();
break;
case "duplicate":
this.duplicate();
break;
default:
alert(
"inventory-widget-edit.vue::context click: [" + menuItem.key + "]"
);
}
} }
} }
export default { export default {
@@ -186,7 +203,8 @@ export default {
title: this.$gzlocale.get("Save"), title: this.$gzlocale.get("Save"),
icon: "save", icon: "save",
surface: true, surface: true,
key: "inventory-widget-edit:save" key: "inventory-widget-edit:save",
method: this.submit
}, },
{ {
title: this.$gzlocale.get("Delete"), title: this.$gzlocale.get("Delete"),
@@ -271,12 +289,19 @@ export default {
that.$gzHandleFormError(error, that); that.$gzHandleFormError(error, that);
}); });
} }
}, //end of submit() },
remove() { remove() {
//check rights //check rights
//do the delete //do the delete
alert("STUB: DELETE"); alert("STUB: DELETE");
}, //end of remove() },
duplicate() {
//only if not dirty
//check rights
//duplicate
//navigate to new record
alert("STUB: DUPLICATE");
},
stubTestClick() { stubTestClick() {
this.$gzevent.$emit("menu-replace-item", { this.$gzevent.$emit("menu-replace-item", {
title: this.$gzlocale.get("Save"), title: this.$gzlocale.get("Save"),