From e32b0b58b36c157420dea07768434b7e73d75874 Mon Sep 17 00:00:00 2001 From: kkfluous Date: Fri, 17 Apr 2026 09:56:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(scheduling):=20=E8=BF=917=E5=A4=A9=20filter?= =?UTF-8?q?=20should=20be=20time-only,=20not=20exclude=20cancelled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the toggle hid cancelled records, so users who clicked a record timestamped within 7 days but later cancelled would see nothing. Now 近7天 filters purely by createdAt; combine with status tabs to narrow further. Co-Authored-By: Claude Opus 4.7 --- src/modules/scheduling/NotificationHistory.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/scheduling/NotificationHistory.tsx b/src/modules/scheduling/NotificationHistory.tsx index 3d8fd5c..6f665f8 100644 --- a/src/modules/scheduling/NotificationHistory.tsx +++ b/src/modules/scheduling/NotificationHistory.tsx @@ -67,7 +67,7 @@ export default function NotificationHistory({ onClose, onChange, recentOnly = fa const visibleRecords = recent7d ? records.filter(r => { const t = Date.parse(r.createdAt); - return Number.isFinite(t) && Date.now() - t <= SEVEN_DAYS_MS && r.status !== 'cancelled'; + return Number.isFinite(t) && Date.now() - t <= SEVEN_DAYS_MS; }) : records; @@ -161,7 +161,7 @@ export default function NotificationHistory({ onClose, onChange, recentOnly = fa className={`text-[11px] px-3 py-1 rounded-full font-medium cursor-pointer transition-colors ${ recent7d ? 'bg-emerald-600 text-white' : 'bg-slate-100 text-slate-500 hover:bg-slate-200' }`} - title="仅看最近 7 天(不含已取消)" + title="仅看最近 7 天" > 近 7 天