|
|
|
@ -23,9 +23,10 @@ interface Props {
|
|
|
|
|
hookId?: string |
|
|
|
|
showLoading?: boolean |
|
|
|
|
modelValue?: Filter[] |
|
|
|
|
webHook?: boolean |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { nested = false, parentId, autoSave = true, hookId = null, modelValue, showLoading = true } = defineProps<Props>() |
|
|
|
|
const { nested = false, parentId, autoSave = true, hookId = null, modelValue, showLoading = true, webHook } = defineProps<Props>() |
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:filtersLength']) |
|
|
|
|
|
|
|
|
@ -101,7 +102,7 @@ const types = computed(() => {
|
|
|
|
|
watch( |
|
|
|
|
() => activeView.value?.id, |
|
|
|
|
(n, o) => { |
|
|
|
|
if (n !== o) loadFilters(hookId as string) |
|
|
|
|
if (n !== o && (hookId || !webHook)) loadFilters(hookId as string) |
|
|
|
|
}, |
|
|
|
|
{ immediate: true }, |
|
|
|
|
) |
|
|
|
@ -137,7 +138,7 @@ defineExpose({
|
|
|
|
|
:class="{ 'shadow min-w-[430px] max-w-[630px] max-h-[max(80vh,500px)] overflow-auto': !nested, 'border-1 w-full': nested }" |
|
|
|
|
> |
|
|
|
|
<div v-if="filters && filters.length" class="nc-filter-grid mb-2" @click.stop> |
|
|
|
|
<template v-for="(filter, i) in filters" :key="filter.id || i"> |
|
|
|
|
<template v-for="(filter, i) in filters" :key="i"> |
|
|
|
|
<template v-if="filter.status !== 'delete'"> |
|
|
|
|
<template v-if="filter.is_group"> |
|
|
|
|
<MdiCloseBox |
|
|
|
@ -280,7 +281,7 @@ defineExpose({
|
|
|
|
|
{{ $t('activity.addFilter') }} |
|
|
|
|
</div> |
|
|
|
|
</a-button> |
|
|
|
|
<a-button class="text-capitalize !text-gray-500" @click.stop="addFilterGroup"> |
|
|
|
|
<a-button class="text-capitalize !text-gray-500" v-if="!webHook" @click.stop="addFilterGroup"> |
|
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
|
<!-- <v-icon small color="grey"> mdi-plus </v-icon> --> |
|
|
|
|
<!-- Add Filter Group --> |
|
|
|
|