ddgriffin / GG-mvp

0 stars 8 forks source link

Create "Close applications" buttons on apprenticeships #45

Closed ddgriffin closed 10 years ago

ddgriffin commented 10 years ago

We need a "close applications" button for makers who have set a high number of apprenticeships and then decide that they have enough apprentices without "filling" their quota

ddgriffin commented 10 years ago
  1. generate a migration that creates a new boolean field in the events database for applications_closed; run rake db:migrate
  2. Give the maker a link on their dashboard as well as a button on the apprenticeship that submits 'true' to that field
  3. Add some logic to xedit that changes the "work with" button state based on if applications_closed == true
ddgriffin commented 10 years ago

OR

  1. create a controller action that transitions state "accepted" to state "filled"
  2. put a button in xedit & maker's dashboard that calls that action
  3. then have an action to transition from "filled" to "accepted"
  4. replace the button in xedit & maker's dashboard with that action
ddgriffin commented 10 years ago

Hey Bethany! Just wanted to add a little more context here. The comments above were my initial thoughts on how this might work - but if you can think of a better way, by all means, go for it!

One thing to keep in mind is that we'll likely end up wanting to have the "Close Applications" button turn into a "Re-open Applications" button after it's been closed, with the effect of reversing the change and allowing applications again. I don't know if this is true, but in my head it seems like it would be easier to set a field value back and forth between true and false, rather than transition the state forward and back between "accepted" (ie. open for applications) and "filled" (closed for applications). We definitely see more errors around state changes in general, probably because we also have a lot of logic hinging on the state.

cheyenneweaver commented 10 years ago

Done and Done!