feat: 通知分发器 DND 检查 + 咨询/报告事件 + 线下活动页面
Iteration 2 剩余工作: 通知分发器改进(erp-message module.rs): - 添加 should_skip_for_dnd() 免打扰检查(urgent 级别不受限) - DND 支持跨午夜窗口(如 22:00-08:00) - 新增 consultation.new_message 事件(患者发消息通知医生) - 新增 lab_report.reviewed 事件(报告审核完成通知患者) - 改进已有事件:预约确认含日期、随访逾期含患者名 积分前端补充: - points.ts 新增 OfflineEvent/EventRegistration 接口 + API - 新增线下活动列表页面(报名/人数/积分奖励) - 注册 events 页面路由
This commit is contained in:
@@ -98,3 +98,40 @@ export async function listMyOrders(params?: { page?: number; page_size?: number
|
||||
export async function listMyTransactions(params?: { page?: number; page_size?: number }) {
|
||||
return api.get<{ data: PointsTransaction[]; total: number }>('/health/points/transactions', params);
|
||||
}
|
||||
|
||||
// ===== 线下活动 =====
|
||||
|
||||
export interface OfflineEvent {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string | null;
|
||||
location: string | null;
|
||||
event_date: string;
|
||||
points_reward: number;
|
||||
max_participants: number | null;
|
||||
current_participants: number;
|
||||
status: string; // draft / published / ongoing / completed / cancelled
|
||||
image_url: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface EventRegistration {
|
||||
id: string;
|
||||
event_id: string;
|
||||
patient_id: string;
|
||||
status: string; // registered / checked_in / cancelled
|
||||
points_granted: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export async function listOfflineEvents(params?: {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
status?: string;
|
||||
}) {
|
||||
return api.get<{ data: OfflineEvent[]; total: number }>('/health/offline-events', params);
|
||||
}
|
||||
|
||||
export async function registerEvent(eventId: string) {
|
||||
return api.post<EventRegistration>(`/health/offline-events/${eventId}/register`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user