This commit is contained in:
@@ -42,8 +42,6 @@ CURRENT ROADMAP
|
||||
CURRENT TODOs
|
||||
=-=-=-=-=-=-=
|
||||
|
||||
|
||||
todo: about link is showing on about form
|
||||
TODO: No way to make a new widget now!!!
|
||||
TODO: save (post) of new record at client triggers renavigation to that page again which also triggers fetch
|
||||
- So what's the point of returning the full record on post?
|
||||
@@ -51,6 +49,10 @@ TODO: save (post) of new record at client triggers renavigation to that page aga
|
||||
- On the other hand, is the data still kept in the view or is create called again fresh and all that??
|
||||
TODO: Switch control has issues in mobile view throws error "touch is undefined"
|
||||
- Update and see if fixes or else switch to some other component
|
||||
todo: clean browser open widget list doesn't fetch anything, seems to sit endlessly, only fix is to select a filter, unselect and force full refresh multiple times
|
||||
- No error at server
|
||||
- Maybe there is an issue with OLD stored list settings because completely wiping them fixes it.
|
||||
- HMMM...maybe we need to wipe the stored settings when the version changes or something, maybe this will be more of an issue later in dev process
|
||||
TODO: HELP link on listVieweditor not working
|
||||
TODO: Add test for *NULL* and not *NULL* in datalistfilter tests as there currently aren't any
|
||||
TODO: ay-data-list-view initform code shows proper way to initialize and await each step
|
||||
|
||||
@@ -134,10 +134,10 @@
|
||||
<v-toolbar-items>
|
||||
<template v-for="item in appBar.menuItems">
|
||||
<v-btn
|
||||
:key="item.key"
|
||||
class="hidden-xs-only"
|
||||
icon
|
||||
v-if="item.surface"
|
||||
:key="item.key"
|
||||
:disabled="item.disabled"
|
||||
@click="clickMenuItem(item)"
|
||||
>
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
"Logout",
|
||||
//form required options
|
||||
"Active",
|
||||
"Add",
|
||||
"New",
|
||||
"Cancel",
|
||||
"Close",
|
||||
"Save",
|
||||
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
case ayatype.Widget:
|
||||
vm.$router.push({
|
||||
name: "inventory-widget-edit",
|
||||
params: { id: tid.id }
|
||||
params: { recordid: tid.id }
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
class="subtitle-1"
|
||||
@click="gridCellButtonClick(c.key, c.i)"
|
||||
>
|
||||
<a href="#"> {{ c.v }}</a>
|
||||
<a href="javascript:"> {{ c.v }}</a>
|
||||
</div>
|
||||
<!-- <v-btn
|
||||
depressed
|
||||
@@ -231,7 +231,7 @@
|
||||
class="subtitle-1"
|
||||
@click="gridCellButtonClick(c.key, c.i)"
|
||||
>
|
||||
<a href="#"> {{ c.v }}</a>
|
||||
<a href="javascript:"> {{ c.v }}</a>
|
||||
</div>
|
||||
<!-- <span
|
||||
@click="gridCellButtonClick(c.key, c.i)"
|
||||
|
||||
@@ -442,7 +442,7 @@ export default new Router({
|
||||
|
||||
{
|
||||
//TEST WIDGET EDIT FORM
|
||||
path: "/inventory/widget/edit/:id",
|
||||
path: "/inventory/widget/edit/:recordid",
|
||||
name: "inventory-widget-edit",
|
||||
component: () =>
|
||||
import(
|
||||
|
||||
@@ -288,8 +288,8 @@ export default {
|
||||
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
//id 0 means create a new record don't load one
|
||||
if (this.$route.params.id != 0) {
|
||||
this.getDataFromApi(this.$route.params.id);
|
||||
if (this.$route.params.recordid != 0) {
|
||||
this.getDataFromApi(this.$route.params.recordid);
|
||||
} else {
|
||||
//setup for new record
|
||||
var readOnly = !this.rights.change;
|
||||
@@ -313,8 +313,8 @@ export default {
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
//fetch the data for the record as if it's a new record
|
||||
if (to.params.id != 0) {
|
||||
this.getDataFromApi(to.params.id);
|
||||
if (to.params.recordid != 0) {
|
||||
this.getDataFromApi(to.params.recordid);
|
||||
}
|
||||
next();
|
||||
// react to route changes...
|
||||
@@ -485,7 +485,7 @@ export default {
|
||||
if (this.canSave) {
|
||||
this.formState.loading = true;
|
||||
var vm = this;
|
||||
var url = API_BASE_URL + this.$route.params.id;
|
||||
var url = API_BASE_URL + this.$route.params.recordid;
|
||||
|
||||
//clear any errors vm might be around from previous submit
|
||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||
@@ -531,13 +531,13 @@ export default {
|
||||
//do the delete
|
||||
vm.formState.loading = true;
|
||||
//No need to delete a new record, just abandon it...
|
||||
if (this.$route.params.id == 0) {
|
||||
if (this.$route.params.recordid == 0) {
|
||||
//this should not get offered for delete but to be safe and clear just in case:
|
||||
JUST_DELETED = true;
|
||||
// navigate backwards
|
||||
vm.$router.go(-1);
|
||||
} else {
|
||||
var url = API_BASE_URL + vm.$route.params.id;
|
||||
var url = API_BASE_URL + vm.$route.params.recordid;
|
||||
|
||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||
window.$gz.api
|
||||
@@ -567,10 +567,10 @@ export default {
|
||||
});
|
||||
},
|
||||
duplicate() {
|
||||
if (this.canDuplicate && this.$route.params.id != 0) {
|
||||
if (this.canDuplicate && this.$route.params.recordid != 0) {
|
||||
this.formState.loading = true;
|
||||
var vm = this;
|
||||
var url = API_BASE_URL + "duplicate/" + this.$route.params.id;
|
||||
var url = API_BASE_URL + "duplicate/" + this.$route.params.recordid;
|
||||
|
||||
//clear any errors vm might be around from previous submit
|
||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||
@@ -659,7 +659,7 @@ function generateMenu(vm) {
|
||||
formData: {
|
||||
formKey: FORM_KEY,
|
||||
ayaType: window.$gz.type.Widget,
|
||||
recordId: vm.$route.params.id,
|
||||
recordId: vm.$route.params.recordid,
|
||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY
|
||||
},
|
||||
menuItems: []
|
||||
|
||||
@@ -18,17 +18,10 @@ export default {
|
||||
components: {
|
||||
GzDataTable
|
||||
},
|
||||
beforeCreate() {
|
||||
window.$gz.eventBus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "vial",
|
||||
title: window.$gz.locale.get("WidgetList"),
|
||||
helpUrl: "form-ay-data-list-view",
|
||||
menuItems: []
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.Widget);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
generateMenu(this);
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||
@@ -38,7 +31,8 @@ export default {
|
||||
currentListViewId: 1,
|
||||
dataListKey: "TestWidgetDataList",
|
||||
dataListFilter: "",
|
||||
dataListSort: ""
|
||||
dataListSort: "",
|
||||
rights: window.$gz.role.defaultRightsObject()
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -58,6 +52,12 @@ function clickHandler(menuItem) {
|
||||
var m = window.$gz.menu.parseMenuItem(menuItem);
|
||||
if (m.owner == FORM_KEY && !m.disabled) {
|
||||
switch (m.key) {
|
||||
case "new":
|
||||
m.vm.$router.push({
|
||||
name: "inventory-widget-edit",
|
||||
params: { recordid: 0 }
|
||||
});
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -66,4 +66,45 @@ function clickHandler(menuItem) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function generateMenu(vm) {
|
||||
var menuOptions = {
|
||||
isMain: true,
|
||||
icon: "vial",
|
||||
title: window.$gz.locale.get("WidgetList"),
|
||||
helpUrl: "form-ay-data-list-view",
|
||||
menuItems: []
|
||||
};
|
||||
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
title: window.$gz.locale.get("New"),
|
||||
icon: "plus",
|
||||
surface: true,
|
||||
key: FORM_KEY + ":new",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
|
||||
//STUB REPORTS
|
||||
//Report not Print, print is a further option
|
||||
menuOptions.menuItems.push({
|
||||
title: window.$gz.locale.get("Report"),
|
||||
icon: "file-alt",
|
||||
key: FORM_KEY + ":report",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "stub: Last report used",
|
||||
icon: "file-alt",
|
||||
key: FORM_KEY + ":report:STUBlastusedreportid",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user