Add third-party self-referential relations
Introduce a self-referential many-to-many relation table so a third party can have child third parties. Each relation is directional (parent to child); both directions can coexist as independent rows. Add a first_level boolean on third_parties (default true) with a filter on the list page that defaults to showing only first-level third parties. Frontend adds a "Third Parties" tab on the detail page where users can link existing third parties or create new ones from the common third party catalog (created as non-first-level). The list page gets a First Level/All toggle filter. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
|
||||
// Copyright (c) 2025-2026 Probo Inc <hello@getprobo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -183,6 +183,13 @@ export const description: INodeProperties[] = [
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Root',
|
||||
name: 'firstLevel',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether this is a first-level third party',
|
||||
},
|
||||
{
|
||||
displayName: 'Security Page URL',
|
||||
name: 'securityPageUrl',
|
||||
@@ -249,6 +256,7 @@ export async function execute(
|
||||
trustPageUrl?: string;
|
||||
certifications?: string;
|
||||
countries?: string;
|
||||
firstLevel?: boolean;
|
||||
};
|
||||
|
||||
const query = `
|
||||
@@ -275,6 +283,7 @@ export async function execute(
|
||||
certifications
|
||||
countries
|
||||
showOnTrustCenter
|
||||
firstLevel
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
@@ -303,6 +312,7 @@ export async function execute(
|
||||
if (additionalFields.subprocessorsListUrl) input.subprocessorsListUrl = additionalFields.subprocessorsListUrl;
|
||||
if (additionalFields.securityPageUrl) input.securityPageUrl = additionalFields.securityPageUrl;
|
||||
if (additionalFields.trustPageUrl) input.trustPageUrl = additionalFields.trustPageUrl;
|
||||
if (additionalFields.firstLevel !== undefined) input.firstLevel = additionalFields.firstLevel;
|
||||
if (additionalFields.certifications) {
|
||||
input.certifications = additionalFields.certifications.split(',').map((c) => c.trim()).filter(Boolean);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user