
    si1                     ,   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ  eed       e ed      d       G d de                    Z eed       e ed      d       G d de                    Zy)zU
this page handles the cbv methods for online and offline employee list in dashboard
    )date)Any)reverse)method_decorator)gettext_lazy)manager_can_enter)EmployeeFilter)Employee)login_required)HorillaListViewdispatch)namezleave.view_leaverequestc                   `     e Zd ZdZeZeZdZdZ	dZ
dZdeddf fdZ fd	Zg d
ZdddZ xZS )DashboardOfflineEmployeesz6
    list view for offline employees in dashboard
    offlineEmployees
   FkwargsreturnNc                 D    t        |   di | t        d      | _        y )Nz
not-in-yet super__init__r   
search_urlselfr   	__class__s     K/var/www/python-projects/worksol/attendance/cbv/dashboard_offline_online.pyr   z"DashboardOfflineEmployees.__init__!   s    "6"!,/    c                     t         |          }t        dt        j                         i      j
                  j                  d      j                  d      }|S )N
not_in_yetTemployee_work_info__isnull	is_activer   get_querysetr	   r   todayqsexcludefilterr   querysetr   s     r   r'   z&DashboardOfflineEmployees.get_queryset%   sK    7')L$**,78R48VdV# 	 r   )r
   get_full_name
get_avatar)Work Statusget_leave_status)Actionssend_mail_buttonz1
        style="width:200px !important;"
        z0
        style="width:80px !important;"
        )r/   r4   )__name__
__module____qualname____doc__r
   modelr	   filter_classview_idrecords_per_pageshow_toggle_formbulk_select_optionr   r   r'   columnsheader_attrs__classcell__r   s   @r   r   r      s[     E!L G0 0 0G	Lr   r   c                   `     e Zd ZdZeZeZdZdZ	dZ
dZdeddf fdZ fd	Zd
dgZdddZ xZS )DashboardOnlineEmployeesz5
    list view for online employees in dashboard
    onlineEmployeesr   Fr   r   Nc                 D    t        |   di | t        d      | _        y )Nznot-out-yetr   r   r   s     r   r   z!DashboardOnlineEmployees.__init__L   s    "6"!-0r   c                     t         |          }t        dt        j                         i      j
                  j                  d      j                  d      }|S )Nnot_out_yetTr"   r$   r&   r,   s     r   r'   z%DashboardOnlineEmployees.get_querysetP   sK    7')M4::<89R48VdV# 	 r   r.   )r1   get_custom_forecasted_info_colz  style="width:200px !important" z  style="width:180px !important" )employee_id__get_full_namerI   )r5   r6   r7   r8   r
   r9   r	   r:   r;   r<   r>   r=   r   r   r'   r?   r@   rA   rB   s   @r   rD   rD   >   sb     E!LG1 1 1 	49G 'M*PLr   rD   N)r8   datetimer   typingr   django.urlsr   django.utils.decoratorsr   django.utils.translationr   _base.decoratorsr   employee.filtersr	   employee.modelsr
   horilla_views.cbv_methodsr   horilla_views.generic.cbv.viewsr   r   rD   r   r   r   <module>rV      s       4 6 - + $ 4 ; .z2#$=>ZP& & Q 3&R .z2#$=>ZP" " Q 3"r   