This commit is contained in:
2019-06-12 18:59:39 +00:00
parent 58e46dde5e
commit fa7028d370
3 changed files with 42 additions and 19 deletions

View File

@@ -1,3 +1,5 @@
import reportChooser from "../components/report-chooser.vue";
/* Xeslint-disable */
/////////////////////////////////
@@ -111,6 +113,15 @@ export default {
}
]
});
}, /////////////////////////////////////
// Show a report list
//
async getReportChoice(vm, reports) {
const result = await vm.$dialog.showAndWait(reportChooser, {
reports: reports,
title: "MYTITLE"
});
return result;
}
//new functions above here
};

View File

@@ -6,23 +6,26 @@ export default {
availableReports: function(reportKey) {
//STUB: this will need to hit the server to get the info required
return [
{ name: "First test report " + reportKey, id: 1 },
{ name: "Some other report " + reportKey, id: 2 },
{ name: "Sample report " + reportKey, id: 3 },
{ name: "Bob's personal report, it's a good one! " + reportKey, id: 4 },
{ name: "Test report five " + reportKey, id: 5 },
{ name: "Test report six " + reportKey, id: 6 },
{ name: "Test report seven " + reportKey, id: 7 },
{ name: "Test report eight " + reportKey, id: 8 },
{ name: "Test report nine " + reportKey, id: 9 },
{ name: "Test report ten " + reportKey, id: 10 },
{ name: "Test report eleven " + reportKey, id: 11 },
{ name: "Test report twelve " + reportKey, id: 12 },
{ name: "Test report thirteen " + reportKey, id: 13 },
{ name: "Test report fourteen " + reportKey, id: 14 },
{ name: "Test report fifteen " + reportKey, id: 15 },
{ name: "Test report sixteen " + reportKey, id: 16 },
{ name: "Test report seventeen " + reportKey, id: 17 }
{ text: "First test report " + reportKey, value: 1 },
{ text: "Some other report " + reportKey, value: 2 },
{ text: "Sample report " + reportKey, value: 3 },
{
text: "Bob's personal report, it's a good one! " + reportKey,
value: 4
},
{ text: "Test report five " + reportKey, value: 5 },
{ text: "Test report six " + reportKey, value: 6 },
{ text: "Test report seven " + reportKey, value: 7 },
{ text: "Test report eight " + reportKey, value: 8 },
{ text: "Test report nine " + reportKey, value: 9 },
{ text: "Test report ten " + reportKey, value: 10 },
{ text: "Test report eleven " + reportKey, value: 11 },
{ text: "Test report twelve " + reportKey, value: 12 },
{ text: "Test report thirteen " + reportKey, value: 13 },
{ text: "Test report fourteen " + reportKey, value: 14 },
{ text: "Test report fifteen " + reportKey, value: 15 },
{ text: "Test report sixteen " + reportKey, value: 16 },
{ text: "Test report seventeen " + reportKey, value: 17 }
];
}
};

View File

@@ -182,6 +182,17 @@ function clickHandler(menuItem) {
break;
case "duplicate":
m.vm.duplicate();
break;
case "report":
m.vm.$gzdialog
.getReportChoice(m.vm, m.vm.$gzreport.availableReports())
.then(result => {
m.vm.$gzevent.$emit(
"notify-success",
FORM_KEY + "::report click, selected is: [" + result + "]"
);
});
break;
default:
m.vm.$gzevent.$emit(
@@ -288,8 +299,6 @@ export default {
.fetch(ltKeysRequired)
.then(() => {
//don't have access to local data object until here
// vm.rights = this.$gzrole.getRights(this, this.$gztype.Widget);
// console.log("BEFORECREATE: setting rights");
vm.formState.ready = true;
})
.catch(err => {