| 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/employee/__pycache__/ |
Upload File : |
o
hͦh� � @ sN d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ ddlm
Z
dd lmZmZ dd
lmZ ddlmZ ddlmZmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddl m!Z!m"Z" dd� Z#e!e"d�dd� ��Z$e!e"d�dd� ��Z%e!e"d�d$dd���Z&e!e"d�d$dd���Z'e!dd� �Z(e!e"d d!�d"d#� ��Z)dS )%zX
employee/context_processors.py
This module is used to write context processor methods
� N)�date)�template)�apps)�messages)�EmailMessage)� Paginator)�HttpResponse�JsonResponse)�render)�ConfiguredEmailBackend)�export_data�generate_pdf)�HorillaMailTemplate)�EmployeeFilter)�Employee)�settings)�login_required�manager_can_enterc C s t | d�}|�|�} | S )z3
This method is used to paginate query set
� )r �get_page)�qryset�page_number� paginator� r �-/var/www/erp/employee/not_in_out_dashboard.py�
paginator_qry s
r zemployee.view_employeec C sP | j �d�}| j �� }tdt�� i�jjdd�jdd�}t | dt
||�|d��S )�l
This context processor wil return the employees, if they not marked the attendance
for the day
�page�
not_in_yetT��employee_work_info__isnull�� is_activezdashboard/not_in_yet.html)� employees�pd)�GET�get� urlencoder r �today�qs�exclude�filterr
r )�requestr �
previous_data�empsr r r r $ s
�����r c C s2 t dt�� i�jjdd�jdd�}t| dd|i�S )r �not_out_yetTr r! zdashboard/not_out_yet.htmlr# )r r r( r) r* r+ r
)r, r. r r r r/ = s ���r/ zemployee.change_employeec C s>