Ops Review and Awaiting CSC request statuses (#128) - #135
Merged
Merged
Conversation
Pending hid where a request was waiting. Room and revision requests now start in Ops Review, and an admin can mark one Sent to CSC (Awaiting CSC) when Operational Affairs passes it on. The Requests tab leads with the suggested next step from each status but lets admins move freely: back to Ops Review, Fulfill or Deny from either open status, and Reopen a denial. A fulfilled request stays final, since a booking is linked to it. Only Ops Review counts as an admin Pending Action; Awaiting CSC is waiting on CSC. Requesters get a bell notification when their request goes to CSC, see what each open status means on the Request page, and a booking's leaders see its open revision request, and its status, in the booking detail. The migration renames 'Pending' to 'Ops Review' on both tables and must ship with this code: the old code inserts 'Pending'. Co-Authored-By: Claude Opus 5 <[email protected]>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #128
Statuses
Room requests and revision requests no longer sit in a single Pending state. An open request is either:
It then closes the way it did before: a room request as Fulfilled or Denied, a revision request as Done (granted by editing the booking) or Denied.
Admin Requests tab
Pending Actions
Only Ops Review requests count. Awaiting CSC ones drop off, since the wait is on CSC, not on an admin.
Requesters
GET /api/revision-requests?booking_id=, guarded like the POST, because RLS only lets the person who filed a revision read it.Migration: apply at deploy time
supabase/migrations/20260916000000_request_review_statuses.sql, with a rollback script.'Pending'→'Ops Review'onroom_requestsandrevision_requests, updates the column defaults, and replaces both status CHECK constraints. Production currently has 2 revision requests in Pending and none on room requests.'Pending', which the new constraint rejects. Code from this PR inserts'Ops Review', which the old constraint rejects. Apply the migration right when this deploys.'Pending'on these tables, anduser_alertshas nobooking_typeconstraint, so the new notification types need no schema change.Testing
tsc --noEmitclean.eslinton changed files is clean apart from one warning that was already there.🤖 Generated with Claude Code