From 5da14cc51b0d44b58690a4c4f03c8a74dd8d3f50 Mon Sep 17 00:00:00 2001 From: Horilla Date: Fri, 21 Nov 2025 12:16:43 +0530 Subject: [PATCH] [UPDT] BIOMETRIC: Updated employee list views for the biometric devices --- horilla_theme/overrides.py | 8 + .../biometric/list_employees_biometric.html | 328 ++++++++++++++++++ .../list_employees_cosec_biometric.html | 229 ++++++++++++ .../biometric/nav_employees_biometric.html | 76 ++++ .../nav_employees_cosec_biometric.html | 76 ++++ .../dahua/list_dahua_employees.html | 147 ++++++++ .../dahua/nav_dahua_employees.html | 85 +++++ .../list_etimeoffice_employees.html | 147 ++++++++ .../nav_etimeoffice_employees.html | 68 ++++ .../templates/pipeline/matching_resumes.html | 12 +- 10 files changed, 1170 insertions(+), 6 deletions(-) create mode 100644 horilla_theme/templates/biometric/list_employees_biometric.html create mode 100644 horilla_theme/templates/biometric/list_employees_cosec_biometric.html create mode 100644 horilla_theme/templates/biometric/nav_employees_biometric.html create mode 100644 horilla_theme/templates/biometric/nav_employees_cosec_biometric.html create mode 100644 horilla_theme/templates/biometric_users/dahua/list_dahua_employees.html create mode 100644 horilla_theme/templates/biometric_users/dahua/nav_dahua_employees.html create mode 100644 horilla_theme/templates/biometric_users/etimeoffice/list_etimeoffice_employees.html create mode 100644 horilla_theme/templates/biometric_users/etimeoffice/nav_etimeoffice_employees.html diff --git a/horilla_theme/overrides.py b/horilla_theme/overrides.py index e0547be1b..d65fd4a50 100644 --- a/horilla_theme/overrides.py +++ b/horilla_theme/overrides.py @@ -591,6 +591,7 @@ if apps.is_installed("attendance"): DashboardaAttendanceOT, DashboardAttendanceToValidate, ) + from biometric.cbv.biometric import BiometricCardView _overtime_attendance_init_orig = DashboardaAttendanceOT.__init__ @@ -604,8 +605,15 @@ if apps.is_installed("attendance"): _validate_attendance_init_orig(self, **kwargs) self.header_attrs = {} + _biometric_device_card_init_orig = BiometricCardView.__init__ + + def _biometric_card_init(self, **kwargs): + _biometric_device_card_init_orig(self, **kwargs) + self.custom_body_template = "cbv/biometric_card_body.html" + DashboardaAttendanceOT.__init__ = _overtime_attendance_init DashboardAttendanceToValidate.__init__ = _validate_attendance_init + BiometricCardView.__init__ = _biometric_card_init if apps.is_installed("leave"): diff --git a/horilla_theme/templates/biometric/list_employees_biometric.html b/horilla_theme/templates/biometric/list_employees_biometric.html new file mode 100644 index 000000000..284f0c9c6 --- /dev/null +++ b/horilla_theme/templates/biometric/list_employees_biometric.html @@ -0,0 +1,328 @@ +{% load i18n %} + + + +
+ {% if employees %} + + + + + + + + + + + {% if perms.biometric.delete_biometricemployees %} + + {% endif %} + + + + + {% for employee in employees %} + + + + + + + + + {% if perms.biometric.delete_biometricemployees %} + + {% endif %} + + {% endfor %} + +
+ + + {% trans "Employee" %} + + {% trans "User ID" %} + + {% trans "Badge ID" %} + + {% trans "Fingerprint" %} + + {% trans "Work Email" %} + + {% trans "Job Position" %} + + {% trans "Actions" %} +
+ + + {{employee.employee.get_full_name|title}} + + {{employee.user_id}} {{device_id.machine_ip}} + {{device_id.port}} + + {{employee.badge_id}} + +
+ + + + + + + + + + + + + + + + + + + + + +
+ +
+ {{employee.work_email}} + + {{employee.job_position}} + + + + +
+ {% else %} +
+
+
+ +

{% trans "No records available at the moment" %}

+
+
+
+ {% endif %} +
+ +{% if employees.has_previous or employees.has_next %} +
+

+ {% trans "Page" %} {{ employees.number }} {% trans "of" %} + {{ employees.paginator.num_pages }} +

