This commit is contained in:
2019-06-12 18:59:48 +00:00
parent fa7028d370
commit 849bdf8b18

View 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>