[UPDT] BASE: Multiple values for key in savedFilters js method
This commit is contained in:
@@ -453,9 +453,8 @@ def export_data(request, model, form_class, filter_class, file_name):
|
||||
employee_company = data.company_id
|
||||
company_name = Company.objects.filter(id=employee_company.id)
|
||||
emp_company = company_name.first()
|
||||
|
||||
# Access the date_format attribute directly
|
||||
time_format = emp_company.time_format
|
||||
time_format = emp_company.time_format if emp_company else "hh:mm A"
|
||||
else:
|
||||
time_format = "hh:mm A"
|
||||
|
||||
@@ -486,7 +485,7 @@ def export_data(request, model, form_class, filter_class, file_name):
|
||||
emp_company = company_name.first()
|
||||
|
||||
# Access the date_format attribute directly
|
||||
date_format = emp_company.date_format
|
||||
date_format = emp_company.date_format if emp_company else "MMM. D, YYYY"
|
||||
else:
|
||||
date_format = "MMM. D, YYYY"
|
||||
# Define date formats
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
|
||||
<div class="oh-wrapper mt-4">
|
||||
<span class="fw-bold" style="font-size:17px;"> {% trans "Current Shift" %}   :   {{shift_data.0.employee_id.employee_work_info.shift_id}}.</span>
|
||||
|
||||
{% if employee.employee_work_info.shift_id or shift_data%}
|
||||
<span class="fw-bold" style="font-size:17px;"> {% if employee.employee_work_info.shift_id %} {% trans "Current Shift" %}   :   {{employee.employee_work_info.shift_id}} {% endif %}</span>
|
||||
<button style="display:inline-block;"
|
||||
class="oh-btn oh-btn--secondary ms-3"
|
||||
data-toggle="oh-modal-toggle"
|
||||
@@ -15,7 +15,7 @@
|
||||
>
|
||||
<ion-icon name="add-sharp" class="mr-1 md hydrated" role="img" aria-label="add sharp"></ion-icon>{% trans "Reallocate Shift." %}
|
||||
</button>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="oh-tabs mt-3">
|
||||
<ul class="oh-tabs__tablist">
|
||||
@@ -31,7 +31,7 @@
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary-outline oh-stop-prop oh-accordion-meta__btn p-2"
|
||||
title="Add"
|
||||
hx-get="{% url 'work-type-request' %}?emp_id={{employee}}"
|
||||
hx-get="{% url 'work-type-request' %}?emp_id={{emp_id}}"
|
||||
hx-target="#formBody"
|
||||
data-target="#workTypeRequestModal"
|
||||
data-toggle="oh-modal-toggle"
|
||||
@@ -57,7 +57,7 @@
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary-outline oh-stop-prop oh-accordion-meta__btn p-2"
|
||||
title="Add"
|
||||
hx-get="{% url 'rotating-work-type-assign-add' %}?emp_id={{employee}}"
|
||||
hx-get="{% url 'rotating-work-type-assign-add' %}?emp_id={{emp_id}}"
|
||||
hx-target="#rotatingWorkTypeAssignModalBody"
|
||||
data-target="#rotating-work-type-modal"
|
||||
data-toggle="oh-modal-toggle"
|
||||
@@ -83,7 +83,7 @@
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary-outline oh-stop-prop oh-accordion-meta__btn p-2"
|
||||
title="Add"
|
||||
hx-get="{% url 'shift-request' %}?emp_id={{employee}}"
|
||||
hx-get="{% url 'shift-request' %}?emp_id={{emp_id}}"
|
||||
hx-target="#shiftRequestTargetModal"
|
||||
data-target="#shiftRequestModal"
|
||||
data-toggle="oh-modal-toggle"
|
||||
@@ -109,7 +109,7 @@
|
||||
<button
|
||||
class="oh-btn oh-btn--secondary-outline oh-stop-prop oh-accordion-meta__btn p-2"
|
||||
title="Add"
|
||||
hx-get="{% url 'rotating-shift-assign-add' %}?emp_id={{employee}}"
|
||||
hx-get="{% url 'rotating-shift-assign-add' %}?emp_id={{emp_id}}"
|
||||
hx-target="#rotatingShiftAssignModalBody"
|
||||
data-target="#rotating-shift-modal"
|
||||
data-toggle="oh-modal-toggle"
|
||||
|
||||
@@ -489,7 +489,7 @@ def shift_tab(request, emp_id):
|
||||
|
||||
Returns: return shift-tab template
|
||||
"""
|
||||
|
||||
employee = Employee.objects.get(id=emp_id)
|
||||
work_type_requests = WorkTypeRequest.objects.filter(employee_id=emp_id)
|
||||
rshift_assign = RotatingShiftAssign.objects.filter(
|
||||
is_active=True, employee_id=emp_id
|
||||
@@ -502,7 +502,8 @@ def shift_tab(request, emp_id):
|
||||
"rshift_assign": rshift_assign,
|
||||
"rwork_type_assign": rwork_type_assign,
|
||||
"shift_data": shift_requests,
|
||||
"employee": emp_id,
|
||||
"emp_id": emp_id,
|
||||
"employee": employee,
|
||||
}
|
||||
return render(request, "tabs/shift-tab.html", context=context)
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 30 KiB |
@@ -40,7 +40,14 @@ $(document).ready(function () {
|
||||
var formDataArray = filterForm.serializeArray();
|
||||
var filterData = {};
|
||||
formDataArray.forEach(function (item) {
|
||||
filterData[item.name] = item.value;
|
||||
if (filterData.hasOwnProperty(item.name)) {
|
||||
if (!Array.isArray(filterData[item.name])) {
|
||||
filterData[item.name] = [filterData[item.name]];
|
||||
}
|
||||
filterData[item.name].push(item.value);
|
||||
} else {
|
||||
filterData[item.name] = item.value;
|
||||
}
|
||||
});
|
||||
var filterDetails = {
|
||||
currentPath: currentPath,
|
||||
|
||||
@@ -337,14 +337,17 @@
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
@media screen and (max-width: 767px) {
|
||||
@media screen and (max-width: 575.98px) {
|
||||
.at-work-seconds {
|
||||
font-size: 10px;
|
||||
}
|
||||
#attendance-activity-container .oh-btn{
|
||||
padding: 0.5rem 0.2rem;
|
||||
}
|
||||
|
||||
.oh-pagination {
|
||||
margin-bottom:10px;
|
||||
|
||||
}
|
||||
}
|
||||
.oh-main__topbar {
|
||||
padding-bottom:1rem;
|
||||
|
||||
Reference in New Issue
Block a user