+
+ {% if employees.has_previous %} + + {% endif %} + {{ employees.number }} / {{ employees.paginator.num_pages }} + {% if employees.has_next %} + + {% endif %} +
+
+{% endif %} + + \ No newline at end of file diff --git a/horilla_theme/templates/biometric/list_employees_cosec_biometric.html b/horilla_theme/templates/biometric/list_employees_cosec_biometric.html new file mode 100644 index 000000000..23bc1ae78 --- /dev/null +++ b/horilla_theme/templates/biometric/list_employees_cosec_biometric.html @@ -0,0 +1,229 @@ +{% load i18n %} + +
+ {% if employees.users %} + + + + + + + + + + + + + + + + + + + + {% for employee in employees.users %} + + + + + + + + + + + + + + + {% endfor %} + +
+ + + {% trans "Employee" %} + + {% trans "User ID" %} + + {% trans "Reference ID" %} + + {% trans "Active" %} + + {% if employees.users %} + {% if employees.users.0.finger_count %} + {% trans "Finger Count" %} + {% else %} + {% trans "Face Count" %} + {% endif %} + {% else %} + {% trans "Biometric Template" %} + {% endif %} + + {% trans "Card Count" %} + + {% trans "Valid Active" %} + + {% trans "Valid End Date" %} + + {% trans "Work Email" %} + + {% trans "Job Position" %} + + {% trans "Actions" %} +
+ + + {{employee.employee_id.get_full_name|title}} + + {{employee.user_id}} + + {{employee.ref_user_id}} + + {% if employee.user_active == "1" %} + {% trans "Yes" %} + {% else %} + {% trans "No" %} + {% endif %} + + {% if employee.finger_count or employee.face_count %} + {% if employee.finger_count %} + {{employee.finger_count}} + {% else %} + {{employee.face_count}} + {% endif %} + {% else %} + {% trans "Not Enrolled" %} + {% endif %} + + {{employee.card_count}} + + {% if employee.validity_enable == "1" %} + {% trans "Yes" %} + {% else %} + {% trans "No" %} + {% endif %} + + {{employee.validity_date_dd}}/{{employee.validity_date_mm}}/{{employee.validity_date_yyyy}} + + {{employee.employee_id.get_mail}} + + {{employee.employee_id.get_job_position}} + +
+ {% if employee.face_count %} + + + + {% endif %} + {% if perms.biometric.change_biometricemployees %} + + + + {% endif %} + {% if perms.biometric.delete_biometricemployees %} + + + + {% endif %} +
+
+ {% else %} +
+
+
+ +

+ {% trans "No records available at the moment" %} +

+
+
+
+ {% endif %} +
+ +{% if employees.paginator.has_previous or employees.paginator.has_next %} +
+

+ {% trans "Page" %} {{ employees.paginator.number }} {% trans "of" %} + {{ employees.paginator.num_pages }} +

+
+ {% if employees.paginator.has_previous %} + + {% endif %} + + {{ employees.paginator.number }} / {{ employees.paginator.num_pages }} + + {% if employees.paginator.has_next %} + + {% endif %} +
+
+{% endif %} + + \ No newline at end of file diff --git a/horilla_theme/templates/biometric/nav_employees_biometric.html b/horilla_theme/templates/biometric/nav_employees_biometric.html new file mode 100644 index 000000000..cb5289e71 --- /dev/null +++ b/horilla_theme/templates/biometric/nav_employees_biometric.html @@ -0,0 +1,76 @@ +{% load static i18n %} +
+

{% trans "Employees" %}

+
+
+ + +
+ + + + {% if perms.biometric.add_biometricemployees %} + + {% trans 'Create' %} + {% trans "Add" %} + + {% endif %} +
+
diff --git a/horilla_theme/templates/biometric/nav_employees_cosec_biometric.html b/horilla_theme/templates/biometric/nav_employees_cosec_biometric.html new file mode 100644 index 000000000..2a88ca524 --- /dev/null +++ b/horilla_theme/templates/biometric/nav_employees_cosec_biometric.html @@ -0,0 +1,76 @@ +{% load static i18n %} +
+

{% trans "Employees" %}

+
+
+ + +
+ + + + {% if perms.biometric.add_biometricemployees %} + + {% trans 'Create' %} + {% trans "Add" %} + + {% endif %} +
+
diff --git a/horilla_theme/templates/biometric_users/dahua/list_dahua_employees.html b/horilla_theme/templates/biometric_users/dahua/list_dahua_employees.html new file mode 100644 index 000000000..2a7494f31 --- /dev/null +++ b/horilla_theme/templates/biometric_users/dahua/list_dahua_employees.html @@ -0,0 +1,147 @@ +{% load i18n %} + +
+ {% if employees %} + + + + + + + + + + + + + + + {% for employee in employees %} + + + + + + + + + + {% endfor %} + +
+ + + {% trans "Employee" %} + + {% trans "User ID" %} + + {% trans "Badge ID" %} + + {% trans "Work Email" %} + + {% trans "Job Position" %} + + {% trans "Actions" %} +
+ + + {{employee.employee_id.get_full_name|title}} + + {{employee.user_id}} + + {{employee.employee_id.badge_id}} + + {{employee.employee_id.get_mail}} + + {{employee.employee_id.get_job_position}} + +
+ {% if perms.biometric.delete_biometricemployees %} + + + + + {% endif %} +
+
+ {% else %} +
+
+
+ +

