Skip to content

Commit

Permalink
fix extra duty comment page
Browse files Browse the repository at this point in the history
  • Loading branch information
Tubo committed Jun 24, 2024
1 parent 46d2b60 commit ac3bf28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion radscheduler/core/views/extra_duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def interest(request, interest_id):

@staff_member_required
def edit_page(request):
subquery = ShiftInterest.objects.filter(registrar=request.user.registrar, shift=OuterRef("pk"))
subquery = ShiftInterest.objects.filter(registrar=OuterRef("registrar"), shift=OuterRef("pk"))
buddy_shifts = Shift.objects.filter(date=OuterRef("date"), type=OuterRef("type"), extra_duty=False).values(
"registrar__user__username"
)
Expand Down
8 changes: 6 additions & 2 deletions radscheduler/templates/extra_duties/edit_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
<table class="table">
<thead>
<tr>
<th scope="col" class="w-25">Date</th>
<th scope="col" class="">Date</th>
<th scope="col">Type</th>
<th scope="col">Applicants</th>
<th scope="col">Winner</th>
<th scope="col" class="w-25">Comment</th>
</tr>
</thead>
<tbody>
Expand All @@ -35,7 +36,7 @@
</td>
<td>
{% if shift.registrar %}
{{ shift.registrar }}: {{ shift.comment }}
<span class="fw-bold">{{ shift.registrar }}</span>
{% else %}
<div x-data="{shift_id: {{ shift.id }} }" class="input-group">
<select class="form-select"
Expand All @@ -60,6 +61,9 @@
</div>
{% endif %}
</td>
<td>
{% if shift.comment %}<p>{{ shift.comment }}</p>{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
Expand Down

0 comments on commit ac3bf28

Please sign in to comment.