Make custom Tags relation filterable on all four entities

Expose the custom many-to-many CTag "Tags" relation as a linkMultiple
field (cTags) so it can be added to the list-view Search Filters, and
build the full Tags setup on Lead from scratch in parity with the others.

Opportunity / Contact / Account (relation already existed):
- add fields.cTags (linkMultiple) to entityDefs
- add cTags to the Search-Filters layout (Opportunity appended, preserving
  cAccount1; Contact/Account get a full filters.json incl. cTags)

Lead (built from scratch):
- create Lead<->CTag many-to-many relation via EntityManager (relationName
  cLeadTag, join table c_lead_tag); link normalized to cTags to mirror the
  other three (API auto-prefix had produced cCTags)
- add cTags field, de_DE/en_US labels, clientDefs panel polish (create:false,
  unlink-only row actions), bottomPanelsDetail entry, and filters.json
- CTag side: links.interessenten label de "Interessenten" / en "Leads"

Verified via API/DB: cTags linkMultiple present on all four scopes; Lead
link/CTag.interessenten resolve; Any of / All of / None of filters execute
and return correct results end-to-end; existing data intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
mkt
2026-06-16 16:31:30 +02:00
parent cebe829dcd
commit e61af83d25
16 changed files with 489 additions and 327 deletions

View File

@@ -5,11 +5,13 @@
"fields": {
"verkaufschancen": "Verkaufschancen",
"kontakte": "Kontakte",
"firmen": "Firmen"
"firmen": "Firmen",
"interessenten": "Interessenten"
},
"links": {
"verkaufschancen": "Verkaufschancen",
"kontakte": "Kontakte",
"firmen": "Firmen"
"firmen": "Firmen",
"interessenten": "Interessenten"
}
}

View File

@@ -0,0 +1,8 @@
{
"fields": {
"cTags": "Tags"
},
"links": {
"cTags": "Tags"
}
}

View File

@@ -5,11 +5,13 @@
"fields": {
"verkaufschancen": "Verkaufschancen",
"kontakte": "Kontakte",
"firmen": "Firmen"
"firmen": "Firmen",
"interessenten": "Leads"
},
"links": {
"verkaufschancen": "Verkaufschancen",
"kontakte": "Kontakte",
"firmen": "Firmen"
"firmen": "Firmen",
"interessenten": "Leads"
}
}

View File

@@ -0,0 +1,8 @@
{
"fields": {
"cTags": "Tags"
},
"links": {
"cTags": "Tags"
}
}

View File

@@ -0,0 +1,20 @@
[
"assignedUser",
"teams",
"createdAt",
"createdBy",
"modifiedAt",
"streamUpdatedAt",
"type",
"industry",
"description",
"emailAddress",
"phoneNumber",
"targetLists",
"billingAddressCountry",
"billingAddress",
"shippingAddress",
"website",
"campaign",
"cTags"
]

View File

@@ -0,0 +1,16 @@
[
"assignedUser",
"teams",
"createdAt",
"createdBy",
"modifiedAt",
"streamUpdatedAt",
"accounts",
"address",
"emailAddress",
"phoneNumber",
"title",
"targetLists",
"campaign",
"cTags"
]

View File

@@ -0,0 +1,8 @@
{
"targetLists": {
"index": 5
},
"cTags": {
"index": 6
}
}

View File

@@ -0,0 +1,20 @@
[
"assignedUser",
"teams",
"createdAt",
"createdBy",
"modifiedAt",
"streamUpdatedAt",
"address",
"accountName",
"campaign",
"emailAddress",
"phoneNumber",
"status",
"source",
"opportunityAmountConverted",
"industry",
"targetLists",
"createdAccount",
"cTags"
]

View File

@@ -0,0 +1,20 @@
[
"assignedUser",
"teams",
"createdAt",
"createdBy",
"modifiedAt",
"streamUpdatedAt",
"account",
"cAccount1",
"amountConverted",
"amountWeightedConverted",
"campaign",
"closeDate",
"contacts",
"leadSource",
"probability",
"stage",
"description",
"cTags"
]

View File

@@ -15,6 +15,10 @@
"firmen": {
"layout": null,
"selectPrimaryFilterName": null
},
"interessenten": {
"layout": null,
"selectPrimaryFilterName": null
}
}
}

View File

@@ -0,0 +1,8 @@
{
"relationshipPanels": {
"cTags": {
"create": false,
"rowActionsView": "custom:views/record/row-actions/tags-unlink-only"
}
}
}

View File

@@ -15,5 +15,12 @@
"audited": false,
"isCustom": true
}
},
"fields": {
"cTags": {
"type": "linkMultiple",
"view": "views/fields/link-multiple",
"isCustom": true
}
}
}

View File

@@ -78,6 +78,14 @@
"entity": "Account",
"audited": false,
"isCustom": true
},
"interessenten": {
"type": "hasMany",
"relationName": "cLeadTag",
"foreign": "cTags",
"entity": "Lead",
"audited": false,
"isCustom": true
}
},
"collection": {

View File

@@ -8,5 +8,12 @@
"audited": false,
"isCustom": true
}
},
"fields": {
"cTags": {
"type": "linkMultiple",
"view": "views/fields/link-multiple",
"isCustom": true
}
}
}

View File

@@ -0,0 +1,19 @@
{
"fields": {
"cTags": {
"type": "linkMultiple",
"view": "views/fields/link-multiple",
"isCustom": true
}
},
"links": {
"cTags": {
"type": "hasMany",
"relationName": "cLeadTag",
"foreign": "interessenten",
"entity": "CTag",
"audited": false,
"isCustom": true
}
}
}

View File

@@ -145,6 +145,11 @@
},
"closeDate": {
"required": false
},
"cTags": {
"type": "linkMultiple",
"view": "views/fields/link-multiple",
"isCustom": true
}
},
"links": {