Open nelsonic opened 5 years ago
mix phx.gen.html Ctx Todo todos title:string status:string priority:integer time_estimate:integer deadline:naive_datetime schedule:naive_datetime assignee:string owner:string
The above command generates the schema as well as the migration and default html for a site (and tests 🎉 ).
we need a pre-defined list of the status ... going to use ecto_enum
@nelsonic I have used ecto_enum before here. Thought it might come in handy for you
Our mission is to create a shared checklist (or "Todo list" if you prefer) we can all see and update in realtime.
[x]
mix phx.new app
[x] create schema for checklist item:
[x] add a few records
[x] sort by priority
Status
[x] use ecto_enum https://github.com/gjaldon/ecto_enum for
status
to only allow a set of options:[x] display the status as a dropdown
[x] apply status
:assigned
ifassignee
is setChannel
#5