From 23586c28eb98fe5d37fad2f1645b40e84dae9c4e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 14:51:46 +0000 Subject: [PATCH 1/9] Swap sidebar/menu icons from Filled to Outlined for a lighter, more current look Every icon in App.jsx (per-resource sidebar icons) and GeneralLayout.jsx (custom menu items and group icons) switches from Material's default Filled variant to Outlined - same icons, thinner stroke weight, matches the Outlined icons now used by nra-client's own Dashboard/Menu/SubMenu components so the whole sidebar reads as one consistent set instead of mixing weights. --- client/src/App.jsx | 44 ++++++++++++++++++------------------ client/src/GeneralLayout.jsx | 34 ++++++++++++++-------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/client/src/App.jsx b/client/src/App.jsx index 380aa6d3..bc8e8db2 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -68,28 +68,28 @@ import InLessonReport from 'src/reports/InLessonReport'; import MichlolFileHelper from '@shared/components/views/MichlolFileHelper'; import ApprovedAbsencesUpload from 'src/components/ApprovedAbsencesUpload'; -import BadgeIcon from '@mui/icons-material/Badge'; -import SupervisedUserCircleIcon from '@mui/icons-material/SupervisedUserCircle'; -import SchoolIcon from '@mui/icons-material/School'; -import EventNoteIcon from '@mui/icons-material/EventNote'; -import PortraitIcon from '@mui/icons-material/Portrait'; -import WorkspacesIcon from '@mui/icons-material/Workspaces'; -import GroupWorkIcon from '@mui/icons-material/GroupWork'; -import ViewListIcon from '@mui/icons-material/ViewList'; -import GradingIcon from '@mui/icons-material/Grading'; -import PlaylistRemoveIcon from '@mui/icons-material/PlaylistRemove'; -import RuleIcon from '@mui/icons-material/Rule'; -import SummarizeIcon from '@mui/icons-material/Summarize'; -import CategoryIcon from '@mui/icons-material/Category'; -import DateRangeIcon from '@mui/icons-material/DateRange'; -import LabelIcon from '@mui/icons-material/Label'; -import CalculateIcon from '@mui/icons-material/Calculate'; -import UploadFileIcon from '@mui/icons-material/UploadFile'; -import PermContactCalendarIcon from '@mui/icons-material/PermContactCalendar'; -import LocalAtmIcon from '@mui/icons-material/LocalAtm'; -import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettings'; -import DirectionsBusIcon from '@mui/icons-material/DirectionsBus'; -import CelebrationIcon from '@mui/icons-material/Celebration'; +import BadgeIcon from '@mui/icons-material/BadgeOutlined'; +import SupervisedUserCircleIcon from '@mui/icons-material/SupervisedUserCircleOutlined'; +import SchoolIcon from '@mui/icons-material/SchoolOutlined'; +import EventNoteIcon from '@mui/icons-material/EventNoteOutlined'; +import PortraitIcon from '@mui/icons-material/PortraitOutlined'; +import WorkspacesIcon from '@mui/icons-material/WorkspacesOutlined'; +import GroupWorkIcon from '@mui/icons-material/GroupWorkOutlined'; +import ViewListIcon from '@mui/icons-material/ViewListOutlined'; +import GradingIcon from '@mui/icons-material/GradingOutlined'; +import PlaylistRemoveIcon from '@mui/icons-material/PlaylistRemoveOutlined'; +import RuleIcon from '@mui/icons-material/RuleOutlined'; +import SummarizeIcon from '@mui/icons-material/SummarizeOutlined'; +import CategoryIcon from '@mui/icons-material/CategoryOutlined'; +import DateRangeIcon from '@mui/icons-material/DateRangeOutlined'; +import LabelIcon from '@mui/icons-material/LabelOutlined'; +import CalculateIcon from '@mui/icons-material/CalculateOutlined'; +import UploadFileIcon from '@mui/icons-material/UploadFileOutlined'; +import PermContactCalendarIcon from '@mui/icons-material/PermContactCalendarOutlined'; +import LocalAtmIcon from '@mui/icons-material/LocalAtmOutlined'; +import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettingsOutlined'; +import DirectionsBusIcon from '@mui/icons-material/DirectionsBusOutlined'; +import CelebrationIcon from '@mui/icons-material/CelebrationOutlined'; const themeOptions = { primary: blue[700], secondary: purple[500] }; diff --git a/client/src/GeneralLayout.jsx b/client/src/GeneralLayout.jsx index 9e5e3a1f..81c73e7e 100644 --- a/client/src/GeneralLayout.jsx +++ b/client/src/GeneralLayout.jsx @@ -1,21 +1,21 @@ import { MenuItemLink } from 'react-admin'; -import SummarizeIcon from '@mui/icons-material/Summarize'; -import HelpIcon from '@mui/icons-material/Help'; -import ImportContactsIcon from '@mui/icons-material/ImportContacts'; -import CallIcon from '@mui/icons-material/Call'; -import SettingsIcon from '@mui/icons-material/Settings'; -import DocumentScannerIcon from '@mui/icons-material/DocumentScanner'; -import DatasetIcon from '@mui/icons-material/Dataset'; -import AnalyticsIcon from '@mui/icons-material/Analytics'; -import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettings'; -import MapIcon from '@mui/icons-material/Map'; -import ContentPasteSearchIcon from '@mui/icons-material/ContentPasteSearch'; -import EditCalendarIcon from '@mui/icons-material/EditCalendar'; -import EventAvailableIcon from '@mui/icons-material/EventAvailable'; -import PercentIcon from '@mui/icons-material/Percent'; -import FileUploadIcon from '@mui/icons-material/FileUpload'; -import ViewListIcon from '@mui/icons-material/ViewList'; -import GridOnIcon from '@mui/icons-material/GridOn'; +import SummarizeIcon from '@mui/icons-material/SummarizeOutlined'; +import HelpIcon from '@mui/icons-material/HelpOutlined'; +import ImportContactsIcon from '@mui/icons-material/ImportContactsOutlined'; +import CallIcon from '@mui/icons-material/CallOutlined'; +import SettingsIcon from '@mui/icons-material/SettingsOutlined'; +import DocumentScannerIcon from '@mui/icons-material/DocumentScannerOutlined'; +import DatasetIcon from '@mui/icons-material/DatasetOutlined'; +import AnalyticsIcon from '@mui/icons-material/AnalyticsOutlined'; +import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettingsOutlined'; +import MapIcon from '@mui/icons-material/MapOutlined'; +import ContentPasteSearchIcon from '@mui/icons-material/ContentPasteSearchOutlined'; +import EditCalendarIcon from '@mui/icons-material/EditCalendarOutlined'; +import EventAvailableIcon from '@mui/icons-material/EventAvailableOutlined'; +import PercentIcon from '@mui/icons-material/PercentOutlined'; +import FileUploadIcon from '@mui/icons-material/FileUploadOutlined'; +import ViewListIcon from '@mui/icons-material/ViewListOutlined'; +import GridOnIcon from '@mui/icons-material/GridOnOutlined'; import BaseLayout from '@shared/components/layout/Layout'; import BaseDashboard from '@shared/components/views/Dashboard'; From 97537b6418c195c212a30a1c342afc2de01549c2 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 15:36:39 +0000 Subject: [PATCH 2/9] Make the Settings page easier to understand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reorder sections by how often a typical user touches them: general, phone, report-card design, report-card defaults, then an "advanced" group last (was: general, dashboard, report styles, report card defaults, phone, Yemot - roughly import order, not usage frequency). - Move dashboard-card config and the Yemot API key into a new "הגדרות מתקדמות" (advanced) section, since both are one-time setup usually done by an admin, not everyday settings. - Add helperText to every report-card toggle - none had any before, so field names like "forceAtt"/"hideAbsTotal" were unexplained. - Reword the dashboard filter field's label from "פילטר נוסף בפורמט JSON (אופציונלי, ללא שנה)" to "סינון מותאם אישית (מתקדם)" with a helperText explaining it's rarely needed. - Remove the "debug" report-card toggle. It defaulted to `true` for every school (getDefaultReportCardSettings), and reportGenerator.ts / studentReportCardReact.tsx read it to add an extra debug column to the actual printed/PDF report card - so this wasn't just a confusing toggle, schools that never touched this setting were printing debug output on real report cards sent to parents by default. --- client/src/domainTranslations.js | 2 +- client/src/settings/DashboardItemsInput.jsx | 95 +++++++++---------- client/src/settings/GeneralSettingsInput.jsx | 36 +++---- .../src/settings/ReportCardSettingsInput.jsx | 86 +++++++++++------ client/src/settings/ReportStylesInput.jsx | 62 ++++++------ client/src/settings/Settings.jsx | 13 ++- client/src/settings/settingsUtil.js | 1 - 7 files changed, 157 insertions(+), 138 deletions(-) diff --git a/client/src/domainTranslations.js b/client/src/domainTranslations.js index 0f332073..39c6d383 100644 --- a/client/src/domainTranslations.js +++ b/client/src/domainTranslations.js @@ -19,7 +19,7 @@ export default { 'dashboardItems.resource': 'מקור נתונים', 'dashboardItems.resourceHelperText': 'בחר את מקור הנתונים שברצונך להציג', 'dashboardItems.yearFilterType': 'סוג סינון שנה', - 'dashboardItems.filter': 'פילטר נוסף בפורמט JSON (אופציונלי, ללא שנה)', + 'dashboardItems.filter': 'סינון מותאם אישית (מתקדם)', 'dashboardItems.title': 'כותרת', reportStyles: 'הגדרות עיצוב תעודה', 'reportStyles.type': 'סוג טקסט', diff --git a/client/src/settings/DashboardItemsInput.jsx b/client/src/settings/DashboardItemsInput.jsx index 72a5848e..6af4e727 100644 --- a/client/src/settings/DashboardItemsInput.jsx +++ b/client/src/settings/DashboardItemsInput.jsx @@ -1,59 +1,56 @@ import React from 'react'; -import { Typography, Accordion, AccordionSummary, AccordionDetails } from '@mui/material'; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import { ArrayInput, SimpleFormIterator, required, TextInput } from 'react-admin'; +import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; import { CommonEntityNameInput } from '@shared/components/fields/CommonEntityNameInput'; import { CommonJsonInput } from '@shared/components/fields/CommonJsonItem'; export function DashboardItemsInput() { return ( - - } - aria-controls="dashboard-items-content" - id="dashboard-items-header" - > - הגדרות לוח מחוונים - - - - - - - - - - - - + + + + + + + + + + ); } diff --git a/client/src/settings/GeneralSettingsInput.jsx b/client/src/settings/GeneralSettingsInput.jsx index 9f6cd58e..9d8d6d6f 100644 --- a/client/src/settings/GeneralSettingsInput.jsx +++ b/client/src/settings/GeneralSettingsInput.jsx @@ -1,7 +1,6 @@ import React from 'react'; -import { Typography, Accordion, AccordionSummary, AccordionDetails } from '@mui/material'; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import { NumberInput, required } from 'react-admin'; +import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; import { PAGE_SIZE_OPTIONS } from '@shared/config/settings'; @@ -9,24 +8,19 @@ const pageSizeOptions = PAGE_SIZE_OPTIONS.map((option) => ({ id: option, name: o export function GeneralSettingsInput() { return ( - - } - aria-controls="general-settings-content" - id="general-settings-header" - > - הגדרות כלליות - - - - - - + + + + ); } diff --git a/client/src/settings/ReportCardSettingsInput.jsx b/client/src/settings/ReportCardSettingsInput.jsx index 283b2045..31c07a2f 100644 --- a/client/src/settings/ReportCardSettingsInput.jsx +++ b/client/src/settings/ReportCardSettingsInput.jsx @@ -1,36 +1,64 @@ import React from 'react'; -import { Typography, Accordion, AccordionSummary, AccordionDetails, Box } from '@mui/material'; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { Box } from '@mui/material'; import { BooleanInput, Link } from 'react-admin'; +import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; export function ReportCardSettingsInput() { return ( - - } - aria-controls="report-card-settings-content" - id="report-card-settings-header" - > - הגדרות ברירת מחדל לתעודה - - - - - להגדרת תמונות - - - - - - - - - - - - - - - + + + + להגדרת תמונות + + + + + + + + + + + + + ); } diff --git a/client/src/settings/ReportStylesInput.jsx b/client/src/settings/ReportStylesInput.jsx index fb550e18..b2fc12f1 100644 --- a/client/src/settings/ReportStylesInput.jsx +++ b/client/src/settings/ReportStylesInput.jsx @@ -1,7 +1,6 @@ import React from 'react'; -import { Typography, Accordion, AccordionSummary, AccordionDetails } from '@mui/material'; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import { ArrayInput, BooleanInput, NumberInput, SimpleFormIterator, required } from 'react-admin'; +import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; // Common Google Fonts list @@ -25,37 +24,32 @@ const fontOptions = [ export function ReportStylesInput() { return ( - - } - aria-controls="report-styles-content" - id="report-styles-header" - > - הגדרות עיצוב תעודה - - - - - - - - - - - - - + + + + + + + + + + + ); } diff --git a/client/src/settings/Settings.jsx b/client/src/settings/Settings.jsx index acc7c0b6..0acb7b38 100644 --- a/client/src/settings/Settings.jsx +++ b/client/src/settings/Settings.jsx @@ -13,6 +13,7 @@ import { } from 'react-admin'; import { useNavigate } from 'react-router-dom'; import { getDefaultPageSize } from '@shared/utils/settingsUtil'; +import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import { getLateValue, getDashboardItems, getReportStyles, getReportCardSettings } from './settingsUtil'; import { DashboardItemsInput } from './DashboardItemsInput'; import { ReportStylesInput } from './ReportStylesInput'; @@ -65,11 +66,17 @@ export default function Settings() { }> - + - - + + + + diff --git a/client/src/settings/settingsUtil.js b/client/src/settings/settingsUtil.js index 31651390..c7928737 100644 --- a/client/src/settings/settingsUtil.js +++ b/client/src/settings/settingsUtil.js @@ -65,6 +65,5 @@ export function getDefaultReportCardSettings() { forceGrades: false, downComment: false, lastGrade: true, - debug: true, }; } From feb614136d20df5a3c23077bb485e4033a353059 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 16:09:25 +0000 Subject: [PATCH 3/9] Simplify the report-style and dashboard-card settings reportStyles: replace the free-form add-a-row-and-pick-a-type repeater with a fixed 6-row form, since the report card only ever has 6 style slots - there was never a real choice to make there. dashboardItems: drop the resource/yearFilterType/raw-filter-JSON fields in favor of a plain management view (rename, reorder, remove). Cards are now created from a list's own filter UI via the new AddToDashboardButton (nra-client), which produces valid values instead of asking users to type them blind. Also add helper text explaining lateValue's multiplier semantics, confirmed against its use in att-report.config.ts and the in-lesson report. --- client/src/settings/DashboardItemsInput.jsx | 79 +++++++++----------- client/src/settings/GeneralSettingsInput.jsx | 7 +- client/src/settings/ReportStylesInput.jsx | 56 ++++++++------ client/src/settings/Settings.jsx | 6 +- client/src/settings/settingsUtil.js | 28 +++++++ 5 files changed, 109 insertions(+), 67 deletions(-) diff --git a/client/src/settings/DashboardItemsInput.jsx b/client/src/settings/DashboardItemsInput.jsx index 6af4e727..8eff0e37 100644 --- a/client/src/settings/DashboardItemsInput.jsx +++ b/client/src/settings/DashboardItemsInput.jsx @@ -1,54 +1,49 @@ import React from 'react'; -import { ArrayInput, SimpleFormIterator, required, TextInput } from 'react-admin'; +import { Box, Chip, Typography } from '@mui/material'; +import { useWatch } from 'react-hook-form'; +import { ArrayInput, SimpleFormIterator, TextInput, useGetResourceLabel, useSimpleFormIteratorItem } from 'react-admin'; import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; -import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; -import { CommonEntityNameInput } from '@shared/components/fields/CommonEntityNameInput'; -import { CommonJsonInput } from '@shared/components/fields/CommonJsonItem'; + +// resource/yearFilterType/filter used to be hand-typed here, including a raw +// JSON filter field - nobody actually used it, and yearFilterType's "regular +// vs extended" choice meant nothing without reading the query code. Cards are +// created from a list's own filter UI instead (see AddToDashboardButton), +// which already produces valid resource+filter values. This is management +// only: rename, reorder, remove. +// +// SimpleForm here has no `record`, so SimpleFormIterator rows carry no +// RecordContext - read each row's live values via its form path instead. +const DashboardItemSummary = () => { + const { index } = useSimpleFormIteratorItem(); + const record = useWatch({ name: `dashboardItems.${index}` }); + const getResourceLabel = useGetResourceLabel(); + if (!record?.resource) return null; + const hasYearFilter = record.yearFilterType && record.yearFilterType !== 'none'; + const hasExtraFilter = record.filter && Object.keys(record.filter).length > 0; + return ( + + + {hasYearFilter && } + {hasExtraFilter && } + + ); +}; export function DashboardItemsInput() { return ( - - - - - - + + כדי להוסיף כרטיס חדש, סננו כל רשימה כרצונכם ולחצו על "הוסף ללוח מחוונים" בסרגל הכלים + שלה. + + + + + diff --git a/client/src/settings/GeneralSettingsInput.jsx b/client/src/settings/GeneralSettingsInput.jsx index 9d8d6d6f..45861568 100644 --- a/client/src/settings/GeneralSettingsInput.jsx +++ b/client/src/settings/GeneralSettingsInput.jsx @@ -20,7 +20,12 @@ export function GeneralSettingsInput() { disableClearable validate={required()} /> - + ); } diff --git a/client/src/settings/ReportStylesInput.jsx b/client/src/settings/ReportStylesInput.jsx index b2fc12f1..28055d99 100644 --- a/client/src/settings/ReportStylesInput.jsx +++ b/client/src/settings/ReportStylesInput.jsx @@ -1,7 +1,9 @@ import React from 'react'; -import { ArrayInput, BooleanInput, NumberInput, SimpleFormIterator, required } from 'react-admin'; +import { Box, Typography } from '@mui/material'; +import { BooleanInput, NumberInput } from 'react-admin'; import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; +import { REPORT_STYLE_TYPES } from './settingsUtil'; // Common Google Fonts list const fontOptions = [ @@ -27,29 +29,41 @@ export function ReportStylesInput() { - - + {REPORT_STYLE_TYPES.map(({ id, label }, index) => ( + + + {label} + - - - - - - + + + + + ))} ); } diff --git a/client/src/settings/Settings.jsx b/client/src/settings/Settings.jsx index 0acb7b38..e58d7fbc 100644 --- a/client/src/settings/Settings.jsx +++ b/client/src/settings/Settings.jsx @@ -14,7 +14,7 @@ import { import { useNavigate } from 'react-router-dom'; import { getDefaultPageSize } from '@shared/utils/settingsUtil'; import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; -import { getLateValue, getDashboardItems, getReportStyles, getReportCardSettings } from './settingsUtil'; +import { getLateValue, getDashboardItems, getReportStyles, getReportCardSettings, normalizeReportStyles } from './settingsUtil'; import { DashboardItemsInput } from './DashboardItemsInput'; import { ReportStylesInput } from './ReportStylesInput'; import { GeneralSettingsInput } from './GeneralSettingsInput'; @@ -39,7 +39,7 @@ export default function Settings() { defaultPageSize: getDefaultPageSize(identity), lateValue: getLateValue(identity), dashboardItems: getDashboardItems(identity), - reportStyles: getReportStyles(identity), + reportStyles: normalizeReportStyles(getReportStyles(identity)), reportCardSettings: getReportCardSettings(identity), phoneNumber: identity?.phoneNumber ?? '', }; @@ -72,7 +72,7 @@ export default function Settings() { diff --git a/client/src/settings/settingsUtil.js b/client/src/settings/settingsUtil.js index c7928737..a86752bb 100644 --- a/client/src/settings/settingsUtil.js +++ b/client/src/settings/settingsUtil.js @@ -44,6 +44,34 @@ export function getReportStyles(identity) { return identity?.additionalData?.reportStyles || []; } +// The report card only ever has these six style slots - it's a fixed set, +// not an open-ended list, so the settings UI shouldn't ask users to add rows +// and pick a "type" for each. `type` stays on each object (report generation +// reads styles by type), it's just no longer a field the user edits. +export const REPORT_STYLE_TYPES = [ + { id: 'titlePrimary', label: 'כותרת ראשית' }, + { id: 'titleSecondary', label: 'כותרת משנית (תאריכים)' }, + { id: 'titleThird', label: 'כותרת שלישית' }, + { id: 'tableHeader', label: 'כותרת טבלה' }, + { id: 'tableCell', label: 'תא טבלה' }, + { id: 'document', label: 'טקסט כללי' }, +]; + +// Existing users may have 0-6 style entries, saved in whatever order they +// were added in - re-map them onto the fixed 6 slots by `type` so a form +// field bound to `reportStyles.` always edits the right slot. +export function normalizeReportStyles(rawStyles = []) { + return REPORT_STYLE_TYPES.map(({ id }) => ( + rawStyles.find((style) => style.type === id) || { + type: id, + fontFamily: '', + fontSize: null, + isBold: false, + isItalic: false, + } + )); +} + export const useReportCardSettings = () => { const { identity } = useGetIdentity(); return getReportCardSettings(identity); From 114370115a71a39896101a5601fd2db9af6828f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 16:51:14 +0000 Subject: [PATCH 4/9] Bump client/shared and make the report-styles table compact The submodule pointer was still on d852588, before CommonSettingsAccordion existed - Settings.jsx has depended on it since 97537b6, so this was only working in ad-hoc local checkouts, not the pinned commit. Bumped to 9c320f5 (adds CommonSettingsAccordion + AddToDashboardButton). ReportStylesInput: each style was a flex row that wrapped across 2-3 lines per entry. Switched to a real table so all 6 rows render as a single compact line each. --- client/shared | 2 +- client/src/settings/ReportStylesInput.jsx | 80 +++++++++++++---------- 2 files changed, 47 insertions(+), 35 deletions(-) diff --git a/client/shared b/client/shared index d852588f..9c320f54 160000 --- a/client/shared +++ b/client/shared @@ -1 +1 @@ -Subproject commit d852588fe84c0d264c89ba48fbb146e5b07ad63e +Subproject commit 9c320f54b89e193a6a51a6441ad0240f4eff3dbf diff --git a/client/src/settings/ReportStylesInput.jsx b/client/src/settings/ReportStylesInput.jsx index 28055d99..7a1a8efb 100644 --- a/client/src/settings/ReportStylesInput.jsx +++ b/client/src/settings/ReportStylesInput.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Box, Typography } from '@mui/material'; +import { Table, TableBody, TableCell, TableHead, TableRow, Typography } from '@mui/material'; import { BooleanInput, NumberInput } from 'react-admin'; import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; @@ -31,39 +31,51 @@ export function ReportStylesInput() { title="הגדרות עיצוב תעודה" subtitle="גופן וגודל לכל חלק בתעודה" > - {REPORT_STYLE_TYPES.map(({ id, label }, index) => ( - - - {label} - - - - - - - ))} + + + + חלק בתעודה + גופן + גודל + מודגש + נטוי + + + + {REPORT_STYLE_TYPES.map(({ id, label }, index) => ( + + + + {label} + + + + + + + + + + + + + + + + ))} + +
); } From 3c841b00369a0de00d9b601c3473a75b12a0dfd0 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 18:20:19 +0000 Subject: [PATCH 5/9] Show each report style's actual default as a placeholder A blank fontFamily/fontSize doesn't mean "unset" - the server falls back per-field to defaultReportStyles in studentReportCardReact.tsx. Surface those real values as placeholders so users can see what they'll get before typing anything. Bump client/shared to cd21992 for the dashboard hint-text fix. --- client/shared | 2 +- client/src/settings/ReportStylesInput.jsx | 6 ++++-- client/src/settings/settingsUtil.js | 12 ++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/client/shared b/client/shared index 9c320f54..cd219929 160000 --- a/client/shared +++ b/client/shared @@ -1 +1 @@ -Subproject commit 9c320f54b89e193a6a51a6441ad0240f4eff3dbf +Subproject commit cd21992950d8a9ba82b02c71550637b8e42f34d2 diff --git a/client/src/settings/ReportStylesInput.jsx b/client/src/settings/ReportStylesInput.jsx index 7a1a8efb..1b942bd7 100644 --- a/client/src/settings/ReportStylesInput.jsx +++ b/client/src/settings/ReportStylesInput.jsx @@ -3,7 +3,7 @@ import { Table, TableBody, TableCell, TableHead, TableRow, Typography } from '@m import { BooleanInput, NumberInput } from 'react-admin'; import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; -import { REPORT_STYLE_TYPES } from './settingsUtil'; +import { REPORT_STYLE_TYPES, REPORT_STYLE_DEFAULTS } from './settingsUtil'; // Common Google Fonts list const fontOptions = [ @@ -29,7 +29,7 @@ export function ReportStylesInput() { @@ -56,6 +56,7 @@ export function ReportStylesInput() { label={false} helperText={false} sx={{ margin: 0 }} + TextFieldProps={{ placeholder: REPORT_STYLE_DEFAULTS[id].fontFamily || 'ברירת מחדל' }} /> @@ -64,6 +65,7 @@ export function ReportStylesInput() { label={false} helperText={false} sx={{ margin: 0 }} + placeholder={String(REPORT_STYLE_DEFAULTS[id].fontSize)} /> diff --git a/client/src/settings/settingsUtil.js b/client/src/settings/settingsUtil.js index a86752bb..c25d66ce 100644 --- a/client/src/settings/settingsUtil.js +++ b/client/src/settings/settingsUtil.js @@ -57,6 +57,18 @@ export const REPORT_STYLE_TYPES = [ { id: 'document', label: 'טקסט כללי' }, ]; +// What the report actually renders with when a field is left blank - mirrors +// defaultReportStyles in server/src/reports/studentReportCardReact.tsx, so +// keep the two in sync if that file's defaults ever change. +export const REPORT_STYLE_DEFAULTS = { + titlePrimary: { fontSize: 18 }, + titleSecondary: { fontSize: 16 }, + titleThird: { fontSize: 16 }, + tableHeader: { fontSize: 16 }, + tableCell: { fontSize: 16 }, + document: { fontFamily: 'Roboto', fontSize: 12 }, +}; + // Existing users may have 0-6 style entries, saved in whatever order they // were added in - re-map them onto the fixed 6 slots by `type` so a form // field bound to `reportStyles.` always edits the right slot. From 6093ca0bb68cd7ef90e32a90ab3782463f1ec94a Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 18:43:51 +0000 Subject: [PATCH 6/9] Add a "load defaults" button to report styles, fix fontSize display Grey placeholder text was too easy to miss (per user testing). Added a button that fills every blank field with the real report default (including isBold, which studentReportCardReact.tsx sets true for all headers/titles except tableCell) - only touches fields that are still empty, doesn't clobber anything the user already set. Also widened the fontSize column and centered its text - at 80px in RTL it was clipping two-digit values down to their last digit. --- client/src/settings/ReportStylesInput.jsx | 39 +++++++++++++++++++++-- client/src/settings/settingsUtil.js | 8 ++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/client/src/settings/ReportStylesInput.jsx b/client/src/settings/ReportStylesInput.jsx index 1b942bd7..37fe435c 100644 --- a/client/src/settings/ReportStylesInput.jsx +++ b/client/src/settings/ReportStylesInput.jsx @@ -1,5 +1,7 @@ import React from 'react'; -import { Table, TableBody, TableCell, TableHead, TableRow, Typography } from '@mui/material'; +import { Box, Button, Table, TableBody, TableCell, TableHead, TableRow, Typography } from '@mui/material'; +import RestartAltIcon from '@mui/icons-material/RestartAltOutlined'; +import { useFormContext } from 'react-hook-form'; import { BooleanInput, NumberInput } from 'react-admin'; import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; import CommonAutocompleteInput from '@shared/components/fields/CommonAutocompleteInput'; @@ -24,6 +26,35 @@ const fontOptions = [ { id: 'Georgia', name: 'Georgia' }, ].sort((a, b) => a.name.localeCompare(b.name)); +// The grey placeholder text showing each default is easy to miss, so this +// gives users a one-click way to actually fill the blank fields with those +// same defaults instead of just eyeballing the placeholder. +const LoadDefaultsButton = () => { + const { getValues, setValue } = useFormContext(); + + const handleClick = () => { + REPORT_STYLE_TYPES.forEach(({ id }, index) => { + const defaults = REPORT_STYLE_DEFAULTS[id]; + const current = getValues(`reportStyles.${index}`) || {}; + if (!current.fontFamily && defaults.fontFamily) { + setValue(`reportStyles.${index}.fontFamily`, defaults.fontFamily, { shouldDirty: true }); + } + if (!current.fontSize && defaults.fontSize) { + setValue(`reportStyles.${index}.fontSize`, defaults.fontSize, { shouldDirty: true }); + } + if (!current.isBold && defaults.isBold) { + setValue(`reportStyles.${index}.isBold`, true, { shouldDirty: true }); + } + }); + }; + + return ( + + ); +}; + export function ReportStylesInput() { return ( + + +
@@ -59,13 +93,14 @@ export function ReportStylesInput() { TextFieldProps={{ placeholder: REPORT_STYLE_DEFAULTS[id].fontFamily || 'ברירת מחדל' }} /> - + diff --git a/client/src/settings/settingsUtil.js b/client/src/settings/settingsUtil.js index c25d66ce..0c386241 100644 --- a/client/src/settings/settingsUtil.js +++ b/client/src/settings/settingsUtil.js @@ -61,10 +61,10 @@ export const REPORT_STYLE_TYPES = [ // defaultReportStyles in server/src/reports/studentReportCardReact.tsx, so // keep the two in sync if that file's defaults ever change. export const REPORT_STYLE_DEFAULTS = { - titlePrimary: { fontSize: 18 }, - titleSecondary: { fontSize: 16 }, - titleThird: { fontSize: 16 }, - tableHeader: { fontSize: 16 }, + titlePrimary: { fontSize: 18, isBold: true }, + titleSecondary: { fontSize: 16, isBold: true }, + titleThird: { fontSize: 16, isBold: true }, + tableHeader: { fontSize: 16, isBold: true }, tableCell: { fontSize: 16 }, document: { fontFamily: 'Roboto', fontSize: 12 }, }; From 30aece27b4435c5dce6cfb79c89f8fd7bab56160 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 18:49:19 +0000 Subject: [PATCH 7/9] =?UTF-8?q?Rename=20dashboard=20references=20to=20"?= =?UTF-8?q?=D7=AA=D7=9E=D7=95=D7=A0=D7=AA=20=D7=9E=D7=A6=D7=91"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump client/shared to 48cadb9 (renames the sidebar label, page title, AddToDashboardButton's label/toast). Updates this app's own strings (settings section title/instructions, dashboardItems field translation) to match. --- client/shared | 2 +- client/src/domainTranslations.js | 2 +- client/src/settings/DashboardItemsInput.jsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/shared b/client/shared index cd219929..48cadb98 160000 --- a/client/shared +++ b/client/shared @@ -1 +1 @@ -Subproject commit cd21992950d8a9ba82b02c71550637b8e42f34d2 +Subproject commit 48cadb98452fb9b5da530a1312a51f42b6c28a2f diff --git a/client/src/domainTranslations.js b/client/src/domainTranslations.js index 39c6d383..8421be52 100644 --- a/client/src/domainTranslations.js +++ b/client/src/domainTranslations.js @@ -15,7 +15,7 @@ export default { fields: { defaultPageSize: 'מספר שורות בטבלה', lateValue: 'שווי איחור', - dashboardItems: 'הגדרות לוח מחוונים', + dashboardItems: 'הגדרות תמונת מצב', 'dashboardItems.resource': 'מקור נתונים', 'dashboardItems.resourceHelperText': 'בחר את מקור הנתונים שברצונך להציג', 'dashboardItems.yearFilterType': 'סוג סינון שנה', diff --git a/client/src/settings/DashboardItemsInput.jsx b/client/src/settings/DashboardItemsInput.jsx index 8eff0e37..735b648e 100644 --- a/client/src/settings/DashboardItemsInput.jsx +++ b/client/src/settings/DashboardItemsInput.jsx @@ -33,11 +33,11 @@ export function DashboardItemsInput() { return ( - כדי להוסיף כרטיס חדש, סננו כל רשימה כרצונכם ולחצו על "הוסף ללוח מחוונים" בסרגל הכלים + כדי להוסיף כרטיס חדש, סננו כל רשימה כרצונכם ולחצו על "הוסף לתמונת מצב" בסרגל הכלים שלה. From bb46b16a7c4c55e414a54561b56f501360751ccd Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 19:27:11 +0000 Subject: [PATCH 8/9] Use the shared DashboardItemsInput instead of a local copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump client/shared to ab0e166. Also fixes a leftover "לוח מחוונים" in the advanced-settings subtitle missed in the earlier rename pass. --- client/shared | 2 +- client/src/settings/DashboardItemsInput.jsx | 51 --------------------- client/src/settings/Settings.jsx | 4 +- 3 files changed, 3 insertions(+), 54 deletions(-) delete mode 100644 client/src/settings/DashboardItemsInput.jsx diff --git a/client/shared b/client/shared index 48cadb98..ab0e1662 160000 --- a/client/shared +++ b/client/shared @@ -1 +1 @@ -Subproject commit 48cadb98452fb9b5da530a1312a51f42b6c28a2f +Subproject commit ab0e1662709683bd22ba59a66e4fbd118309ea1a diff --git a/client/src/settings/DashboardItemsInput.jsx b/client/src/settings/DashboardItemsInput.jsx deleted file mode 100644 index 735b648e..00000000 --- a/client/src/settings/DashboardItemsInput.jsx +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import { Box, Chip, Typography } from '@mui/material'; -import { useWatch } from 'react-hook-form'; -import { ArrayInput, SimpleFormIterator, TextInput, useGetResourceLabel, useSimpleFormIteratorItem } from 'react-admin'; -import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; - -// resource/yearFilterType/filter used to be hand-typed here, including a raw -// JSON filter field - nobody actually used it, and yearFilterType's "regular -// vs extended" choice meant nothing without reading the query code. Cards are -// created from a list's own filter UI instead (see AddToDashboardButton), -// which already produces valid resource+filter values. This is management -// only: rename, reorder, remove. -// -// SimpleForm here has no `record`, so SimpleFormIterator rows carry no -// RecordContext - read each row's live values via its form path instead. -const DashboardItemSummary = () => { - const { index } = useSimpleFormIteratorItem(); - const record = useWatch({ name: `dashboardItems.${index}` }); - const getResourceLabel = useGetResourceLabel(); - if (!record?.resource) return null; - const hasYearFilter = record.yearFilterType && record.yearFilterType !== 'none'; - const hasExtraFilter = record.filter && Object.keys(record.filter).length > 0; - return ( - - - {hasYearFilter && } - {hasExtraFilter && } - - ); -}; - -export function DashboardItemsInput() { - return ( - - - כדי להוסיף כרטיס חדש, סננו כל רשימה כרצונכם ולחצו על "הוסף לתמונת מצב" בסרגל הכלים - שלה. - - - - - - - - - ); -} diff --git a/client/src/settings/Settings.jsx b/client/src/settings/Settings.jsx index e58d7fbc..1c8c7f96 100644 --- a/client/src/settings/Settings.jsx +++ b/client/src/settings/Settings.jsx @@ -14,8 +14,8 @@ import { import { useNavigate } from 'react-router-dom'; import { getDefaultPageSize } from '@shared/utils/settingsUtil'; import { CommonSettingsAccordion } from '@shared/components/settings/CommonSettingsAccordion'; +import { DashboardItemsInput } from '@shared/components/settings/DashboardItemsInput'; import { getLateValue, getDashboardItems, getReportStyles, getReportCardSettings, normalizeReportStyles } from './settingsUtil'; -import { DashboardItemsInput } from './DashboardItemsInput'; import { ReportStylesInput } from './ReportStylesInput'; import { GeneralSettingsInput } from './GeneralSettingsInput'; import { ReportCardSettingsInput } from './ReportCardSettingsInput'; @@ -72,7 +72,7 @@ export default function Settings() { From ae980f1f3ea48218c38c2b209f5bb29647b9accd Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 19:38:37 +0000 Subject: [PATCH 9/9] Point client/shared at nra-client main (merged PR #26) --- client/shared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/shared b/client/shared index ab0e1662..3d743786 160000 --- a/client/shared +++ b/client/shared @@ -1 +1 @@ -Subproject commit ab0e1662709683bd22ba59a66e4fbd118309ea1a +Subproject commit 3d74378646c64e93aa3304786fa7679572506ad6