This commit is contained in:
66
ayanova/src/components/report-chooser.vue
Normal file
66
ayanova/src/components/report-chooser.vue
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<template>
|
||||||
|
<DialogCard :title="title" :actions="actions" :handle="handleClick">
|
||||||
|
<v-select
|
||||||
|
v-model="selected"
|
||||||
|
:items="reports"
|
||||||
|
menu-props="auto"
|
||||||
|
hide-details
|
||||||
|
single-line
|
||||||
|
></v-select>
|
||||||
|
</DialogCard>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/* 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 () {
|
||||||
|
// return new Promise(resolve => {
|
||||||
|
// setTimeout(resolve, 3000)
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selected: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
title: String,
|
||||||
|
reports: Array
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
actions() {
|
||||||
|
return {
|
||||||
|
ok: {
|
||||||
|
flat: true,
|
||||||
|
text: "OCURR"
|
||||||
|
// ,
|
||||||
|
// handle: function(a,b,c,d) {
|
||||||
|
|
||||||
|
// debugger;
|
||||||
|
// this.$emit("submit", this.selected);
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
flat: true,
|
||||||
|
text: "CRNCL",
|
||||||
|
handle: () => {
|
||||||
|
return "NOPE";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick (res) {
|
||||||
|
this.$emit('submit', this.selected)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user