This commit is contained in:
@@ -119,9 +119,9 @@ export default {
|
|||||||
async getReportChoice(vm, reports) {
|
async getReportChoice(vm, reports) {
|
||||||
const result = await vm.$dialog.showAndWait(reportChooser, {
|
const result = await vm.$dialog.showAndWait(reportChooser, {
|
||||||
reports: reports,
|
reports: reports,
|
||||||
title: "Choose a report",
|
title: vm.$gzlocale.get("Report"),
|
||||||
oktext: "PrintIt!",
|
oktext: vm.$gzlocale.get("Print"),
|
||||||
canceltext: "fuckthisshit"
|
canceltext: vm.$gzlocale.get("Cancel")
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export default {
|
|||||||
"Delete",
|
"Delete",
|
||||||
"OK",
|
"OK",
|
||||||
"Print",
|
"Print",
|
||||||
|
"Report",
|
||||||
"WikiPage",
|
"WikiPage",
|
||||||
"Duplicate",
|
"Duplicate",
|
||||||
"RecordHistory",
|
"RecordHistory",
|
||||||
|
|||||||
@@ -3,20 +3,17 @@
|
|||||||
<v-select
|
<v-select
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
:items="reports"
|
:items="reports"
|
||||||
menu-props="auto"
|
|
||||||
hide-details
|
hide-details
|
||||||
single-line
|
single-line
|
||||||
|
prepend-icon="fa-print"
|
||||||
></v-select>
|
></v-select>
|
||||||
</DialogCard>
|
</DialogCard>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<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 {
|
export default {
|
||||||
// overlay: 'default',
|
// overlay: 'default',
|
||||||
// asyncData () {
|
// asyncData () {
|
||||||
@@ -39,22 +36,25 @@ export default {
|
|||||||
actions() {
|
actions() {
|
||||||
// debugger;
|
// debugger;
|
||||||
return {
|
return {
|
||||||
ok: {
|
|
||||||
flat: true,
|
|
||||||
text: this.oktext
|
|
||||||
},
|
|
||||||
cancel: {
|
cancel: {
|
||||||
flat: true,
|
flat: true,
|
||||||
text: this.canceltext,
|
text: this.canceltext,
|
||||||
|
key: "false",
|
||||||
handle: () => {
|
handle: () => {
|
||||||
return undefined;
|
// debugger;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
ok: {
|
||||||
|
flat: true,
|
||||||
|
text: this.oktext
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick() {
|
handleClick(res) {
|
||||||
|
// debugger;
|
||||||
this.$emit("submit", this.selected);
|
this.$emit("submit", this.selected);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ function clickHandler(menuItem) {
|
|||||||
break;
|
break;
|
||||||
case "report":
|
case "report":
|
||||||
m.vm.$gzdialog
|
m.vm.$gzdialog
|
||||||
.getReportChoice(m.vm, m.vm.$gzreport.availableReports())
|
.getReportChoice(m.vm, m.vm.$gzreport.availableReports("WIDGET"))
|
||||||
.then(result => {
|
.then(result => {
|
||||||
m.vm.$gzevent.$emit(
|
m.vm.$gzevent.$emit(
|
||||||
"notify-success",
|
"notify-success",
|
||||||
|
|||||||
Reference in New Issue
Block a user