forked from wangziqi/gongxue-base
feat: refine admin forms, attendance and finance workflows
Squash merge PR #23. Included changes: - complete occupancy check-in required fields/default payload - improve responsive admin management pages - fix attendance edge cases and attendance period config - refine wallet/finance-related workflow handling Checks: - npm run typecheck -w apps/admin - npm run typecheck -w apps/server
This commit is contained in:
@@ -175,6 +175,16 @@ export class StudentsController {
|
||||
return this.service.getBasicLookups();
|
||||
}
|
||||
|
||||
@Get('filter-lookups')
|
||||
@RequirePermission('student:view')
|
||||
async getFilterLookups(@Request() req: AuthenticatedRequest) {
|
||||
const classIds = await this.service.getAccessibleClassIds(
|
||||
req.user.id,
|
||||
this.canManageAllStudents(req),
|
||||
);
|
||||
return this.service.getFilterLookups(classIds);
|
||||
}
|
||||
|
||||
@Get()
|
||||
@RequirePermission('student:view')
|
||||
async findAll(
|
||||
@@ -194,7 +204,7 @@ export class StudentsController {
|
||||
@Get('export')
|
||||
@RequirePermission('student:export')
|
||||
async exportExcel(
|
||||
@Query('includeArchived') includeArchived?: string,
|
||||
@Query() query: QueryStudentDto,
|
||||
@Res() res?: Response,
|
||||
@Request() req?: any,
|
||||
) {
|
||||
@@ -202,10 +212,7 @@ export class StudentsController {
|
||||
req.user.id,
|
||||
this.canManageAllStudents(req),
|
||||
);
|
||||
const students = await this.service.findAll(
|
||||
{ includeArchived: includeArchived === 'true' },
|
||||
classIds,
|
||||
);
|
||||
const students = await this.service.findAll(query, classIds);
|
||||
const workbook = new ExcelJS.Workbook();
|
||||
const ws = workbook.addWorksheet('学生名单');
|
||||
ws.columns = STUDENT_EXPORT_COLUMNS;
|
||||
|
||||
Reference in New Issue
Block a user