From 6a72261c91ce5a38289a4f114e0e28c636689c54 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Wed, 29 Oct 2025 17:57:55 +0100 Subject: [PATCH] feat(servizio): Update open contacts display logic and add mapping for open contacts announcements --- .../src/components/servizio/main.tsx | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/infoalloggi/src/components/servizio/main.tsx b/apps/infoalloggi/src/components/servizio/main.tsx index 06ba4d9..192be35 100644 --- a/apps/infoalloggi/src/components/servizio/main.tsx +++ b/apps/infoalloggi/src/components/servizio/main.tsx @@ -190,9 +190,10 @@ export const ServizioContent = () => { ); } - const openContattiCount = servizio.annunci.filter( - (a) => a.open_contatti_at !== null, - ).length; + const openContattiAnnunci = servizio.annunci.filter( + (a) => a.open_contatti_at !== null && a.user_confirmed_at === null, + + ); const annunciInConferma = servizio.annunci.filter( (a) => a.user_confirmed_at !== null, @@ -211,9 +212,9 @@ export const ServizioContent = () => { Contatti sbloccati - {openContattiCount} / 10 + {openContattiAnnunci.length} / 10 - + @@ -255,6 +256,15 @@ export const ServizioContent = () => { )}
+
+ {openContattiAnnunci.map((data) => { + return ( + + + + ); + })} +
{annunciInConferma.map((data) => { return (