diff --git a/server/src/db/entities/User.entity.ts b/server/src/db/entities/User.entity.ts index c373d394..b875ef32 100644 --- a/server/src/db/entities/User.entity.ts +++ b/server/src/db/entities/User.entity.ts @@ -8,18 +8,16 @@ import { Teacher } from 'src/db/entities/Teacher.entity'; @Entity('users') export class User extends BaseUser { - // @OneToMany(() => Grade, (grades) => grades.user) + // Typed only, not mapped: these entities reference the user through a plain + // `userId` column, with no TypeORM relation. Adding @OneToMany here would + // also require a matching @ManyToOne on each entity. grades: Grade[]; - // @OneToMany(() => KlassType, (klassTypes) => klassTypes.user) klassTypes: KlassType[]; - // @OneToMany(() => KnownAbsence, (knownAbsences) => knownAbsences.user) knownAbsences: KnownAbsence[]; - // @OneToMany(() => Student, (students) => students.user) students: Student[]; - // @OneToMany(() => Teacher, (teachers) => teachers.user) teachers: Teacher[]; } 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 40307e42..ebff4d6f 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 @@ -126,7 +126,7 @@ class AttReportWithReportMonthService { + private async bulkChangeKlass(extra: Record): Promise { const ids = getAsNumberArray(extra.ids); if (!ids || ids.length === 0) return 'לא נבחרו רשומות'; const klassReferenceId = getAsNumber(extra.klassReferenceId); @@ -135,7 +135,7 @@ class AttReportWithReportMonthService { + private async bulkChangeTeacher(extra: Record): Promise { const ids = getAsNumberArray(extra.ids); if (!ids || ids.length === 0) return 'לא נבחרו רשומות'; const teacherReferenceId = getAsNumber(extra.teacherReferenceId); @@ -144,7 +144,7 @@ class AttReportWithReportMonthService { + private async bulkKnownAbsences(extra: Record): Promise { const ids = getAsArray(extra.ids); if (!ids) return 'לא נבחרו רשומות'; const reports = await this.dataSource.getRepository(AttReport).findBy({ id: In(ids) }); @@ -169,7 +169,7 @@ class AttReportWithReportMonthService { + private async fixStudentReferenceV2(extra: Record): Promise { const ids = getAsArray(extra.ids); if (!ids) return 'לא נבחרו רשומות'; const reports = await this.dataSource.getRepository(AttReport).findBy({ id: In(ids) }); @@ -189,7 +189,7 @@ class AttReportWithReportMonthService { + private async fixReferences(extra: Record): Promise { const ids = getAsNumberArray(extra.ids); if (!ids) return 'לא נבחרו רשומות'; const referenceFields = { diff --git a/server/src/reports/lessonSignaturePdfReport.tsx b/server/src/reports/lessonSignaturePdfReport.tsx index b20ae5cb..1f32c59c 100644 --- a/server/src/reports/lessonSignaturePdfReport.tsx +++ b/server/src/reports/lessonSignaturePdfReport.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import { DataSource, In } from 'typeorm'; import { ImportFile } from '@shared/entities/ImportFile.entity'; import { ReportGroup } from 'src/db/entities/ReportGroup.entity'; -import { ReportGroupSession } from 'src/db/entities/ReportGroupSession.entity'; import { AttReport } from 'src/db/entities/AttReport.entity'; import { Grade } from 'src/db/entities/Grade.entity'; import { Student } from 'src/db/entities/Student.entity'; @@ -452,7 +451,7 @@ const LessonSignatureReport: React.FunctionComponent = ({ reportParams, re ציון: ${report.gradeAvg ? report.gradeAvg * 100 : '-'}, השפעה: ${gradeEffect.effectPercent ? gradeEffect.effectPercent + '%' : gradeEffect.effect}, ציון סופי: ${displayGrade} `; - const { fullCellStyle, rightAlignFullCellStyle, emptyCellStyle } = useCellStyles(); + const { fullCellStyle, rightAlignFullCellStyle } = useCellStyles(); return {formatDisplayName(report.lesson)}