Reports!
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<v-app>
|
<v-app>
|
||||||
<gznotify ref="gznotify"></gznotify>
|
<gznotify ref="gznotify"></gznotify>
|
||||||
<gzconfirm ref="gzconfirm"></gzconfirm>
|
<gzconfirm ref="gzconfirm"></gzconfirm>
|
||||||
|
<!-- <gzreportselector ref="gzreportselector"></gzreportselector> -->
|
||||||
<!-- Width of nav drawer set to allow widest translated text menu item to show which is spanish client service requests item -->
|
<!-- Width of nav drawer set to allow widest translated text menu item to show which is spanish client service requests item -->
|
||||||
<v-navigation-drawer
|
<v-navigation-drawer
|
||||||
v-if="isAuthenticated"
|
v-if="isAuthenticated"
|
||||||
@@ -230,12 +231,14 @@
|
|||||||
import ayaNovaVersion from "./api/ayanova-version";
|
import ayaNovaVersion from "./api/ayanova-version";
|
||||||
import gzconfirm from "./components/gzconfirm";
|
import gzconfirm from "./components/gzconfirm";
|
||||||
import gznotify from "./components/gznotify";
|
import gznotify from "./components/gznotify";
|
||||||
|
//import gzreportselector from "./components/report-selector-control";
|
||||||
import openObjectHandler from "./api/open-object-handler";
|
import openObjectHandler from "./api/open-object-handler";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
gzconfirm,
|
gzconfirm,
|
||||||
gznotify
|
gznotify
|
||||||
|
//,gzreportselector
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
78
ayanova/src/components/report-selector-control.vue
Normal file
78
ayanova/src/components/report-selector-control.vue
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<template>
|
||||||
|
<div class="text-center">
|
||||||
|
<v-dialog
|
||||||
|
persistent
|
||||||
|
v-model="isVisible"
|
||||||
|
:max-width="options.width"
|
||||||
|
@keydown.esc="cancel"
|
||||||
|
:data-cy="!!$ay.dev ? 'reportselector' : false"
|
||||||
|
>
|
||||||
|
<v-card elevation="24">
|
||||||
|
<v-card-title class="headline lighten-2" primary-title>
|
||||||
|
<span> {{ $ay.t("Report") }} </span>
|
||||||
|
</v-card-title>
|
||||||
|
|
||||||
|
<v-card-text>
|
||||||
|
//list of reports here
|
||||||
|
</v-card-text>
|
||||||
|
|
||||||
|
<!-- <v-divider></v-divider> v-bind:class="options.type" -->
|
||||||
|
|
||||||
|
<v-card-actions>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn
|
||||||
|
color="primary darken-1"
|
||||||
|
text
|
||||||
|
@click.native="cancel"
|
||||||
|
:data-cy="!!$ay.dev ? 'reportselector:cancel' : false"
|
||||||
|
>{{ $ay.t("Cancel") }}</v-btn
|
||||||
|
>
|
||||||
|
<v-btn
|
||||||
|
color="primary darken-1"
|
||||||
|
text
|
||||||
|
@click.native="ok"
|
||||||
|
:data-cy="!!$ay.dev ? 'reportselector:ok' : false"
|
||||||
|
>{{ $ay.t("Ok") }}</v-btn
|
||||||
|
>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data: () => ({
|
||||||
|
isVisible: false,
|
||||||
|
resolve: null,
|
||||||
|
reject: null,
|
||||||
|
options: {
|
||||||
|
width: 290,
|
||||||
|
zIndex: 200
|
||||||
|
},
|
||||||
|
selectedReportId: null
|
||||||
|
}),
|
||||||
|
props: {
|
||||||
|
ayaType: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.isVisible = true;
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.resolve = resolve;
|
||||||
|
this.reject = reject;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
ok() {
|
||||||
|
this.resolve(true);
|
||||||
|
this.isVisible = false;
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.resolve(false);
|
||||||
|
this.isVisible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -16,6 +16,7 @@ import VueCurrencyInput from "vue-currency-input";
|
|||||||
import lodash from "./libs/lodash.min.js";
|
import lodash from "./libs/lodash.min.js";
|
||||||
|
|
||||||
//my libs
|
//my libs
|
||||||
|
import errorhandler from "./api/errorhandler";
|
||||||
import ayaNovaVersion from "./api/ayanova-version";
|
import ayaNovaVersion from "./api/ayanova-version";
|
||||||
import gzeventbus from "./api/eventbus";
|
import gzeventbus from "./api/eventbus";
|
||||||
import gzmenu from "./api/gzmenu";
|
import gzmenu from "./api/gzmenu";
|
||||||
@@ -42,7 +43,7 @@ import customFieldsControl from "./components/custom-fields-control.vue";
|
|||||||
import currencyControl from "./components/currency-control.vue";
|
import currencyControl from "./components/currency-control.vue";
|
||||||
import decimalControl from "./components/decimal-control.vue";
|
import decimalControl from "./components/decimal-control.vue";
|
||||||
import errorControl from "./components/error-control.vue";
|
import errorControl from "./components/error-control.vue";
|
||||||
import errorhandler from "./api/errorhandler";
|
import reportSelectorControl from "./components/report-selector-control.vue";
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// LIBS AND GLOBAL ITEMS
|
// LIBS AND GLOBAL ITEMS
|
||||||
@@ -170,6 +171,7 @@ Vue.component("gz-custom-fields", customFieldsControl);
|
|||||||
Vue.component("gz-currency", currencyControl);
|
Vue.component("gz-currency", currencyControl);
|
||||||
Vue.component("gz-decimal", decimalControl);
|
Vue.component("gz-decimal", decimalControl);
|
||||||
Vue.component("gz-error", errorControl);
|
Vue.component("gz-error", errorControl);
|
||||||
|
Vue.component("gz-report-selector", reportSelectorControl);
|
||||||
|
|
||||||
//3rd party components
|
//3rd party components
|
||||||
Vue.use(VueCurrencyInput);
|
Vue.use(VueCurrencyInput);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-row v-if="formState.ready">
|
<v-row v-if="formState.ready">
|
||||||
|
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
<v-row>
|
<v-row>
|
||||||
@@ -572,10 +573,15 @@ function clickHandler(menuItem) {
|
|||||||
m.vm.duplicate();
|
m.vm.duplicate();
|
||||||
break;
|
break;
|
||||||
case "report":
|
case "report":
|
||||||
|
//debugger;
|
||||||
|
m.vm.$refs.reportSelector.open().then(res => {
|
||||||
|
console.log("Report selector result:", res);
|
||||||
|
});
|
||||||
|
|
||||||
//TODO: FOLLOWING TWO LINES STILL VALID BUT NEED TO MAKE A REPORT CHOOSER COMPONENT
|
//TODO: FOLLOWING TWO LINES STILL VALID BUT NEED TO MAKE A REPORT CHOOSER COMPONENT
|
||||||
// let reportList = window.$gz.report.availableReports("WIDGET");
|
// let reportList = window.$gz.report.availableReports("WIDGET");
|
||||||
// let selectedItem = reportList[0].value;
|
// let selectedItem = reportList[0].value;
|
||||||
alert("STUB: REPORT LIST DIALOG");
|
//alert("STUB: REPORT LIST DIALOG");
|
||||||
|
|
||||||
// window.$gz.dialog
|
// window.$gz.dialog
|
||||||
// .getReportChoice(m.vm, reportList, selectedItem)
|
// .getReportChoice(m.vm, reportList, selectedItem)
|
||||||
|
|||||||
Reference in New Issue
Block a user