brown-puzzle-hq / bph-site

1 stars 0 forks source link

Add refund hints feature #146

Closed qiaochloe closed 2 weeks ago

qiaochloe commented 2 weeks ago

Also changed the "claimed by" column to "status."

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bph-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 8:13pm
alex-j-wang commented 2 weeks ago

Would be nice to have a direct "refund" option when submitting.

Also noticed a bug, weird stuff can happen if you claim a hint and unclaim it on the table. If the opened hint page isn't refreshed, you can still submit a response.

qiaochloe commented 2 weeks ago

Hmm, I'm not sure how to refresh another window here.

I added more restrictive database queries and better error-handling through toast. This will hopefully better enforce the hinting state diagram. (eg. You should never be able to submit a response if you are not the claimer of a hint.)

alex-j-wang commented 2 weeks ago

LGTM. In the future we might want to not display the refund button in the main hints table (for risk of accidental refunds) but should be good for now.