From 1a613c607cd5d4b993637ed6f00e039993d3dbb2 Mon Sep 17 00:00:00 2001 From: frakarr Date: Thu, 11 Dec 2025 22:28:13 +0100 Subject: [PATCH] Update FamilyList.tsx --- pages/FamilyList.tsx | 77 ++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/pages/FamilyList.tsx b/pages/FamilyList.tsx index 7ffc8e6..63a9af8 100644 --- a/pages/FamilyList.tsx +++ b/pages/FamilyList.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; -import { CondoService } from '../services/api'; +import { CondoService } from '../services/mockDb'; import { Family, Condo, Notice, AppSettings } from '../types'; import { Search, ChevronRight, UserCircle, Building, Bell, AlertTriangle, Hammer, Calendar, Info, Link as LinkIcon, Check } from 'lucide-react'; @@ -100,6 +100,44 @@ export const FamilyList: React.FC = () => { return (
+ + {/* Notices Section - Dashboard effect */} + {settings?.features.notices && notices.length > 0 && ( +
+

+ Bacheca Avvisi +

+
+ {notices.map(notice => { + const isRead = userReadIds.includes(notice.id); + return ( +
+
+
+ +
+
+
+

{notice.title}

+ {isRead && Letto} + {!isRead && Nuovo} +
+

{new Date(notice.date).toLocaleDateString()}

+

{notice.content}

+ {notice.link && ( + + Apri Link + + )} +
+
+
+ ); + })} +
+
+ )} + {/* Responsive Header */}
@@ -124,43 +162,6 @@ export const FamilyList: React.FC = () => {
- {/* Notices Section (Visible to Users only if feature enabled) */} - {settings?.features.notices && notices.length > 0 && ( -
-

- Bacheca Avvisi -

-
- {notices.map(notice => { - const isRead = userReadIds.includes(notice.id); - return ( -
-
-
- -
-
-
-

{notice.title}

- {isRead && Letto} - {!isRead && Nuovo} -
-

{new Date(notice.date).toLocaleDateString()}

-

{notice.content}

- {notice.link && ( - - Apri Link - - )} -
-
-
- ); - })} -
-
- )} - {/* List */}