From b3955cc8c2920a012c5aac8d7b3e07fadb04608f Mon Sep 17 00:00:00 2001 From: yael-miller Date: Thu, 15 Jan 2026 06:45:53 +0000 Subject: [PATCH 1/2] add lead teacher view and routes --- client/src/App.jsx | 2 ++ client/src/GeneralLayout.jsx | 5 ++++- .../lead-taecher-att-report-list.jsx | 21 +++++++++++++++++++ .../entities/att-report-with-report-month.jsx | 1 + .../att-report-with-report-month.config.ts | 1 + 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 client/src/components/TeacherView/lead-taecher-att-report-list.jsx diff --git a/client/src/App.jsx b/client/src/App.jsx index dae6876c..3499c5c9 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -25,6 +25,7 @@ import { resourceEntityGuesser } from '@shared/components/crudContainers/EntityG import attReport from "src/entities/att-report"; import attReportWithReportMonth from './entities/att-report-with-report-month'; import teacherAttReport from 'src/components/TeacherView/taecher-att-report-list'; +import LeadTeacherAttReportList from './components/TeacherView/lead-taecher-att-report-list'; import TeacherPercentReportWithDatesList from 'src/components/TeacherView/percent-report-with-dates-list'; import TeacherStudentAttendanceList from 'src/components/TeacherView/student-attendance-list'; import grade from "src/entities/grade"; @@ -142,6 +143,7 @@ const App = () => ( } /> } /> } /> + }/> ); diff --git a/client/src/GeneralLayout.jsx b/client/src/GeneralLayout.jsx index 6960fcaa..bebfd916 100644 --- a/client/src/GeneralLayout.jsx +++ b/client/src/GeneralLayout.jsx @@ -14,6 +14,8 @@ 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 BaseLayout from "@shared/components/layout/Layout"; import BaseDashboard from '@shared/components/views/Dashboard'; @@ -48,7 +50,8 @@ const menuGroups = [ ({ permissions }) => !isOnlyInLessonReport(permissions) && ({ name: 'report', icon: , routes: [ ({ permissions }) => !isTeacherView(permissions) && } />, - } /> + } />, + } /> ] }), { name: 'settings', icon: }, diff --git a/client/src/components/TeacherView/lead-taecher-att-report-list.jsx b/client/src/components/TeacherView/lead-taecher-att-report-list.jsx new file mode 100644 index 00000000..1f3ecc03 --- /dev/null +++ b/client/src/components/TeacherView/lead-taecher-att-report-list.jsx @@ -0,0 +1,21 @@ +import attReport from "../../entities/att-report-with-report-month.jsx"; +import { TeacherGuard } from "src/components/TeacherView/TeacherAccess.jsx"; +import { useObjectStore } from "src/utils/storeUtil"; + +const BaseList = attReport.list; + +const LeadTeacherAttReportList = (props) => { + const { value: teacher } = useObjectStore("teacher"); + + const leadTeacherFilter = { + 'klass.klassType.teacherReferenceId': teacher?.id, + }; + + return ( + + + + ); +}; + +export default LeadTeacherAttReportList; \ No newline at end of file diff --git a/client/src/entities/att-report-with-report-month.jsx b/client/src/entities/att-report-with-report-month.jsx index 0fd1196b..86876abe 100644 --- a/client/src/entities/att-report-with-report-month.jsx +++ b/client/src/entities/att-report-with-report-month.jsx @@ -83,6 +83,7 @@ export const Datagrid = ({ isAdmin, children, ...props }) => { } const entity = { + resource: 'att_report_with_report_month', Datagrid, Inputs, filters, diff --git a/server/src/entity-modules/att-report-with-report-month.config.ts b/server/src/entity-modules/att-report-with-report-month.config.ts index 8f4268d7..4ca28aa0 100644 --- a/server/src/entity-modules/att-report-with-report-month.config.ts +++ b/server/src/entity-modules/att-report-with-report-month.config.ts @@ -22,6 +22,7 @@ function getConfig(): BaseEntityModuleOptions { teacher: { eager: false }, lesson: { eager: false }, klass: { eager: false }, + 'klass.klassType':{eager:false}, reportMonth: { eager: false }, reportGroupSession: { eager: false } } From c338eee1d59a148f67ae7f6ee1e063384269db3e Mon Sep 17 00:00:00 2001 From: yael-miller Date: Thu, 15 Jan 2026 10:25:36 +0000 Subject: [PATCH 2/2] typo and formatting --- client/src/App.jsx | 2 +- ...her-att-report-list.jsx => lead-teacher-att-report-list.jsx} | 0 .../src/entity-modules/att-report-with-report-month.config.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename client/src/components/TeacherView/{lead-taecher-att-report-list.jsx => lead-teacher-att-report-list.jsx} (100%) diff --git a/client/src/App.jsx b/client/src/App.jsx index 3499c5c9..eaeed812 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -25,7 +25,7 @@ import { resourceEntityGuesser } from '@shared/components/crudContainers/EntityG import attReport from "src/entities/att-report"; import attReportWithReportMonth from './entities/att-report-with-report-month'; import teacherAttReport from 'src/components/TeacherView/taecher-att-report-list'; -import LeadTeacherAttReportList from './components/TeacherView/lead-taecher-att-report-list'; +import LeadTeacherAttReportList from './components/TeacherView/lead-teacher-att-report-list'; import TeacherPercentReportWithDatesList from 'src/components/TeacherView/percent-report-with-dates-list'; import TeacherStudentAttendanceList from 'src/components/TeacherView/student-attendance-list'; import grade from "src/entities/grade"; diff --git a/client/src/components/TeacherView/lead-taecher-att-report-list.jsx b/client/src/components/TeacherView/lead-teacher-att-report-list.jsx similarity index 100% rename from client/src/components/TeacherView/lead-taecher-att-report-list.jsx rename to client/src/components/TeacherView/lead-teacher-att-report-list.jsx diff --git a/server/src/entity-modules/att-report-with-report-month.config.ts b/server/src/entity-modules/att-report-with-report-month.config.ts index 4ca28aa0..110a7f15 100644 --- a/server/src/entity-modules/att-report-with-report-month.config.ts +++ b/server/src/entity-modules/att-report-with-report-month.config.ts @@ -22,7 +22,7 @@ function getConfig(): BaseEntityModuleOptions { teacher: { eager: false }, lesson: { eager: false }, klass: { eager: false }, - 'klass.klassType':{eager:false}, + 'klass.klassType': { eager: false }, reportMonth: { eager: false }, reportGroupSession: { eager: false } }