mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
4 years ago
|
<template>
|
||
|
<v-select
|
||
3 years ago
|
v-model="hookEvent"
|
||
4 years ago
|
class="caption"
|
||
|
outlined
|
||
|
dense
|
||
|
label="Event"
|
||
|
required
|
||
|
:items="eventList"
|
||
|
:item-text="v => v.text.join(' ')"
|
||
|
:item-value="v => v.value.join(' ')"
|
||
|
:rules="[v => !!v || 'Event Required']"
|
||
3 years ago
|
/>
|
||
4 years ago
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
3 years ago
|
name: 'WebhookEvent',
|
||
4 years ago
|
props: ['operation', 'event'],
|
||
|
data: () => ({
|
||
|
eventList: [
|
||
|
// {text: ["Before", "Insert"], value: ['before', 'insert']},
|
||
3 years ago
|
{ text: ['After', 'Insert'], value: ['after', 'insert'] },
|
||
4 years ago
|
// {text: ["Before", "Update"], value: ['before', 'update']},
|
||
3 years ago
|
{ text: ['After', 'Update'], value: ['after', 'update'] },
|
||
4 years ago
|
// {text: ["Before", "Delete"], value: ['before', 'delete']},
|
||
2 years ago
|
{ text: ['After', 'Delete'], value: ['after', 'delete'] },
|
||
|
],
|
||
4 years ago
|
}),
|
||
|
computed: {
|
||
|
hookEvent: {
|
||
3 years ago
|
get() {
|
||
2 years ago
|
return `${this.event} ${this.operation}`;
|
||
3 years ago
|
},
|
||
3 years ago
|
set(v) {
|
||
2 years ago
|
const [event, operation] = v.split(' ');
|
||
|
this.$emit('update:event', event);
|
||
|
this.$emit('update:operation', operation);
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
};
|
||
4 years ago
|
</script>
|
||
|
|
||
2 years ago
|
<style scoped></style>
|