Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: improving events management #8

Merged
merged 26 commits into from
Jul 19, 2017
Merged

Feature: improving events management #8

merged 26 commits into from
Jul 19, 2017

Conversation

thor
Copy link
Member

@thor thor commented Jul 8, 2017

Background

Editing events is very bare-bones at the moment, and lacks a lot of features that would make it generally more usable for... anything.

  • A created event cannot be edited (without having admin access, of some sort)
    • Incorrect details cannot be changed
    • This applies to invoiced events too, which cannot even be edited from the admin panel 馃槩
  • Poor user experience when adding events
  • Cannot add more than seven shifts, but usually that's not even necessary
  • No details regarding what invoice an event is part of, or which wage report it was part of

In terms of the code, it can now be swapped over to use parts of CBV, although with inlines and whatnot there'll always be some mess.

Rough plan

  • Create a minimum viable CBV-version of the events adding
    • Make it fancier
    • ... but also make it simpler
  • Create a minimum viable CBV-version of updating events
    • Decide on how to deal with events that have been invoiced 馃槰
    • Make events reasonably updateable before invoicing
    • Allow events to be "unready" to be invoiced, or just "not ready" or "not approved"
    • Add another admin model for events without limitations, separate from current
  • Separate the events addition template into adding and editing
  • Change up the events overview page
    • Pagination? 馃搫
    • Linking to the events edit-page 馃捑
    • A calendar? 馃搯
  • Add tests for the fun stuff

@thor thor self-assigned this Jul 8, 2017
@thor thor force-pushed the feature-events branch 2 times, most recently from 1b71518 to 3090696 Compare July 8, 2017 23:55
thor added 13 commits July 19, 2017 12:09
Fixes #7, by using a proper, more solid way to correctly save and
validate the forms. No longer can you add an event without anything in
it!
- Removed points from urls.py
- Simplified some parts of the tests
- Furthermore added permissions checking for the events add and edit
Should work fine, seeing as we have raise_exception to True per default.
Addition of test is due to failing view of invoices, due to relying on
event.get_cost() and event.get_hours(), which is now just event.cost and
event.hours. :)
thor added 3 commits July 19, 2017 14:33
Now use {% set %} to do all titles, as well as "title_small".
Note that we can also use block assignments. :)
thor added 3 commits July 19, 2017 20:39
- Added help_text to select fields of Event.
- Improved columns for tables
- Tweaked the utils macro
Fixes #6 somewhat. Note that the error message is not the most helpful,
but it'll do until there's an exact one for the minimum value.
@thor thor merged commit b3f0018 into master Jul 19, 2017
@thor
Copy link
Member Author

thor commented Jul 19, 2017

Conclusion: no need to add pagination right now, because the list isn't yet that long. I'll create a separate issue to track pagination of the events view.

Calendar is still on the todo, but waiting for that is detrimental to anything else. There are some Django apps like django-scheduler that can help with this, but they're somewhat more complex than I really care for. All I need is to display it, and that's about where the similarities end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant