10 Commits

21 changed files with 843 additions and 353 deletions

View File

@@ -29,8 +29,6 @@ import {
EyeOutlined,
CloseOutlined,
FileTextOutlined,
FilePdfOutlined,
CameraOutlined,
ReloadOutlined,
} from '@ant-design/icons';
import dayjs from 'dayjs';
@@ -741,33 +739,16 @@ const StudentProfileContent: React.FC<StudentProfileContentProps> = ({
void fetchData();
}, [fetchData]);
const handleDownloadReport = useCallback(() => {
const token = localStorage.getItem('token');
window.open(`/api/archive/${studentId}/report?token=${token}`, '_blank');
}, [studentId]);
const handlePreviewReport = useCallback(() => {
const token = localStorage.getItem('token');
window.open(`/api/archive/${studentId}/report?token=${token}`, '_blank');
}, [studentId]);
const handleDownloadPdf = useCallback(async () => {
const token = localStorage.getItem('token');
const handlePreviewReport = useCallback(async () => {
try {
const res = await fetch(`/api/archive/${studentId}/report`, {
headers: { Authorization: `Bearer ${token}` },
});
if (!res.ok) throw new Error('下载失败');
const blob = await res.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `学员档案_${studentId}.pdf`;
a.click();
URL.revokeObjectURL(url);
} catch (e: unknown) {
const err = e as { message?: string };
message.error(err?.message || 'PDF下载失败');
const { html } = await api.get<{ html: string }>(`/archive/${studentId}/report-html`);
const w = window.open('', '_blank');
if (w) {
w.document.write(html);
w.document.close();
}
} catch {
message.error('加载报告失败');
}
}, [studentId]);
@@ -787,13 +768,7 @@ const StudentProfileContent: React.FC<StudentProfileContentProps> = ({
</Space>
<Space>
<Button icon={<FileTextOutlined />} onClick={handlePreviewReport}>
</Button>
<Button icon={<FilePdfOutlined />} onClick={handleDownloadPdf}>
PDF下载
</Button>
<Button icon={<CameraOutlined />} onClick={handleDownloadReport}>
</Button>
<Button icon={<ReloadOutlined />} onClick={fetchData} loading={loading}>

View File

@@ -1,7 +1,8 @@
import React, { useEffect, useState, useMemo, useCallback } from 'react';
import {
Card, Button, Select, Modal, Form, Input, DatePicker, TimePicker,
Popconfirm, message, Space, Spin, Empty, Tag, Tooltip,
Popconfirm, message, Space, Spin, Empty, Tag, Tooltip, Segmented,
Badge,
} from 'antd';
import {
CalendarOutlined,
@@ -61,8 +62,12 @@ const WEEKDAY_NUMBERS = [1, 2, 3, 4, 5, 6, 7];
// ---- Component ----
const SchedulesPage: React.FC = () => {
// Week navigation
const [weekStart, setWeekStart] = useState<Dayjs>(() => dayjs().weekday(1).startOf('day'));
// View mode and navigation
const [viewMode, setViewMode] = useState<'week' | 'month'>('week');
const [viewDate, setViewDate] = useState<Dayjs>(() => dayjs().weekday(1).startOf('day'));
// Modal date selection (month view)
const [selectedDate, setSelectedDate] = useState<Dayjs | null>(null);
// Data
const [classrooms, setClassrooms] = useState<ClassroomItem[]>([]);
@@ -85,12 +90,48 @@ const SchedulesPage: React.FC = () => {
const [submitting, setSubmitting] = useState(false);
const [form] = Form.useForm<ScheduleFormValues>();
// Derived week info
// Derived week/month info
const weekStart = useMemo(() => viewDate.weekday(1).startOf('day'), [viewDate]);
const monthStart = useMemo(() => viewDate.startOf('month'), [viewDate]);
const weekEnd = useMemo(() => weekStart.add(6, 'day'), [weekStart]);
const weekNum = useMemo(() => weekStart.week(), [weekStart]);
const weekYear = useMemo(() => weekStart.year(), [weekStart]);
const startDateStr = useMemo(() => weekStart.format('YYYY-MM-DD'), [weekStart]);
const endDateStr = useMemo(() => weekEnd.format('YYYY-MM-DD'), [weekEnd]);
const calendarDays = useMemo(() => {
const monthEnd = monthStart.endOf('month');
const startOffset = (monthStart.day() + 6) % 7;
const endOffset = (7 - monthEnd.day()) % 7;
const start = monthStart.subtract(startOffset, 'day');
const end = monthEnd.add(endOffset, 'day');
const totalDays = end.diff(start, 'day') + 1;
const days: Dayjs[] = [];
for (let i = 0; i < totalDays; i++) {
days.push(start.add(i, 'day'));
}
return days;
}, [monthStart]);
const weeks = useMemo(() => {
const result: Dayjs[][] = [];
for (let i = 0; i < calendarDays.length; i += 7) {
result.push(calendarDays.slice(i, i + 7));
}
return result;
}, [calendarDays]);
const startDateStr = useMemo(() => {
if (viewMode === 'month') {
return calendarDays[0].format('YYYY-MM-DD');
}
return weekStart.format('YYYY-MM-DD');
}, [viewMode, weekStart, calendarDays]);
const endDateStr = useMemo(() => {
if (viewMode === 'month') {
return calendarDays[calendarDays.length - 1].format('YYYY-MM-DD');
}
return weekEnd.format('YYYY-MM-DD');
}, [viewMode, weekEnd, calendarDays]);
// ---- Data fetching ----
@@ -159,10 +200,30 @@ const SchedulesPage: React.FC = () => {
return filtered;
}, [matrix, filterClassId]);
const monthScheduleMap = useMemo(() => {
const map: Record<string, ClassScheduleItem[]> = {};
for (const day of calendarDays) {
const wd = day.day() === 0 ? 7 : day.day();
const dateStr = day.format('YYYY-MM-DD');
const result: ClassScheduleItem[] = [];
for (const classroom of filteredClassrooms) {
const daySchedules = displayMatrix[classroom.id]?.[wd] || [];
for (const s of daySchedules) {
if (dateStr >= s.startDate && dateStr <= s.endDate) {
result.push(s);
}
}
}
map[dateStr] = result;
}
return map;
}, [calendarDays, displayMatrix, filteredClassrooms]);
// ---- Cell click handlers ----
const handleCellClick = (classroomId: number, weekDay: number) => {
const schedules = displayMatrix[classroomId]?.[weekDay] || [];
setSelectedCell({ classroomId, weekDay });
setSelectedDate(null);
if (schedules.length > 0) {
setSelectedSchedules(schedules);
@@ -175,6 +236,31 @@ const SchedulesPage: React.FC = () => {
}
};
const getSchedulesForDate = (date: Dayjs): ClassScheduleItem[] => {
const wd = date.day() === 0 ? 7 : date.day();
const dateStr = date.format('YYYY-MM-DD');
const result: ClassScheduleItem[] = [];
for (const classroom of filteredClassrooms) {
const daySchedules = displayMatrix[classroom.id]?.[wd] || [];
for (const s of daySchedules) {
if (dateStr >= s.startDate && dateStr <= s.endDate) {
result.push(s);
}
}
}
return result;
};
const handleDateClick = (date: Dayjs) => {
const dateKey = date.format('YYYY-MM-DD');
const schedules = monthScheduleMap[dateKey] || getSchedulesForDate(date);
setSelectedDate(date);
setSelectedCell(null);
setSelectedSchedules(schedules);
setModalMode('detail');
setModalOpen(true);
};
// ---- Create schedule ----
const handleSubmit = async () => {
@@ -214,13 +300,11 @@ const SchedulesPage: React.FC = () => {
try {
await api.delete(`/class-schedules/${id}`);
message.success('排课已删除');
// Refresh the cell's schedules
if (selectedCell) {
const remaining = selectedSchedules.filter((s) => s.id !== id);
setSelectedSchedules(remaining);
if (remaining.length === 0) {
setModalOpen(false);
}
// Refresh the displayed schedules
const remaining = selectedSchedules.filter((s) => s.id !== id);
setSelectedSchedules(remaining);
if (remaining.length === 0) {
setModalOpen(false);
}
fetchData();
} catch (e: unknown) {
@@ -273,24 +357,57 @@ const SchedulesPage: React.FC = () => {
<h3 style={{ margin: 0 }}></h3>
</Space>
<Space>
<Button
icon={<LeftOutlined />}
onClick={() => setWeekStart(weekStart.subtract(7, 'day'))}
>
</Button>
<span style={{ fontWeight: 500, fontSize: 15 }}>
{weekYear} W{weekNum}
<span style={{ color: '#8c8c8c', fontWeight: 400, fontSize: 13, marginLeft: 6 }}>
({startDateStr} ~ {endDateStr})
</span>
</span>
<Button
icon={<RightOutlined />}
onClick={() => setWeekStart(weekStart.add(7, 'day'))}
>
</Button>
<Segmented
value={viewMode}
onChange={(v) => {
setViewMode(v as 'week' | 'month');
setSelectedDate(null);
}}
options={[
{ label: '周视图', value: 'week' },
{ label: '月视图', value: 'month' },
]}
/>
{viewMode === 'week' ? (
<>
<Button
icon={<LeftOutlined />}
onClick={() => setViewDate(viewDate.subtract(7, 'day'))}
>
</Button>
<span style={{ fontWeight: 500, fontSize: 15 }}>
{weekYear} W{weekNum}
<span style={{ color: '#8c8c8c', fontWeight: 400, fontSize: 13, marginLeft: 6 }}>
({startDateStr} ~ {endDateStr})
</span>
</span>
<Button
icon={<RightOutlined />}
onClick={() => setViewDate(viewDate.add(7, 'day'))}
>
</Button>
</>
) : (
<>
<Button
icon={<LeftOutlined />}
onClick={() => setViewDate(viewDate.subtract(1, 'month'))}
>
</Button>
<span style={{ fontWeight: 500, fontSize: 15 }}>
{monthStart.format('YYYY年 M月')}
</span>
<Button
icon={<RightOutlined />}
onClick={() => setViewDate(viewDate.add(1, 'month'))}
>
</Button>
</>
)}
</Space>
</div>
@@ -322,7 +439,7 @@ const SchedulesPage: React.FC = () => {
<Spin spinning={loading}>
{classrooms.length === 0 ? (
<Empty description="暂无教室数据" />
) : (
) : (viewMode === 'week' ? (
<div style={{ overflowX: 'auto' }}>
<table
style={{
@@ -455,7 +572,88 @@ const SchedulesPage: React.FC = () => {
</tbody>
</table>
</div>
)}
) : (
<div style={{ overflowX: 'auto' }}>
<table
style={{
width: '100%',
borderCollapse: 'collapse',
fontSize: 13,
tableLayout: 'fixed',
}}
>
<thead>
<tr style={{ background: '#fafafa' }}>
{['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((d) => (
<th
key={d}
style={{
padding: '10px 8px',
border: '1px solid #f0f0f0',
textAlign: 'center',
fontWeight: 500,
}}
>
{d}
</th>
))}
</tr>
</thead>
<tbody>
{weeks.map((week, wi) => (
<tr key={wi}>
{week.map((day, di) => {
const isCurrentMonth = day.month() === monthStart.month();
const dateKey = day.format('YYYY-MM-DD');
const daySchedules = monthScheduleMap[dateKey] || [];
const count = daySchedules.length;
return (
<td
key={di}
onClick={() => handleDateClick(day)}
style={{
padding: '6px 8px',
border: '1px solid #f0f0f0',
verticalAlign: 'top',
cursor: 'pointer',
height: 90,
background: isCurrentMonth ? '#fff' : '#fafafa',
transition: 'background 0.15s',
}}
onMouseEnter={(e) => {
(e.currentTarget as HTMLElement).style.background = isCurrentMonth ? '#f0f5ff' : '#f0f0f0';
}}
onMouseLeave={(e) => {
(e.currentTarget as HTMLElement).style.background = isCurrentMonth ? '' : '#fafafa';
}}
>
<div
style={{
fontWeight: isCurrentMonth ? 600 : 400,
color: isCurrentMonth ? '#262626' : '#bfbfbf',
fontSize: 14,
marginBottom: 4,
}}
>
{day.date()}
</div>
{count > 0 && (
<Badge
count={count}
size="small"
overflowCount={99}
style={{ backgroundColor: '#1677ff' }}
/>
)}
</td>
);
})}
</tr>
))}
</tbody>
</table>
</div>
))}
</Spin>
{/* Modal */}
@@ -463,7 +661,9 @@ const SchedulesPage: React.FC = () => {
title={
modalMode === 'create'
? `新增排课 — ${selectedClassroom?.name || ''} · ${selectedCell ? WEEKDAYS[selectedCell.weekDay - 1] : ''}`
: `排课详情 — ${selectedClassroom?.name || ''} · ${selectedCell ? WEEKDAYS[selectedCell.weekDay - 1] : ''}`
: selectedDate
? `排课详情 — ${selectedDate.format('YYYY-MM-DD')} ${WEEKDAYS[selectedDate.day() === 0 ? 6 : selectedDate.day() - 1]}`
: `排课详情 — ${selectedClassroom?.name || ''} · ${selectedCell ? WEEKDAYS[selectedCell.weekDay - 1] : ''}`
}
open={modalOpen}
onCancel={() => setModalOpen(false)}

View File

@@ -1,9 +1,10 @@
import React from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import { Card, Button, Space } from 'antd';
import { ArrowLeftOutlined, DownloadOutlined } from '@ant-design/icons';
import { ArrowLeftOutlined, EyeOutlined } from '@ant-design/icons';
import StudentProfileContent from '../../components/StudentProfileContent';
import PermissionButton from '../../components/PermissionButton';
import api from '../../api';
const StudentProfilePage: React.FC = () => {
const { id } = useParams<{ id: string }>();
@@ -13,9 +14,17 @@ const StudentProfilePage: React.FC = () => {
const studentId = Number(id);
const handleDownloadReport = () => {
const token = localStorage.getItem('token');
window.open(`/api/archive/${studentId}/report?token=${token}`, '_blank');
const handlePreviewReport = async () => {
try {
const { html } = await api.get<{ html: string }>(`/archive/${studentId}/report-html`);
const w = window.open('', '_blank');
if (w) {
w.document.write(html);
w.document.close();
}
} catch (err) {
console.error('Failed to load report HTML:', err);
}
};
return (
@@ -30,10 +39,10 @@ const StudentProfilePage: React.FC = () => {
<PermissionButton
permission="student:view"
type="primary"
icon={<DownloadOutlined />}
onClick={handleDownloadReport}
icon={<EyeOutlined />}
onClick={handlePreviewReport}
>
</PermissionButton>
}
>

View File

@@ -442,7 +442,7 @@ const StudentsPage: React.FC = () => {
dataSource={data}
rowKey="id"
loading={loading}
scroll={{ x: 1300 }}
scroll={{ x: 1410 }}
pagination={{ pageSize: 15, showTotal: (total) => `${total}` }}
rowClassName={(record: any) => (record.status === 'archived' ? 'archived-row' : '')}
rowSelection={{

View File

@@ -44,7 +44,6 @@
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"pdfkit": "^0.18.0",
"puppeteer": "^25.3.0",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"typeorm": "^0.3.28"

View File

@@ -1,8 +1,6 @@
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import puppeteer from 'puppeteer';
import { Response } from 'express';
import { StudentProfile } from '../entities/student-profile.entity';
import { StudentEnrollment } from '../entities/student-enrollment.entity';
import { ExamScore } from '../entities/exam-score.entity';
@@ -33,7 +31,7 @@ export class ArchiveReportService {
@InjectRepository(Student) private studentRepo: Repository<Student>,
) {}
async generateReport(studentId: number, res: Response): Promise<void> {
async generateReportHtml(studentId: number): Promise<string> {
const [student, profile, enrollments, exams, learnings, result, attendances] =
await Promise.all([
this.studentRepo.findOne({ where: { id: studentId } }),
@@ -57,31 +55,7 @@ export class ArchiveReportService {
attendances,
};
const html = this.buildHtml(data);
const browser = await puppeteer.launch({
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});
try {
const page = await browser.newPage();
await page.setContent(html, { waitUntil: 'load' });
const pdf = await page.pdf({
format: 'A4',
printBackground: true,
margin: { top: 0, right: 0, bottom: 0, left: 0 },
});
res.setHeader('Content-Type', 'application/pdf');
res.setHeader(
'Content-Disposition',
`attachment; filename=student_report_${studentId}.pdf`,
);
res.end(pdf);
} finally {
await browser.close();
}
return this.buildHtml(data);
}
private css(): string {
@@ -442,8 +416,8 @@ ${this.buildLearningAndResult(learnings, result, now)}
const sortedExams = [...cultureExams].filter((e) => e.score != null);
let improvement = '—';
if (sortedExams.length >= 2) {
const first = sortedExams[0].score!;
const last = sortedExams[sortedExams.length - 1].score!;
const first = sortedExams[0].score;
const last = sortedExams[sortedExams.length - 1].score;
improvement = (last - first).toFixed(1);
}
@@ -538,7 +512,7 @@ ${this.buildLearningAndResult(learnings, result, now)}
const cultureExams = exams.filter((e) => e.score != null);
if (cultureExams.length === 0) return '';
const scores = cultureExams.map((e) => e.score!);
const scores = cultureExams.map((e) => e.score);
const labels = cultureExams.map((e) => {
const d = e.examDate || '-';
return d.length > 7 ? d.slice(5) : d;

View File

@@ -8,12 +8,11 @@ import {
Param,
UseGuards,
Request,
Res,
UseInterceptors,
UploadedFile,
} from '@nestjs/common';
import { FileInterceptor } from '@nestjs/platform-express';
import type { Request as ExpressRequest, Response } from 'express';
import type { Request as ExpressRequest } from 'express';
import { ArchiveReportService } from './archive-report.service';
import { ArchiveService } from './archive.service';
import {
@@ -340,12 +339,25 @@ export class ArchiveController {
return result;
}
@Get(':studentId/report')
@Get(':studentId/report-html')
@RequirePermission('student:view')
async generateReport(
async generateReportHtml(
@Param('studentId') studentId: string,
@Res() res: Response,
@Request() req: AuthenticatedRequest,
) {
return this.reportService.generateReport(+studentId, res);
const { ipAddress, userAgent } = extractRequestInfo(req);
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: 'archive',
action: 'generate_report_html',
targetId: +studentId,
targetType: 'student',
ipAddress,
userAgent,
});
const html = await this.reportService.generateReportHtml(+studentId);
return { html };
}
}

View File

@@ -22,6 +22,7 @@ import {
MatchDingRecordDto,
AttendanceReportQueryDto,
UpdateAttendanceRecordDto,
GenerateFromSchedulesDto,
} from './dto/attendance.dto';
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
import { OperationLogsService } from '../operation-logs/operation-logs.service';
@@ -58,6 +59,28 @@ export class AttendanceController {
return result;
}
// ── Generate attendance records from schedules (with optional date range) ──
@Post('attendance-records/generate-from-schedules')
@RequirePermission('attendance:create')
async generateFromSchedules(
@Body() dto: GenerateFromSchedulesDto,
@Request() req: any,
) {
const { ipAddress, userAgent } = extractRequestInfo(req);
const result = await this.service.generateFromSchedules(dto);
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '考勤管理',
action: '按课表生成考勤',
detail: `班级 ${dto.classId}, 共 ${result.count}`,
ipAddress,
userAgent,
});
return result;
}
// ── Export attendance records ──
@Get('attendance-records/export')
@RequirePermission('attendance:export')

View File

@@ -1,13 +1,13 @@
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AttendanceRecord, DingAttendanceRaw, Student, Class } from '../entities';
import { AttendanceRecord, DingAttendanceRaw, Student, Class, ClassSchedule, ClassStudent } from '../entities';
import { AttendanceService } from './attendance.service';
import { AttendanceController } from './attendance.controller';
import { OperationLogsModule } from '../operation-logs/operation-logs.module';
import { CommonModule } from '../common/common.module';
@Module({
imports: [
TypeOrmModule.forFeature([AttendanceRecord, DingAttendanceRaw, Student, Class]),
TypeOrmModule.forFeature([AttendanceRecord, DingAttendanceRaw, Student, Class, ClassSchedule, ClassStudent]),
OperationLogsModule,
CommonModule,
],

View File

@@ -25,7 +25,7 @@ describe('AttendanceService — batchCreate', () => {
save: jest
.fn()
.mockImplementation((entities: AttendanceRecord[]) => {
const result = entities.map((e, i) => ({ ...e, id: i + 1 } as AttendanceRecord));
const result = entities.map((e, i) => ({ ...e, id: i + 1 }));
savedRecords.push(...result);
return Promise.resolve(result);
}),

View File

@@ -4,8 +4,8 @@ import {
BadRequestException,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository, In, Between } from 'typeorm';
import { AttendanceRecord, DingAttendanceRaw, Class, Student } from '../entities';
import { Repository, In, Between, LessThanOrEqual, MoreThanOrEqual } from 'typeorm';
import { AttendanceRecord, DingAttendanceRaw, Class, Student, ClassSchedule, ClassStudent, ScheduleType } from '../entities';
import { CampusScope } from '../common/campus-scope';
import {
BatchCreateAttendanceDto,
@@ -15,6 +15,8 @@ import {
MatchDingRecordDto,
AttendanceReportQueryDto,
UpdateAttendanceRecordDto,
GenerateAttendanceFromSchedulesDto,
GenerateFromSchedulesDto,
} from './dto/attendance.dto';
@Injectable()
@@ -28,6 +30,10 @@ export class AttendanceService {
private classRepo: Repository<Class>,
@InjectRepository(Student)
private studentRepo: Repository<Student>,
@InjectRepository(ClassSchedule)
private scheduleRepo: Repository<ClassSchedule>,
@InjectRepository(ClassStudent)
private classStudentRepo: Repository<ClassStudent>,
private readonly scope: CampusScope,
) {}
@@ -60,6 +66,114 @@ export class AttendanceService {
return { count: saved.length, records: saved };
}
// ── Generate attendance records from class schedules ──
async generateAttendanceFromSchedules(dto: GenerateAttendanceFromSchedulesDto) {
const { classId, dateFrom, dateTo } = dto;
if (dateFrom > dateTo) {
throw new BadRequestException('dateFrom must not be later than dateTo');
}
const cls = await this.classRepo.findOne({ where: { id: classId } });
if (!cls) {
throw new NotFoundException(`Class ${classId} not found`);
}
const schedules = await this.scheduleRepo.find({
where: {
classId,
scheduleType: ScheduleType.INTERNAL,
status: 'active',
startDate: LessThanOrEqual(dateTo),
endDate: MoreThanOrEqual(dateFrom),
},
});
const classStudents = await this.classStudentRepo.find({
where: { classId, status: 'active' },
relations: ['student'],
});
if (schedules.length === 0 || classStudents.length === 0) {
return { count: 0, records: [] };
}
const existingRecords = await this.attendanceRepo.find({
where: { classId, attendanceDate: Between(dateFrom, dateTo) },
});
const existingKeys = new Set(
existingRecords.map((r) => `${r.studentId}|${r.attendanceDate}|${r.session}`),
);
const entities: AttendanceRecord[] = [];
const end = new Date(dateTo);
for (let d = new Date(dateFrom); d <= end; d.setDate(d.getDate() + 1)) {
const dateStr = d.toISOString().slice(0, 10);
const weekDay = d.getDay() === 0 ? 7 : d.getDay();
for (const sched of schedules) {
if (sched.weekDay !== weekDay) continue;
if (dateStr < sched.startDate || dateStr > sched.endDate) continue;
const session = this.mapScheduleTimeToSession(sched.startTime);
for (const cs of classStudents) {
const key = `${cs.studentId}|${dateStr}|${session}`;
if (existingKeys.has(key)) continue;
const entity = this.attendanceRepo.create({
studentId: cs.studentId,
classId,
attendanceDate: dateStr,
session,
status: 'pending',
source: 'schedule',
});
entity.departmentId = cs.student?.departmentId ?? cls.departmentId ?? undefined;
entities.push(entity);
existingKeys.add(key);
}
}
}
const saved = await this.attendanceRepo.save(entities);
return { count: saved.length, records: saved };
}
// ── Generate attendance records from schedules (optional date range, defaults to current week) ──
async generateFromSchedules(dto: GenerateFromSchedulesDto): Promise<{ count: number; records: AttendanceRecord[] }> {
const { classId, startDate, endDate } = dto;
// Default to current week (MondaySunday)
const now = new Date();
const dayOfWeek = now.getDay();
const mondayOffset = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
const monday = new Date(now);
monday.setDate(now.getDate() + mondayOffset);
monday.setHours(0, 0, 0, 0);
const sunday = new Date(monday);
sunday.setDate(monday.getDate() + 6);
sunday.setHours(23, 59, 59, 999);
const dateFrom = startDate ?? monday.toISOString().slice(0, 10);
const dateTo = endDate ?? sunday.toISOString().slice(0, 10);
return this.generateAttendanceFromSchedules({
classId,
dateFrom,
dateTo,
});
}
private mapScheduleTimeToSession(startTime: string): string {
const hour = parseInt(startTime.slice(0, 2), 10);
if (hour < 8) return 'morning_reading';
if (hour < 12) return 'morning';
if (hour < 17) return 'afternoon';
if (hour < 20) return 'evening_study';
return 'night_check';
}
// ── Attendance summary ──
async getSummary(query: AttendanceSummaryQueryDto) {
const qb = this.attendanceRepo.createQueryBuilder('ar');

View File

@@ -151,3 +151,33 @@ export class AttendanceReportQueryDto {
@IsDateString()
dateTo?: string;
}
export class GenerateAttendanceFromSchedulesDto {
@IsInt()
@Type(() => Number)
@IsNotEmpty()
classId: number;
@IsDateString()
@IsNotEmpty()
dateFrom: string;
@IsDateString()
@IsNotEmpty()
dateTo: string;
}
export class GenerateFromSchedulesDto {
@IsInt()
@Type(() => Number)
@IsNotEmpty()
classId: number;
@IsOptional()
@IsDateString()
startDate?: string;
@IsOptional()
@IsDateString()
endDate?: string;
}

View File

@@ -47,12 +47,12 @@ export class CampusScope {
if (ids.length === 0) {
// Non-super-admin with no scoping → match nothing, never leak unfiltered data
if (!this.isSuperAdmin) {
return { ...where, departmentId: In([]) } as unknown as T;
return { ...where, departmentId: In([]) };
}
return where;
}
return { ...where, departmentId: In(ids) } as unknown as T;
return { ...where, departmentId: In(ids) };
}
/** Returns department IDs for QueryBuilder .andWhere() usage. null = no filtering needed. */

View File

@@ -123,7 +123,7 @@ export class DingTalkService {
name: dd.name,
source: 'dingtalk',
sourceId,
parentSourceId: (dd.parent_id ? String(dd.parent_id) : undefined) as any,
parentSourceId: (dd.parent_id ? String(dd.parent_id) : undefined),
type: 'department',
});
deptCount++;

View File

@@ -117,7 +117,7 @@ export class WeComService {
name: wd.name,
source: 'wecom',
sourceId,
parentSourceId: (wd.parentid ? String(wd.parentid) : undefined) as any,
parentSourceId: (wd.parentid ? String(wd.parentid) : undefined),
type: 'department',
});
deptCount++;

View File

@@ -163,6 +163,8 @@ export class OccupanciesService {
roomId: dto.newRoomId,
checkInDate: dto.transferDate,
billingStartDate: dto.newBillingStartDate || defaultBillingStart,
rentalType: oldOcc.rentalType,
tenantId: oldOcc.tenantId,
notes: `${oldOcc.roomId}号房换入`,
});
await runner.manager.save(newOcc);

View File

@@ -69,6 +69,17 @@ const PRESET_PERMISSIONS: Array<{ code: string; name: string; group: string }> =
{ code: 'attendance:create', name: '新增考勤', group: 'attendance' },
{ code: 'attendance:edit', name: '编辑考勤', group: 'attendance' },
{ code: 'attendance:export', name: '导出考勤', group: 'attendance' },
{ code: 'attendance:generate', name: '按课表生成考勤', group: 'attendance' },
{ code: 'learning:create', name: '创建学习任务', group: 'learning' },
{ code: 'learning:edit', name: '编辑学习任务', group: 'learning' },
{ code: 'learning:delete', name: '删除学习任务', group: 'learning' },
{ code: 'exam:create', name: '创建考试', group: 'exam' },
{ code: 'exam:edit', name: '编辑考试', group: 'exam' },
{ code: 'exam:delete', name: '删除考试', group: 'exam' },
{ code: 'sync:trigger', name: '触发数据同步', group: 'sync' },
{ code: 'sync:read', name: '查看同步状态', group: 'sync' },
{ code: 'integration:trigger', name: '触发集成', group: 'integration' },
{ code: 'integration:read', name: '查看集成状态', group: 'integration' },
];
const PRESET_ROLES: Array<{
@@ -120,6 +131,27 @@ const PRESET_ROLES: Array<{
isSystem: true,
permissionGroups: ['classroom', 'rental', 'tenant'],
},
{
name: '财务',
code: 'finance',
description: '管理费用、账单与押金',
isSystem: true,
permissionGroups: ['expense', 'bill', 'deposit', 'dashboard'],
},
{
name: '宿管',
code: 'dorm_manager',
description: '管理宿舍入住与宿舍信息',
isSystem: true,
permissionGroups: ['student', 'room', 'occupancy', 'dashboard'],
},
{
name: '教务',
code: 'academic',
description: '管理班级、排课、考勤、学习与考试',
isSystem: true,
permissionGroups: ['class', 'schedule', 'attendance', 'classroom', 'learning', 'exam', 'dashboard'],
},
];
@Injectable()

View File

@@ -177,9 +177,9 @@ export class StudentsService {
// Group attendance by class
const attendanceByClass = new Map<number, AttendanceRecord[]>();
for (const r of attendanceRecords) {
const list = attendanceByClass.get(r.classId!) || [];
const list = attendanceByClass.get(r.classId) || [];
list.push(r);
attendanceByClass.set(r.classId!, list);
attendanceByClass.set(r.classId, list);
}
const comparison = enrollments.map((e) => {

View File

@@ -0,0 +1,268 @@
# 学生档案报告前端预览 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 将档案报告从后端 Puppeteer 生成 PDF 改为后端生成 HTML、前端新窗口预览、浏览器打印出 PDF。
**Architecture:** 后端新增 `/archive/:studentId/report-html` 返回 HTML 字符串(复用现有 `buildHtml()` 方法),前端 `fetch` 后在新窗口渲染。移除 Puppeteer 依赖和原 PDF 下载端点。
**Tech Stack:** NestJS 11 + TypeORM + React 19 + Ant Design 6
## Global Constraints
- 复用现有 `buildHtml()` / `buildCover()` / `css()` 等 HTML 构造方法,不做任何样式改动
- 所有写操作记录日志
- 前端遵循现有页面模式
- Docker 镜像需移除 Chromium 相关依赖
---
### Task 1: 后端新增 report-html 接口
**Files:**
- Modify: `apps/server/src/archive/archive-report.service.ts`
- Modify: `apps/server/src/archive/archive.controller.ts`
**Interfaces:**
- Produces: `ArchiveReportService.generateReportHtml(studentId: number): Promise<string>`
- Produces: `GET /archive/:studentId/report-html``{ html: string }`
- [ ] **Step 1: 在 ArchiveReportService 新增 generateReportHtml 方法**
`archive-report.service.ts``generateReport` 方法之后,新增:
```typescript
async generateReportHtml(studentId: number): Promise<string> {
const [student, profile, enrollments, exams, learnings, result, attendances] =
await Promise.all([
this.studentRepo.findOne({ where: { id: studentId } }),
this.profileRepo.findOne({ where: { studentId } }),
this.enrollmentRepo.find({ where: { studentId }, order: { startDate: 'ASC' } }),
this.examRepo.find({ where: { studentId }, order: { examDate: 'ASC' } }),
this.learningRepo.find({ where: { studentId }, order: { recordDate: 'DESC' } }),
this.resultRepo.findOne({ where: { studentId } }),
this.attendanceRepo.find({ where: { studentId }, order: { attendanceDate: 'ASC' } }),
]);
if (!student) throw new Error('学生不存在');
const data: ReportData = {
student,
profile,
enrollments,
exams,
learnings,
result,
attendances,
};
return this.buildHtml(data);
}
```
- [ ] **Step 2: 在 ArchiveController 新增 report-html 端点**
`archive.controller.ts` 中,`generateReport` 方法之后新增:
```typescript
@Get(':studentId/report-html')
@RequirePermission('student:view')
async getReportHtml(
@Param('studentId') studentId: string,
@Request() req: AuthenticatedRequest,
) {
const { ipAddress, userAgent } = extractRequestInfo(req);
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: 'archive',
action: 'preview_report',
targetId: +studentId,
targetType: 'student',
ipAddress,
userAgent,
});
const html = await this.reportService.generateReportHtml(+studentId);
return { html };
}
```
- [ ] **Step 3: 验证后端接口**
```bash
# 启动后端后测试
curl -H "Authorization: Bearer <token>" http://localhost:3000/api/archive/1/report-html
```
预期返回 `{ "html": "<!DOCTYPE html>..." }`HTML 内容完整。
- [ ] **Step 4: Commit**
```bash
git add apps/server/src/archive/archive-report.service.ts apps/server/src/archive/archive.controller.ts
git commit -m "feat: add GET /archive/:studentId/report-html endpoint"
```
---
### Task 2: 前端按钮改为预览报告
**Files:**
- Modify: `apps/admin/src/pages/StudentProfile/index.tsx`
**Interfaces:**
- Consumes: `GET /archive/:studentId/report-html``{ html: string }`
- [ ] **Step 1: 修改按钮行为**
`handleDownloadReport` 替换为 `handlePreviewReport`,打开新窗口渲染 HTML
```typescript
const handlePreviewReport = async () => {
const token = localStorage.getItem('token');
const res = await fetch(`/api/archive/${studentId}/report-html`, {
headers: { Authorization: `Bearer ${token}` },
});
const { html } = await res.json();
const w = window.open('', '_blank');
if (w) {
w.document.write(html);
w.document.close();
}
};
```
将按钮文本和图标改为预览:
```tsx
extra={
<PermissionButton
permission="student:view"
type="primary"
icon={<EyeOutlined />}
onClick={handlePreviewReport}
>
预览报告
</PermissionButton>
}
```
需要在文件顶部 import 添加 `EyeOutlined`(已有 `DownloadOutlined` 可删除)。
- [ ] **Step 2: 浏览器验证**
```bash
# 启动前端 dev server
cd apps/admin && npm run dev
```
1. 打开学生档案页面
2. 点击「预览报告」按钮
3. 确认新窗口打开完整报告,样式正确
4. 新窗口 Ctrl+P → 确认打印预览分页正常
- [ ] **Step 3: Commit**
```bash
git add apps/admin/src/pages/StudentProfile/index.tsx
git commit -m "feat: change report button from download to preview"
```
---
### Task 3: 移除 Puppeteer 和旧 PDF 下载端点
**Files:**
- Modify: `apps/server/src/archive/archive-report.service.ts`
- Modify: `apps/server/src/archive/archive.controller.ts`
- Modify: `apps/server/package.json`
- Modify: `apps/server/Dockerfile`
**Interfaces:**
- Removes: `ArchiveReportService.generateReport(studentId, res)` — Puppeteer PDF 生成
- Removes: `GET /archive/:studentId/report` — PDF 下载端点
- Removes: `puppeteer` npm 依赖
- [ ] **Step 1: 删除 generateReport 方法**
`archive-report.service.ts` 中删除 `generateReport(res: Response)` 方法(第 36-85 行),包括方法内所有 Puppeteer 相关逻辑。
同步删除文件顶部的两个不再需要的 import
```typescript
// 删除这两行
import puppeteer from 'puppeteer';
import { Response } from 'express';
```
- [ ] **Step 2: 删除旧的 report 端点**
`archive.controller.ts` 中删除 `GET /archive/:studentId/report``generateReport` 方法(第 343-362 行)。
同步删除 `@Res` 装饰器的 import检查 `@Res` 是否被其他地方使用,如果只在 `generateReport` 中使用,则一并移除)。
- [ ] **Step 3: 移除 puppeteer 依赖**
```bash
cd apps/server && npm uninstall puppeteer
```
- [ ] **Step 4: 清理 Dockerfile**
读取 `apps/server/Dockerfile`,移除 Chromium/ Puppeteer 相关依赖安装。常见需要移除的:
- `chromium` / `chromium-browser` 等包
- Puppeteer 相关环境变量如 `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD`
- [ ] **Step 5: 验证构建**
```bash
cd apps/server && npm run build
```
确认编译通过,无 puppeteer 相关 import 错误。
- [ ] **Step 6: Commit**
```bash
git add apps/server/src/archive/archive-report.service.ts apps/server/src/archive/archive.controller.ts apps/server/package.json apps/server/package-lock.json apps/server/Dockerfile
git commit -m "refactor: remove Puppeteer, use frontend browser print for PDF"
```
---
### Task 4: 端到端验证
- [ ] **Step 1: 启动完整环境**
```bash
docker compose up -d
```
- [ ] **Step 2: 验证功能**
1. 登录系统 → 学生列表 → 进入某个学生档案
2. 点击「预览报告」→ 新窗口打开
3. 检查报告完整性:封面、基础信息、考试成绩总览(含 SVG 趋势图)、出勤记录(含 SVG 柱状图)、文化课明细、学情记录与录取归档
4. 新窗口 Ctrl+P → 另存为 PDF
5. 确认 PDF 内容与预览一致
- [ ] **Step 3: 验证无回归**
- 基础档案 Tab CRUD 正常
- 报读记录/考试成绩/学情记录/录取结果 增删改正常
- 附件上传/删除正常
---
## Self-Review
**1. Spec coverage:**
- [x] 新增 `/report-html` 端点 → Task 1 Step 2
- [x] 复用现有 buildHtml → Task 1 Step 1
- [x] 删除 Puppeteer 和旧端点 → Task 3
- [x] 前端按钮改为预览 → Task 2
- [x] 验收标准全部覆盖 → Task 4
**2. Placeholder scan:** 无 TBD/TODO/占位符。
**3. Type consistency:** `generateReportHtml` 签名在三处一致Service 定义、Controller 调用、接口文档。

View File

@@ -0,0 +1,79 @@
# 学生档案报告:后端渲染 → 前端预览
> 将档案报告从后端 Puppeteer 生成 PDF 改为后端生成 HTML、前端新窗口预览、浏览器打印出 PDF。
## 目标
- 去掉 Puppeteer 依赖(减小编译/运行时镜像体积)
- 报告预览即时可用,不再等待 PDF 生成
- PDF 导出由用户通过浏览器 Ctrl+P → 另存为 PDF 完成
- 改动最小化:复用现有 `buildHtml()` 等 HTML 构造方法
## 架构
```
前端: fetch /archive/:studentId/report-html
→ window.open → document.write(html)
→ 用户浏览/打印
后端: ArchiveReportService.generateReportHtml(studentId)
→ 查数据库组装 ReportData
→ 调用现有 buildHtml(data)
→ 返回 HTML 字符串
```
## 后端改动
### `apps/server/src/archive/archive-report.service.ts`
| 操作 | 详情 |
|------|------|
| 新增 | `generateReportHtml(studentId: number): Promise<string>` — 复用现有数据查询和 `buildHtml()`,返回纯 HTML 字符串 |
| 删除 | `generateReport(studentId: number, res: Response): Promise<void>` — Puppeteer PDF 流式输出 |
| 删除 | `import puppeteer from 'puppeteer'` |
| 删除 | `import { Response } from 'express'` |
其余 `buildHtml``buildCover``buildBasicInfo``buildExamOverview``buildAttendance``buildExamDetail``buildLearningAndResult``renderScoreTable``renderScoreTrendChart``renderAttendanceBar``renderAttendanceMatrix``css``pageFrame``pageHeader``pageFooter``esc` 等私有方法全部保留不变。
### `apps/server/src/archive/archive.controller.ts`
| 操作 | 详情 |
|------|------|
| 新增 | `GET /archive/:studentId/report-html` — 调用 `reportService.generateReportHtml(+studentId)`,返回 `{ html: string }`,记录操作日志 |
| 删除 | `GET /archive/:studentId/report` — 原 Puppeteer PDF 下载端点 |
### 依赖清理
| 文件 | 操作 |
|------|------|
| `apps/server/package.json` | 移除 `puppeteer` |
| `apps/server/Dockerfile` | 移除 Chromium 相关依赖安装步骤 |
## 前端改动
### `apps/admin/src/pages/StudentProfile/index.tsx`
| 操作 | 详情 |
|------|------|
| 修改 | "生成档案报表"按钮文本 → "预览报告" |
| 修改 | `handleDownloadReport``handlePreviewReport``fetch(/api/archive/:id/report-html)` → 解析 JSON → `window.open``document.write(html)` |
## 影响范围
| 层级 | 文件 | 改动量 |
|------|------|--------|
| 后端 service | `archive-report.service.ts` | +15 行, -30 行 |
| 后端 controller | `archive.controller.ts` | +12 行, -10 行 |
| 后端依赖 | `package.json`, `Dockerfile` | 小改动 |
| 前端 | `StudentProfile/index.tsx` | ~10 行 |
无数据库变更,无 API 兼容性破坏(`/report` 端点被替换为 `/report-html`)。
## 验收标准
- [ ] 点击「预览报告」按钮,新窗口打开完整报告(封面→学情记录共 6 页)
- [ ] 报告样式与现有 PDF 版视觉一致
- [ ] 新窗口内 Ctrl+P 可正常打印,打印预览显示分页正确
- [ ] Puppeteer 已从依赖中移除Docker 构建不再安装 Chromium
- [ ] 现有学生档案 CRUD 功能不受影响

227
package-lock.json generated
View File

@@ -70,7 +70,6 @@
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"pdfkit": "^0.18.0",
"puppeteer": "^25.3.0",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"typeorm": "^0.3.28"
@@ -4204,103 +4203,6 @@
"integrity": "sha512-nctNujXL3FC1v99FktaTMSugSD9ZOZekEpahUSafkU2TSvW+XGKNkQZbokuJtiWvPBK208dwMJva8UfBkChqpw==",
"license": "MIT"
},
"node_modules/@puppeteer/browsers": {
"version": "3.0.6",
"resolved": "https://registry.npmmirror.com/@puppeteer/browsers/-/browsers-3.0.6.tgz",
"integrity": "sha512-B/gKoqlFkzhvzsI6jo9K1cZz9o5ypviVv/xu8CwA4grZzyVwN+XfkT+tu8T1zrauuEXv6VhS2oGX+6NL95WcKA==",
"license": "Apache-2.0",
"dependencies": {
"modern-tar": "^0.7.6",
"yargs": "^18.0.0"
},
"bin": {
"browsers": "lib/main-cli.js"
},
"engines": {
"node": ">=22.12.0"
},
"peerDependencies": {
"proxy-agent": ">=8.0.1",
"yauzl": "^2.10.0 || ^3.4.0"
},
"peerDependenciesMeta": {
"proxy-agent": {
"optional": true
},
"yauzl": {
"optional": true
}
}
},
"node_modules/@puppeteer/browsers/node_modules/ansi-styles": {
"version": "6.2.3",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.3.tgz",
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/@puppeteer/browsers/node_modules/cliui": {
"version": "9.0.1",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-9.0.1.tgz",
"integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==",
"license": "ISC",
"dependencies": {
"string-width": "^7.2.0",
"strip-ansi": "^7.1.0",
"wrap-ansi": "^9.0.0"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@puppeteer/browsers/node_modules/wrap-ansi": {
"version": "9.0.2",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
"integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
"license": "MIT",
"dependencies": {
"ansi-styles": "^6.2.1",
"string-width": "^7.0.0",
"strip-ansi": "^7.1.0"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/@puppeteer/browsers/node_modules/yargs": {
"version": "18.0.0",
"resolved": "https://registry.npmmirror.com/yargs/-/yargs-18.0.0.tgz",
"integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==",
"license": "MIT",
"dependencies": {
"cliui": "^9.0.1",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"string-width": "^7.2.0",
"y18n": "^5.0.5",
"yargs-parser": "^22.0.0"
},
"engines": {
"node": "^20.19.0 || ^22.12.0 || >=23"
}
},
"node_modules/@puppeteer/browsers/node_modules/yargs-parser": {
"version": "22.0.0",
"resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-22.0.0.tgz",
"integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==",
"license": "ISC",
"engines": {
"node": "^20.19.0 || ^22.12.0 || >=23"
}
},
"node_modules/@rc-component/async-validator": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/@rc-component/async-validator/-/async-validator-6.0.0.tgz",
@@ -7761,31 +7663,6 @@
"node": ">=6.0"
}
},
"node_modules/chromium-bidi": {
"version": "16.0.1",
"resolved": "https://registry.npmmirror.com/chromium-bidi/-/chromium-bidi-16.0.1.tgz",
"integrity": "sha512-J63PGu/9PpeCwLIcKYyzWP6yaVL5pxuBc0shlYCYM8BaAkmlwiQboXO1iNbOgSDbVklEyYFfNEcHD8oOAWacUA==",
"license": "Apache-2.0",
"dependencies": {
"mitt": "^3.0.1",
"zod": "^3.24.1"
},
"engines": {
"node": ">=20.19.0 <22.0.0 || >=22.12.0"
},
"peerDependencies": {
"devtools-protocol": "*"
}
},
"node_modules/chromium-bidi/node_modules/zod": {
"version": "3.25.76",
"resolved": "https://registry.npmmirror.com/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
},
"node_modules/ci-info": {
"version": "4.4.0",
"resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-4.4.0.tgz",
@@ -8476,12 +8353,6 @@
"node": ">=8"
}
},
"node_modules/devtools-protocol": {
"version": "0.0.1638949",
"resolved": "https://registry.npmmirror.com/devtools-protocol/-/devtools-protocol-0.0.1638949.tgz",
"integrity": "sha512-mXwg4Fqnv0WR4iuAT/gYUmctNkjILwXFHyZ+m7Ty1dfr0ezZt2U3gnrrJTfRobJTHoXf+IbuFvFITzLrLFjwJA==",
"license": "BSD-3-Clause"
},
"node_modules/dezalgo": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/dezalgo/-/dezalgo-1.0.4.tgz",
@@ -12012,18 +11883,6 @@
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lilconfig": {
"version": "3.1.3",
"resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.3.tgz",
"integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
"license": "MIT",
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/antonk52"
}
},
"node_modules/linebreak": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/linebreak/-/linebreak-1.1.0.tgz",
@@ -12718,12 +12577,6 @@
"node": ">=16 || 14 >=14.17"
}
},
"node_modules/mitt": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz",
"integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
"license": "MIT"
},
"node_modules/mkdirp": {
"version": "0.5.6",
"resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz",
@@ -12743,15 +12596,6 @@
"license": "MIT",
"optional": true
},
"node_modules/modern-tar": {
"version": "0.7.6",
"resolved": "https://registry.npmmirror.com/modern-tar/-/modern-tar-0.7.6.tgz",
"integrity": "sha512-sweCIVXzx1aIGTCdzcMlSZt1h8k5Tmk08VNAuRk3IU28XamGiOH5ypi11g6De2CH7PhYqSSnGy2A/EFhbWnVKg==",
"license": "MIT",
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
@@ -13734,44 +13578,6 @@
"node": ">=6"
}
},
"node_modules/puppeteer": {
"version": "25.3.0",
"resolved": "https://registry.npmmirror.com/puppeteer/-/puppeteer-25.3.0.tgz",
"integrity": "sha512-O1tx8S315aw8eI99HZ5ZNcVEzJ9+jKF//eO5UvfZ3cXJ6okZ5sX3Y50u7DJaM+ewEK4LqXP068tBhfRaWikj+g==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
"@puppeteer/browsers": "3.0.6",
"chromium-bidi": "16.0.1",
"devtools-protocol": "0.0.1638949",
"lilconfig": "^3.1.3",
"puppeteer-core": "25.3.0",
"typed-query-selector": "^2.12.2"
},
"bin": {
"puppeteer": "lib/puppeteer/node/cli.js"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/puppeteer-core": {
"version": "25.3.0",
"resolved": "https://registry.npmmirror.com/puppeteer-core/-/puppeteer-core-25.3.0.tgz",
"integrity": "sha512-fm+wpUr2oigH1PXZvwgATrM2tYWHMDG8ASzTEe9uukCye4X5Ldx1K5BTHPFKITrIWvQQAQ256d1NpbEveBcKjA==",
"license": "Apache-2.0",
"dependencies": {
"@puppeteer/browsers": "3.0.6",
"chromium-bidi": "16.0.1",
"devtools-protocol": "0.0.1638949",
"typed-query-selector": "^2.12.2",
"webdriver-bidi-protocol": "0.4.2",
"ws": "^8.21.0"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/pure-rand": {
"version": "7.0.1",
"resolved": "https://registry.npmmirror.com/pure-rand/-/pure-rand-7.0.1.tgz",
@@ -15787,12 +15593,6 @@
"node": ">= 0.4"
}
},
"node_modules/typed-query-selector": {
"version": "2.12.2",
"resolved": "https://registry.npmmirror.com/typed-query-selector/-/typed-query-selector-2.12.2.tgz",
"integrity": "sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==",
"license": "MIT"
},
"node_modules/typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz",
@@ -16465,12 +16265,6 @@
"defaults": "^1.0.3"
}
},
"node_modules/webdriver-bidi-protocol": {
"version": "0.4.2",
"resolved": "https://registry.npmmirror.com/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.2.tgz",
"integrity": "sha512-VSV+fzfChirL3e7jay2yUC7B4HQCGtEWEg/MSSQbK+qWbqeGlRLlXTzPpYr3XGUvbpDHumWZBJxgesg4N7dbtA==",
"license": "Apache-2.0"
},
"node_modules/webpack": {
"version": "5.108.3",
"resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.108.3.tgz",
@@ -16831,27 +16625,6 @@
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/ws": {
"version": "8.21.0",
"resolved": "https://registry.npmmirror.com/ws/-/ws-8.21.0.tgz",
"integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": ">=5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/xmlchars": {
"version": "2.2.0",
"resolved": "https://registry.npmmirror.com/xmlchars/-/xmlchars-2.2.0.tgz",