Repository navigation
Feat/manage submissions - #331
Merged
Merged
Conversation
Manage Submissions lists every team with where it stands — nothing filed, drafts only, or a final entry — teams owing an entry first. Tabs filter by standing, a search narrows by team, project or member, and a banner says whether submissions are open. Read only: owners may read every submission but cannot file or finalize one for a team. One ListSubmissions per team until the backend can list a hackathon's submissions in one call (TODO backend: submissions-hackathon-list).
Every team with its standing and the entry that counts — version, who submitted and finalized it and when (UTC), a newer unfinalized draft if there is one, and the link or notes. Always the whole hackathon, whichever tab or search is on screen.
After Manage Teams, as Submissions follows Teams for participants, and so also as a tile on Settings. Shown whether or not submissions are open: the page itself says which.
While a search is typed the tab counts count matching teams, and a tab with no match links to the tabs that have one. Nothing switches tabs on its own, and the search survives changing tab. The load now returns every team and the tab is applied on the page, so switching tabs no longer re-runs a ListSubmissions per team.
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.
Manage Submissions: see where every team stands
The story
Until now there was no way to answer that. The Submissions page shows a
participant their own team's work and nothing else, so an organizer had to ask
every team, or someone had to look in the database.
What you get
A Manage Submissions page in the organizer sidebar, right after Manage Teams
(and as a tile on Settings). It lists every team with:
still owing an entry first, then by name;
and when, a newer draft that has not been finalized, and earlier versions
folded away.
On top of the list:
only turn into a warning when they are not zero.
searching, the tab counts count the matches, and a tab with none links to the
tabs that have some — so a person is never "not found" just because their team
is on another tab. Nothing switches tabs on its own.
Settings.
<hackathon-name>-submissions.csv:The decisions behind it, and why
Read only. The backend lets an owner read every submission
(
rbac.go:238), but creating and finalizing needsubmission:writescoped tothe team, which only
Memberholds. Casbin has no role inheritance, so an ownercannot finalize for a team, and the page does not pretend otherwise.
No backend change — at the cost of one call per team.
TeamService.Listreturns teams without their submissions, and
ListSubmissionstakes one team.So the page calls
List, thenListSubmissionsfor every team in parallel.Fine at tens of teams; the single call it should become is asked for in a
backend ticket, and the one function to change carries
TODO(backend: submissions-hackathon-list).The tab is applied in the browser. The page loads every team once and reads
?standing=on the client. That is what lets a search see every tab, and itmeans switching tabs re-runs nothing on the server — otherwise every tab click
would repeat a
ListSubmissionsper team. The?standing=link still works forbookmarks and the back button.
The CSV is the whole hackathon, whatever tab or search is on screen — the
same rule the project and participant exports follow. The Standing column
keeps the three apart. Times are UTC and say so: the file is built on the
server, which does not know the reader's time zone.
"Final" stays final under a newer draft. A team can create a draft after
finalizing. That draft does not count unless it is finalized too, so the team
stays Final and the draft is shown as a note — the same rule the participant
page already follows.
No count on the Settings tile. The Settings page deliberately makes no
TeamService.Listcall, and a submission count would need one.Testing
fallback, member names, the tab filter and its counts, the sidebar entry and
which entry lights up, and the CSV layout (blank columns for a team with
nothing, quotes and line breaks in notes, UTC times).
treefmtclean, lint passes, all 733 unit tests pass.svelte-checkreportsnothing in the touched files (4 pre-existing errors elsewhere, unchanged from
main).alice: AI Innovation Challenge has 3teams and 2 submissions, Internal Product Sprint 2 teams and 3 submissions,
Data for Good 8 teams and none, Partner Data Sprint no teams.
Follow-ups, not in this PR
that forgot before the deadline. Today the backend does not allow it; whether
it should is a product decision, not a bug.