From ddc4f3c9ad0b73602a25863ba76ecc72121dafd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Thu, 18 Sep 2025 17:10:14 +0200 Subject: [PATCH] fix(front): use property deletedAt instead of deleted --- .../tracking/watchlist/diagram/watchlistToEdges.tsx | 4 ++-- .../tracking/watchlist/diagram/watchlistToNodes.tsx | 4 ++-- assets/utils/functions/sortDomainEntities.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/components/tracking/watchlist/diagram/watchlistToEdges.tsx b/assets/components/tracking/watchlist/diagram/watchlistToEdges.tsx index 50c1574..a7fdb6d 100644 --- a/assets/components/tracking/watchlist/diagram/watchlistToEdges.tsx +++ b/assets/components/tracking/watchlist/diagram/watchlistToEdges.tsx @@ -7,10 +7,10 @@ import type {Edge} from '@xyflow/react' export function domainEntitiesToEdges(d: Domain, withRegistrar = false): Edge[] { const rdapRoleTranslated = rdapRoleTranslation() - const sponsor = d.entities.find(e => e.deletedAt !== undefined && e.roles.includes('sponsor')) + const sponsor = d.entities.find(e => e.deletedAt === undefined && e.roles.includes('sponsor')) return d.entities .filter(e => - e.deletedAt !== undefined && + e.deletedAt === undefined && (withRegistrar || !e.roles.includes('registrar')) && ((sponsor == null) || !e.roles.includes('registrar') || e.roles.includes('sponsor')) ) diff --git a/assets/components/tracking/watchlist/diagram/watchlistToNodes.tsx b/assets/components/tracking/watchlist/diagram/watchlistToNodes.tsx index e60ddc8..af34410 100644 --- a/assets/components/tracking/watchlist/diagram/watchlistToNodes.tsx +++ b/assets/components/tracking/watchlist/diagram/watchlistToNodes.tsx @@ -15,10 +15,10 @@ export const domainToNode = (d: Domain): Node => ({ }) export const domainEntitiesToNode = (d: Domain, withRegistrar = false): Node[] => { - const sponsor = d.entities.find(e => e.deletedAt !== undefined && e.roles.includes('sponsor')) + const sponsor = d.entities.find(e => e.deletedAt === undefined && e.roles.includes('sponsor')) return d.entities .filter(e => - e.deletedAt !== undefined && + e.deletedAt === undefined && (withRegistrar || !e.roles.includes('registrar')) && ((sponsor == null) || !e.roles.includes('registrar') || e.roles.includes('sponsor')) ) diff --git a/assets/utils/functions/sortDomainEntities.tsx b/assets/utils/functions/sortDomainEntities.tsx index 6240fc8..a1073ce 100644 --- a/assets/utils/functions/sortDomainEntities.tsx +++ b/assets/utils/functions/sortDomainEntities.tsx @@ -1,7 +1,7 @@ import type {Domain} from '../api' export const sortDomainEntities = (domain: Domain) => domain.entities - .filter(e => e.deletedAt !== undefined) + .filter(e => e.deletedAt === undefined) .sort((e1, e2) => { const p = (r: string[]) => r.includes('registrant') ? 5