Skip to content

Feature add notifications#421

Merged
kbeker merged 2 commits intomasterfrom
feature-add-notifications
Jul 16, 2019
Merged

Feature add notifications#421
kbeker merged 2 commits intomasterfrom
feature-add-notifications

Conversation

@kbeker
Copy link
Contributor

@kbeker kbeker commented Jul 10, 2019

I don't assign as resolve blueprint which @rwrzesien created because now it is not done what is in this blueprint

@kbeker kbeker added the feature New feature label Jul 10, 2019
@kbeker kbeker self-assigned this Jul 10, 2019
Copy link
Contributor

@dybi dybi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Just few suggestions.
wow

users/views.py Outdated
for days_delta in range(1, (today - latest_report_date).days):
no_report_day = latest_report_date + datetime.timedelta(days=days_delta)

if no_report_day.weekday() not in [5, 6]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one suggestion here:
maybe use .isoweek() and add comment, that Saturday and Sunday should be skipped

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, changed :)

users/views.py Outdated
def get_context_data(self, *, _object_list: Any = None, **kwargs: Any) -> dict:
context_data = super().get_context_data(**kwargs)
users_queryset = self.get_queryset()
today = datetime.date.today()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be inlined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@kbeker kbeker force-pushed the feature-add-notifications branch from c5fbe50 to 406dc5a Compare July 12, 2019 08:41
@kbeker kbeker force-pushed the feature-add-notifications branch 3 times, most recently from 80de627 to 498ffb7 Compare July 15, 2019 13:25
<div class="table-responsive">
{% if users_days_without_report %}
<table class="table table-bordered">
<thead class="notification_table_head">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is not needed anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, deleted

for element in contains:
self.assertContains(response, element)

def test_manager_should_be_able_get_notification_view(self):
Copy link
Contributor

@rwrzesien rwrzesien Jul 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also add this check to AccessPermissionsTestCase. Or I think it is enough for them to be there. Having them tested in one place should work fine for future changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I've deleted them from test_views and moved to test_access_permissions`

@kbeker kbeker force-pushed the feature-add-notifications branch from 498ffb7 to 7410b87 Compare July 16, 2019 11:37
@kbeker kbeker force-pushed the feature-add-notifications branch from 7410b87 to ea5c725 Compare July 16, 2019 11:52
@kbeker kbeker merged commit ea5c725 into master Jul 16, 2019
@kbeker kbeker deleted the feature-add-notifications branch July 16, 2019 11:55
@kbeker kbeker added this to the next_release milestone Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants