Browse Source

fix(gui-v2): hook filter

pull/3129/head
Wing-Kam Wong 2 years ago
parent
commit
12ee6aeae5
  1. 14
      packages/nc-gui-v2/components/webhook/Editor.vue

14
packages/nc-gui-v2/components/webhook/Editor.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { Form, message } from 'ant-design-vue' import { Form, message } from 'ant-design-vue'
import { inject, reactive, useApi, useNuxtApp, extractSdkResponseErrorMsg, fieldRequiredValidator, MetaInj } from '#imports' import { MetaInj, extractSdkResponseErrorMsg, fieldRequiredValidator, inject, reactive, useApi, useNuxtApp } from '#imports'
const emit = defineEmits(['backToList', 'editOrAdd']) const emit = defineEmits(['backToList', 'editOrAdd'])
@ -44,7 +44,7 @@ const discordChannels = ref<Record<string, any>[]>([])
const mattermostChannels = ref<Record<string, any>[]>([]) const mattermostChannels = ref<Record<string, any>[]>([])
const filters = ref([]) const filterRef = ref()
const formInput = ref({ const formInput = ref({
'Email': [ 'Email': [
@ -339,12 +339,7 @@ async function saveHooks() {
hook.id = res.id hook.id = res.id
} }
// TODO: wait for filter implementation await filterRef.value.applyChanges(hook.id)
// if ($refs.filter) {
// await $refs.filter.applyChanges(false, {
// hookId: hook.id,
// });
// }
message.success('Webhook details updated successfully') message.success('Webhook details updated successfully')
} catch (e: any) { } catch (e: any) {
@ -570,7 +565,7 @@ onMounted(async () => {
<a-col :span="24"> <a-col :span="24">
<a-card> <a-card>
<a-checkbox v-model:checked="hook.condition">On Condition</a-checkbox> <a-checkbox v-model:checked="hook.condition">On Condition</a-checkbox>
<SmartsheetToolbarColumnFilter v-if="hook.condition" /> <SmartsheetToolbarColumnFilter v-if="hook.condition" ref="filterRef" :auto-save="false" :hook-id="hook.id" />
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>
@ -598,7 +593,6 @@ onMounted(async () => {
ref="webhookTestRef" ref="webhookTestRef"
:hook="{ :hook="{
...hook, ...hook,
filters,
notification: { notification: {
...hook.notification, ...hook.notification,
payload: hook.notification.payload, payload: hook.notification.payload,

Loading…
Cancel
Save