Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('AttendanceCleanupRuleConfig', () => {
return { service, jobService };
}

function makeReq(ids: string, rules: Partial<AttendanceCleanupRule>[]) {
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.
Expand All @@ -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, {});

Expand All @@ -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, {});

Expand All @@ -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, {});

Expand Down
2 changes: 0 additions & 2 deletions server/src/entity-modules/att-report.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion server/src/entity-modules/known-absence.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class KnownAbsenceService<T extends Entity | KnownAbsence> extends BaseEntitySer
}
}

function getRows(body: any): StudentDatesRow[] {
function getRows(body: { rows?: StudentDatesRow[] } | undefined): StudentDatesRow[] {
return Array.isArray(body?.rows) ? body.rows : [];
}

Expand Down
Loading