From 58be33a8d70973dc86aa863b82bb0da4c79577db Mon Sep 17 00:00:00 2001 From: Ashwanth Balakrishnan Date: Tue, 7 May 2024 12:23:36 +0530 Subject: [PATCH] Added Pre-Commit Hooks (#175) * Added pre commit hook * Run pre commit hook on all files --------- Co-authored-by: Horilla <131998600+horilla-opensource@users.noreply.github.com> --- .env.dist | 4 +- .gitignore | 2 +- .pre-commit-config.yaml | 17 + CONTRIBUTING.md | 4 +- Dockerfile | 2 +- README.md | 16 +- asset/admin.py | 5 +- asset/filters.py | 10 +- asset/forms.py | 28 +- asset/models.py | 7 +- asset/resources.py | 1 + asset/scheduler.py | 4 + asset/static/src/asset/dashboard.js | 5 +- asset/templates/asset/asset_creation.html | 4 +- asset/templates/asset/asset_information.html | 16 +- asset/templates/asset/asset_list.html | 80 +- asset/templates/asset/asset_report_form.html | 6 +- asset/templates/asset/asset_return_form.html | 10 +- asset/templates/asset/asset_update.html | 30 +- asset/templates/asset/dashboard.html | 20 +- .../asset/dashboard_allocated_assets.html | 2 +- .../asset/dashboard_asset_requests.html | 4 +- .../asset_history/asset_history_filter.html | 2 +- .../asset_history/asset_history_list.html | 15 +- .../asset_history/asset_history_nav.html | 10 +- .../asset_history_single_view.html | 4 +- asset/templates/asset_history/group_by.html | 4 +- asset/templates/batch/asset_batch_empty.html | 2 +- .../batch/asset_batch_number_list.html | 8 +- .../batch/asset_batch_number_update.html | 2 +- .../batch/asset_batch_number_view.html | 2 +- asset/templates/category/asset_category.html | 22 +- .../category/asset_category_creation.html | 14 +- .../category/asset_category_update.html | 4 +- .../category/asset_category_view.html | 18 +- asset/templates/category/asset_empty.html | 10 +- .../future_update/asset_list_view.html | 18 +- .../asset_request_allocation_list.html | 20 +- .../asset_request_allocation_view.html | 12 +- .../request_allocation/group_by.html | 130 +- .../individual allocation.html | 4 +- .../request_allocation/individual_own.html | 8 +- .../individual_request.html | 8 +- asset/urls.py | 5 +- asset/views.py | 83 +- attendance/admin.py | 5 +- attendance/filters.py | 14 +- attendance/forms.py | 36 +- attendance/methods/differentiate.py | 1 + attendance/methods/group_by.py | 6 +- attendance/models.py | 27 +- .../static/dashboard/attendanceChart.js | 2 +- .../attendance/attendance_empty.html | 2 +- .../attendance/attendance/attendance_nav.html | 6 +- .../attendance/attendance_on_time.html | 22 +- .../attendance/attendance_request_one.html | 44 +- .../attendance/attendance_view.html | 4 +- .../attendance/attendance/export_filter.html | 2 +- .../attendance/attendance/group_by.html | 12 +- .../attendance/attendance/tab_content.html | 38 +- .../attendance/validate_attendance.html | 16 +- .../attendance/attendance/validate_form.html | 2 +- .../attendance_account_export_filter.html | 2 +- .../attendance_overtime_view.html | 2 +- .../attendance_account/group_by.html | 4 +- .../attendance/attendance_account/nav.html | 8 +- .../attendance_account/overtime_empty.html | 6 +- .../attendance_account/overtime_list.html | 12 +- .../attendance_activity/activity_empty.html | 4 +- .../attendance_activity/activity_list.html | 10 +- .../attendance_activity_view.html | 2 +- .../attendance_activity/group_by.html | 10 +- .../attendance/attendance_activity/nav.html | 12 +- .../single_attendance_activity.html | 2 +- .../break_point/condition_form.html | 3 - .../attendance/dashboard/dashboard.html | 22 +- .../attendance/dashboard/overtime_table.html | 2 +- .../dashboard/to_validate_table.html | 14 +- .../attendance/grace_time/grace_time.html | 52 +- .../grace_time/grace_time_form.html | 4 +- .../late_come_early_out/group_by.html | 12 +- .../late_come_early_out_filters.html | 10 +- .../attendance/late_come_early_out/nav.html | 14 +- .../late_come_early_out/report_list.html | 16 +- .../late_come_early_out/reports.html | 2 +- .../late_come_early_out/reports_empty.html | 4 +- .../late_come_early_out/single_report.html | 10 +- .../own_attendance/attendances.html | 26 +- .../attendance/own_attendance/filters.html | 2 +- .../attendance/own_attendance/group_by.html | 4 +- .../attendance/own_attendance/nav.html | 12 +- .../attendance/own_attendance/own_empty.html | 4 +- .../own_attendance/view_own_attendances.html | 2 +- .../attendance/penalty/penalty_view.html | 12 +- .../attendance/settings/settings.html | 4 +- .../work_record/work_record_list.html | 2 +- .../work_record/work_record_view.html | 8 +- attendance/templates/attendance_form.html | 6 +- .../attendance/attendance_comment.html | 6 +- .../attendance_request_comment_form.html | 2 +- .../requests/attendance/comment_view.html | 14 +- .../templates/requests/attendance/filter.html | 8 +- .../requests/attendance/group_by.html | 12 +- .../requests/attendance/individual_view.html | 2 +- .../templates/requests/attendance/nav.html | 4 +- .../requests/attendance/request_lines.html | 34 +- .../requests/attendance/request_new_form.html | 4 +- .../requests/attendance/requests_empty.html | 2 +- .../requests/attendance/view-requests.html | 4 +- attendance/templatetags/attendancefilters.py | 5 +- attendance/urls.py | 9 +- attendance/views.py | 53 +- attendance/views/clock_in_out.py | 20 +- attendance/views/dashboard.py | 6 +- attendance/views/penalty.py | 9 +- attendance/views/process_attendance_data.py | 6 +- attendance/views/requests.py | 36 +- attendance/views/search.py | 33 +- attendance/views/views.py | 74 +- auth/forgot-password.html | 2 +- auth/reset.html | 2 +- base/admin.py | 20 +- base/announcement.py | 11 +- base/backends.py | 7 +- base/context_processors.py | 3 +- base/filters.py | 10 +- base/forms.py | 38 +- base/horilla_company_manager.py | 2 + base/management/commands/createhorillauser.py | 3 +- base/methods.py | 13 +- base/middleware.py | 3 +- base/models.py | 17 +- base/request_and_approve.py | 10 +- base/scheduler.py | 16 +- base/static/base/actions.js | 2 +- base/static/base/date_settings.js | 4 +- base/static/base/filter.js | 2 +- base/static/base/time_settings.js | 7 +- base/static/base/toggleColumn.js | 2 +- base/static/basedOn.js | 4 +- base/templates/announcement/announcement.html | 12 +- .../announcement/announcement_form.html | 6 +- .../announcement/announcement_one.html | 26 +- .../announcement_update_form.html | 6 +- base/templates/announcement/comment_form.html | 6 +- base/templates/announcement/comment_view.html | 10 +- base/templates/announcement/expiry_day.html | 5 +- .../base/action_type/action_type.html | 8 +- .../base/action_type/action_type_form.html | 8 +- .../base/action_type/action_type_view.html | 20 +- .../base/audit_tag/audit_tag_form.html | 6 +- .../base/audit_tag/audit_tag_view.html | 20 +- .../employee_account_block_unblock.html | 6 +- base/templates/base/auth/filters.html | 2 +- base/templates/base/auth/group_accordion.html | 10 +- base/templates/base/auth/group_lines.html | 9 +- .../base/auth/group_user_assign.html | 2 +- base/templates/base/auth/group_view.html | 8 +- base/templates/base/auth/permission.html | 4 +- .../base/auth/permission_accordion.html | 2 +- .../templates/base/auth/permission_lines.html | 2 +- base/templates/base/auth/permission_view.html | 17 +- base/templates/base/company/company.html | 2 +- base/templates/base/company/company_form.html | 2 +- base/templates/base/company/company_view.html | 8 +- base/templates/base/company/condition.html | 4 +- .../base/company/condition_view.html | 6 +- base/templates/base/company/date.html | 1 - .../templates/base/department/department.html | 2 +- .../base/department/department_form.html | 10 +- .../base/department/department_view.html | 12 +- .../pagination_settings.html | 3 +- .../base/employee_tag/employee_tag_form.html | 6 +- .../base/employee_tag/employee_tag_view.html | 22 +- .../base/employee_type/employee_type.html | 2 +- .../base/employee_type/type_view.html | 8 +- base/templates/base/general_settings.html | 2 +- .../base/install_biometric_attendance.html | 6 +- .../base/job_position/job_position_form.html | 6 +- .../base/job_position/job_position_view.html | 8 +- .../base/job_role/job_role_view.html | 2 +- base/templates/base/mail_server/form.html | 2 +- .../base/mail_server/mail_server.html | 2 +- .../base/mail_server/mail_server_view.html | 22 +- .../base/mail_server/replace_mail.html | 6 +- .../base/rotating_shift/htmx/group_by.html | 24 +- .../rotating_shift_assign_update_form.html | 4 +- .../htmx/rotating_shift_form.html | 4 +- .../base/rotating_shift/individual_view.html | 54 +- .../base/rotating_shift/rotating_shift.html | 3 +- .../rotating_shift/rotating_shift_assign.html | 4 +- .../rotating_shift_assign_nav.html | 10 +- .../rotating_shift_assign_view.html | 24 +- .../rotating_shift/rotating_shift_view.html | 8 +- .../rotating_work_type/htmx/group_by.html | 18 +- .../htmx/rotating_work_type_form.html | 6 +- .../rotating_work_type/individual_view.html | 18 +- .../rotating_work_type.html | 2 +- .../rotating_work_type_assign.html | 4 +- .../rotating_work_type_assign_nav.html | 6 +- .../rotating_work_type_assign_view.html | 18 +- .../rotating_work_type_view.html | 10 +- base/templates/base/shift/schedule.html | 2 +- base/templates/base/shift/schedule_form.html | 4 +- base/templates/base/shift/schedule_view.html | 6 +- base/templates/base/shift/shift.html | 2 +- base/templates/base/shift/shift_view.html | 10 +- base/templates/base/tags/employee_tags.html | 6 +- base/templates/base/tags/helpdesk_tags.html | 6 +- base/templates/base/tags/tags.html | 6 +- base/templates/base/tags/tags_form.html | 6 +- base/templates/base/tags/tags_view.html | 22 +- .../base/ticket_type/ticket_type.html | 6 +- .../base/ticket_type/ticket_type_view.html | 20 +- base/templates/base/work_type/work_type.html | 2 +- .../base/work_type/work_type_view.html | 10 +- base/templates/email_config.html | 2 +- .../attendance_validate.html | 6 +- .../leave_allocation_approve.html | 12 +- .../leave_request_approve.html | 6 +- .../request_and_approve/overtime_approve.html | 4 +- .../allocation_request_update_form.html | 18 +- .../htmx/allocation_details.html | 20 +- .../htmx/allocation_requests.html | 26 +- .../shift_request/htmx/comment_view.html | 10 +- .../shift_request/htmx/group_by.html | 64 +- .../shift_request/htmx/requests.html | 108 +- .../htmx/shift_allocation_form.html | 6 +- .../shift_request/htmx/shift_comment.html | 6 +- .../htmx/shift_request_comment_form.html | 6 +- .../htmx/shift_request_detail.html | 24 +- .../templates/shift_request/request_form.html | 4 +- .../shift_request/request_update_form.html | 4 +- .../shift_request/shift_request.html | 4 +- .../shift_request/shift_request_nav.html | 1 - .../shift_request/shift_request_view.html | 4 +- .../work_type_request/htmx/comment_view.html | 12 +- .../work_type_request/htmx/group_by.html | 40 +- .../work_type_request/htmx/requests.html | 40 +- .../htmx/work_type_comment.html | 6 +- .../htmx/work_type_request_single_view.html | 22 +- .../htmx/worktype_request_comment_form.html | 6 +- .../work_type_request/request_form.html | 2 +- .../request_update_form.html | 4 +- .../work_type_request/work_type_request.html | 2 +- .../work_type_request_nav.html | 10 +- .../work_type_request_view.html | 14 +- base/templatetags/basefilters 2.py | 3 +- base/templatetags/basefilters.py | 9 +- base/translator.py | 1 - base/urls.py | 10 +- base/views.py | 196 +- docker-compose.yaml | 5 +- employee/admin.py | 12 +- employee/filters.py | 13 +- employee/forms.py | 16 +- employee/methods/methods.py | 3 +- employee/models.py | 44 +- employee/not_in_out_dashboard.py | 18 +- employee/policies.py | 23 +- employee/scheduler.py | 3 +- employee/static/dashboard/getBirthday.js | 4 +- employee/static/employee/search.js | 34 +- employee/templates/asset-tab.html | 1 - employee/templates/dashboard/not_in_yet.html | 4 +- employee/templates/dashboard/not_out_yet.html | 2 +- .../dashboard/upcoming_birthdays.html | 2 +- .../disciplinary_nav.html | 22 +- .../disciplinary_records.html | 8 +- .../templates/documents/document_nav.html | 10 +- .../documents/document_requests.html | 10 +- employee/templates/documents/requests.html | 44 +- .../employee/create_form/personal_info.html | 17 +- .../dashboard/dashboard_employee.html | 2 +- .../templates/employee/profile/bank_info.html | 2 +- .../templates/employee/profile/profile.html | 10 +- .../employee/profile/profile_modal.html | 2 +- .../employee/profile/profile_view.html | 16 +- .../templates/employee/profile/work_info.html | 6 +- employee/templates/employee/send_mail.html | 4 +- .../employee/update_form/bank_details.html | 2 +- .../employee/update_form/form_view.html | 11 +- .../employee/update_form/personal_info.html | 2 +- .../employee/update_form/work_details.html | 14 +- .../templates/employee/view/individual.html | 26 +- employee/templates/employee_filters.html | 5 +- employee/templates/employee_nav.html | 6 +- .../employee_personal_info/bulk_update.html | 4 +- .../employee_personal_info/employee_card.html | 11 +- .../employee_create_form.html | 25 +- .../employee_empty_view.html | 4 +- .../employee_personal_info/employee_list.html | 38 +- .../employee_personal_info.html | 18 +- .../employee_update_form.html | 6 +- .../employee_personal_info/employee_view.html | 14 +- .../employee_work_info.html | 32 +- .../first_last_badge.html | 2 +- .../employee_personal_info/group_by.html | 18 +- .../employee_personal_info/script.js | 2 +- .../employee_personal_info/style.css | 2 +- employee/templates/import_export_nav.html | 10 +- .../templates/organisation_chart/chart.html | 2 - .../organisation_chart/org_chart.html | 7 +- employee/templates/payroll-tab.html | 8 +- employee/templates/performance-tab.html | 8 +- employee/templates/personal-tab.html | 2 +- employee/templates/policies/attachments.html | 6 +- employee/templates/related_models.html | 4 +- .../settings/encashment_settings.html | 8 +- employee/templates/settings/settings.html | 4 +- employee/templates/tabs/add_note.html | 4 +- .../tabs/allowance_deduction-tab.html | 26 +- .../templates/tabs/asset-request-tab.html | 24 +- employee/templates/tabs/asset-tab.html | 2 +- employee/templates/tabs/attendance-tab.html | 34 +- employee/templates/tabs/bonus_points.html | 8 +- employee/templates/tabs/document_tab.html | 34 +- employee/templates/tabs/forms/add_points.html | 2 +- .../tabs/forms/redeem_points_form.html | 4 +- .../templates/tabs/group_permissions.html | 2 +- employee/templates/tabs/history.html | 2 +- .../templates/tabs/htmx/document_form.html | 8 +- employee/templates/tabs/htmx/reject_form.html | 2 +- employee/templates/tabs/htmx/view_file.html | 10 +- employee/templates/tabs/leave-tab.html | 18 +- employee/templates/tabs/mail_log.html | 2 +- employee/templates/tabs/note_tab.html | 19 +- employee/templates/tabs/payroll-tab.html | 6 +- employee/templates/tabs/penalty_account.html | 2 +- employee/templates/tabs/performance-tab.html | 8 +- employee/templates/tabs/personal-tab.html | 4 +- .../templates/tabs/profile-asset-tab.html | 3 +- .../tabs/profile-attendance-tab.html | 4 +- .../templates/tabs/scheduled_interview.html | 2 +- employee/templates/tabs/shift-tab.html | 122 +- employee/templatetags/employee_filter.py | 3 +- employee/urls.py | 8 +- employee/views.py | 198 +- entrypoint.sh | 4 +- helpdesk/admin.py | 10 +- helpdesk/filter.py | 1 + helpdesk/forms.py | 18 +- helpdesk/models.py | 13 +- helpdesk/search_indexes.py | 1 + helpdesk/static/tickets/tickets.js | 2 +- .../department_managers.html | 6 +- .../department_managers_form.html | 4 +- .../department_managers_view.html | 16 +- .../helpdesk/faq/faq_category_create.html | 6 +- .../helpdesk/faq/faq_category_list.html | 4 +- .../templates/helpdesk/faq/faq_create.html | 6 +- helpdesk/templates/helpdesk/faq/faq_list.html | 4 +- .../templates/helpdesk/faq/faq_list_view.html | 16 +- helpdesk/templates/helpdesk/faq/faq_nav.html | 4 +- helpdesk/templates/helpdesk/faq/faq_view.html | 16 +- .../helpdesk/mail_templates/ticket_mail.html | 18 +- .../helpdesk/ticket/forms/add_tag.html | 51 +- .../ticket/forms/change_assinees.html | 1 - .../ticket/forms/change_raised_on.html | 4 +- .../helpdesk/ticket/ticket_card.html | 126 +- .../helpdesk/ticket/ticket_detail.html | 71 +- .../helpdesk/ticket/ticket_filter.html | 12 +- .../helpdesk/ticket/ticket_form.html | 2 +- .../helpdesk/ticket/ticket_group.html | 164 +- .../helpdesk/ticket/ticket_list.html | 128 +- .../templates/helpdesk/ticket/ticket_nav.html | 2 +- .../helpdesk/ticket/ticket_view.html | 44 +- helpdesk/threading.py | 9 +- helpdesk/views.py | 74 +- horilla/__init__.py | 10 +- horilla/decorators.py | 38 +- horilla/filters.py | 5 +- horilla/haystack_configuration.py | 1 + horilla/horilla_apps.py | 2 +- horilla/horilla_context_processors.py | 2 +- horilla/models.py | 7 +- horilla/settings.py | 5 +- horilla/urls.py | 11 +- horilla_audit/admin.py | 3 +- horilla_audit/context_processors.py | 5 +- horilla_audit/forms.py | 6 +- horilla_audit/methods.py | 3 +- horilla_audit/models.py | 6 +- horilla_audit/templatetags/audit_filters.py | 5 +- horilla_crumbs/context_processors.py | 4 +- horilla_documents/admin.py | 1 - horilla_documents/forms.py | 8 +- horilla_documents/models.py | 13 +- horilla_widgets/forms.py | 2 + .../multiselect_components/nav.html | 2 +- .../multiselect_components/pagination.html | 2 +- .../multiselect_components/search.html | 4 +- .../multiselect_components/table.html | 10 +- horilla_widgets/urls.py | 2 +- horilla_widgets/widgets/select_widgets.py | 1 + leave/admin.py | 24 +- leave/decorators.py | 3 +- leave/filters.py | 23 +- leave/forms.py | 46 +- leave/models.py | 94 +- leave/resources.py | 1 + leave/scheduler.py | 9 +- .../leave/accrual_plan_assign_view.html | 4 +- .../leave/accrual_plan_creation.html | 19 +- .../templates/leave/accrual_plan_update.html | 8 +- leave/templates/leave/accrual_plan_view.html | 4 +- leave/templates/leave/assign_view.html | 6 +- .../leave/company_leave/company_leave.html | 6 +- .../company_leave_creation_form.html | 2 +- .../company_leave/company_leave_view.html | 12 +- leave/templates/leave/dashboard.html | 12 +- leave/templates/leave/employee_dashboard.html | 16 +- leave/templates/leave/holiday/holiday.html | 12 +- .../templates/leave/holiday/holiday_view.html | 6 +- .../allocation_request_comment_form.html | 4 +- .../comment_view.html | 10 +- .../leave_allocation_comment.html | 4 +- .../leave_allocation_request_create.html | 2 +- .../leave_allocation_request_group_by.html | 66 +- .../leave_allocation_request_list.html | 56 +- .../leave_allocation_request_single_view.html | 47 +- .../leave_allocation_request_update.html | 4 +- .../leave_allocation_request_view.html | 8 +- leave/templates/leave/leave_assign.html | 2 +- .../leave/leave_assign/assign_view.html | 16 +- .../leave/leave_assign/assigned-leave.html | 2 +- .../leave/leave_assign/assigned_leave.html | 6 +- .../leave/leave_assign/group_by.html | 4 +- .../leave_assign/leave_assign_one_form.html | 2 +- .../leave_assign/single_assign_view.html | 5 +- leave/templates/leave/leave_assign_form.html | 2 +- .../leave/leave_assign_one_form.html | 2 +- .../templates/leave/leave_my_assign_view.html | 2 +- .../leave/leave_my_request_view.html | 10 +- .../leave/leave_my_requests_view.html | 12 +- .../leave/leave_request/comment_view.html | 10 +- .../dashboard_leave_requests.html | 2 +- .../leave_request/filter_leave_requests.html | 2 +- .../leave/leave_request/group_by.html | 32 +- .../leave/leave_request/leave-requests.html | 2 +- .../leave/leave_request/leave_clashes.html | 6 +- .../leave/leave_request/leave_comment.html | 4 +- .../leave/leave_request/leave_requests.html | 10 +- .../leave/leave_request/one_request_view.html | 8 +- .../leave/leave_request/penalty/create.html | 8 +- .../leave/leave_request/penalty/form.html | 5 +- .../leave/leave_request/request_view.html | 10 +- leave/templates/leave/leave_request_form.html | 2 +- leave/templates/leave/leave_request_view.html | 2 +- .../leave/leave_type/leave_type_creation.html | 30 +- .../leave_type/leave_type_empty_view.html | 4 +- .../leave_type_individual_view.html | 12 +- .../leave/leave_type/leave_type_update.html | 24 +- .../leave/leave_type/leave_types.html | 2 +- .../templates/leave/leave_type_creation.html | 16 +- leave/templates/leave/leave_type_update.html | 16 +- leave/templates/leave/leave_type_view.html | 6 +- leave/templates/leave/on_leave.html | 2 +- leave/templates/leave/one_request_view.html | 2 +- .../templates/leave/request_update_form.html | 2 +- leave/templates/leave/request_view.html | 6 +- leave/templates/leave/restrict/restrict.html | 4 +- .../leave/restrict/restrict_filter.html | 2 +- .../leave/restrict/restrict_form.html | 2 +- .../leave/restrict/restrict_update_form.html | 5 +- .../leave/restrict/view_restrict.html | 4 +- .../leave/user_eave_type_empty_view.html | 4 +- .../templates/leave/user_leave/group_by.html | 26 +- .../leave/user_leave/user-leave.html | 4 +- .../leave/user_leave/user_leave_confirm.html | 2 +- .../user_leave/user_leave_empty_view.html | 4 +- .../leave/user_leave/user_leave_view.html | 2 +- .../leave/user_leave/user_request_one.html | 20 +- .../leave/user_leave/user_request_view.html | 36 +- .../leave/user_leave/user_requests.html | 30 +- .../leave/user_leave_empty_view.html | 4 +- leave/templates/leave/user_leave_request.html | 8 +- .../leave/user_leave_type_empty_view.html | 4 +- leave/templates/leave/user_leave_view.html | 2 +- leave/templates/leave/user_request_one.html | 6 +- leave/templates/leave/user_request_view.html | 4 +- leave/threading.py | 25 +- leave/urls.py | 13 +- leave/views.py | 233 +- media/recruitment/resume/ImportError_21.xlsx | 2 +- notifications/admin.py | 3 +- notifications/base/models.py | 8 +- notifications/models.py | 3 +- notifications/settings.py | 1 - .../templates/notifications/notice.html | 12 +- .../templatetags/notifications_tags.py | 8 +- notifications/urls.py | 4 +- notifications/utils.py | 1 - notifications/views.py | 8 +- offboarding/admin.py | 9 +- offboarding/decorators.py | 1 + offboarding/filters.py | 2 + offboarding/forms.py | 8 +- offboarding/models.py | 8 +- .../templates/offboarding/employee/form.html | 2 +- .../templates/offboarding/note/form.html | 2 +- .../offboarding/note/view_notes.html | 6 +- .../offboarding/pipeline/employee_task.html | 8 +- .../templates/offboarding/pipeline/form.html | 2 +- .../offboarding/pipeline/individual_view.html | 8 +- .../offboarding/pipeline/offboardings.html | 10 +- .../offboarding/pipeline/pipeline.html | 2 +- .../offboarding/resignation/filter.html | 2 +- .../offboarding/resignation/form.html | 2 +- .../offboarding/resignation/group_by.html | 10 +- .../offboarding/resignation/nav.html | 4 +- .../resignation/request_cards.html | 12 +- .../offboarding/resignation/request_list.html | 18 +- .../resignation/request_single_view.html | 3 +- .../resignation/requests_view.html | 4 +- .../offboarding/settings/settings.html | 4 +- .../offboarding/stage/offboarding_body.html | 2 +- .../templates/offboarding/task/form.html | 2 +- .../offboarding/task/table_body.html | 14 +- .../templatetags/offboarding_filter.py | 10 +- offboarding/urls.py | 1 + offboarding/views.py | 17 +- onboarding/admin.py | 5 +- onboarding/decorators.py | 3 +- onboarding/filters.py | 3 +- onboarding/forms.py | 14 +- onboarding/models.py | 8 +- .../templates/onboarding/candidate_task.html | 22 +- .../onboarding/candidate_update.html | 2 +- .../templates/onboarding/candidates.html | 8 +- .../templates/onboarding/candidates_view.html | 14 +- .../templates/onboarding/dashboard.html | 10 +- .../onboarding/dashboard/status_list.html | 4 +- .../onboarding/dashboard/task_report.html | 2 +- .../onboarding/employee_bank_details.html | 10 +- .../onboarding/employee_creation.html | 2 +- onboarding/templates/onboarding/group_by.html | 57 +- .../templates/onboarding/kanban/kanban.html | 38 +- .../onboarding/mail_templates/default.html | 18 +- .../onboarding/onboarding_table.html | 44 +- .../templates/onboarding/onboarding_view.html | 44 +- .../onboarding/onboarding_view_nav.html | 2 +- .../templates/onboarding/onboardings.html | 6 +- .../templates/onboarding/profile_view.html | 2 +- .../templates/onboarding/rejection/form.html | 2 +- .../templates/onboarding/send_mail_form.html | 2 +- .../templates/onboarding/single_view.html | 12 +- .../templates/onboarding/stage_form.html | 2 +- .../templates/onboarding/stage_update.html | 2 +- .../templates/onboarding/static/country.js | 2 +- .../templates/onboarding/static/index.js | 2 - .../templates/onboarding/static/style.css | 4 +- onboarding/templates/onboarding/table.html | 4 +- onboarding/templates/onboarding/tabs.html | 4 +- .../templates/onboarding/task_update.html | 4 +- .../templates/onboarding/task_view.html | 2 +- .../templates/onboarding/user_creation.html | 14 +- .../templates/onboarding/welcome_aboard.html | 4 +- onboarding/templatetags/onboardingfilters.py | 3 +- onboarding/urls.py | 1 + onboarding/views.py | 94 +- payroll/admin.py | 14 +- payroll/filters.py | 6 +- payroll/forms/component_forms.py | 69 +- payroll/forms/forms.py | 8 +- payroll/forms/tax_forms.py | 9 +- payroll/methods/methods.py | 12 +- payroll/methods/payslip_calc.py | 10 +- payroll/methods/tax_calc.py | 5 +- payroll/models/models.py | 52 +- payroll/models/tax_models.py | 3 +- payroll/scheduler.py | 2 + payroll/static/payroll/dashboard.js | 4 +- payroll/templates/common_form.html | 2 +- payroll/templates/contract_form.html | 12 +- payroll/templates/one_time_deduction.html | 16 +- .../payroll/allowance/allowance_empty.html | 4 +- .../payroll/allowance/card_allowance.html | 5 +- .../payroll/allowance/filter_allowance.html | 4 +- .../payroll/allowance/list_allowance.html | 16 +- .../payroll/allowance/view_allowance.html | 42 +- .../allowance/view_single_allowance.html | 2 - payroll/templates/payroll/common/form.html | 2 +- .../payroll/contract/contract_create.html | 4 +- .../payroll/contract/contract_empty.html | 2 +- .../payroll/contract/contract_list.html | 22 +- .../contract/contract_single_view.html | 4 +- .../payroll/contract/contract_view.html | 2 +- .../payroll/contract/filter_contract.html | 2 +- .../templates/payroll/contract/group_by.html | 12 +- .../contribution_deduction_assign.html | 1 - .../contribution_deduction_creation.html | 2 +- .../contribution_deduction_employees.html | 4 +- payroll/templates/payroll/dashboard.html | 14 +- .../payroll/deduction/card_deduction.html | 8 +- .../payroll/deduction/deduction_empty.html | 2 +- .../payroll/deduction/filter_deduction.html | 2 +- .../payroll/deduction/list_deduction.html | 22 +- .../payroll/deduction/view_deduction.html | 12 +- .../deduction/view_single_deduction.html | 6 +- payroll/templates/payroll/htmx/form.html | 18 +- payroll/templates/payroll/loan/filter.html | 2 +- payroll/templates/payroll/loan/form.html | 2 +- .../templates/payroll/loan/installments.html | 14 +- .../templates/payroll/loan/records_card.html | 10 +- .../templates/payroll/loan/records_list.html | 100 +- .../payroll/mail_templates/default.html | 2 +- payroll/templates/payroll/payroll.html | 2 +- .../payslip/generate_payslip_list.html | 6 +- .../templates/payroll/payslip/group_by.html | 32 +- .../payroll/payslip/group_payslips.html | 18 +- .../payroll/payslip/individual_payslip.html | 6 +- .../payslip/individual_payslip_summery.html | 22 +- .../payroll/payslip/individual_pdf.html | 13 +- .../payroll/payslip/payslip_table.html | 40 +- .../payroll/payslip/payslips_empty.html | 6 +- .../payroll/payslip/view_payslips.html | 6 +- .../payroll/reimbursement/attachments.html | 2 +- .../payroll/reimbursement/comment_view.html | 10 +- .../payroll/reimbursement/filter.html | 2 +- .../templates/payroll/reimbursement/form.html | 5 +- .../reimbursement/reimbursement_comment.html | 6 +- .../reimbursement/reimbursement_list.html | 156 +- .../reimbursement_request_comment_form.html | 6 +- .../reimbursenent_individual.html | 28 +- .../payroll/reimbursement/request_cards.html | 26 +- .../reimbursement/view_reimbursement.html | 18 +- .../payroll/settings/payroll_settings.html | 2 +- .../templates/payroll/settings/settings.html | 4 +- .../templates/payroll/tax/federal_tax.html | 1 - payroll/templates/payroll/tax/federaltax.html | 1 - .../payroll/tax/filing_status_empty.html | 5 +- .../payroll/tax/filing_status_list.html | 6 +- .../payroll/tax/filing_status_view.html | 4 +- .../templates/payroll/tax/filingstatus.html | 2 +- .../work_record/work_record_create.html | 7 +- .../work_record_employees_view.html | 2 +- .../payroll/work_record/work_record_view.html | 17 +- payroll/templatetags/current_month_record.py | 3 +- payroll/threadings/mail.py | 8 +- payroll/urls/component_urls.py | 3 +- payroll/urls/tax_urls.py | 2 +- payroll/urls/urls.py | 5 +- payroll/views/component_views.py | 136 +- payroll/views/tax_views.py | 17 +- payroll/views/views.py | 60 +- payroll/widgets/component_widgets.py | 2 +- pms/admin.py | 18 +- pms/filters.py | 12 +- pms/forms.py | 41 +- pms/methods.py | 19 +- pms/models.py | 35 +- pms/scheduler.py | 13 +- pms/static/css/pms.css | 3 +- pms/static/src/dashboard/pmsChart.js | 4 +- pms/static/src/feedback/feedback_answer.js | 14 +- .../src/feedback/feedback_detailed_view.js | 17 +- pms/static/src/okr/objective_creation.js | 4 +- pms/static/src/period/period.js | 4 +- pms/templates/dashboard/pms_dashboard.html | 22 +- .../feedback/answer/feedback_answer.html | 6 +- .../feedback/answer/feedback_answer_view.html | 10 +- pms/templates/feedback/feedback_creation.html | 10 +- .../feedback/feedback_detailed_view.html | 12 +- .../feedback_detailed_view_answer.html | 18 +- pms/templates/feedback/feedback_empty.html | 13 +- pms/templates/feedback/feedback_list.html | 60 +- .../feedback/feedback_list_view.html | 37 +- pms/templates/feedback/feedback_update.html | 3 +- .../feedback/question/question_all.html | 6 +- .../question_template_detailed_view.html | 6 +- .../question_template_empty.html | 8 +- .../question_template_list.html | 6 +- .../question_template_update.html | 4 +- .../question_template_view.html | 2 +- pms/templates/meetings/meeting_answer.html | 20 +- .../meetings/meeting_answer_view.html | 16 +- .../meeting_question_template_view.html | 6 +- .../meetings/meeting_single_view.html | 18 +- pms/templates/meetings/meetings_list.html | 64 +- pms/templates/meetings/meetings_nav.html | 2 +- pms/templates/meetings/view_meetings.html | 2 +- pms/templates/messages.html | 2 +- pms/templates/okr/add_assignees.html | 10 +- pms/templates/okr/create_period.html | 10 +- pms/templates/okr/emp_obj_single.html | 32 +- .../emp_objective_dashboard_view.html | 74 +- .../okr/emp_objective/emp_objective_list.html | 60 +- .../okr/emp_objective/emp_objective_nav.html | 4 +- pms/templates/okr/emp_objective_form.html | 3 +- pms/templates/okr/group_by.html | 30 +- .../okr/key_result/key_result_creation.html | 4 +- .../key_result/key_result_creation_htmx.html | 4 +- .../okr/key_result/key_result_form.html | 8 +- .../okr/key_result/key_result_update.html | 10 +- .../okr/key_result/key_result_view.html | 22 +- pms/templates/okr/key_result/kr_card.html | 9 +- .../okr/key_result/kr_dashboard_view.html | 44 +- pms/templates/okr/key_result/kr_filter.html | 4 +- pms/templates/okr/key_result/kr_form.html | 13 +- pms/templates/okr/key_result/kr_list.html | 20 +- pms/templates/okr/key_result/kr_nav.html | 6 +- .../okr/key_result/real_kr_form.html | 8 +- pms/templates/okr/key_result/view_kr.html | 1 - pms/templates/okr/kr_list.html | 34 +- pms/templates/okr/objective_creation.html | 25 +- .../okr/objective_detailed_view.html | 30 +- .../okr/objective_detailed_view_activity.html | 16 +- pms/templates/okr/objective_empty.html | 4 +- pms/templates/okr/objective_list.html | 12 +- pms/templates/okr/objective_list_view.html | 2 +- pms/templates/okr/okr_detailed_view.html | 82 +- pms/templates/okr/okr_list.html | 122 +- pms/templates/okr/okr_nav.html | 2 +- pms/templates/okr/okr_view.html | 8 +- pms/templates/period/period_create.html | 8 +- pms/templates/period/period_empty.html | 10 +- pms/templates/period/period_list.html | 6 +- pms/templates/period/period_update.html | 12 +- pms/templates/period/period_view.html | 4 +- pms/templatetags/pmsfilters.py | 20 +- pms/urls.py | 15 +- pms/views.py | 118 +- recruitment/admin.py | 14 +- recruitment/decorators.py | 1 + recruitment/filters.py | 10 +- recruitment/forms.py | 61 +- recruitment/models.py | 47 +- recruitment/pipeline_grouper.py | 6 +- recruitment/static/candidate/actions.js | 2 +- recruitment/static/dashboard/joiningChart.js | 15 +- recruitment/static/dashboard/vacancyChart.js | 3 - recruitment/static/pipeline/activeTab.js | 12 +- recruitment/static/pipeline/load.js | 1 - recruitment/static/pipeline/pipeline.js | 4 +- recruitment/static/pipeline/pipelineDrag.js | 4 +- recruitment/static/pipeline/recruitment.js | 64 +- recruitment/static/recruitment/pipeline.js | 28 +- .../templates/candidate/application_form.html | 2 +- .../candidate/application_form_component.html | 2 +- .../templates/candidate/candidate_card.html | 9 +- .../templates/candidate/candidate_empty.html | 4 +- .../candidate/candidate_history.html | 6 +- .../templates/candidate/candidate_list.html | 24 +- .../templates/candidate/candidate_nav.html | 18 +- .../candidate/candidate_remark_create.html | 2 +- .../candidate/candidate_update_form.html | 4 +- .../templates/candidate/candidate_view.html | 8 +- recruitment/templates/candidate/filters.html | 2 +- recruitment/templates/candidate/group_by.html | 68 +- .../templates/candidate/individual.html | 42 +- .../templates/candidate/interview_form.html | 18 +- .../templates/candidate/interview_list.html | 34 +- .../templates/candidate/interview_nav.html | 14 +- .../templates/candidate/interview_view.html | 4 +- .../templates/candidate/rating_tab.html | 4 +- .../templates/candidate/self_tracking.html | 2 +- recruitment/templates/candidate/success.html | 2 +- .../dashboard/candidates_per_stage.html | 2 +- .../templates/dashboard/dashboard.html | 28 +- .../templates/offerletter/create_letter.html | 2 +- .../offerletter/empty_mail_template.html | 2 +- .../templates/offerletter/htmx/form.html | 2 +- .../templates/offerletter/view_letter.html | 2 +- .../templates/offerletter/view_templates.html | 8 +- .../components/candidate_stage_component.html | 24 +- .../pipeline_search_components.html | 36 +- .../components/stages_tab_content.html | 11 +- .../templates/pipeline/footer_components.html | 26 +- .../form/recruitment_drop_down_form.html | 1 - .../pipeline/form/recruitment_update.html | 2 +- .../candidate_kanban_components.html | 32 +- .../pipeline/kanban_components/kanban.html | 10 +- .../kanban_stage_components.html | 26 +- recruitment/templates/pipeline/nav.html | 34 +- recruitment/templates/pipeline/pipeline.html | 22 +- .../templates/pipeline/pipeline_card.html | 52 +- .../pipeline_components/add_note.html | 4 +- .../candidate_remark_view.html | 8 +- .../pipeline_components/kanban_tabs.html | 28 +- .../schedule_interview.html | 18 +- .../schedule_interview_update.html | 22 +- .../pipeline_components/send_mail.html | 12 +- .../pipeline_components/view_note.html | 6 +- .../templates/pipeline/pipeline_empty.html | 22 +- .../templates/pipeline/pipeline_tab.html | 16 +- .../templates/pipeline/pipeline_tabs.html | 2 +- recruitment/templates/rating_input.html | 2 +- .../templates/recruitment/filters.html | 7 +- recruitment/templates/recruitment/nav.html | 16 +- .../recruitment/open_recruitments.html | 12 +- .../recruitment/recruitment_component.html | 45 +- .../recruitment/recruitment_create.html | 2 +- .../recruitment/recruitment_details.html | 2 +- .../recruitment_duplicate_form.html | 7 +- .../recruitment/recruitment_empty.html | 14 +- .../recruitment/recruitment_form.html | 2 +- .../recruitment/recruitment_view.html | 2 +- .../recruitment/settings/settings.html | 8 +- recruitment/templates/select2.js | 2 +- .../settings/reject_reason_form.html | 2 +- .../settings/reject_reason_lines.html | 6 +- .../skill_zone/empty_skill_zone.html | 4 +- .../templates/skill_zone/skill_zone_card.html | 24 +- .../skill_zone/skill_zone_create.html | 2 +- .../templates/skill_zone/skill_zone_list.html | 52 +- .../templates/skill_zone/skill_zone_nav.html | 2 +- .../skill_zone/skill_zone_update.html | 4 +- .../templates/skill_zone/skill_zone_view.html | 8 +- .../skill_zone_cand/skill_zone_cand_card.html | 18 +- .../skill_zone_cand/skill_zone_cand_form.html | 10 +- .../skill_zone_cand/skill_zone_cand_list.html | 24 +- .../skill_zone_cand/skill_zone_cand_nav.html | 24 +- .../skill_zone_cand/skill_zone_cand_view.html | 4 +- .../skill_zone_cand/to_skill_zone_form.html | 8 +- recruitment/templates/stage/filters.html | 5 +- recruitment/templates/stage/nav.html | 14 +- .../templates/stage/stage_component.html | 26 +- recruitment/templates/stage/stage_create.html | 2 +- recruitment/templates/stage/stage_group.html | 32 +- recruitment/templates/survey/add_form.html | 2 +- .../survey/candidate-survey-form.html | 6 +- .../survey/candidate_survey_form.html | 4 +- recruitment/templates/survey/form.html | 2 +- recruitment/templates/survey/main_form.html | 2 +- .../question-template-organized-form.html | 6 +- .../question_template_organized_form.html | 6 +- recruitment/templates/survey/survey-card.html | 2 +- .../templates/survey/survey-empty-view.html | 4 +- .../templates/survey/survey-list-view.html | 4 +- recruitment/templates/survey/survey_card.html | 4 +- .../templates/survey/survey_empty_view.html | 4 +- .../templates/survey/template-form.html | 4 +- .../survey/template-update-form.html | 4 +- .../templates/survey/template_accordion.html | 12 +- .../templates/survey/template_form.html | 6 +- .../survey/template_update_form.html | 4 +- .../survey/view-question-templates.html | 2 +- .../survey/view_question_templates.html | 26 +- .../survey/view_single_template.html | 20 +- recruitment/templates/survey_form.html | 10 +- .../templatetags/recruitmentfilters.py | 5 +- recruitment/urls.py | 43 +- recruitment/views.py | 36 +- recruitment/views/actions.py | 18 +- recruitment/views/dashboard.py | 8 +- recruitment/views/mail_templates.py | 5 +- recruitment/views/search.py | 14 +- recruitment/views/surveys.py | 25 +- recruitment/views/views.py | 192 +- static/admin/css/dark_mode.css | 14 +- static/admin/img/gis/move_vertex_off.svg | 2 +- static/admin/img/gis/move_vertex_on.svg | 2 +- static/admin/js/admin/RelatedObjectLookups.js | 4 +- static/admin/js/vendor/select2/i18n/af.js | 2 +- static/admin/js/vendor/select2/i18n/ar.js | 2 +- static/admin/js/vendor/select2/i18n/az.js | 2 +- static/admin/js/vendor/select2/i18n/bg.js | 2 +- static/admin/js/vendor/select2/i18n/bn.js | 2 +- static/admin/js/vendor/select2/i18n/bs.js | 2 +- static/admin/js/vendor/select2/i18n/ca.js | 2 +- static/admin/js/vendor/select2/i18n/cs.js | 2 +- static/admin/js/vendor/select2/i18n/da.js | 2 +- static/admin/js/vendor/select2/i18n/de.js | 2 +- static/admin/js/vendor/select2/i18n/dsb.js | 2 +- static/admin/js/vendor/select2/i18n/el.js | 2 +- static/admin/js/vendor/select2/i18n/en.js | 2 +- static/admin/js/vendor/select2/i18n/es.js | 2 +- static/admin/js/vendor/select2/i18n/et.js | 2 +- static/admin/js/vendor/select2/i18n/eu.js | 2 +- static/admin/js/vendor/select2/i18n/fa.js | 2 +- static/admin/js/vendor/select2/i18n/fi.js | 2 +- static/admin/js/vendor/select2/i18n/fr.js | 2 +- static/admin/js/vendor/select2/i18n/gl.js | 2 +- static/admin/js/vendor/select2/i18n/he.js | 2 +- static/admin/js/vendor/select2/i18n/hi.js | 2 +- static/admin/js/vendor/select2/i18n/hr.js | 2 +- static/admin/js/vendor/select2/i18n/hsb.js | 2 +- static/admin/js/vendor/select2/i18n/hu.js | 2 +- static/admin/js/vendor/select2/i18n/hy.js | 2 +- static/admin/js/vendor/select2/i18n/id.js | 2 +- static/admin/js/vendor/select2/i18n/is.js | 2 +- static/admin/js/vendor/select2/i18n/it.js | 2 +- static/admin/js/vendor/select2/i18n/ja.js | 2 +- static/admin/js/vendor/select2/i18n/ka.js | 2 +- static/admin/js/vendor/select2/i18n/km.js | 2 +- static/admin/js/vendor/select2/i18n/ko.js | 2 +- static/admin/js/vendor/select2/i18n/lt.js | 2 +- static/admin/js/vendor/select2/i18n/lv.js | 2 +- static/admin/js/vendor/select2/i18n/mk.js | 2 +- static/admin/js/vendor/select2/i18n/ms.js | 2 +- static/admin/js/vendor/select2/i18n/nb.js | 2 +- static/admin/js/vendor/select2/i18n/ne.js | 2 +- static/admin/js/vendor/select2/i18n/nl.js | 2 +- static/admin/js/vendor/select2/i18n/pl.js | 2 +- static/admin/js/vendor/select2/i18n/ps.js | 2 +- static/admin/js/vendor/select2/i18n/pt-BR.js | 2 +- static/admin/js/vendor/select2/i18n/pt.js | 2 +- static/admin/js/vendor/select2/i18n/ro.js | 2 +- static/admin/js/vendor/select2/i18n/ru.js | 2 +- static/admin/js/vendor/select2/i18n/sk.js | 2 +- static/admin/js/vendor/select2/i18n/sl.js | 2 +- static/admin/js/vendor/select2/i18n/sq.js | 2 +- .../admin/js/vendor/select2/i18n/sr-Cyrl.js | 2 +- static/admin/js/vendor/select2/i18n/sr.js | 2 +- static/admin/js/vendor/select2/i18n/sv.js | 2 +- static/admin/js/vendor/select2/i18n/th.js | 2 +- static/admin/js/vendor/select2/i18n/tk.js | 2 +- static/admin/js/vendor/select2/i18n/tr.js | 2 +- static/admin/js/vendor/select2/i18n/uk.js | 2 +- static/admin/js/vendor/select2/i18n/vi.js | 2 +- static/admin/js/vendor/select2/i18n/zh-CN.js | 2 +- static/admin/js/vendor/select2/i18n/zh-TW.js | 2 +- .../js/vendor/select2/select2.full.min.js | 2 +- static/auth/forgot-password.html | 2 +- static/auth/reset.html | 2 +- static/bootstrap/bootsrtap.min.js | 2 +- static/bootstrap/bootstrap.min.css | 2 +- static/build/css/bootstrap.min.css | 2 +- static/build/css/driver.min.css | 24 +- static/build/css/style.min.css | 2 +- static/build/css/styleWidget.css | 2 +- static/build/css/summernote-lite.min.css | 2 +- static/build/js/allowanceWidget.js | 4 +- static/build/js/dashboardDriver.js | 2 +- static/build/js/deductionWidget.js | 6 +- static/build/js/driver.js | 2 +- static/build/js/htmxSelect2.js | 2 +- static/build/js/jquery.min.js | 2 +- static/build/js/moment.js | 2 +- static/build/js/orgChart.js | 2 +- static/build/js/pipelineDriver.js | 2 +- static/build/js/settingsDriver.js | 2 +- static/build/js/styleWidget.js | 2 +- static/build/js/summernote-lite.min.js | 6 +- static/build/js/sweetAlert.js | 2 +- static/build/js/web.frontend.js | 30 +- static/build/js/web.frontend.min.js | 9264 ++++++++--------- static/build/manifest.json | 2 +- static/build/vendor/ionicons/.bin/stencil | 2 +- .../core/compiler/lib.es2015.symbol.d.ts | 2 +- .../compiler/lib.es2016.array.include.d.ts | 2 +- .../@stencil/core/compiler/lib.es2016.d.ts | 2 +- .../core/compiler/lib.es2016.full.d.ts | 2 +- .../core/compiler/lib.es2017.full.d.ts | 2 +- .../compiler/lib.es2018.asynciterable.d.ts | 2 +- .../core/compiler/lib.es2018.full.d.ts | 2 +- .../core/compiler/lib.es2018.regexp.d.ts | 2 +- .../core/compiler/lib.es2020.date.d.ts | 2 +- .../core/compiler/lib.esnext.full.d.ts | 2 +- .../@stencil/core/compiler/stencil.js | 22 +- .../@stencil/core/compiler/stencil.min.js | 2 +- .../ionicons/@stencil/core/dependencies.json | 2 +- .../@stencil/core/dev-server/connector.html | 2 +- .../core/dev-server/open-in-editor-api.js | 2 +- .../dev-server/templates/initial-load.html | 2 +- .../@stencil/core/dev-server/visualstudio.vbs | 4 +- .../ionicons/@stencil/core/dev-server/ws.js | 2 +- .../@stencil/core/dev-server/xdg-open | 4 +- .../internal/client/polyfills/css-shim.js | 2 +- .../client/polyfills/es5-html-element.js | 2 +- .../@stencil/core/internal/hydrate/index.js | 228 +- .../@stencil/core/internal/hydrate/runner.js | 44 +- .../core/internal/hydrate/shadow-css.js | 18 +- .../ionicons/@stencil/core/internal/index.js | 2 +- .../@stencil/core/internal/testing/index.js | 266 +- .../core/internal/testing/shadow-css.js | 18 +- .../vendor/ionicons/@stencil/core/readme.md | 2 +- .../core/screenshot/compare/build/app.css | 2 +- .../core/screenshot/compare/build/app.esm.js | 2 +- .../core/screenshot/compare/build/app.js | 2 +- .../screenshot/compare/build/p-081b0641.js | 2 +- .../compare/build/p-227a1e18.entry.js | 2 +- .../compare/build/p-2c298727.entry.js | 2 +- .../compare/build/p-5479268c.entry.js | 2 +- .../compare/build/p-573ec8a4.entry.js | 2 +- .../compare/build/p-6ba08604.entry.js | 2 +- .../compare/build/p-6bc63295.entry.js | 2 +- .../compare/build/p-7a3759fd.entry.js | 2 +- .../screenshot/compare/build/p-7b4e3ba7.js | 2 +- .../screenshot/compare/build/p-988eb362.css | 2 +- .../screenshot/compare/build/p-9b6a9315.js | 2 +- .../compare/build/p-b4cc611c.entry.js | 2 +- .../compare/build/p-d1bf53f5.entry.js | 2 +- .../screenshot/compare/build/p-e2efe0df.js | 2 +- .../compare/build/p-e8ca6d97.entry.js | 2 +- .../compare/build/p-ec2f13e0.entry.js | 2 +- .../compare/build/p-f0b99977.entry.js | 2 +- .../compare/build/p-f4745c2f.entry.js | 2 +- .../screenshot/compare/build/p-fbbae598.js | 2 +- .../core/screenshot/compare/host.config.json | 2 +- .../core/screenshot/compare/index.html | 2 +- .../core/screenshot/compare/manifest.json | 2 +- .../@stencil/core/sys/node/autoprefixer.js | 2 +- .../ionicons/@stencil/core/sys/node/glob.js | 2 +- .../@stencil/core/sys/node/graceful-fs.js | 2 +- .../ionicons/@stencil/core/sys/node/index.js | 622 +- .../@stencil/core/sys/node/node-fetch.js | 2 +- .../@stencil/core/sys/node/prompts.js | 2 +- .../ionicons/@stencil/core/sys/node/worker.js | 4 +- .../ionicons/@stencil/core/testing/index.js | 406 +- static/css/style.css | 7 +- static/htmx/htmx.min.js | 2 +- static/images/ui/announcement.svg | 2 +- static/images/ui/arrow-right-line.svg | 2 +- static/images/ui/assets.svg | 2 +- static/images/ui/at-circle.svg | 2 +- static/images/ui/attendances.svg | 2 +- static/images/ui/caret-down.svg | 2 +- static/images/ui/cog.svg | 2 +- static/images/ui/dashboard.svg | 2 +- static/images/ui/employees.svg | 2 +- static/images/ui/exciting.svg | 2 +- static/images/ui/exit-outline.svg | 2 +- static/images/ui/filter.svg | 2 +- static/images/ui/grid.svg | 2 +- static/images/ui/happy.svg | 2 +- static/images/ui/headset-solid.svg | 2 +- static/images/ui/leave.svg | 2 +- static/images/ui/menu.svg | 2 +- static/images/ui/no-announcement.svg | 4 +- static/images/ui/not-found.svg | 2 +- static/images/ui/notification.svg | 2 +- static/images/ui/online_party.svg | 2 +- static/images/ui/pms.svg | 2 +- static/images/ui/recruitment.svg | 2 +- static/images/ui/rocket.svg | 2 +- static/images/ui/search.svg | 2 +- static/images/ui/share.svg | 2 +- static/images/ui/trash.svg | 2 +- static/images/ui/unknown_document.svg | 2 +- static/images/ui/wallet-outline.svg | 2 +- static/index/index.js | 6 +- static/jquery/ajax.js | 2 +- static/jquery/jquery.min.js | 2 +- static/jquery/jqueryui.css | 2 +- static/jquery/jqueryui.js | 4 +- static/pipeline/pipeline.js | 64 +- static/proper/proper.js | 2 +- static/recruitment/candidate.js | 6 +- static/recruitment/recruitment.js | 22 +- static/src/js/index.js | 2 +- static/src/js/modules/dashboard/Calendar.js | 2 +- .../src/js/modules/dashboard/ImageSelect.js | 2 +- static/src/js/modules/dashboard/Inputs.js | 6 +- static/src/js/modules/dashboard/Kanban.js | 10 +- static/src/js/modules/dashboard/LoadLayout.js | 8 +- .../src/js/modules/dashboard/ModalDialog.js | 2 +- .../src/js/modules/dashboard/ResizeInput.js | 4 +- static/src/js/modules/dashboard/Tabs.js | 6 +- static/src/js/modules/dashboard/Tooltip.js | 10 +- static/src/js/modules/vendors/niceSelect.js | 2 - static/src/scss/abstracts/_variables.scss | 10 +- static/src/scss/base/_base.scss | 1 - static/src/scss/base/_fonts.scss | 2 +- static/src/scss/components/_accordion.scss | 4 +- static/src/scss/components/_badges.scss | 2 +- static/src/scss/components/_input.scss | 2 +- static/src/scss/components/_kanban.scss | 2 +- static/src/scss/components/_modal.scss | 4 +- static/src/scss/components/_pagination.scss | 2 +- static/src/scss/components/_profile.scss | 12 +- static/src/scss/components/_progress.scss | 2 +- static/src/scss/components/_sidebar.scss | 2 +- static/src/scss/components/_table.scss | 8 +- static/src/scss/components/_tabs.scss | 2 +- static/src/scss/components/_timeoff.scss | 2 +- static/src/scss/components/_tooltip.scss | 2 +- static/src/scss/layout/_general.scss | 2 - static/src/scss/layout/_header.scss | 4 +- static/src/scss/main.scss | 4 +- static/src/scss/overrides/_datepicker.scss | 2 +- static/src/scss/overrides/_fullcalendar.scss | 2 +- static/src/scss/pages/_auth.scss | 4 +- static/src/scss/pages/_dashboard.scss | 1 - static/src/scss/pages/_feedback.scss | 2 +- static/src/scss/pages/_onboarding.scss | 4 +- static/src/scss/pages/_profile.scss | 2 +- static/src/scss/prepros-6.config | 2 +- static/src/scss/vendors/_normalize.scss | 2 +- static/static/images/ui/assets.svg | 2 +- static/static/images/ui/at-circle.svg | 2 +- static/static/images/ui/attendances.svg | 2 +- static/static/images/ui/caret-down.svg | 2 +- static/static/images/ui/cog.svg | 2 +- static/static/images/ui/dashboard.svg | 2 +- static/static/images/ui/employees.svg | 2 +- static/static/images/ui/exciting.svg | 2 +- static/static/images/ui/filter.svg | 2 +- static/static/images/ui/grid.svg | 2 +- static/static/images/ui/happy.svg | 2 +- static/static/images/ui/leave.svg | 2 +- static/static/images/ui/menu.svg | 2 +- static/static/images/ui/notification.svg | 2 +- static/static/images/ui/online_party.svg | 2 +- static/static/images/ui/pms.svg | 2 +- static/static/images/ui/recruitment.svg | 2 +- static/static/images/ui/rocket.svg | 2 +- static/static/images/ui/search.svg | 2 +- static/static/images/ui/share.svg | 2 +- static/static/images/ui/trash.svg | 2 +- templates/404.html | 4 +- templates/animation.html | 2 +- templates/announcement_single_view.html | 4 +- templates/dashboard.html | 38 +- templates/filter_tags.html | 12 +- templates/forgot_password.html | 2 +- templates/index.html | 40 +- templates/navbar.html | 6 +- templates/no_perm.html | 4 +- templates/notification/all_notifications.html | 18 +- templates/notification/notification.html | 10 +- .../notification/notification_items.html | 8 +- templates/quick_access.html | 14 +- templates/reset_password.html | 8 +- templates/sidebar.html | 20 +- templates/went_wrong.html | 4 +- 1117 files changed, 11976 insertions(+), 11690 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.env.dist b/.env.dist index aceac6503..962d763d8 100644 --- a/.env.dist +++ b/.env.dist @@ -13,7 +13,7 @@ DATABASE_URL=postgresql://user:password@localhost:5432/dbname # ----OR---- -# Database Configuration +# Database Configuration DB_ENGINE=django.db.backends.postgresql DB_NAME=dbname @@ -37,5 +37,3 @@ DB_PORT=5432 # PyODBC: ``pyodbc://`` # Amazon Redshift: ``redshift://`` # LDAP: ``ldap://`` - - diff --git a/.gitignore b/.gitignore index 29928e258..8d9efc133 100755 --- a/.gitignore +++ b/.gitignore @@ -127,7 +127,7 @@ dmypy.json # Pyre type checker .pyre/ -*.pyc +*.pyc # migration files **/migrations/** diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..3f3506d38 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,17 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.4.2 + hooks: + - id: black + language_version: python3.10 + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + args: ["--profile", "black", "--filter-files"] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5750bd7dc..70debc569 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing Guidelines for Horilla +# Contributing Guidelines for Horilla Thank you for considering contributing to Horilla! We welcome your input and appreciate the community effort to make this project even better. @@ -28,7 +28,7 @@ Thank you for considering contributing to Horilla! We welcome your input and app - Commit your changes with a clear and descriptive commit message. ```bash - git commit -m "Add feature X" + git commit -m "Add feature X" ``` 6. **Push Changes:** diff --git a/Dockerfile b/Dockerfile index a6d820a1b..b8458bb8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,4 @@ RUN pip install -r requirements.txt EXPOSE 8000 -CMD ["python3", "manage.py", "runserver"] \ No newline at end of file +CMD ["python3", "manage.py", "runserver"] diff --git a/README.md b/README.md index 30a0d2c8f..6b792f69c 100755 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ This should output the version number of Python that you just installed. To install Python on Windows, follow these steps: 1. Download the latest version of Python from the official website: https://www.python.org/downloads/windows/ . -2. Run the installer and select "Add Python to PATH" during the installation process. +2. Run the installer and select "Add Python to PATH" during the installation process. 3. Choose the installation directory and complete the installation process. 4. To check if Python is installed correctly, open the Command Prompt and type the following command: ```bash @@ -44,7 +44,7 @@ This should output the version number of Python that you just installed. **macOS** -macOS comes with Python pre-installed, but if you need to install a specific version or if Python is not installed, you can use Homebrew to install it. +macOS comes with Python pre-installed, but if you need to install a specific version or if Python is not installed, you can use Homebrew to install it. Follow these steps: 1. Install Homebrew by running the following command in the terminal: @@ -67,12 +67,12 @@ Congratulations, you have successfully installed Python on Ubuntu, Windows, or m ### **Installing Django** ___ -Before installing Django, you must have Python installed on your machine. +Before installing Django, you must have Python installed on your machine. To install Django, follow the following steps: 1. Create a virtual environment: -It is highly recommended to create a virtual environment before installing Django. +It is highly recommended to create a virtual environment before installing Django. A virtual environment allows you to isolate your Python environment and avoid conflicts with other Python packages that may be installed on your machine. @@ -109,7 +109,7 @@ python -m django --version ``` This should output the version number of Django that you just installed. -Congratulations, you have successfully installed Django on your machine! +Congratulations, you have successfully installed Django on your machine! You can now start building web applications using Django. ### **Installing Horilla** @@ -163,12 +163,12 @@ python manage.py runserver ``` If everything is configured correctly, you should be able to access your Horilla app at http://localhost:8000. ->Note: +>Note: >>If you wish to run the Horilla application to any other port, you can specify the port number after the runserver command. >>eg: *python manage.py runserver * ->Note: +>Note: >>By default a SQLite database will be setup for the project with demo data already loaded. >>If you wish to start with a fresh database, remove the db.sqlite3 file from the project directory and run the migrate command followed by the createhorillauser command to start with a fresh database. @@ -271,7 +271,7 @@ python manage.py migrate >*Note that SQLite has some limitations compared to other databases, so you may need to consider these limitations if you have a large amount of data or a high level of concurrency in your application.* For more details: -[Django SQLite Database](https://docs.djangoproject.com/en/4.2/ref/databases/#sqlite-notes) +[Django SQLite Database](https://docs.djangoproject.com/en/4.2/ref/databases/#sqlite-notes) **Oracle** diff --git a/asset/admin.py b/asset/admin.py index 7e64235b2..dc0e7e986 100644 --- a/asset/admin.py +++ b/asset/admin.py @@ -11,14 +11,15 @@ Models Registered: """ from django.contrib import admin + from .models import ( Asset, + AssetAssignment, AssetCategory, AssetDocuments, + AssetLot, AssetReport, AssetRequest, - AssetAssignment, - AssetLot, ) # Register your models here. diff --git a/asset/filters.py b/asset/filters.py index 01f6ea72b..70f040403 100644 --- a/asset/filters.py +++ b/asset/filters.py @@ -3,13 +3,15 @@ Module containing custom filter classes for various models. """ import uuid + import django_filters from django import forms from django_filters import FilterSet -from horilla.filters import filter_by_name -from .models import Asset, AssetAssignment, AssetCategory, AssetRequest from base.methods import reload_queryset +from horilla.filters import filter_by_name + +from .models import Asset, AssetAssignment, AssetCategory, AssetRequest class CustomFilterSet(FilterSet): @@ -140,7 +142,9 @@ class AssetRequestFilter(CustomFilterSet): """ Custom filter set for AssetRequest instances. """ + search = django_filters.CharFilter(method="search_method") + def search_method(self, queryset, _, value: str): """ This method is used to search employees @@ -180,7 +184,9 @@ class AssetAllocationFilter(CustomFilterSet): """ Custom filter set for AssetAllocation instances. """ + search = django_filters.CharFilter(method="search_method") + def search_method(self, queryset, _, value: str): """ This method is used to search employees diff --git a/asset/forms.py b/asset/forms.py index 3f86b574c..c08fd40c5 100644 --- a/asset/forms.py +++ b/asset/forms.py @@ -6,25 +6,27 @@ This module contains Django ModelForms for handling various aspects of asset man including asset creation, allocation, return, category assignment, and batch handling. """ -from datetime import date import uuid +from datetime import date + from django import forms -from base.forms import ModelForm from django.core.exceptions import ValidationError +from django.template.loader import render_to_string from django.utils.translation import gettext_lazy as _ -from employee.forms import MultipleFileField -from employee.models import Employee + from asset.models import ( Asset, - AssetDocuments, - AssetReport, - AssetRequest, AssetAssignment, AssetCategory, + AssetDocuments, AssetLot, + AssetReport, + AssetRequest, ) +from base.forms import ModelForm from base.methods import reload_queryset -from django.template.loader import render_to_string +from employee.forms import MultipleFileField +from employee.models import Employee def set_date_field_initial(instance): @@ -92,7 +94,7 @@ class AssetForm(ModelForm): attrs={ "class": "oh-select oh-select-2 select2-hidden-accessible ", "placeholder": "LOT001", - "onchange": "batchNoChange($(this))" + "onchange": "batchNoChange($(this))", } ), } @@ -108,13 +110,15 @@ class AssetForm(ModelForm): {"id": str(uuid.uuid4())} ) self.fields["asset_status"].widget.attrs.update({"id": str(uuid.uuid4())}) - + batch_no_choices = [("", _("---Choose Batch No.---"))] + list( self.fields["asset_lot_number_id"].queryset.values_list("id", "lot_number") ) self.fields["asset_lot_number_id"].choices = batch_no_choices if self.instance.pk is None: - self.fields["asset_lot_number_id"].choices += [("create", _("Create new batch number"))] + self.fields["asset_lot_number_id"].choices += [ + ("create", _("Create new batch number")) + ] def clean(self): instance = self.instance @@ -173,7 +177,7 @@ class AssetReportForm(ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.fields['asset_id'].widget.attrs['disabled'] = 'disabled' + self.fields["asset_id"].widget.attrs["disabled"] = "disabled" class AssetCategoryForm(ModelForm): diff --git a/asset/models.py b/asset/models.py index 567643e53..26ee9533a 100644 --- a/asset/models.py +++ b/asset/models.py @@ -5,13 +5,14 @@ This module defines Django models to manage assets, their categories, assigning, within an Asset Management System. """ -from django.db import models from django.core.exceptions import ValidationError +from django.db import models from django.utils.translation import gettext_lazy as _ -from horilla.models import HorillaModel -from base.models import Company + from base.horilla_company_manager import HorillaCompanyManager +from base.models import Company from employee.models import Employee +from horilla.models import HorillaModel class AssetCategory(HorillaModel): diff --git a/asset/resources.py b/asset/resources.py index ae2cf6d05..c003d9ba9 100644 --- a/asset/resources.py +++ b/asset/resources.py @@ -4,6 +4,7 @@ This module defines classes for handling resources related to assets. """ from import_export import resources + from .models import Asset diff --git a/asset/scheduler.py b/asset/scheduler.py index 0db6bc9f8..fabf125a3 100644 --- a/asset/scheduler.py +++ b/asset/scheduler.py @@ -5,7 +5,9 @@ This module is used to register scheduled tasks """ from datetime import date, timedelta + from apscheduler.schedulers.background import BackgroundScheduler + from notifications.signals import notify @@ -14,6 +16,7 @@ def notify_expiring_assets(): Finds all Expiring Assets and send a notification on the notify_before date. """ from django.contrib.auth.models import User + from asset.models import Asset today = date.today() @@ -45,6 +48,7 @@ def notify_expiring_documents(): Finds all Expiring Documents and send a notification on the notify_before date. """ from django.contrib.auth.models import User + from horilla_documents.models import Document today = date.today() diff --git a/asset/static/src/asset/dashboard.js b/asset/static/src/asset/dashboard.js index 48eefe47b..6d6452ed7 100644 --- a/asset/static/src/asset/dashboard.js +++ b/asset/static/src/asset/dashboard.js @@ -18,7 +18,7 @@ $(document).ready(function() { }); } } - + function asset_category_chart(dataSet) { var Asset_category_chart = document.getElementById("assetCategoryChart"); if (Asset_category_chart){ @@ -50,7 +50,7 @@ $(document).ready(function() { console.log("Error", error); }, }); - + $.ajax({ type: "GET", url: "/asset/asset-category-chart", @@ -102,4 +102,3 @@ function emptyAssetAvialabeChart(assetAvailableChartChart,args,options){ }; } } - diff --git a/asset/templates/asset/asset_creation.html b/asset/templates/asset/asset_creation.html index b98024cdb..a733f209b 100644 --- a/asset/templates/asset/asset_creation.html +++ b/asset/templates/asset/asset_creation.html @@ -1,4 +1,4 @@ -{% load static i18n %} {% load i18n %} {% load widget_tweaks %} +{% load static i18n %} {% load i18n %} {% load widget_tweaks %} {% if asset_creation_form.asset_category_id.initial %} {% if messages %} @@ -165,4 +165,4 @@ }) }) - \ No newline at end of file + diff --git a/asset/templates/asset/asset_information.html b/asset/templates/asset/asset_information.html index 43ba7afe1..74954c715 100644 --- a/asset/templates/asset/asset_information.html +++ b/asset/templates/asset/asset_information.html @@ -86,7 +86,7 @@
{% for report in asset.asset_report.all %} -
  • +
  • {{report.title}}
    {% for doc in report.documents.all %} @@ -96,17 +96,17 @@
  • {% endfor %} -
    + {% endif %} - \ No newline at end of file + diff --git a/asset/templates/asset/asset_list.html b/asset/templates/asset/asset_list.html index 7041cfd3b..c5e143476 100644 --- a/asset/templates/asset/asset_list.html +++ b/asset/templates/asset/asset_list.html @@ -30,11 +30,11 @@
    {% for asset in assets %} -
    @@ -54,60 +54,60 @@ {% if perms.asset.change_asset or perms.asset.delete_asset %}
    {% if asset_under == 'asset_filter' %} - + id="oh-btn-asset-update-modal"> {% if asset.assetassignment_set.all %} - + title='{% trans "Asset Report" %}'> {% else %} - + title='{% trans "Asset Report" %}'> {% endif %} -
    {% csrf_token %} -
    {% else %} {% if perms.asset.change_asset %} - + id="oh-btn-asset-update-modal"> - {% endif %} {% if asset.assetassignment_set.all %} - + title='{% trans "Asset Report" %}'> {% else %} - + title='{% trans "Asset Report" %}'> {% endif %} {% if perms.asset.delete_asset %} -
    {% csrf_token %} -
    @@ -205,7 +205,7 @@ \ No newline at end of file + diff --git a/asset/templates/asset/asset_report_form.html b/asset/templates/asset/asset_report_form.html index 4554a8b99..f8e1a2413 100644 --- a/asset/templates/asset/asset_report_form.html +++ b/asset/templates/asset/asset_report_form.html @@ -7,7 +7,7 @@ hx-swap="innerHTML" method="post" hx-encoding="multipart/form-data" -> +> {% csrf_token %}
    @@ -31,7 +31,7 @@ {% comment %} {{ asset_report_form.as_p }} {% endcomment %}
    - +
    - \ No newline at end of file + diff --git a/asset/templates/asset/asset_return_form.html b/asset/templates/asset/asset_return_form.html index 52871a906..341044e4a 100644 --- a/asset/templates/asset/asset_return_form.html +++ b/asset/templates/asset/asset_return_form.html @@ -34,7 +34,7 @@ {{asset_return_form.return_images}}
    - + {% if perms.payroll.add_loanaccount %} - + {% endif %}
    -
    \ No newline at end of file +
    diff --git a/asset/templates/asset/asset_update.html b/asset/templates/asset/asset_update.html index ce4aabd3e..ecc745b41 100644 --- a/asset/templates/asset/asset_update.html +++ b/asset/templates/asset/asset_update.html @@ -1,4 +1,4 @@ -{% load static i18n %} +{% load static i18n %} {% if asset_form.instance.id %} {% if messages %} @@ -10,7 +10,7 @@
    {% endfor %} - \ No newline at end of file + diff --git a/asset/templates/asset/dashboard.html b/asset/templates/asset/dashboard.html index d952670f3..9272f9482 100644 --- a/asset/templates/asset/dashboard.html +++ b/asset/templates/asset/dashboard.html @@ -1,4 +1,4 @@ -{% extends 'index.html' %} +{% extends 'index.html' %} {% block content %} {% load static i18n %} {% load i18n %} @@ -70,10 +70,10 @@ - +
    - +
    @@ -83,7 +83,7 @@
    -
    +
    @@ -102,7 +102,7 @@
    - +
    @@ -112,8 +112,8 @@
    -
    - + +
    @@ -122,12 +122,12 @@
    {% if asset_allocations %} {% include "asset/dashboard_allocated_assets.html" %} - {% else %} + {% else %}
    Page not found. 404.
    {% trans "There is no asset allocation at this moment." %}
    - + {% endif %}
    @@ -138,4 +138,4 @@ -{% endblock content %} \ No newline at end of file +{% endblock content %} diff --git a/asset/templates/asset/dashboard_allocated_assets.html b/asset/templates/asset/dashboard_allocated_assets.html index 99f4b9df8..7f621ffb6 100644 --- a/asset/templates/asset/dashboard_allocated_assets.html +++ b/asset/templates/asset/dashboard_allocated_assets.html @@ -44,4 +44,4 @@ {% endfor %}
    - \ No newline at end of file + diff --git a/asset/templates/asset/dashboard_asset_requests.html b/asset/templates/asset/dashboard_asset_requests.html index 9dd38369b..5cb3db0d1 100644 --- a/asset/templates/asset/dashboard_asset_requests.html +++ b/asset/templates/asset/dashboard_asset_requests.html @@ -53,7 +53,7 @@ > - {% if perms.asset.add_assetassignment %} + {% if perms.asset.add_assetassignment %} {% if asset_request.asset_request_status == 'Requested' %}
    @@ -89,4 +89,4 @@ {% endfor %}
    - \ No newline at end of file + diff --git a/asset/templates/asset_history/asset_history_filter.html b/asset/templates/asset_history/asset_history_filter.html index a725d282f..e1603176d 100644 --- a/asset/templates/asset_history/asset_history_filter.html +++ b/asset/templates/asset_history/asset_history_filter.html @@ -84,7 +84,7 @@ {{f.form.assigned_date_gte}} - +
    {% endfor %}
    @@ -56,7 +56,7 @@
    {% trans "Page" %} {{ asset_assignments.number }} {% trans "of" %} {{ asset_assignments.paginator.num_pages }}. - +
    {% endfor %} - -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/asset/templates/category/asset_empty.html b/asset/templates/category/asset_empty.html index 18d8679ce..2e7402bdc 100644 --- a/asset/templates/category/asset_empty.html +++ b/asset/templates/category/asset_empty.html @@ -45,7 +45,7 @@
    - + @@ -73,11 +73,11 @@
    {% if perms.asset.add_assetcategory %}
    - + hx-target="#objectCreateModalTarget"> {% trans "Create" %} @@ -103,4 +103,4 @@ class="oh-wrapper-main"
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/asset/templates/future_update/asset_list_view.html b/asset/templates/future_update/asset_list_view.html index 04ef97c93..585c692ea 100644 --- a/asset/templates/future_update/asset_list_view.html +++ b/asset/templates/future_update/asset_list_view.html @@ -45,11 +45,11 @@ @@ -139,7 +139,7 @@
    {% for asset in assets %} - +
    @@ -156,8 +156,8 @@
    {{asset.asset_lot_number_id}}
    - - + + @@ -165,8 +165,8 @@ hx-confirm="Do you want to delete this asset?" class="oh-btn oh-btn--danger-outline oh-btn--light-bkg w-100 asset-delete" title="{% trans 'Remove' %}" data-category-id="{{asset.asset_category_id.id}}"> - - + +
    @@ -221,4 +221,4 @@ -{% endblock %} {% endcomment %} \ No newline at end of file +{% endblock %} {% endcomment %} diff --git a/asset/templates/request_allocation/asset_request_allocation_list.html b/asset/templates/request_allocation/asset_request_allocation_list.html index ffe3d67b0..11479d132 100644 --- a/asset/templates/request_allocation/asset_request_allocation_list.html +++ b/asset/templates/request_allocation/asset_request_allocation_list.html @@ -135,7 +135,7 @@ >{% trans "Previous" %} - {%endif %} + {%endif %} {% if assets.has_next %}
  • Page not found. 404.
    {% trans "No assets have been assigned to you." %}
    -
  • +
    {% endif %}
    @@ -201,7 +201,7 @@ hx-target="#asset_request_allocation_list" data-cell-index="102" data-cell-title='{% trans "Request Date" %}' >{% trans "Request Date" %}
    {% trans "Status" %}
    - {% if perms.asset.add_assetassignment %} + {% if perms.asset.add_assetassignment %}
    {% trans "Confirmation" %}
    {% endif %} @@ -249,7 +249,7 @@ > - {% if perms.asset.add_assetassignment %} + {% if perms.asset.add_assetassignment %} {% if asset_request.asset_request_status == 'Requested' %}
    - + @@ -154,17 +154,17 @@ link-info {% endif %} ">{% trans asset_request.asset_request_status %} - + - {% if perms.asset.add_assetassignment %} + {% if perms.asset.add_assetassignment %} {% if asset_request.asset_request_status == 'Requested' %}
    - + @@ -172,7 +172,7 @@ - +
    {% else %} @@ -186,7 +186,7 @@ title='{% trans "Approve" %}' > - + - + - + {% endif %} {% endif %} - +
    - +
    - +
    {{asset_request.requested_employee_id}}
    - +
    {% trans "Requested Date" %} @@ -238,7 +238,7 @@ {{asset_request.asset_category_id}}
    - +
    {% trans "Request Description" %} @@ -248,9 +248,9 @@
    - + {% endfor %} - +
    @@ -276,7 +276,7 @@ {% if request_list.list.has_previous or request_list.list.has_next %}
    - {% trans "Page" %} {{ request_list.list.number }} + {% trans "Page" %} {{ request_list.list.number }} {%trans "of" %} {{request_list.list.paginator.num_pages }}.
    @@ -402,10 +402,10 @@ link-info {% endif %} ">{% trans asset_request.asset_request_status %} - + - {% if perms.asset.add_assetassignment %} + {% if perms.asset.add_assetassignment %} {% if asset_request.asset_request_status == 'Requested' %}
    @@ -419,7 +419,7 @@ - +
    {% else %} @@ -433,7 +433,7 @@ title='{% trans "Approve" %}' > - +
    - + - + {% endif %} {% endif %} - +
    - +
    - +
    {{asset_request.requested_employee_id}}
    - +
    {% trans "Requested Date" %} @@ -485,7 +485,7 @@ {{asset_request.asset_category_id}}
    - +
    {% trans "Request Description" %} @@ -495,9 +495,9 @@
    - + {% endfor %} - +
    @@ -561,7 +561,7 @@
    - {% if allocation_field %} + {% if allocation_field %}
    {% for allocation_list in asset_allocations %}
    @@ -630,7 +630,7 @@
    {% endif %}
    - +
    - +
    - +
    {{asset_allocation.assigned_to_employee_id}}
    - +
    {% trans "Returned Status" %} @@ -664,7 +664,7 @@ {{asset_allocation.assigned_by_employee_id}}
    - +
    {% trans "Allocated Date" %} @@ -673,15 +673,15 @@
    {% trans "Returned Date" %} {{asset_allocation.return_date}} -
    +
    {% trans "Asset" %} {{asset_allocation.asset_id}} -
    +
    - +
    {% trans "Return Description" %} @@ -691,15 +691,15 @@
    - + {% endfor %} - +
    @@ -732,7 +732,7 @@
    - {% trans "Page" %} {{ allocation_list.list.number }} + {% trans "Page" %} {{ allocation_list.list.number }} {%trans "of" %} {{allocation_list.list.paginator.num_pages }}.
    {% endif %} - +
    - +
    - +
    {{asset_allocation.assigned_to_employee_id}}
    - +
    {% trans "Returned Status" %} @@ -891,7 +891,7 @@ {{asset_allocation.assigned_by_employee_id}}
    - +
    {% trans "Allocated Date" %} @@ -900,15 +900,15 @@
    {% trans "Returned Date" %} {{asset_allocation.return_date}} -
    +
    {% trans "Asset" %} {{asset_allocation.asset_id}} -
    +
    - +
    {% trans "Return Description" %} @@ -918,15 +918,15 @@
    - + {% endfor %} - +
    @@ -1013,4 +1013,4 @@ localStorage.setItem('activeTabPms', activeTab) }); }); - \ No newline at end of file + diff --git a/asset/templates/request_allocation/individual allocation.html b/asset/templates/request_allocation/individual allocation.html index 88311afde..b38fce453 100644 --- a/asset/templates/request_allocation/individual allocation.html +++ b/asset/templates/request_allocation/individual allocation.html @@ -12,7 +12,7 @@ aria-label="chevron back outline" > - +
    - + {% else %} -
    @@ -209,7 +209,7 @@
    + > {% csrf_token %}
    {% else %} -
    {% endif %} -
    @@ -86,15 +86,15 @@ {% trans "Weekly every" %} {{instance.rotate_every_weekend}} {% elif instance.based_on == "monthly" %} {% if instance.rotate_every == "1" %} - {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "st day of month" %} + {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "st day of month" %} {% elif instance.rotate_every == "2" %} - {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "nd day of month" %} + {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "nd day of month" %} {% elif instance.rotate_every == "3" %} - {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "rd day of month" %} + {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "rd day of month" %} {% elif instance.rotate_every == "last" %} - {% trans "Rotate every last day of month" %} + {% trans "Rotate every last day of month" %} {% else %} - {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "th day of month" %} + {% trans "Rotate every" %} {{instance.rotate_every}}{% trans "th day of month" %} {% endif %} {% endif %} @@ -116,7 +116,7 @@
    - +
    {% endif %} diff --git a/base/templates/base/rotating_work_type/rotating_work_type.html b/base/templates/base/rotating_work_type/rotating_work_type.html index 9c75b0719..d4bfc3f7a 100644 --- a/base/templates/base/rotating_work_type/rotating_work_type.html +++ b/base/templates/base/rotating_work_type/rotating_work_type.html @@ -51,4 +51,4 @@ -{% endblock settings %} \ No newline at end of file +{% endblock settings %} diff --git a/base/templates/base/rotating_work_type/rotating_work_type_assign.html b/base/templates/base/rotating_work_type/rotating_work_type_assign.html index 02cad1970..e2cb7a15a 100644 --- a/base/templates/base/rotating_work_type/rotating_work_type_assign.html +++ b/base/templates/base/rotating_work_type/rotating_work_type_assign.html @@ -16,8 +16,8 @@
    - {% if rwork_type_assign %} - {% include 'base/rotating_work_type/rotating_work_type_assign_view.html' %} + {% if rwork_type_assign %} + {% include 'base/rotating_work_type/rotating_work_type_assign_view.html' %} {% else %} {% include "base/rotating_work_type/rotating_work_type_assign_empty.html" %} {% endif %} diff --git a/base/templates/base/rotating_work_type/rotating_work_type_assign_nav.html b/base/templates/base/rotating_work_type/rotating_work_type_assign_nav.html index 5e28d1357..6c29dd800 100644 --- a/base/templates/base/rotating_work_type/rotating_work_type_assign_nav.html +++ b/base/templates/base/rotating_work_type/rotating_work_type_assign_nav.html @@ -68,7 +68,7 @@ x-show="open" @click.outside="open = false" style="display: none" - > + >
    @@ -130,7 +130,7 @@ >{% trans "Archive" %} - {% endif %} + {% endif %} {% if perms.base.change_rotatingworktypeassign or request.user|is_reportingmanager %}
  • {% trans "Un-Archive" %}
  • - {% endif %} + {% endif %} {% if request.user|is_reportingmanager %}
  • @@ -146,13 +146,13 @@ > - @@ -160,7 +160,7 @@ {% endif %} {% if perms.base.change_rotatingworktypeassign or request.user|is_reportingmanager %} {% if rwork_type.is_active %} -
    {% else %} -
  • -{% endblock settings %} \ No newline at end of file +{% endblock settings %} diff --git a/base/templates/base/shift/schedule_form.html b/base/templates/base/shift/schedule_form.html index c7c99be18..9ba757202 100644 --- a/base/templates/base/shift/schedule_form.html +++ b/base/templates/base/shift/schedule_form.html @@ -1,6 +1,6 @@ {% load i18n %} - - \ No newline at end of file + diff --git a/base/templates/base/shift/schedule_view.html b/base/templates/base/shift/schedule_view.html index be4ef7a1a..4a0571f50 100644 --- a/base/templates/base/shift/schedule_view.html +++ b/base/templates/base/shift/schedule_view.html @@ -38,7 +38,7 @@
    - {{shift.employeeshiftschedule_set.all|length}} + {{shift.employeeshiftschedule_set.all|length}} {% trans "Schedules" %} {% for schedule in shift.employeeshiftschedule_set.all %} @@ -70,11 +70,11 @@
    - {% endif %} + {% endif %} {% if perms.base.delete_employeeshiftschedule %}
    - {% include 'base/shift/shift_view.html' %} + {% include 'base/shift/shift_view.html' %} {% endif %}
    diff --git a/base/templates/base/shift/shift_view.html b/base/templates/base/shift/shift_view.html index c8dcbaecd..6415513c9 100644 --- a/base/templates/base/shift/shift_view.html +++ b/base/templates/base/shift/shift_view.html @@ -40,11 +40,11 @@ > - {% endif %} - {% if perms.base.delete_employeeshift %} + {% endif %} + {% if perms.base.delete_employeeshift %} + method='post'> {% csrf_token %}
    {% if employeetags %} - {% include 'base/employee_tag/employee_tag_view.html' %} + {% include 'base/employee_tag/employee_tag_view.html' %} {% else %}
    Page not found. 404. @@ -78,4 +78,4 @@ -{% endblock settings %} \ No newline at end of file +{% endblock settings %} diff --git a/base/templates/base/tags/helpdesk_tags.html b/base/templates/base/tags/helpdesk_tags.html index df79551fa..b4f7905ce 100644 --- a/base/templates/base/tags/helpdesk_tags.html +++ b/base/templates/base/tags/helpdesk_tags.html @@ -13,7 +13,7 @@ class="oh-btn oh-btn--secondary oh-btn--shadow" data-toggle="oh-modal-toggle" data-target="#tagModal" - hx-get="{% url 'tag-create' %}" + hx-get="{% url 'tag-create' %}" hx-target="#tagForm" > @@ -22,7 +22,7 @@ {% endif %}
    {% if tags %} - {% include 'base/tags/tags_view.html' %} + {% include 'base/tags/tags_view.html' %} {% else %}
    Page not found. 404. @@ -79,4 +79,4 @@ -{% endblock settings %} \ No newline at end of file +{% endblock settings %} diff --git a/base/templates/base/tags/tags.html b/base/templates/base/tags/tags.html index fbd250246..7ec1e7d59 100644 --- a/base/templates/base/tags/tags.html +++ b/base/templates/base/tags/tags.html @@ -14,7 +14,7 @@ class="oh-btn oh-btn--secondary oh-btn--shadow" data-toggle="oh-modal-toggle" data-target="#audittagModal" - hx-get="{% url 'audit-tag-create' %}" + hx-get="{% url 'audit-tag-create' %}" hx-target="#audittagForm" > @@ -23,7 +23,7 @@ {% endif %}
    {% if audittags %} - {% include 'base/audit_tag/audit_tag_view.html' %} + {% include 'base/audit_tag/audit_tag_view.html' %} {% else %}
    Page not found. 404. @@ -78,4 +78,4 @@
    -{% endblock settings %} \ No newline at end of file +{% endblock settings %} diff --git a/base/templates/base/tags/tags_form.html b/base/templates/base/tags/tags_form.html index f6e2a843b..bd01feafa 100644 --- a/base/templates/base/tags/tags_form.html +++ b/base/templates/base/tags/tags_form.html @@ -11,14 +11,14 @@ {% endif %} - {% csrf_token %} {{form.as_p}} @@ -27,4 +27,4 @@ {% trans "Save" %} - \ No newline at end of file + diff --git a/base/templates/base/tags/tags_view.html b/base/templates/base/tags/tags_view.html index 6220bf3a1..8d86ebc1b 100644 --- a/base/templates/base/tags/tags_view.html +++ b/base/templates/base/tags/tags_view.html @@ -5,7 +5,7 @@
    {% trans "Title" %}
    {% trans "Color" %}
    - {% if perms.base.delete_tags or perms.base.delete_tags %} + {% if perms.base.delete_tags or perms.base.delete_tags %}
    {% trans "Actions" %}
    {% endif %}
    @@ -15,7 +15,7 @@
    {{tag}}
    -
    - {% if perms.base.delete_tags or perms.base.delete_tags %} + {% if perms.base.delete_tags or perms.base.delete_tags %}
    {% if perms.base.change_tags %} - {% endif %} - {% if perms.base.delete_tags %} -
    + {% endif %} + {% if perms.base.delete_tags %} + {% csrf_token %}
    {% if ticket_types %} - {% include 'base/ticket_type/ticket_type_view.html' %} + {% include 'base/ticket_type/ticket_type_view.html' %} {% else %}
    Page not found. 404. @@ -75,4 +75,4 @@
    -{% endblock settings %} \ No newline at end of file +{% endblock settings %} diff --git a/base/templates/base/ticket_type/ticket_type_view.html b/base/templates/base/ticket_type/ticket_type_view.html index aa9e405a7..f214468c9 100644 --- a/base/templates/base/ticket_type/ticket_type_view.html +++ b/base/templates/base/ticket_type/ticket_type_view.html @@ -6,7 +6,7 @@
    {% trans "Ticket Type" %}
    {% trans "Type" %}
    {% trans "Prefix" %}
    - {% if perms.helpdesk.delete_tickettype or perms.helpdesk.delete_tickettype %} + {% if perms.helpdesk.delete_tickettype or perms.helpdesk.delete_tickettype %}
    {% trans "Actions" %}
    {% endif %}
    @@ -17,12 +17,12 @@
    {{t_type}}
    {{t_type.get_type_display}}
    {{t_type.prefix}}
    - {% if perms.helpdesk.delete_tickettype or perms.helpdesk.delete_tickettype %} + {% if perms.helpdesk.delete_tickettype or perms.helpdesk.delete_tickettype %}
    {% if perms.helpdesk.change_tickettype %} - {% endif %} - {% if perms.helpdesk.delete_tickettype %} - + {% endif %} + {% if perms.helpdesk.delete_tickettype %} + {% csrf_token %}
    - {% endif %} - {% if perms.base.delete_worktype %} - + {% endif %} + {% if perms.base.delete_worktype %} + {% csrf_token %}
    \ No newline at end of file +
    diff --git a/base/templates/request_and_approve/leave_allocation_approve.html b/base/templates/request_and_approve/leave_allocation_approve.html index 73c886a1a..6ff4e077b 100644 --- a/base/templates/request_and_approve/leave_allocation_approve.html +++ b/base/templates/request_and_approve/leave_allocation_approve.html @@ -12,10 +12,10 @@
    {% for leave_allocation_request in allocation_reqests %} - diff --git a/base/templates/shift_request/allocation_request_update_form.html b/base/templates/shift_request/allocation_request_update_form.html index 98f1635f3..8ba44c4dd 100644 --- a/base/templates/shift_request/allocation_request_update_form.html +++ b/base/templates/shift_request/allocation_request_update_form.html @@ -1,6 +1,6 @@ {% load i18n %} {% load static %} - {{form.as_p}} @@ -20,21 +20,21 @@ "shift_id":selectElement }, success: function (response) { - + var reallocateToSelect = parentForm.find("[name=reallocate_to]"); reallocateToSelect.empty(); // Clear existing options - + for (var i = 0; i < response.employee_data.length; i++) { var employee = response.employee_data[i]; - + // Log the values being added - + reallocateToSelect.append(''); } - + } }); - + }); - - \ No newline at end of file + + diff --git a/base/templates/shift_request/htmx/allocation_details.html b/base/templates/shift_request/htmx/allocation_details.html index 906598772..958938714 100644 --- a/base/templates/shift_request/htmx/allocation_details.html +++ b/base/templates/shift_request/htmx/allocation_details.html @@ -15,17 +15,17 @@ {% if request.GET.instances_ids %}
    - -
    {% endif %} -
    @@ -139,7 +139,7 @@ - {% if shift_request.approved == False and shift_request.canceled == False %} + {% if shift_request.approved == False and shift_request.canceled == False %}
    {% csrf_token %} @@ -151,10 +151,10 @@
    {% else %} - {% endif %} + {% endif %} {% endif %}
    - \ No newline at end of file + diff --git a/base/templates/shift_request/htmx/allocation_requests.html b/base/templates/shift_request/htmx/allocation_requests.html index 9fe5e9159..cc79072b8 100644 --- a/base/templates/shift_request/htmx/allocation_requests.html +++ b/base/templates/shift_request/htmx/allocation_requests.html @@ -60,12 +60,12 @@ style="cursor: pointer;" {% for shift_request in data1 %}
    -
    @@ -98,12 +98,12 @@ style="cursor: pointer;"
    {{shift_request.requested_date}}
    {{shift_request.requested_till}}
    {{shift_request.description}}
    - +
    - +
    @@ -113,7 +113,7 @@ style="cursor: pointer;"
    - +
    @@ -123,7 +123,7 @@ style="cursor: pointer;" {% else %} {% endif %} - {% if shift_request.approved == False and shift_request.canceled == False %} + {% if shift_request.approved == False and shift_request.canceled == False %}
    {% csrf_token %} @@ -135,18 +135,18 @@ style="cursor: pointer;"
    {% else %} - {% endif %} + {% endif %}
    {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %} -
    + -
    +
    {% if shift_request.canceled == False %} {% trans "Cancel" %} {% else %} diff --git a/base/templates/shift_request/htmx/comment_view.html b/base/templates/shift_request/htmx/comment_view.html index 0200cd259..4438bb986 100644 --- a/base/templates/shift_request/htmx/comment_view.html +++ b/base/templates/shift_request/htmx/comment_view.html @@ -19,7 +19,7 @@
    {% trans "Comment" %} - +
    @@ -32,14 +32,14 @@
    {% trans "By" %} - {{ comment.employee_id }}
    {% trans "Date & Time" %} - {% trans "on" %}  {{ comment.created_at|date:"F j, Y" }}   + {% trans "on" %}  {{ comment.created_at|date:"F j, Y" }}   {% trans "at" %}   {{ comment.created_at|time:"g:i A" }}
    @@ -48,9 +48,7 @@
    - + {% endfor %} {% endif %} - - diff --git a/base/templates/shift_request/htmx/group_by.html b/base/templates/shift_request/htmx/group_by.html index b1d8288b2..a93bf0240 100644 --- a/base/templates/shift_request/htmx/group_by.html +++ b/base/templates/shift_request/htmx/group_by.html @@ -20,7 +20,7 @@
    -
    +
    @@ -44,7 +44,7 @@
    {% trans "Requested Till" %}
    {% trans "Description" %}
    {% trans "Comment" %}
    -
    {% trans "Actions" %}
    +
    {% trans "Actions" %}
    {% if perms.base.change_shiftrequest and shift_request.approved == False or request.user|is_reportingmanager %}
    {% trans "Confirmation" %}
    {% endif %} @@ -52,15 +52,15 @@
    {% for shift_request in shift_request_list.list %}
    -
    {{shift_request.description|truncatechars:17}}
    - + {% endif %} - - {% if shift_request.approved == False %} + {% if shift_request.approved == False %}
    {% csrf_token %}
    {% else %} - {% endif %} + {% endif %}
    {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %} -
    +
    {% if shift_request.approved == False and shift_request.canceled == False%} - @@ -140,10 +140,10 @@ {% endif %} - + {% if shift_request.canceled == False %} - @@ -168,7 +168,7 @@
    - {% trans "Page" %} {{ shift_request_list.list.number }} + {% trans "Page" %} {{ shift_request_list.list.number }} {%trans "of" %} {{shift_request_list.list.paginator.num_pages }}.
    -
    +
    @@ -338,15 +338,15 @@
    {% for shift_request in shift_request_list.list %}
    -
    {{shift_request.description|truncatechars:17}}
    - + {% endif %} - {% if shift_request.approved == False and shift_request.canceled == False %} + {% if shift_request.approved == False and shift_request.canceled == False %}
    {% csrf_token %} @@ -426,7 +426,7 @@
    {% else %} - {% endif %} + {% endif %}
    {% endif %} @@ -479,7 +479,7 @@ {% else %} {% endif %} - {% if shift_request.approved == False and shift_request.canceled == False %} + {% if shift_request.approved == False and shift_request.canceled == False %}
    {% csrf_token %} @@ -491,7 +491,7 @@
    {% else %} - {% endif %} + {% endif %} {% endif %} @@ -516,10 +516,10 @@
    - +
    - {% trans "Page" %} {{ shift_request_list.list.number }} + {% trans "Page" %} {{ shift_request_list.list.number }} {%trans "of" %} {{shift_request_list.list.paginator.num_pages }}.
    -
    +
    @@ -34,10 +34,10 @@ />
    -
    {% trans "Employee" %}
    @@ -45,12 +45,12 @@
    {% trans "Previous/Current Shift" %}
    {% trans "Requested Date" %}
    {% trans "Requested Till" %}
    {% trans "Description" %}
    @@ -63,15 +63,15 @@
    {% for shift_request in data %} -
    {{shift_request.requested_date}}
    {{shift_request.requested_till}}
    {{shift_request.description|truncatechars:17}}
    - +
    - + - +
    - +
    {% if shift_request.approved == False and not shift_request.canceled %} @@ -115,8 +115,8 @@ {% else %} {% endif %} - - {% if shift_request.approved == False and shift_request.canceled == False %} + {% if shift_request.approved == False and shift_request.canceled == False %}
    {% csrf_token %}
    {% else %} - {% endif %} + {% endif %}
    {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %} -
    +
    {% if shift_request.approved == False and shift_request.canceled == False %} - @@ -152,10 +152,10 @@ {% endif %} - + {% if shift_request.canceled == False %} - @@ -178,7 +178,7 @@
    - +
    @@ -232,11 +232,11 @@
    - {% endif %} + {% endif %}
    - +
    {% if allocated_data %} @@ -252,7 +252,7 @@
    -
    +
    @@ -267,16 +267,16 @@ />
    -
    {% trans "Employee" %}
    -
    @@ -287,12 +287,12 @@
    {% trans "Previous/Current Shift" %}
    {% trans "Requested Date" %}
    {% trans "Requested Till" %}
    {% trans "Description" %}
    @@ -305,15 +305,15 @@
    {% for shift_request in allocated_data %} -
    {{shift_request.requested_date}}
    {{shift_request.requested_till}}
    {{shift_request.description|truncatechars:17}}
    - +
    - + - +
    - + {% if perms.base.change_shiftrequest or request.user|is_reportingmanager %}
    @@ -381,7 +381,7 @@ {% else %} {% endif %} - {% if shift_request.approved == False and shift_request.canceled == False %} + {% if shift_request.approved == False and shift_request.canceled == False %}
    {% csrf_token %} @@ -393,7 +393,7 @@
    {% else %} - {% endif %} + {% endif %}
    {% endif %} @@ -446,14 +446,14 @@ {% else %} {% endif %} - {% if shift_request.approved == False and shift_request.canceled == False %} + {% if shift_request.approved == False and shift_request.canceled == False %}
    {% csrf_token %}
    {% else %} - {% endif %} + {% endif %} {% endif %} @@ -480,7 +480,7 @@
    - +
    @@ -560,7 +560,7 @@
    - + \ No newline at end of file + diff --git a/base/templates/shift_request/htmx/shift_request_comment_form.html b/base/templates/shift_request/htmx/shift_request_comment_form.html index 0c5d1ac9b..52e83fa04 100644 --- a/base/templates/shift_request/htmx/shift_request_comment_form.html +++ b/base/templates/shift_request/htmx/shift_request_comment_form.html @@ -11,10 +11,10 @@
    {% endif %} -
    {% csrf_token %} {{form.as_p}} @@ -24,4 +24,4 @@ > {% trans "Save" %} -
    \ No newline at end of file + diff --git a/base/templates/shift_request/htmx/shift_request_detail.html b/base/templates/shift_request/htmx/shift_request_detail.html index 65f14e990..34655e44b 100644 --- a/base/templates/shift_request/htmx/shift_request_detail.html +++ b/base/templates/shift_request/htmx/shift_request_detail.html @@ -14,24 +14,24 @@
    -
    \ No newline at end of file +
    diff --git a/base/templates/shift_request/request_form.html b/base/templates/shift_request/request_form.html index 4aa1765e8..ae8ec63a0 100644 --- a/base/templates/shift_request/request_form.html +++ b/base/templates/shift_request/request_form.html @@ -2,10 +2,10 @@ {% load static %}
    - + {% csrf_token %}
    {{form.as_p}}
    - +
    diff --git a/base/templates/shift_request/request_update_form.html b/base/templates/shift_request/request_update_form.html index dcc617222..e5c738cf2 100644 --- a/base/templates/shift_request/request_update_form.html +++ b/base/templates/shift_request/request_update_form.html @@ -1,6 +1,6 @@ {% load i18n %} {% load static %} -
    {% comment %}
    {% endcomment %} {{form.as_p}} @@ -22,4 +22,4 @@ }); }) toggleFunctionShiftRequestForm($("#shiftRequestModalUpdateBody #id_is_permanent_shift")); - \ No newline at end of file + diff --git a/base/templates/shift_request/shift_request.html b/base/templates/shift_request/shift_request.html index 335b4f32c..2113bbbee 100644 --- a/base/templates/shift_request/shift_request.html +++ b/base/templates/shift_request/shift_request.html @@ -15,7 +15,7 @@ {% for message in messages %}
    {{ message }} -
    +
    {% endfor %}
    {% endif %} @@ -25,4 +25,4 @@ {{form}} -
    \ No newline at end of file +
    diff --git a/base/templates/shift_request/shift_request_nav.html b/base/templates/shift_request/shift_request_nav.html index 9d8c3b733..06243421b 100644 --- a/base/templates/shift_request/shift_request_nav.html +++ b/base/templates/shift_request/shift_request_nav.html @@ -410,4 +410,3 @@ }); - diff --git a/base/templates/shift_request/shift_request_view.html b/base/templates/shift_request/shift_request_view.html index 6379f03e5..c74b44304 100644 --- a/base/templates/shift_request/shift_request_view.html +++ b/base/templates/shift_request/shift_request_view.html @@ -1,5 +1,5 @@ -{% extends "index.html" %} {% block content %} {% load i18n %} -{% load basefilters %} {% load attendancefilters %} +{% extends "index.html" %} {% block content %} {% load i18n %} +{% load basefilters %} {% load attendancefilters %} {% include 'shift_request/shift_request_nav.html' %}
    {% trans "Comment" %} - +
    @@ -32,14 +32,14 @@
    {% trans "By" %} - {{ comment.employee_id }}
    {% trans "Date & Time" %} - {% trans "on" %}  {{ comment.created_at|date:"F j, Y" }}   + {% trans "on" %}  {{ comment.created_at|date:"F j, Y" }}   {% trans "at" %}   {{ comment.created_at|time:"g:i A" }}
    @@ -48,9 +48,7 @@
    - + {% endfor %} - + {% endif %} - - diff --git a/base/templates/work_type_request/htmx/group_by.html b/base/templates/work_type_request/htmx/group_by.html index 6f0e95f2b..37b16db5e 100644 --- a/base/templates/work_type_request/htmx/group_by.html +++ b/base/templates/work_type_request/htmx/group_by.html @@ -53,7 +53,7 @@ style="cursor: pointer; display: none"
    -
    +
    @@ -76,7 +76,7 @@ style="cursor: pointer; display: none"
    {% trans "Requested Till" %}
    {% trans "Description" %}
    {% trans "Comment" %}
    -
    {% trans "Actions" %}
    +
    {% trans "Actions" %}
    {% if perms.base.change_worktyperequest or request.user|is_reportingmanager %}
    {% trans "Confirmation" %}
    {% endif %} @@ -84,17 +84,17 @@ style="cursor: pointer; display: none"
    {% for work_type_request in work_type_request_list.list %}
    -
    +
    @@ -64,7 +64,7 @@
    {% trans "Employee" %} @@ -79,7 +79,7 @@ >{% trans "Requested Date" %}
    {% trans "Requested Till" %}
    {% trans "Description" %}
    @@ -92,17 +92,17 @@
    {% for work_type_request in data %}
    -
    -
    - + {% endfor %} {% else %} @@ -172,4 +172,4 @@ commentButton.style.display = 'none'; } }); - \ No newline at end of file + diff --git a/base/templates/work_type_request/htmx/work_type_request_single_view.html b/base/templates/work_type_request/htmx/work_type_request_single_view.html index c0d189586..410920e6f 100644 --- a/base/templates/work_type_request/htmx/work_type_request_single_view.html +++ b/base/templates/work_type_request/htmx/work_type_request_single_view.html @@ -26,24 +26,24 @@
    {% if request.GET.instances_ids %}
    - -
    {% endif %} -
    @@ -67,7 +67,7 @@ href ="{% url 'employee-view-individual' work_type_request.employee_id.id %}">
    - +
    @@ -97,8 +97,8 @@ href ="{% url 'employee-view-individual' work_type_request.employee_id.id %}">
    {% trans "Is permenent work type" %} - {% if work_type_request.is_permanent_work_type == True %} {% trans "Yes" %} - {% else %} {% trans "No" %} + {% if work_type_request.is_permanent_work_type == True %} {% trans "Yes" %} + {% else %} {% trans "No" %} {% endif %}
    @@ -156,4 +156,4 @@ href ="{% url 'employee-view-individual' work_type_request.employee_id.id %}"> {% trans "There are no work type requets to display." %}
    -{% endif %} \ No newline at end of file +{% endif %} diff --git a/base/templates/work_type_request/htmx/worktype_request_comment_form.html b/base/templates/work_type_request/htmx/worktype_request_comment_form.html index 072dd70b4..e53b13974 100644 --- a/base/templates/work_type_request/htmx/worktype_request_comment_form.html +++ b/base/templates/work_type_request/htmx/worktype_request_comment_form.html @@ -11,10 +11,10 @@
    {% endif %} - {% csrf_token %} {{form.as_p}} @@ -24,4 +24,4 @@ > {% trans "Save" %} - \ No newline at end of file + diff --git a/base/templates/work_type_request/request_form.html b/base/templates/work_type_request/request_form.html index b915712b8..87a608c00 100644 --- a/base/templates/work_type_request/request_form.html +++ b/base/templates/work_type_request/request_form.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n %} {% if messages %}
    {% for message in messages %} diff --git a/base/templates/work_type_request/request_update_form.html b/base/templates/work_type_request/request_update_form.html index 9d7d0f3ff..b519c9bc3 100644 --- a/base/templates/work_type_request/request_update_form.html +++ b/base/templates/work_type_request/request_update_form.html @@ -4,7 +4,7 @@ {% for message in messages %}
    {{ message }} -
    +
    {% endfor %}
    {% endif %} @@ -30,4 +30,4 @@ function toggleFunctionWorkTypeRequestForm(){ }); }) toggleFunctionWorkTypeRequestForm(); - \ No newline at end of file + diff --git a/base/templates/work_type_request/work_type_request.html b/base/templates/work_type_request/work_type_request.html index 895da6a97..a68cd6b92 100644 --- a/base/templates/work_type_request/work_type_request.html +++ b/base/templates/work_type_request/work_type_request.html @@ -5,7 +5,7 @@ {% for message in messages %}
    {{ message }} -
    +
    {% endfor %}
    {% endif %} diff --git a/base/templates/work_type_request/work_type_request_nav.html b/base/templates/work_type_request/work_type_request_nav.html index e147aa1f4..93bf29a5c 100644 --- a/base/templates/work_type_request/work_type_request_nav.html +++ b/base/templates/work_type_request/work_type_request_nav.html @@ -147,7 +147,7 @@ x-data="{searchShow: false}" {{f.form.requested_date__gte}}
    - +
    @@ -174,7 +174,7 @@ x-data="{searchShow: false}" x-show="open" @click.outside="open = false" style="display: none" - > + >
    @@ -227,14 +227,14 @@ x-data="{searchShow: false}" {% endif %} {% if perms.base.change_worktyperequest or request.user|is_reportingmanager %}
  • - {% trans "Approve Requests" %}
  • - {% endif %} + {% endif %} {% if perms.base.change_worktyperequest or request.user|is_reportingmanager %}
  • - {% trans "Reject Requests" %}
  • diff --git a/base/templates/work_type_request/work_type_request_view.html b/base/templates/work_type_request/work_type_request_view.html index 3cd22a7d1..92556c843 100644 --- a/base/templates/work_type_request/work_type_request_view.html +++ b/base/templates/work_type_request/work_type_request_view.html @@ -38,10 +38,10 @@ {% endif %}
    - {% if data %} - {% include 'work_type_request/htmx/requests.html' %} + {% if data %} + {% include 'work_type_request/htmx/requests.html' %} {% else %} - {% include 'work_type_request/htmx/empty_request.html' %} + {% include 'work_type_request/htmx/empty_request.html' %} {% endif %}
    @@ -108,24 +108,24 @@ enlargeImageContainer.append(name) setTimeout(function () { enlargeImageContainer.show() - + const iframe = document.querySelector('iframe').contentWindow var iframe_document = iframe.document iframe_image = iframe_document.getElementsByTagName('img')[0] $(iframe_image).attr('style', 'width:100%; height:100%;') }, 100) } - + function hideEnlargeImage() { var enlargeImageContainer = $('.enlargeImageContainer') enlargeImageContainer.empty() } - + $(document).on('click', function (event) { if (!$(event.target).closest('#enlargeImageContainer').length) { hideEnlargeImage() } - }) + }) function submitForm(elem) { $(elem).siblings(".add_more_submit").click(); } diff --git a/base/templatetags/basefilters 2.py b/base/templatetags/basefilters 2.py index 7aa6734c6..c4e81e816 100755 --- a/base/templatetags/basefilters 2.py +++ b/base/templatetags/basefilters 2.py @@ -1,6 +1,5 @@ -from django.template.defaultfilters import register from django import template - +from django.template.defaultfilters import register register = template.Library() diff --git a/base/templatetags/basefilters.py b/base/templatetags/basefilters.py index e144614b4..a60a497e6 100644 --- a/base/templatetags/basefilters.py +++ b/base/templatetags/basefilters.py @@ -1,10 +1,12 @@ import json -from django.template.defaultfilters import register + from django import template +from django.core.paginator import Page, Paginator +from django.template.defaultfilters import register + from base.methods import get_pagination from base.models import MultipleApprovalManagers from employee.models import Employee, EmployeeWorkInformation -from django.core.paginator import Page, Paginator def paginator_qry(qryset, page_number): @@ -117,6 +119,7 @@ def abs_value(value): """ return abs(value) + @register.filter(name="config_perms") def config_perms(user): permissions = [ @@ -130,4 +133,4 @@ def config_perms(user): ] for perm in permissions: if user.has_perm(perm): - return True \ No newline at end of file + return True diff --git a/base/translator.py b/base/translator.py index 8c6aa6421..685b81ad3 100644 --- a/base/translator.py +++ b/base/translator.py @@ -324,4 +324,3 @@ _("rejected"), _("true"), _("false"), _("candidate-create"), - diff --git a/base/urls.py b/base/urls.py index f1aed64fa..73c032850 100644 --- a/base/urls.py +++ b/base/urls.py @@ -1,5 +1,7 @@ +from django.contrib.auth.models import Group from django.urls import path -from base import request_and_approve, views, announcement + +from base import announcement, request_and_approve, views from base.forms import ( RotatingShiftAssignForm, RotatingWorkTypeAssignForm, @@ -24,8 +26,6 @@ from base.models import ( WorkType, WorkTypeRequest, ) -from django.contrib.auth.models import Group - from employee.models import EmployeeTag from horilla_audit.models import AuditTag @@ -102,7 +102,9 @@ urlpatterns = [ name="mail-server-create-update", ), path("mail-server-delete", views.mail_server_delete, name="mail-server-delete"), - path("replace-primary-mail", views.replace_primary_mail, name="replace-primary-mail"), + path( + "replace-primary-mail", views.replace_primary_mail, name="replace-primary-mail" + ), path("settings/company-create/", views.company_create, name="company-create"), path("settings/company-view/", views.company_view, name="company-view"), path( diff --git a/base/views.py b/base/views.py index 6f3cd26a5..cfbfe00f9 100644 --- a/base/views.py +++ b/base/views.py @@ -4,143 +4,143 @@ views.py This module is used to map url pattens with django views or methods """ +import json +import uuid +from datetime import datetime, timedelta +from urllib.parse import parse_qs, unquote, urlencode + from django import forms from django.apps import apps -from datetime import timedelta, datetime -from urllib.parse import parse_qs, urlencode, unquote -import uuid -import json -from django.db.models import ProtectedError -from django.shortcuts import get_object_or_404, render, redirect -from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse -from django.views.decorators.http import require_http_methods -from django.core.paginator import Paginator -from django.core.mail import send_mail -from django.utils.translation import gettext as _ -from django.db.models import Q +from django.conf import settings from django.contrib import messages from django.contrib.auth import authenticate, login, logout -from django.contrib.auth.models import Group, User, Permission +from django.contrib.auth.models import Group, Permission, User +from django.core.mail import send_mail +from django.core.paginator import Paginator +from django.db.models import F, ProtectedError, Q +from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse +from django.shortcuts import get_object_or_404, redirect, render +from django.utils.translation import gettext as _ +from django.views.decorators.csrf import csrf_exempt +from django.views.decorators.http import require_http_methods + from attendance.forms import AttendanceValidationConditionForm from attendance.methods.group_by import group_by_queryset from attendance.models import AttendanceValidationCondition, GraceTime -from django.views.decorators.csrf import csrf_exempt -from django.conf import settings -from horilla_audit.forms import HistoryTrackingFieldsForm -from horilla_audit.models import AccountBlockUnblock, AuditTag, HistoryTrackingFields -from notifications.models import Notification -from notifications.base.models import AbstractNotification -from notifications.signals import notify -from horilla.decorators import ( - delete_permission, - duplicate_permission, - permission_required, - login_required, - manager_can_enter, -) -from employee.models import Actiontype, Employee, EmployeeTag, EmployeeWorkInformation -from employee.forms import ActiontypeForm -from employee.filters import EmployeeFilter from base.backends import ConfiguredEmailBackend from base.decorators import ( shift_request_change_permission, work_type_request_change_permission, ) +from base.filters import ( + RotatingShiftAssignFilters, + RotatingShiftRequestReGroup, + RotatingWorkTypeAssignFilter, + RotatingWorkTypeRequestReGroup, + ShiftRequestFilter, + ShiftRequestReGroup, + WorkTypeRequestFilter, + WorkTypeRequestReGroup, +) from base.forms import ( AnnouncementExpireForm, + AssignPermission, + AssignUserGroup, AuditTagForm, + ChangePasswordForm, CompanyForm, DepartmentForm, DriverForm, DynamicMailConfForm, DynamicPaginationForm, - EmployeeTagForm, - JobPositionForm, - JobRoleForm, EmployeeShiftForm, EmployeeShiftScheduleForm, + EmployeeShiftScheduleUpdateForm, + EmployeeTagForm, EmployeeTypeForm, + JobPositionForm, + JobRoleForm, + MultipleApproveConditionForm, + ResetPasswordForm, + RotatingShiftAssign, RotatingShiftAssignExportForm, + RotatingShiftAssignForm, + RotatingShiftAssignUpdateForm, + RotatingShiftForm, RotatingWorkTypeAssignExportForm, + RotatingWorkTypeAssignForm, + RotatingWorkTypeAssignUpdateForm, + RotatingWorkTypeForm, ShiftAllocationForm, ShiftRequestColumnForm, ShiftRequestCommentForm, - WorkTypeForm, - UserGroupForm, - RotatingShiftForm, - RotatingShiftAssign, - RotatingWorkTypeForm, - RotatingWorkTypeAssignForm, - RotatingShiftAssignForm, ShiftRequestForm, - WorkTypeRequestColumnForm, - WorkTypeRequestForm, - RotatingShiftAssignUpdateForm, - RotatingWorkTypeAssignUpdateForm, - EmployeeShiftScheduleUpdateForm, - AssignUserGroup, - AssignPermission, - ResetPasswordForm, - ChangePasswordForm, TagsForm, - MultipleApproveConditionForm, + UserGroupForm, + WorkTypeForm, + WorkTypeRequestColumnForm, WorkTypeRequestCommentForm, + WorkTypeRequestForm, +) +from base.methods import ( + choosesubordinates, + closest_numbers, + export_data, + filtersubordinates, + get_key_instances, + get_pagination, + sortby, ) from base.models import ( Announcement, AnnouncementExpire, AnnouncementView, BaserequestFile, + BiometricAttendance, Company, DashboardEmployeeCharts, + Department, DynamicEmailConfiguration, DynamicPagination, - JobPosition, - JobRole, - Department, - MultipleApprovalCondition, - MultipleApprovalManagers, - ShiftRequestComment, - WorkType, EmployeeShift, EmployeeShiftDay, EmployeeShiftSchedule, EmployeeType, + JobPosition, + JobRole, + MultipleApprovalCondition, + MultipleApprovalManagers, + RotatingShift, RotatingWorkType, RotatingWorkTypeAssign, - RotatingShift, ShiftRequest, - WorkTypeRequest, + ShiftRequestComment, Tags, + WorkType, + WorkTypeRequest, WorkTypeRequestComment, - BiometricAttendance, ) -from base.filters import ( - RotatingShiftRequestReGroup, - RotatingWorkTypeRequestReGroup, - ShiftRequestFilter, - ShiftRequestReGroup, - WorkTypeRequestFilter, - RotatingShiftAssignFilters, - RotatingWorkTypeAssignFilter, - WorkTypeRequestReGroup, -) -from base.methods import ( - choosesubordinates, - filtersubordinates, - get_key_instances, - sortby, - closest_numbers, - export_data, - get_pagination, +from employee.filters import EmployeeFilter +from employee.forms import ActiontypeForm +from employee.models import Actiontype, Employee, EmployeeTag, EmployeeWorkInformation +from helpdesk.forms import TicketTypeForm +from helpdesk.models import DepartmentManager, TicketType +from horilla.decorators import ( + delete_permission, + duplicate_permission, + login_required, + manager_can_enter, + permission_required, ) +from horilla_audit.forms import HistoryTrackingFieldsForm +from horilla_audit.models import AccountBlockUnblock, AuditTag, HistoryTrackingFields +from notifications.base.models import AbstractNotification +from notifications.models import Notification +from notifications.signals import notify from payroll.forms.component_forms import PayrollSettingsForm from payroll.models.models import EncashmentGeneralSettings from payroll.models.tax_models import PayrollSettings -from helpdesk.models import DepartmentManager, TicketType -from helpdesk.forms import TicketTypeForm from recruitment.models import RejectReason -from django.db.models import F def custom404(request): @@ -270,11 +270,11 @@ def send_link(employee, request, id, user): message = f"Reset Your Password {url}." email_backend = ConfiguredEmailBackend() default = "base.backends.ConfiguredEmailBackend" - is_default_backend=True + is_default_backend = True EMAIL_BACKEND = getattr(settings, "EMAIL_BACKEND", "") if EMAIL_BACKEND and default != EMAIL_BACKEND: - is_default_backend = False - + is_default_backend = False + if is_default_backend and not email_backend.configuration: messages.error(request, _("Primary mail server is not configured")) return @@ -868,7 +868,12 @@ def mail_server_conf(request): if DynamicEmailConfiguration.objects.filter(is_primary=True).exists(): primary_mail_not_exist = False return render( - request, "base/mail_server/mail_server.html", {"mail_servers": mail_servers,"primary_mail_not_exist":primary_mail_not_exist} + request, + "base/mail_server/mail_server.html", + { + "mail_servers": mail_servers, + "primary_mail_not_exist": primary_mail_not_exist, + }, ) @@ -891,24 +896,28 @@ def mail_server_delete(request): return HttpResponse("") else: if DynamicEmailConfiguration.objects.all().count() == 1: - messages.warning(request, "You have only 1 Mail server configuration that can't be deleted") + messages.warning( + request, + "You have only 1 Mail server configuration that can't be deleted", + ) return HttpResponse("") - else : - mails=DynamicEmailConfiguration.objects.all().exclude(is_primary=True) + else: + mails = DynamicEmailConfiguration.objects.all().exclude(is_primary=True) return render( request, "base/mail_server/replace_mail.html", { "mails": mails, - 'title':_("Can't Delete"), + "title": _("Can't Delete"), }, ) - + + def replace_primary_mail(request): """ This method is used to replace primary mail server """ - emailconfig_id=request.POST.get('replace_mail') + emailconfig_id = request.POST.get("replace_mail") email_config = DynamicEmailConfiguration.objects.get(id=emailconfig_id) email_config.is_primary = True email_config.save() @@ -5397,8 +5406,8 @@ def employee_charts(request): def check_permission(request, charts): from recruitment.templatetags.recruitmentfilters import ( - is_stagemanager, is_recruitmentmangers, + is_stagemanager, ) permissions = { @@ -5508,6 +5517,7 @@ def employee_chart_show(request): context = {"dashboard_charts": charts, "employee_chart": employee_charts.charts} return render(request, "dashboard_chart_form.html", context) + def enable_biometric_attendance_view(request): biometric = BiometricAttendance.objects.first() return render( @@ -5538,4 +5548,4 @@ def activate_biometric_attendance(request): ), ) instance.save() - return JsonResponse({"message": "Success"}) \ No newline at end of file + return JsonResponse({"message": "Success"}) diff --git a/docker-compose.yaml b/docker-compose.yaml index 6f7076e27..47fd6746f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -29,10 +29,7 @@ services: test: ["CMD", "pg_isready", "-U", "postgres"] interval: 10s timeout: 5s - retries: 5 + retries: 5 volumes: horilla-data: - - - diff --git a/employee/admin.py b/employee/admin.py index 3eaec0a2e..9b68e86f5 100644 --- a/employee/admin.py +++ b/employee/admin.py @@ -5,20 +5,20 @@ This page is used to register the model with admins site. """ from django.contrib import admin +from simple_history.admin import SimpleHistoryAdmin + from employee.models import ( + Actiontype, BonusPoint, + DisciplinaryAction, Employee, - EmployeeWorkInformation, EmployeeBankDetails, EmployeeNote, EmployeeTag, - PolicyMultipleFile, + EmployeeWorkInformation, Policy, - DisciplinaryAction, - Actiontype, + PolicyMultipleFile, ) -from simple_history.admin import SimpleHistoryAdmin - # Register your models here. diff --git a/employee/filters.py b/employee/filters.py index 0bcb6489f..5b49bf936 100644 --- a/employee/filters.py +++ b/employee/filters.py @@ -6,22 +6,21 @@ This page is used to register filter for employee models """ import datetime +import uuid import django -from attendance.models import Attendance -from employee.models import DisciplinaryAction, Policy -import uuid -from django import forms import django_filters -from django.contrib.auth.models import Permission, Group from django import forms +from django.contrib.auth.models import Group, Permission from django.utils.translation import gettext as _ +from django_filters import CharFilter, DateFilter + +from attendance.models import Attendance from base.methods import reload_queryset from base.models import WorkType +from employee.models import DisciplinaryAction, Employee, Policy from horilla.filters import FilterSet, filter_by_name -from employee.models import Employee from horilla_documents.models import Document -from django_filters import CharFilter, DateFilter class EmployeeFilter(FilterSet): diff --git a/employee/forms.py b/employee/forms.py index a2cfa2288..cc31faca1 100644 --- a/employee/forms.py +++ b/employee/forms.py @@ -3,7 +3,7 @@ forms.py This module contains the form classes used in the application. -Each form represents a specific functionality or data input in the +Each form represents a specific functionality or data input in the application. They are responsible for validating and processing user input data. @@ -21,31 +21,33 @@ class YourForm(forms.Form): pass """ -from datetime import date import re +from datetime import date from typing import Any + from django import forms -from django.db.models import Q from django.contrib.auth.models import User +from django.db.models import Q from django.forms import DateInput, TextInput +from django.template.loader import render_to_string from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy as trans -from django.template.loader import render_to_string + from base import thread_local_middleware -from horilla.decorators import logger +from base.methods import reload_queryset from employee.models import ( Actiontype, BonusPoint, DisciplinaryAction, Employee, - EmployeeWorkInformation, EmployeeBankDetails, EmployeeNote, + EmployeeWorkInformation, NoteFiles, Policy, PolicyMultipleFile, ) -from base.methods import reload_queryset +from horilla.decorators import logger from horilla_audit.models import AccountBlockUnblock diff --git a/employee/methods/methods.py b/employee/methods/methods.py index 3af5c6fa2..ba9ad68ce 100644 --- a/employee/methods/methods.py +++ b/employee/methods/methods.py @@ -3,9 +3,10 @@ employee/methods.py """ import re -from employee.models import Employee from itertools import groupby + from base.context_processors import get_initial_prefix +from employee.models import Employee def dynamic_prefix_sort(item): diff --git a/employee/models.py b/employee/models.py index 19aeb837d..febeb9b0f 100644 --- a/employee/models.py +++ b/employee/models.py @@ -6,31 +6,33 @@ This module is used to register models for employee app """ from datetime import date, datetime, timedelta + from django.conf import settings -from django.db import models -from django.contrib.auth.models import User, Permission -from django.dispatch import receiver -from django.db.models.signals import post_save -from django.utils.translation import gettext_lazy as trans -from django.utils.translation import gettext as _ +from django.contrib.auth.models import Permission, User from django.core.exceptions import ValidationError from django.core.files.storage import default_storage +from django.db import models +from django.db.models.signals import post_save +from django.dispatch import receiver +from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy as trans + from base import thread_local_middleware -from horilla.models import HorillaModel -from horilla_audit.models import HorillaAuditLog, HorillaAuditInfo -from horilla_audit.methods import get_diff +from base.horilla_company_manager import HorillaCompanyManager from base.models import ( Company, - JobPosition, - WorkType, - EmployeeType, - JobRole, Department, EmployeeShift, + EmployeeType, + JobPosition, + JobRole, + WorkType, validate_time_format, ) -from base.horilla_company_manager import HorillaCompanyManager -from employee.methods.duration_methods import strtime_seconds, format_time +from employee.methods.duration_methods import format_time, strtime_seconds +from horilla.models import HorillaModel +from horilla_audit.methods import get_diff +from horilla_audit.models import HorillaAuditInfo, HorillaAuditLog # create your model @@ -257,7 +259,7 @@ class Employee(models.Model): a dictionary is returned with a list of related models of that employee. """ from onboarding.models import OnboardingStage, OnboardingTask - from recruitment.models import Stage, Recruitment + from recruitment.models import Recruitment, Stage reporting_manager_query = EmployeeWorkInformation.objects.filter( reporting_manager_id=self.pk @@ -629,9 +631,9 @@ class EmployeeBankDetails(HorillaModel): def clean(self): if self.account_number is not None: - bank_details = EmployeeBankDetails.objects.exclude(employee_id=self.employee_id).filter( - account_number=self.account_number - ) + bank_details = EmployeeBankDetails.objects.exclude( + employee_id=self.employee_id + ).filter(account_number=self.account_number) if bank_details: raise ValidationError( { @@ -732,7 +734,9 @@ class BonusPoint(HorillaModel): HorillaAuditInfo, ], ) - objects = HorillaCompanyManager(related_company_field="employee_id__employee_work_info__company_id") + objects = HorillaCompanyManager( + related_company_field="employee_id__employee_work_info__company_id" + ) def __str__(self): return f"{self.employee_id} - {self.points} Points" diff --git a/employee/not_in_out_dashboard.py b/employee/not_in_out_dashboard.py index 6d4040bc9..0e60642b6 100644 --- a/employee/not_in_out_dashboard.py +++ b/employee/not_in_out_dashboard.py @@ -5,19 +5,21 @@ This module is used to write context processor methods """ from datetime import date + from django import template -from django.shortcuts import render -from django.http import JsonResponse, HttpResponse from django.contrib import messages from django.core.mail import EmailMessage -from base.methods import generate_pdf -from employee.models import Employee -from horilla.decorators import manager_can_enter, login_required -from horilla import settings -from employee.filters import EmployeeFilter -from recruitment.models import RecruitmentMailTemplate from django.core.paginator import Paginator +from django.http import HttpResponse, JsonResponse +from django.shortcuts import render + from base.backends import ConfiguredEmailBackend +from base.methods import generate_pdf +from employee.filters import EmployeeFilter +from employee.models import Employee +from horilla import settings +from horilla.decorators import login_required, manager_can_enter +from recruitment.models import RecruitmentMailTemplate def paginator_qry(qryset, page_number): diff --git a/employee/policies.py b/employee/policies.py index 8fabe1578..7557a5db5 100644 --- a/employee/policies.py +++ b/employee/policies.py @@ -5,13 +5,18 @@ This module is used to write operation related to policies """ import datetime -from datetime import timedelta import json -from django.contrib import messages -from django.http import HttpResponse, JsonResponse -from django.shortcuts import redirect, render, get_object_or_404 -from base.views import paginator_qry +from datetime import timedelta from urllib.parse import parse_qs + +from django.contrib import messages +from django.contrib.auth.models import User +from django.http import HttpResponse, JsonResponse +from django.shortcuts import get_object_or_404, redirect, render +from django.utils.translation import gettext_lazy as _ + +from base.methods import filtersubordinates, get_key_instances +from base.views import paginator_qry from employee.filters import DisciplinaryActionFilter, PolicyFilter from employee.forms import DisciplinaryActionForm, PolicyForm from employee.models import ( @@ -21,14 +26,8 @@ from employee.models import ( Policy, PolicyMultipleFile, ) -from horilla.decorators import permission_required, login_required -from django.contrib.auth.models import User -from django.utils.translation import gettext_lazy as _ +from horilla.decorators import login_required, permission_required from notifications.signals import notify -from base.methods import ( - filtersubordinates, - get_key_instances, -) @login_required diff --git a/employee/scheduler.py b/employee/scheduler.py index bd645dfbb..447e8f24a 100644 --- a/employee/scheduler.py +++ b/employee/scheduler.py @@ -1,5 +1,6 @@ import datetime from datetime import timedelta + from apscheduler.schedulers.background import BackgroundScheduler @@ -20,8 +21,8 @@ def block_unblock_disciplinary(): """ This scheduled task to trigger the Disciplinary action and take the suspens """ - from employee.models import DisciplinaryAction from base.models import EmployeeShiftSchedule + from employee.models import DisciplinaryAction from employee.policies import employee_account_block_unblock dis_action = DisciplinaryAction.objects.all() diff --git a/employee/static/dashboard/getBirthday.js b/employee/static/dashboard/getBirthday.js index eb9250594..bcc2a4ba9 100644 --- a/employee/static/dashboard/getBirthday.js +++ b/employee/static/dashboard/getBirthday.js @@ -16,9 +16,9 @@ function upcomingBirthdays(response) { container.append(`
    -
    - diff --git a/employee/templates/dashboard/not_in_yet.html b/employee/templates/dashboard/not_in_yet.html index 131f9a22f..ba9f19717 100644 --- a/employee/templates/dashboard/not_in_yet.html +++ b/employee/templates/dashboard/not_in_yet.html @@ -97,7 +97,7 @@ aria-label="caret back outline" > - {% endif %} + {% endif %} {% if employees.has_next %} - {% endif %} + {% endif %} {% if employees.has_previous or employees.has_next %} {% trans "Page" %} {{ employees.number }} {%trans "of" %} diff --git a/employee/templates/dashboard/not_out_yet.html b/employee/templates/dashboard/not_out_yet.html index 0a0fb781a..5d3e25015 100644 --- a/employee/templates/dashboard/not_out_yet.html +++ b/employee/templates/dashboard/not_out_yet.html @@ -25,7 +25,7 @@
    -
    {% if perms.employee.add_disciplinaryaction %} - +
    -
    @@ -132,7 +132,7 @@ - {% if data %} @@ -141,7 +141,7 @@
    {% else %}
    - +
    Page not found. 404. @@ -180,7 +180,7 @@ } {% endif %} - +
    diff --git a/employee/templates/employee_personal_info/employee_list.html b/employee/templates/employee_personal_info/employee_list.html index bf61126e5..a945048fb 100644 --- a/employee/templates/employee_personal_info/employee_list.html +++ b/employee/templates/employee_personal_info/employee_list.html @@ -6,7 +6,7 @@
    {{ message }}
    {% endfor %}
    -{% endif %} +{% endif %}
    @@ -60,7 +60,7 @@
    -
    +
    @@ -145,56 +145,56 @@
    {% if perms.employee.view_employee %} - {{emp.email}} - {{emp.phone}} {% endif %} - {{emp.badge_id}} - {{emp.employee_work_info.job_position_id}} - {{emp.employee_work_info.department_id}} - {{emp.employee_work_info.shift_id}} - {{emp.employee_work_info.work_type_id}} - {{emp.employee_work_info.job_role_id}} -
    - + {% else %} + > {% csrf_token %} - {% endif %} - {% endif %} + {% endif %} + {% endif %} {% if perms.employee.delete_employee %} {% with emp.contract_set.first as contract %} diff --git a/employee/templates/employee_personal_info/employee_personal_info.html b/employee/templates/employee_personal_info/employee_personal_info.html index 87cd33a0c..8586c5dab 100644 --- a/employee/templates/employee_personal_info/employee_personal_info.html +++ b/employee/templates/employee_personal_info/employee_personal_info.html @@ -14,17 +14,17 @@

    {{form.instance.employee_first_name}}'s {% trans "Info" %}

    - +
    {{form.employee_first_name.errors}}
    {{form.employee_first_name}}
    - +
    {{form.employee_last_name.errors}} -
    {{form.employee_last_name}}
    +
    {{form.employee_last_name}}
    {{form.email.errors}} @@ -44,14 +44,14 @@
    - - + + {{form.address.errors}}
    {{form.address}}
    {{form.country.errors}}
    {{form.country}}
    - - + + {{form.qualification.errors}}
    {{form.qualification}}
    {{form.experience.errors}} @@ -80,8 +80,8 @@ > {% trans "Submit" %} - {% endif %} + {% endif %}
    -
    \ No newline at end of file +
    diff --git a/employee/templates/employee_personal_info/employee_update_form.html b/employee/templates/employee_personal_info/employee_update_form.html index c827e4199..bce1a81b7 100644 --- a/employee/templates/employee_personal_info/employee_update_form.html +++ b/employee/templates/employee_personal_info/employee_update_form.html @@ -7,13 +7,13 @@ {% for message in messages %}
    {{ message }} -
    +
    {% endfor %}
    {% endif %}
    - +
    {% include 'employee_personal_info/employee_personal_info.html' %}
    @@ -21,4 +21,4 @@ {% include 'employee_personal_info/employee_work_info.html' %}
    -
    \ No newline at end of file +
    diff --git a/employee/templates/employee_personal_info/employee_view.html b/employee/templates/employee_personal_info/employee_view.html index 2809ccaa8..3a5494cfb 100644 --- a/employee/templates/employee_personal_info/employee_view.html +++ b/employee/templates/employee_personal_info/employee_view.html @@ -4,14 +4,14 @@ {% trans "Selected Employees" %}
    - {% if data %} - {% if view_type == 'list' %} - {% include 'employee_personal_info/employee_list.html' %} - {% else %} - {% include 'employee_personal_info/employee_card.html' %} + {% if data %} + {% if view_type == 'list' %} + {% include 'employee_personal_info/employee_list.html' %} + {% else %} + {% include 'employee_personal_info/employee_card.html' %} {% endif %} - {% else %} - {% include "employee_personal_info/employee_empty_view.html" %} + {% else %} + {% include "employee_personal_info/employee_empty_view.html" %} {% endif %}
    diff --git a/employee/templates/employee_personal_info/employee_work_info.html b/employee/templates/employee_personal_info/employee_work_info.html index 384fc69aa..979cadcdf 100644 --- a/employee/templates/employee_personal_info/employee_work_info.html +++ b/employee/templates/employee_personal_info/employee_work_info.html @@ -3,7 +3,7 @@
    -
    +

    {{form.instance.employee_first_name}}'s {% trans "Work Info" %}

    @@ -12,7 +12,7 @@
    {{work_form.department_id.errors}} -
    {{work_form.department_id}}
    +
    {{work_form.department_id}}
    {{work_form.shift_id.errors}} @@ -40,35 +40,35 @@
    {{work_form.company_id.errors}} - {{work_form.company_id}} + {{work_form.company_id}}
    {{work_form.location.errors}} - {{work_form.location}} + {{work_form.location}}
    {{work_form.email.errors}} - {{work_form.email}} + {{work_form.email}}
    {{work_form.date_joining.errors}} - {{work_form.date_joining}} + {{work_form.date_joining}}
    {{work_form.contract_end_date.errors}} - {{work_form.contract_end_date}} + {{work_form.contract_end_date}}
    {{work_form.basic_salary.errors}} - {{work_form.basic_salary}} + {{work_form.basic_salary}}
    {{work_form.salary_hour.errors}} - {{work_form.salary_hour}} + {{work_form.salary_hour}}
    {{work_form.tags.errors}} - {{work_form.tags}} + {{work_form.tags}}
    {% if perms.employee.change_employeeworkinformation %} @@ -93,15 +93,15 @@ {% endif %} {% endif %}
    -
    -
    +
    +
    -
    +

    {{form.instance.employee_first_name}}'s {% trans "Bank Info" %}

    @@ -110,7 +110,7 @@
    {{bank_form.account_number.errors}} -
    {{bank_form.account_number}}
    +
    {{bank_form.account_number}}
    {{bank_form.branch.errors}} @@ -168,8 +168,8 @@ {% endif %} {% endif %}
    -
    -
    +
    +
    diff --git a/employee/templates/employee_personal_info/first_last_badge.html b/employee/templates/employee_personal_info/first_last_badge.html index 89082eb5e..ecc04f7dc 100644 --- a/employee/templates/employee_personal_info/first_last_badge.html +++ b/employee/templates/employee_personal_info/first_last_badge.html @@ -2,4 +2,4 @@
    {{badge.0}} - {{badge.1}}
    -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/employee/templates/employee_personal_info/group_by.html b/employee/templates/employee_personal_info/group_by.html index 19602fbe9..23f996f21 100644 --- a/employee/templates/employee_personal_info/group_by.html +++ b/employee/templates/employee_personal_info/group_by.html @@ -197,10 +197,10 @@ > {% endif %} {% if perms.employee.delete_employee %} {% if emp.is_active %}
    + > {% csrf_token %}
    \ No newline at end of file +
    diff --git a/employee/templates/organisation_chart/chart.html b/employee/templates/organisation_chart/chart.html index 1beead97d..0b4bf12e0 100644 --- a/employee/templates/organisation_chart/chart.html +++ b/employee/templates/organisation_chart/chart.html @@ -9,5 +9,3 @@ {data:blah,nodeContent:"title"} ) - - diff --git a/employee/templates/organisation_chart/org_chart.html b/employee/templates/organisation_chart/org_chart.html index 8baa4fa93..038cb0e88 100644 --- a/employee/templates/organisation_chart/org_chart.html +++ b/employee/templates/organisation_chart/org_chart.html @@ -24,15 +24,15 @@ border: 1px solid #aaa; border-radius: 2px; " - name="manager_id" + name="manager_id" title="Reporting Managers" hx-post="{% url 'organisation-chart' %}" - hx-target="#chart_target" + hx-target="#chart_target" > {% for manager_id, values in reporting_manager_dict.items %} {% endfor %} - +
    @@ -44,4 +44,3 @@ {% endblock %} - diff --git a/employee/templates/payroll-tab.html b/employee/templates/payroll-tab.html index 5047e5f07..557248f3d 100644 --- a/employee/templates/payroll-tab.html +++ b/employee/templates/payroll-tab.html @@ -39,7 +39,7 @@
    {% for payslip in employee.payslip_set.all %} - +
    @@ -53,9 +53,9 @@
    {{payslip.employee_id}}
    - +
    - +
    {{payslip.start_date}} - {{payslip.end_date}} @@ -76,4 +76,4 @@ {% endfor %}
    -
    \ No newline at end of file +
    diff --git a/employee/templates/performance-tab.html b/employee/templates/performance-tab.html index 499fb5690..2a2b74a12 100644 --- a/employee/templates/performance-tab.html +++ b/employee/templates/performance-tab.html @@ -25,7 +25,7 @@ {{feedback.review_cycle | title}} - {% trans feedback.status %} + {% trans feedback.status %} {{ current_date|timesince:feedback.end_date }}
    @@ -35,13 +35,13 @@ {% endif %} - + - +
    {% endfor%}
    -
    \ No newline at end of file +
    diff --git a/employee/templates/personal-tab.html b/employee/templates/personal-tab.html index ab7c3ab74..7e126de9a 100644 --- a/employee/templates/personal-tab.html +++ b/employee/templates/personal-tab.html @@ -340,4 +340,4 @@
    - \ No newline at end of file + diff --git a/employee/templates/policies/attachments.html b/employee/templates/policies/attachments.html index d6450b143..9e7491a5c 100644 --- a/employee/templates/policies/attachments.html +++ b/employee/templates/policies/attachments.html @@ -8,7 +8,7 @@ style="width:40px;height:40px"> @@ -19,13 +19,13 @@ {% endif %} - + {% endfor %} {% if perms.employee.add_policy %} {% csrf_token %} -