[FIX] ATTENDANCE: Next and previous view for all individual view in attendance
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#detailAttendance"
|
||||
hx-target="#detailAttendanceModalBody"
|
||||
hx-get="{% url 'user-request-one-view' attendance.id %}"
|
||||
hx-get="{% url 'user-request-one-view' attendance.id %}?instances_ids={{attendances_ids}}"
|
||||
>
|
||||
<div class="oh-sticky-table__sd">
|
||||
<div class="d-flex">
|
||||
@@ -250,7 +250,7 @@
|
||||
<ion-icon name="close-outline"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oh-modal__dialog-body" id="detailAttendanceModalBody"></div>
|
||||
<div class="oh-modal__dialog-body oh-modal__dialog-body oh-modal__dialog-relative" id="detailAttendanceModalBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#detailAttendance"
|
||||
hx-target="#detailAttendanceModalBody"
|
||||
hx-get="{% url 'user-request-one-view' attendance.id %}?my_attendance=true"
|
||||
hx-get="{% url 'user-request-one-view' attendance.id %}?my_attendance=true&instances_ids={{attendances_ids}}"
|
||||
>
|
||||
<div
|
||||
class="oh-sticky-table__sd{% if attendance.is_validate_request_approved %} row-status--blue {% elif attendance.attendance_validated %} row-status--green {% elif attendance.is_validate_request %} row-status--orange {% else %} row-status--red{% endif %}"
|
||||
@@ -295,7 +295,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="oh-modal__dialog-body"
|
||||
class="oh-modal__dialog-body oh-modal__dialog-body oh-modal__dialog-relative"
|
||||
id="detailAttendanceModalBody"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
@@ -478,11 +478,15 @@ def view_my_attendance(request):
|
||||
template = "attendance/own_attendance/view_own_attendances.html"
|
||||
else:
|
||||
template = "attendance/own_attendance/own_empty.html"
|
||||
attendances_ids = json.dumps(
|
||||
list(employee_attendances.values_list("id", flat=True))
|
||||
)
|
||||
return render(
|
||||
request,
|
||||
template,
|
||||
{
|
||||
"attendances": paginator_qry(employee_attendances, request.GET.get("page")),
|
||||
"attendances_ids":attendances_ids,
|
||||
"f": filter,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user