Skip to content

Commit

Permalink
Merge pull request #1806 from 18F/highlight_currentWeek
Browse files Browse the repository at this point in the history
Emphasize current reporting period and reverse order
  • Loading branch information
cantsin authored Oct 4, 2024
2 parents 9b80c41 + 85d2251 commit 6f1d685
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tock/hours/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def get_context_data(self, **kwargs):

context['uncompleted_reporting_periods'] = sorted(list(chain(
unstarted_reporting_periods, unfinished_reporting_periods)),
key=attrgetter('start_date'), reverse=True)
key=attrgetter('start_date'), reverse=False)

context['today'] = dt.datetime.utcnow().date()

Expand Down
2 changes: 1 addition & 1 deletion tock/tock/templates/hours/reporting_period_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2>Due</h2>
{% for reporting_period in uncompleted_reporting_periods %}
<li class="reporting-period--item{% if reporting_period.end_date < today %} overdue{% endif %}">
{% if reporting_period.end_date < today %}<span>Overdue: </span>{% endif %}
<a href="{% url 'reportingperiod:UpdateTimesheet' reporting_period %}">{{ reporting_period.end_date | date:"F j, Y" }}</a>
<a class="{% if today > reporting_period.start_date and today < reporting_period.end_date %}text-bold{% endif %}" href="{% url 'reportingperiod:UpdateTimesheet' reporting_period %}">{{ reporting_period.end_date | date:"F j, Y" }}</a>
</li>
{% endfor %}
</ul>
Expand Down

0 comments on commit 6f1d685

Please sign in to comment.