diff --git a/templates/home/_card_tasks.php b/templates/home/_card_tasks.php index b6fbf52..25beb4e 100644 --- a/templates/home/_card_tasks.php +++ b/templates/home/_card_tasks.php @@ -56,6 +56,24 @@ 'title' => (string)$t['title'], 'status_word' => \App\Task::statusWord((string)($t['status'] ?? 'todo')), 'note' => (string)($t['note'] ?? ''), + /* 🔴🔴 2026-11-05(用户:「网页端,在首页上修改一个日程, + 没有填写截止日期的地方」): + + 根因:`fb_entry_json()` 用 `kind === 'custom' && ref_id > 0` + 算 `$evOwn`,而这里**只传了 edit 地址、没传 ref_id** + ⇒ `$evOwn = false` ⇒ `source = 'derived'` + ⇒ 浮层底栏的「编辑」「删除」两颗按钮**都不显示** + ⇒ 用户点开任务只能看到只读面板,压根没有进编辑表单的入口 + ⇒ 永远看不到「截止时间」(那控件只在 _edit_form.php 里)。 + + ⚠️ 只补 `ref_id`,**不补 kind**:`fb_entry_json` 的判据是 + `kind === 'custom'`,而这个值只用来区分 + 「日历里真正属于某本日历的条目」vs「从别的模块派生的」。 + 对任务来说它只关心"能不能在这里改",答案是**能** + (有 `tasks/edit`),所以让它走默认的 'custom' 就对了。 + ⚠️ 补了之后 `del` 也会变非空 —— 这是**正确的**, + 任务本来就能删,只是之前被同一个 bug 一起藏掉了。 */ + 'ref_id' => (int)$t['id'], /* v78:浮层把正文换成这块面板(可就地改状态/看板/子任务/附件/评论) */ 'panel' => url('tasks/panel', ['id' => (int)$t['id']]), ], url('tasks/show', ['id' => (int)$t['id']]),