This commit is contained in:
@@ -90,12 +90,12 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
ok() {
|
ok() {
|
||||||
this.resolve(this.selectedReport);
|
|
||||||
this.isVisible = false;
|
this.isVisible = false;
|
||||||
|
this.resolve(this.selectedReport);
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.resolve(null);
|
|
||||||
this.isVisible = false;
|
this.isVisible = false;
|
||||||
|
this.resolve(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container>
|
<v-container>
|
||||||
|
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||||
<v-row v-if="formState.ready">
|
<v-row v-if="formState.ready">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
|
||||||
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
|
||||||
</v-col>
|
|
||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
<v-row>
|
<v-row>
|
||||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||||
@@ -575,27 +573,27 @@ function clickHandler(menuItem) {
|
|||||||
m.vm.duplicate();
|
m.vm.duplicate();
|
||||||
break;
|
break;
|
||||||
case "report":
|
case "report":
|
||||||
//debugger;
|
//todo: code the rest of this block
|
||||||
|
//update generateMenu to put in last report choice from vuex
|
||||||
|
//update enable / disable menu item code to make reports disabled when dirty like save and duplicate
|
||||||
|
|
||||||
|
//finally, make a fake report viewer view to go to with choices set
|
||||||
|
|
||||||
m.vm.$refs.reportSelector.open().then(res => {
|
m.vm.$refs.reportSelector.open().then(res => {
|
||||||
console.log("Report selector result:", res);
|
//if null for no selection
|
||||||
|
//just bail out
|
||||||
|
if (res == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
alert("STUB: view report " + res.name);
|
||||||
|
|
||||||
|
//if not null then persist this choice in formstate in vuex
|
||||||
|
//res.id = report id
|
||||||
|
//res.name = report name
|
||||||
|
//DON"T NEED to regenerate menu because we're leaving this form anyway and it will generate on return
|
||||||
|
|
||||||
|
//Now open the report viewer...
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO: FOLLOWING TWO LINES STILL VALID BUT NEED TO MAKE A REPORT CHOOSER COMPONENT
|
|
||||||
// let reportList = window.$gz.report.availableReports("WIDGET");
|
|
||||||
// let selectedItem = reportList[0].value;
|
|
||||||
//alert("STUB: REPORT LIST DIALOG");
|
|
||||||
|
|
||||||
// window.$gz.dialog
|
|
||||||
// .getReportChoice(m.vm, reportList, selectedItem)
|
|
||||||
// .then(res => {
|
|
||||||
// if (res) {
|
|
||||||
// window.$gz.eventBus.$emit(
|
|
||||||
// "notify-success",
|
|
||||||
// FORM_KEY + "::report click, selected is: [" + res + "]"
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
@@ -652,6 +650,9 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//todo: get the last used report from the vuex form state and
|
||||||
|
//insert it here if it exists.
|
||||||
|
//was going to do multiple but that's a lot of fuckery and space eating
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "stub: Last report used",
|
title: "stub: Last report used",
|
||||||
icon: "fa-file-alt",
|
icon: "fa-file-alt",
|
||||||
|
|||||||
Reference in New Issue
Block a user