Script Generator
53ae3f02a5
fix: 新建需求漏传 status 字段导致状态/操作按钮不显示
根因:RequirementModal.handleSubmit 提交时漏传 status,store
createRequirement 也无默认值,落库 status 为 undefined。
page.tsx 的所有操作按钮均按 req.status === '...' 判断,
undefined 不匹配任何分支 → 所有按钮消失;REQ_STATUS_LABEL[undefined]
也是 undefined → 状态列空白。
修复(双兜底,二选一就够,但都改更稳):
- RequirementModal.tsx: handleSubmit 加 status: initial?.status ?? 'pending_review'
- useRequirementStore.ts: createRequirement 加 status: data.status ?? 'pending_review'
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-16 20:55:04 +08:00
..
2026-06-16 20:39:03 +08:00
2026-06-16 20:55:04 +08:00
2026-06-16 17:44:59 +08:00
2026-06-16 19:15:28 +08:00
2026-06-16 20:55:04 +08:00
2026-06-08 10:31:35 +08:00
2026-06-08 17:11:23 +08:00
2026-06-08 10:31:35 +08:00
2026-06-08 10:31:35 +08:00
2026-06-08 12:28:14 +08:00