We want a system so crew chiefs can order cards for their crews when they are ready.
Concept
The system shoulda allow crew chiefs to request and track cards as they are generated on a per-person basis.
Requirements
Database models
Card order
UUID - UUID, primary key
target - User
requester - User
printer - User
state - Enum (REQUESTED, PRINTING, DONE)
created - Datetime, default NOW()
last_update - Datetime, default NOW()
event - Event
Remember to create an sqlalchemy migration
API
Crew
views/crew/instance - You need to be HR_ADMIN, CARD_PRINTER, ADMIN, or chief in order to access this
POST cardOrder - Iterates through all current crew members(for every position, for every position mapping, check if the event is either null or the current event). If a card order doesn't exist for the current event, make it
GET cardOrder - Iterates through all current crew members, returning a list of all current card orders for the crew. for the current event
views/card_order/instance - You need to be HR_ADMIN, CARD_PRINTER, ADMIN, or chief in order to access this
GET (empty name) - Returns a card order.
DELETE (empty name) - Deletes a card order.
POST (empty name) - Updates the card state. Takes one argument, new_state. Either PRINTING or DONE. If the state is already DONE, it should error. If the state is PRINTING, it should only allow DONE.
Tests
It should not be possible for a normal crew member to create or update card orders
It should not be possible to create a card order if one already exists
It should be possible to create a card order even if there already is one for another event.
We want a system so crew chiefs can order cards for their crews when they are ready.
Concept
The system shoulda allow crew chiefs to request and track cards as they are generated on a per-person basis.
Requirements
Database models
Card order
Remember to create an sqlalchemy migration
API
Crew
null
or the current event). If a card order doesn't exist for the current event, make itnew_state
. EitherPRINTING
orDONE
. If the state is alreadyDONE
, it should error. If the state isPRINTING
, it should only allowDONE
.Tests