hackclub / hackclub/hackathons-backend

Hackathon submission state buttons are visually confusing

Open
#402 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
29
Forks
8
Avg merge
12h 2m
Merged PRs (30d)
41

Description

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 https://github.com/hackclub/hackathons-backend/issues/401)

![image](https://github.com/hackclub/hackathons-backend/assets/20099646/202ed65b-afef-4e98-9f21-7bb94c565786)

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.

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.