feat(subject): 参与者状态依赖筛选日期并支持后续编辑

- 未填写筛选日期的参与者不再默认进入 SCREENING,状态显示为占位符。
- SubjectUpdate 不再开放 status 入参,改由后端依据日期推导,并新增
  screening_date 字段允许 PM/CRA 后续补录筛选日期。
- 参与者管理页与详情页同步:详情页支持编辑筛选日期,列表页与详情页
  在没有筛选日期时显示占位符而非旧 enum 值。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cheng Zhou
2026-05-25 12:36:33 +08:00
parent f40e979c53
commit a2add43fa5
6 changed files with 47 additions and 8 deletions
+6
View File
@@ -275,3 +275,9 @@ def test_derive_subject_status_marks_screening_until_enrollment_date_is_filled()
subject = SimpleNamespace(screening_date=date(2026, 5, 1), enrollment_date=None)
assert derive_subject_status(subject, [], []) == "SCREENING"
def test_derive_subject_status_is_empty_before_screening_date_is_filled():
subject = SimpleNamespace(screening_date=None, enrollment_date=None)
assert derive_subject_status(subject, [], []) == ""