fix: audit issues - field mismatches, missing endpoints, data loss
- Report frontends: createdAt→uploadedAt field alignment with backend - Dashboard: fix pending reports endpoint /api/reports/pending - FollowUpListPage: status labels upcoming/cancelled - MedicationController: add PUT/DELETE endpoints + service methods - FollowUpController: add DELETE endpoint, Notes to CreateRequest - Auth: UpdateProfileRequest includes doctor fields - Auth: login restores soft-deleted users instead of crashing
This commit is contained in:
@@ -57,7 +57,7 @@ export function DashboardPage() {
|
||||
const [patients, consultations, reports, followUps] = await Promise.all([
|
||||
api.get<RawPatient[]>('/api/patients'),
|
||||
api.get<RawConsultation[]>('/api/consultations'),
|
||||
api.get<RawReport[]>('/api/reports?status=pending'),
|
||||
api.get<RawReport[]>('/api/reports/pending'),
|
||||
api.get<RawFollowUp[]>('/api/follow-ups'),
|
||||
]);
|
||||
setStats({
|
||||
|
||||
@@ -16,9 +16,9 @@ export function FollowUpListPage() {
|
||||
|
||||
const statusLabel = (s: string) => {
|
||||
switch (s) {
|
||||
case 'pending': return { text: '待随访', color: '#F59E0B', bg: '#FFF8E6' };
|
||||
case 'upcoming': return { text: '待随访', color: '#F59E0B', bg: '#FFF8E6' };
|
||||
case 'completed': return { text: '已完成', color: '#20C997', bg: '#E6F9F2' };
|
||||
case 'missed': return { text: '已错过', color: '#EF4444', bg: '#FEE9E9' };
|
||||
case 'cancelled': return { text: '已取消', color: '#EF4444', bg: '#FEE9E9' };
|
||||
default: return { text: s, color: '#9BA0B4', bg: '#F5F6F9' };
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ interface RawReport {
|
||||
imageUrls: string[]; status: string; riskLevel?: string;
|
||||
summary?: string; suggestions?: string;
|
||||
patientName?: string; doctorName?: string;
|
||||
createdAt: string; completedAt?: string;
|
||||
uploadedAt: string; completedAt?: string;
|
||||
items?: RawItem[];
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export function ReportDetailPage() {
|
||||
<div style={{ marginTop: 8, fontSize: 13, color: '#9BA0B4' }}>
|
||||
患者:{report.patientName || '未知'} |
|
||||
分类:{categoryMap[report.category] || report.category} |
|
||||
日期:{report.createdAt?.split('T')[0]}
|
||||
日期:{report.uploadedAt?.split('T')[0]}
|
||||
</div>
|
||||
</div>
|
||||
<span style={{
|
||||
|
||||
@@ -4,7 +4,7 @@ import { api } from '../../services/api-client';
|
||||
|
||||
interface RawReportItem {
|
||||
id: string; patientId: string; patientName?: string;
|
||||
title: string; category: string; status: string; createdAt: string;
|
||||
title: string; category: string; status: string; uploadedAt: string;
|
||||
}
|
||||
|
||||
export function ReportListPage() {
|
||||
@@ -52,7 +52,7 @@ export function ReportListPage() {
|
||||
{s.text}
|
||||
</span>
|
||||
</td>
|
||||
<td style={{ padding: '12px 20px', color: '#9BA0B4' }}>{r.createdAt?.split('T')[0]}</td>
|
||||
<td style={{ padding: '12px 20px', color: '#9BA0B4' }}>{r.uploadedAt?.split('T')[0]}</td>
|
||||
<td style={{ padding: '12px 20px' }}>
|
||||
<Link to={`/reports/${r.id}`} style={{
|
||||
color: '#4F6EF7', fontSize: 12, fontWeight: 600,
|
||||
|
||||
Reference in New Issue
Block a user