hackclub / hackathons-backend

Powering https://hackathons.hackclub.com

Home Page:https://hackathons.hackclub.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hackathon submission state buttons are visually confusing

garyhtou opened this issue · comments

The admin hackathon show page contains buttons to transition the state of a hackathon submission (Approve, Reject, and Hold for Review). It's a bit confusing because all the buttons appear at once (similar to #401)

image

We should hide certain buttons depending on the current state. For example, approve -> approve should not be a valid state transition; thus, we should hide the approve button if the current state is approved.

---
title: Hackathon Submission State Diagram
---
stateDiagram-v2
    [*] --> Pending
    Pending --> Approved
    Pending --> Rejected
    Approved --> Pending: Hold for Review
    Rejected --> Pending: Hold for Review

Those buttons should be disabled, but they're not showing up visually for some reason.