From a49ee8f15ce264e6758a37498c4668c71a6067a9 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 4 May 2024 09:22:02 +0000 Subject: [PATCH] feat: add nested filter support in webhook --- .../components/smartsheet/toolbar/ColumnFilter.vue | 4 ++-- packages/nocodb/src/helpers/webhookHelpers.ts | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue index c7ff8c2650..6786165378 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue @@ -419,9 +419,9 @@ const onLogicalOpUpdate = async (filter: Filter, index: number) => { class="min-w-20 capitalize" placeholder="Group op" dropdown-class-name="nc-dropdown-filter-logical-op-group" + :disabled="i > 1 && !isLogicalOpChangeAllowed" @click.stop @change="saveOrUpdate(filter, i)" - :disabled="(i > 1 && !isLogicalOpChangeAllowed)" >
@@ -618,7 +618,7 @@ const onLogicalOpUpdate = async (filter: Filter, index: number) => {
- +
diff --git a/packages/nocodb/src/helpers/webhookHelpers.ts b/packages/nocodb/src/helpers/webhookHelpers.ts index 6faba5155b..59fa0d1fec 100644 --- a/packages/nocodb/src/helpers/webhookHelpers.ts +++ b/packages/nocodb/src/helpers/webhookHelpers.ts @@ -54,8 +54,15 @@ export async function validateCondition( const column = await filter.getColumn(); const field = column.title; let val = data[field]; - - if ( + if (filter.is_group) { + res = await validateCondition( + filter.children || (await filter.getChildren()), + data, + { + client, + }, + ); + } else if ( [ UITypes.Date, UITypes.DateTime,