feat(business): update audit, auth, course-plans, announcements, exams

- audit: update retention.ts, types.ts, audit-retention-settings.tsx

- auth: update actions.ts and types.ts

- course-plans: update actions.ts, course-plan-detail.tsx, template-picker-dialog.tsx,

  add lib/track-event.ts

- announcements: update page.tsx, announcement-list.tsx, announcement-pagination.tsx

- exams: update actions.ts
This commit is contained in:
SpecialX
2026-07-04 10:23:03 +08:00
parent b63d116b6c
commit 98429e87eb
13 changed files with 114 additions and 61 deletions

View File

@@ -0,0 +1,19 @@
/**
* 课程计划监控埋点接口P2-8
*
* 供客户端组件直接调用以记录关键操作。
* 当前为空实现,后续接入监控 SDK 时只需修改此函数。
*
* 注意:此文件不得标记 "use server",因为 trackCoursePlanEvent 是同步函数,
* 不涉及服务端操作。Next.js 16 要求 "use server" 文件中所有导出必须是 async 函数。
*/
export function trackCoursePlanEvent(
event: string,
properties?: Record<string, unknown>,
): void {
// 预留:接入监控 SDK 后实现
if (process.env.NODE_ENV === "development") {
console.debug(`[course-plans] ${event}`, properties)
}
}