Reports!
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user