From be2d80c718238a877d2ba27031bcf7df4dcfa43e Mon Sep 17 00:00:00 2001 From: yueyang <2495544247@qq.com> Date: Tue, 27 Oct 2026 09:40:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=AE=80=E5=B7=B2=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=BE=85=E5=8A=9E=E9=87=8D=E5=A4=8D=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Business/SystemizationTodo.php | 16 +++++++++++++++- .../business/pages/systemization-todos.blade.php | 12 +++++++----- .../Feature/Business/SystemizationTodosTest.php | 5 ++++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/app/Models/Business/SystemizationTodo.php b/app/Models/Business/SystemizationTodo.php index 74c10b7a..195698d7 100644 --- a/app/Models/Business/SystemizationTodo.php +++ b/app/Models/Business/SystemizationTodo.php @@ -74,10 +74,24 @@ class SystemizationTodo extends Model return $this->isCompleted() ? self::STATUS_COMPLETED : self::STATUS_INCOMPLETE; } + public function displayProgress(): string + { + $progress = trim((string) $this->progress); + if ($progress === '') { + return ''; + } + + $normalized = (string) preg_replace('/[\s。.]+$/u', '', $progress); + + return $this->isCompleted() && $normalized === self::STATUS_COMPLETED + ? '' + : $progress; + } + public function reminder(): array { if ($this->isCompleted()) { - return ['label' => '已完成', 'tone' => 'muted']; + return ['label' => '—', 'tone' => 'muted']; } if ($this->due_date === null) { return ['label' => '时间待定', 'tone' => 'muted']; diff --git a/resources/views/business/pages/systemization-todos.blade.php b/resources/views/business/pages/systemization-todos.blade.php index 243f61de..b488f337 100644 --- a/resources/views/business/pages/systemization-todos.blade.php +++ b/resources/views/business/pages/systemization-todos.blade.php @@ -394,6 +394,8 @@ $statusClass = $item->isCompleted() ? 'sys-todo-badge--completed' : 'sys-todo-badge--incomplete'; + $displayProgress = $item->displayProgress(); + $displayNotes = trim((string) $item->notes); $todoPayload = [ 'id' => $item->id, 'position' => (int) $item->item_sequence, @@ -496,17 +498,17 @@