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.
47 lines
1.1 KiB
47 lines
1.1 KiB
<template> |
|
<v-select |
|
v-model="hookEvent" |
|
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']" |
|
/> |
|
</template> |
|
|
|
<script> |
|
export default { |
|
name: 'WebhookEvent', |
|
props: ['operation', 'event'], |
|
data: () => ({ |
|
eventList: [ |
|
// {text: ["Before", "Insert"], value: ['before', 'insert']}, |
|
{ text: ['After', 'Insert'], value: ['after', 'insert'] }, |
|
// {text: ["Before", "Update"], value: ['before', 'update']}, |
|
{ text: ['After', 'Update'], value: ['after', 'update'] }, |
|
// {text: ["Before", "Delete"], value: ['before', 'delete']}, |
|
{ text: ['After', 'Delete'], value: ['after', 'delete'] } |
|
] |
|
}), |
|
computed: { |
|
hookEvent: { |
|
get() { |
|
return `${this.event} ${this.operation}` |
|
}, |
|
set(v) { |
|
const [event, operation] = v.split(' ') |
|
this.$emit('update:event', event) |
|
this.$emit('update:operation', operation) |
|
} |
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style scoped> |
|
|
|
</style>
|
|
|