mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 17:46:41 +00:00
refactor(gui): linting
Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
This commit is contained in:
@@ -1,42 +1,41 @@
|
||||
<template>
|
||||
|
||||
<v-select
|
||||
v-model="hookEvent"
|
||||
class="caption"
|
||||
outlined
|
||||
dense
|
||||
v-model="hookEvent"
|
||||
label="Event"
|
||||
required
|
||||
:items="eventList"
|
||||
:item-text="v => v.text.join(' ')"
|
||||
:item-value="v => v.value.join(' ')"
|
||||
:rules="[v => !!v || 'Event Required']"
|
||||
>
|
||||
</v-select>
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "webhookEvent",
|
||||
name: 'WebhookEvent',
|
||||
props: ['operation', 'event'],
|
||||
data: () => ({
|
||||
eventList: [
|
||||
// {text: ["Before", "Insert"], value: ['before', 'insert']},
|
||||
{text: ["After", "Insert"], value: ['after', 'insert']},
|
||||
{ text: ['After', 'Insert'], value: ['after', 'insert'] },
|
||||
// {text: ["Before", "Update"], value: ['before', 'update']},
|
||||
{text: ["After", "Update"], value: ['after', 'update']},
|
||||
{ text: ['After', 'Update'], value: ['after', 'update'] },
|
||||
// {text: ["Before", "Delete"], value: ['before', 'delete']},
|
||||
{text: ["After", "Delete"], value: ['after', 'delete']},
|
||||
],
|
||||
{ text: ['After', 'Delete'], value: ['after', 'delete'] }
|
||||
]
|
||||
}),
|
||||
computed: {
|
||||
hookEvent: {
|
||||
get() {
|
||||
get () {
|
||||
return `${this.event} ${this.operation}`
|
||||
}, set(v) {
|
||||
const [event, operation] = v.split(' ');
|
||||
this.$emit('update:event', event);
|
||||
this.$emit('update:operation', operation);
|
||||
},
|
||||
set (v) {
|
||||
const [event, operation] = v.split(' ')
|
||||
this.$emit('update:event', event)
|
||||
this.$emit('update:operation', operation)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user