This commit is contained in:
2019-06-12 19:45:49 +00:00
parent 11b439700c
commit 03d4b11394
4 changed files with 16 additions and 15 deletions

View File

@@ -119,9 +119,9 @@ export default {
async getReportChoice(vm, reports) {
const result = await vm.$dialog.showAndWait(reportChooser, {
reports: reports,
title: "Choose a report",
oktext: "PrintIt!",
canceltext: "fuckthisshit"
title: vm.$gzlocale.get("Report"),
oktext: vm.$gzlocale.get("Print"),
canceltext: vm.$gzlocale.get("Cancel")
});
return result;
}

View File

@@ -62,6 +62,7 @@ export default {
"Delete",
"OK",
"Print",
"Report",
"WikiPage",
"Duplicate",
"RecordHistory",

View File

@@ -3,20 +3,17 @@
<v-select
v-model="selected"
:items="reports"
menu-props="auto"
hide-details
single-line
prepend-icon="fa-print"
></v-select>
</DialogCard>
</template>
<script>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* Xeslint-disable */
/* eslint-disable */
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//TODO: add property to accept list of reports available to user
//todo: emit event on selection of report or try this.$emit('submit', inputs)
//and call by using const result = await this.$dialog.showAndWait(MyDialog, params)
export default {
// overlay: 'default',
// asyncData () {
@@ -39,22 +36,25 @@ export default {
actions() {
// debugger;
return {
ok: {
flat: true,
text: this.oktext
},
cancel: {
flat: true,
text: this.canceltext,
key: "false",
handle: () => {
return undefined;
// debugger;
return 0;
}
},
ok: {
flat: true,
text: this.oktext
}
};
}
},
methods: {
handleClick() {
handleClick(res) {
// debugger;
this.$emit("submit", this.selected);
return false;
}

View File

@@ -185,7 +185,7 @@ function clickHandler(menuItem) {
break;
case "report":
m.vm.$gzdialog
.getReportChoice(m.vm, m.vm.$gzreport.availableReports())
.getReportChoice(m.vm, m.vm.$gzreport.availableReports("WIDGET"))
.then(result => {
m.vm.$gzevent.$emit(
"notify-success",