+ {% trans "No records available at the moment" %} +

+
+
+
+ {% endif %} +
+ +{% if employees.has_previous or employees.has_next %} +
+

+ {% trans "Page" %} {{ employees.number }} {% trans "of" %} + {{ employees.paginator.num_pages }} +

+
+ {% if employees.has_previous %} + + {% endif %} + {{ employees.number }} / {{ employees.paginator.num_pages }} + {% if employees.has_next %} + + {% endif %} +
+
+{% endif %} + + \ No newline at end of file diff --git a/horilla_theme/templates/biometric_users/dahua/nav_dahua_employees.html b/horilla_theme/templates/biometric_users/dahua/nav_dahua_employees.html new file mode 100644 index 000000000..36fb9d10f --- /dev/null +++ b/horilla_theme/templates/biometric_users/dahua/nav_dahua_employees.html @@ -0,0 +1,85 @@ +{% load static i18n %} +
+

{% trans "Employees" %}

+
+
+ + +
+ + + + {% if perms.biometric.add_biometricemployees %} + + {% trans 'Create' %} + {% trans "Add" %} + + {% endif %} +
+
diff --git a/horilla_theme/templates/biometric_users/etimeoffice/list_etimeoffice_employees.html b/horilla_theme/templates/biometric_users/etimeoffice/list_etimeoffice_employees.html new file mode 100644 index 000000000..272d08311 --- /dev/null +++ b/horilla_theme/templates/biometric_users/etimeoffice/list_etimeoffice_employees.html @@ -0,0 +1,147 @@ +{% load i18n %} + +
+ {% if employees %} + + + + + + + + + + + + + + + {% for employee in employees %} + + + + + + + + + + {% endfor %} + +
+ + + {% trans "Employee" %} + + {% trans "Emp Code" %} + + {% trans "Badge ID" %} + + {% trans "Work Email" %} + + {% trans "Job Position" %} + + {% trans "Actions" %} +
+ + + {{employee.employee_id.get_full_name|title}} + + {{employee.user_id}} + + {{employee.employee_id.badge_id}} + + {{employee.employee_id.get_mail}} + + {{employee.employee_id.get_job_position}} + +
+ {% if perms.biometric.delete_biometricemployees %} + + + + + {% endif %} +
+
+ {% else %} +
+
+
+ +

+ {% trans "No records available at the moment" %} +

+
+
+
+ {% endif %} +
+ +{% if employees.has_previous or employees.has_next %} +
+

+ {% trans "Page" %} {{ employees.number }} {% trans "of" %} + {{ employees.paginator.num_pages }} +

+
+ {% if employees.has_previous %} + + {% endif %} + {{ employees.number }} / {{ employees.paginator.num_pages }} + {% if employees.has_next %} + + {% endif %} +
+
+{% endif %} + + \ No newline at end of file diff --git a/horilla_theme/templates/biometric_users/etimeoffice/nav_etimeoffice_employees.html b/horilla_theme/templates/biometric_users/etimeoffice/nav_etimeoffice_employees.html new file mode 100644 index 000000000..a260ee0eb --- /dev/null +++ b/horilla_theme/templates/biometric_users/etimeoffice/nav_etimeoffice_employees.html @@ -0,0 +1,68 @@ +{% load static i18n %} +
+

{% trans "Employees" %}

+
+
+ + +
+ + + +
+
diff --git a/horilla_theme/templates/pipeline/matching_resumes.html b/horilla_theme/templates/pipeline/matching_resumes.html index 5cd6cc0e9..be6e3b356 100644 --- a/horilla_theme/templates/pipeline/matching_resumes.html +++ b/horilla_theme/templates/pipeline/matching_resumes.html @@ -5,10 +5,10 @@ } #enlargeImageContainer { - display:none; - position: absolute; - width: 300px; - height: 400px; + display:none; + position: absolute; + width: 300px; + height: 400px; z-index: 1000; } .diff-cell { @@ -99,8 +99,8 @@ var elementOffset = $(element).offset(); var elementWidth = $(element).outerWidth(); - var topPosition = elementOffset.top - 30; - var leftPosition = elementWidth + 10; + var topPosition = elementOffset.top - 30; + var leftPosition = elementWidth + 10; // Position the enlarge image container dynamically enlargeImageContainer.css({