From b156c0b63fd48d0ee80adc26e25769f9a3edbb48 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Apr 2026 00:27:19 +0000 Subject: [PATCH] fix(appeals): always show action controls + add Reopen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'resolved' state was a dead-end — no way to change your mind after clicking approve/deny, and no way to re-action a needs_info appeal once the submitter replied. Action controls now show on every row regardless of status, and resolved rows get a Reopen button that moves the appeal back to pending. Backend action handler already overwrites status unconditionally, so this is purely removing a view-layer gate plus adding /:id/reopen as a thin wrapper over the shared actionAppeal helper. Chronicler #81 --- .../arbiter-3.0/src/routes/admin/appeals.js | 1 + .../src/views/admin/appeals/_list.ejs | 22 +++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/services/arbiter-3.0/src/routes/admin/appeals.js b/services/arbiter-3.0/src/routes/admin/appeals.js index c48b82a..a53271c 100644 --- a/services/arbiter-3.0/src/routes/admin/appeals.js +++ b/services/arbiter-3.0/src/routes/admin/appeals.js @@ -84,5 +84,6 @@ async function actionAppeal(req, res, newStatus, label, colorClass) { router.post('/:id/approve', (req, res) => actionAppeal(req, res, 'approved', 'Approved', 'text-green-500')); router.post('/:id/deny', (req, res) => actionAppeal(req, res, 'denied', 'Denied', 'text-red-500')); router.post('/:id/info', (req, res) => actionAppeal(req, res, 'needs_info','Info Requested','text-yellow-500')); +router.post('/:id/reopen', (req, res) => actionAppeal(req, res, 'pending', 'Reopened', 'text-gray-500')); module.exports = router; diff --git a/services/arbiter-3.0/src/views/admin/appeals/_list.ejs b/services/arbiter-3.0/src/views/admin/appeals/_list.ejs index a576b2d..23236a7 100644 --- a/services/arbiter-3.0/src/views/admin/appeals/_list.ejs +++ b/services/arbiter-3.0/src/views/admin/appeals/_list.ejs @@ -68,18 +68,18 @@ <%= a.status %> - <% if (a.status === 'pending' || a.status === 'needs_info') { %> -
- -
- - - -
+
+ +
+ + + + <% if (a.status !== 'pending') { %> + + <% } %>
- <% } else { %> - resolved - <% } %> +
+ <% }); %>