From 0ecba4d836874f37befbc026e7d7cc5e0357314d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 07:20:29 +0000 Subject: [PATCH] refactor(server): drop commented-out export headers, unused test param, type getRows body Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012GTictqecCYiBSiCMj1RKN --- .../__tests__/attendance-cleanup-rule.config.spec.ts | 8 ++++---- server/src/entity-modules/att-report.config.ts | 2 -- server/src/entity-modules/known-absence.config.ts | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/server/src/entity-modules/__tests__/attendance-cleanup-rule.config.spec.ts b/server/src/entity-modules/__tests__/attendance-cleanup-rule.config.spec.ts index 564f87d8..3b525ddd 100644 --- a/server/src/entity-modules/__tests__/attendance-cleanup-rule.config.spec.ts +++ b/server/src/entity-modules/__tests__/attendance-cleanup-rule.config.spec.ts @@ -51,7 +51,7 @@ describe('AttendanceCleanupRuleConfig', () => { return { service, jobService }; } - function makeReq(ids: string, rules: Partial[]) { + function makeReq(ids: string) { // getManyByIds is what actually applies crudAuth's filter (via createBuilder) - it's // mocked here rather than re-testing that plumbing, which base-entity.service.spec.ts // already covers directly. @@ -69,7 +69,7 @@ describe('AttendanceCleanupRuleConfig', () => { { id: 1, userId: 38 }, { id: 2, userId: 38 }, ] as any); - const req = makeReq('1,2', []); + const req = makeReq('1,2'); const message = await service.doAction(req, {}); @@ -82,7 +82,7 @@ describe('AttendanceCleanupRuleConfig', () => { it('enqueues nothing when none of the selected ids resolve for this caller', async () => { const { service, jobService } = makeService(); jest.spyOn(service, 'getManyByIds').mockResolvedValue([]); - const req = makeReq('99', []); // e.g. owned by someone else, filtered out by crudAuth + const req = makeReq('99'); // e.g. owned by someone else, filtered out by crudAuth const message = await service.doAction(req, {}); @@ -96,7 +96,7 @@ describe('AttendanceCleanupRuleConfig', () => { { id: 1, userId: 38 }, { id: 2, userId: 39 }, ] as any); - const req = makeReq('1,2', []); + const req = makeReq('1,2'); await service.doAction(req, {}); diff --git a/server/src/entity-modules/att-report.config.ts b/server/src/entity-modules/att-report.config.ts index 1417efac..23b9c81a 100644 --- a/server/src/entity-modules/att-report.config.ts +++ b/server/src/entity-modules/att-report.config.ts @@ -53,8 +53,6 @@ function getConfig(): BaseEntityModuleOptions { { value: getHebrewDateFormatter('reportDate'), label: 'תאריך עברי' }, { value: 'howManyLessons', label: 'מספר שיעורים' }, { value: 'absCount', label: 'מספר חיסורים' }, - // { value: 'approvedAbsCount', label: 'מספר חיסורים מאושרים' }, - // { value: 'sheetName', label: 'חודש דיווח' }, { value: 'comments', label: 'הערות' }, ]; if (!shouldShowTopic(req)) { diff --git a/server/src/entity-modules/known-absence.config.ts b/server/src/entity-modules/known-absence.config.ts index f2f43707..34812627 100644 --- a/server/src/entity-modules/known-absence.config.ts +++ b/server/src/entity-modules/known-absence.config.ts @@ -82,7 +82,7 @@ class KnownAbsenceService extends BaseEntitySer } } -function getRows(body: any): StudentDatesRow[] { +function getRows(body: { rows?: StudentDatesRow[] } | undefined): StudentDatesRow[] { return Array.isArray(body?.rows) ? body.rows : []; }