This commit is contained in:
@@ -50,7 +50,6 @@ CURRENT TODOs
|
|||||||
@@@@@@@@@@@ ROADMAP STAGE 2:
|
@@@@@@@@@@@ ROADMAP STAGE 2:
|
||||||
|
|
||||||
|
|
||||||
todo: Customer login should have help links go to a special customer end user section in the manual, but they can still view the rest of the manual becuase maybe they will buy it
|
|
||||||
todo: new widget
|
todo: new widget
|
||||||
- There should be a new option (in addition to duplicate) within the existing widget form because it makes sense to want to make a new one while editing previous one
|
- There should be a new option (in addition to duplicate) within the existing widget form because it makes sense to want to make a new one while editing previous one
|
||||||
- Plus you could have arrived there from anywhere, don't want to have to reload a big list just to add a new one
|
- Plus you could have arrived there from anywhere, don't want to have to reload a big list just to add a new one
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
<v-content>
|
<v-content>
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
<transition name="fade" mode="out-in" @after-leave="afterLeave">
|
<transition name="fade" mode="out-in" @after-leave="afterLeave">
|
||||||
<router-view class="view"></router-view>
|
<router-view class="view" :key="$route.fullPath"></router-view>
|
||||||
</transition>
|
</transition>
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-content>
|
</v-content>
|
||||||
|
|||||||
@@ -341,25 +341,25 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//enable / disable save button
|
//enable / disable save button
|
||||||
let canSave = val.dirty && val.valid && !val.readOnly;
|
if (val.dirty && val.valid && !val.readOnly) {
|
||||||
if (canSave) {
|
|
||||||
window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":save");
|
window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":save");
|
||||||
} else {
|
} else {
|
||||||
window.$gz.eventBus.$emit("menu-disable-item", FORM_KEY + ":save");
|
window.$gz.eventBus.$emit("menu-disable-item", FORM_KEY + ":save");
|
||||||
}
|
}
|
||||||
|
|
||||||
//enable / disable duplicate button
|
//enable / disable duplicate / new button
|
||||||
let canDuplicate = !val.dirty && val.valid && !val.readOnly;
|
if (!val.dirty && val.valid && !val.readOnly) {
|
||||||
if (canDuplicate) {
|
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"menu-enable-item",
|
"menu-enable-item",
|
||||||
FORM_KEY + ":duplicate"
|
FORM_KEY + ":duplicate"
|
||||||
);
|
);
|
||||||
|
window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":new");
|
||||||
} else {
|
} else {
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"menu-disable-item",
|
"menu-disable-item",
|
||||||
FORM_KEY + ":duplicate"
|
FORM_KEY + ":duplicate"
|
||||||
);
|
);
|
||||||
|
window.$gz.eventBus.$emit("menu-disable-item", FORM_KEY + ":new");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
@@ -574,6 +574,12 @@ function clickHandler(menuItem) {
|
|||||||
case "delete":
|
case "delete":
|
||||||
m.vm.remove();
|
m.vm.remove();
|
||||||
break;
|
break;
|
||||||
|
case "new":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "widget-edit",
|
||||||
|
params: { recordid: 0, new: true }
|
||||||
|
});
|
||||||
|
break;
|
||||||
case "duplicate":
|
case "duplicate":
|
||||||
m.vm.duplicate();
|
m.vm.duplicate();
|
||||||
break;
|
break;
|
||||||
@@ -657,6 +663,15 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (vm.rights.change) {
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: vm.$ay.t("New"),
|
||||||
|
icon: "fa-plus",
|
||||||
|
key: FORM_KEY + ":new",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: vm.$ay.t("Duplicate"),
|
title: vm.$ay.t("Duplicate"),
|
||||||
|
|||||||
Reference in New Issue
Block a user