From 02550854e4c3e1368fd2b9ee51162de171acb7e5 Mon Sep 17 00:00:00 2001 From: Matt Almeida Date: Fri, 27 Oct 2023 13:06:16 -0400 Subject: [PATCH] Don't require holding for review to approve/reject (#271) An explicit hold's purpose is to just mark that someone is on it, but waiting for something (clarification, edit, etc.), so we shouldn't require it to change a decision. --- app/views/admin/hackathons/show.html.erb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/views/admin/hackathons/show.html.erb b/app/views/admin/hackathons/show.html.erb index 37e989b2..a09a8d16 100644 --- a/app/views/admin/hackathons/show.html.erb +++ b/app/views/admin/hackathons/show.html.erb @@ -93,13 +93,9 @@
- <% if @hackathon.pending? %> - <%= button_to "Approve", admin_hackathon_approval_path(@hackathon), class: "button--success" %> - <%= button_to "Reject", admin_hackathon_rejection_path(@hackathon), class: "button--danger" %> - <% end %> - <% unless @hackathon.pending? %> - <%= button_to "Hold for review", admin_hackathon_hold_path(@hackathon), class: "button--neutral" %> - <% end %> + <%= button_to "Approve", admin_hackathon_approval_path(@hackathon), disabled: @hackathon.approved?, class: "button--success" %> + <%= button_to "Reject", admin_hackathon_rejection_path(@hackathon), disabled: @hackathon.rejected?, class: "button--danger" %> + <%= button_to "Hold for review", admin_hackathon_hold_path(@hackathon), disabled: @hackathon.pending?, class: "button--neutral" %>
<%= render "events/timeline", {eventable: @hackathon} %>