WIP - add contct and contact details

This commit is contained in:
Francisco Gaona
2026-01-12 21:08:47 +01:00
parent f8a3cffb64
commit ca11c8cbe7
19 changed files with 551 additions and 94 deletions

View File

@@ -98,10 +98,20 @@ const visibleRelatedLists = computed<RelatedListConfig[]>(() => {
const layoutRelatedLists = pageLayout.value?.relatedLists
if (!layoutRelatedLists || layoutRelatedLists.length === 0) {
return []
// Page layout has no related list selections; show all by default
return relatedLists
}
return relatedLists.filter(list => layoutRelatedLists.includes(list.relationName))
const normalize = (name: string) => name?.toLowerCase().replace(/[^a-z0-9]/g, '')
const layoutNormalized = layoutRelatedLists.map(normalize)
const filtered = relatedLists.filter(list => {
const name = list.relationName
return layoutRelatedLists.includes(name) || layoutNormalized.includes(normalize(name))
})
// If nothing matched (e.g., relationName changed), fall back to showing all
return filtered.length > 0 ? filtered : relatedLists
})
</script>