From a3d7a8e55282aaef627c94fa3afe869cec34b067 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 07:49:22 +0000 Subject: [PATCH 1/2] Shrink teacher-reported-today cards and show missing-girls count on every card - reduce card/column padding, font sizes and gaps so more cards fit per screen - show a total missing-girls count in each card's header (sum of its lesson counts, or the card's own count when it has no lesson breakdown), not just on lesson chips Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_011UFsJW6shPwXgjbXDm6kRG --- .../src/entities/teacher-reported-today.jsx | 90 +++++++++++-------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/client/src/entities/teacher-reported-today.jsx b/client/src/entities/teacher-reported-today.jsx index 13224eca..d2fbeb03 100644 --- a/client/src/entities/teacher-reported-today.jsx +++ b/client/src/entities/teacher-reported-today.jsx @@ -62,16 +62,24 @@ function groupByKlass(groups) { }); } +// Total missing girls for the whole card: sum across its lessons, or the card's own +// count when it has no per-lesson breakdown (the "ללא שיוך שיעור" case). +function getTotalMissingGirls(group) { + return group.lessonRows.length > 0 + ? group.lessonRows.reduce((sum, row) => sum + (row.missingGirlsCount || 0), 0) + : group.missingGirlsCount || 0; +} + const TeacherReportCards = ({ isAdmin }) => { const { data } = useListContext(); const groups = groupByTeacherAndDate(data || []); const columns = groupByKlass(groups); return ( - + {columns.map((column) => ( - - + + {column.klassReferenceId ? ( @@ -80,42 +88,50 @@ const TeacherReportCards = ({ isAdmin }) => { ) : 'ללא כיתה'} - - {column.groups.map((group) => ( - - - - - - - - - - + + {column.groups.map((group) => { + const totalMissingGirls = getTotalMissingGirls(group); + return ( + + + + + + + + + + {totalMissingGirls > 0 && ( + + חסרו {totalMissingGirls} + + )} + + {isAdmin && } - {formatDate(group.reportDate)} - {formatHour(group.reportHour)} + {formatDate(group.reportDate)} + {formatHour(group.reportHour)} - - - {group.lessonRows.length > 0 ? ( - group.lessonRows.map((row) => ( - - - - - - - - )) - ) : ( - ללא שיוך שיעור - )} - - - - - ))} + + {group.lessonRows.length > 0 ? ( + group.lessonRows.map((row) => ( + + + + + + + + )) + ) : ( + ללא שיוך שיעור + )} + + + + + ); + })} ))} From 255c07f3766d95ba94464692b6e3aae52e5c68f8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 07:53:48 +0000 Subject: [PATCH 2/2] Keep horizontal scroll fallback on wrapping card columns Per Copilot review: fixed 220px columns with no shrink can overflow on viewports narrower than one column. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_011UFsJW6shPwXgjbXDm6kRG --- client/src/entities/teacher-reported-today.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/entities/teacher-reported-today.jsx b/client/src/entities/teacher-reported-today.jsx index d2fbeb03..0b11b0bf 100644 --- a/client/src/entities/teacher-reported-today.jsx +++ b/client/src/entities/teacher-reported-today.jsx @@ -76,7 +76,7 @@ const TeacherReportCards = ({ isAdmin }) => { const columns = groupByKlass(groups); return ( - + {columns.map((column) => (