Generated day view from database
Added day state and day order to helper to define view