
    si                         d Z ddlmZ ddlmZ ddlmZ ddlm	Z	m
Z
  ed      ZdZdZ ed	       ed
      dd ed       ed      d ed       ed      ddgZd Zd Zd Zy)z
offboarding/sidebar.py
    )reverse)gettext_lazy)resignation_request_enabled)any_manageris_offboarding_employeeOffboardingzimages/ui/exit-outline.svgz-offboarding.sidebar.offboarding_accessibility	Dashboardzoffboarding-dashboardz+offboarding.sidebar.dashboard_accessibility)menuredirectaccessibilityzExit Processzoffboarding-pipeline)r
   r   zResignation Letterszresignation-request-viewz4offboarding.sidebar.resignation_letter_accessibilityc                     d}	 | j                   j                  d      xs@ t        | j                   j                        xs t	        | j                   j                        }|S # |c cY S xY w)NFoffboarding)userhas_module_permsr   employee_getr   )requestr
   
user_permsargskwargs
accessibles         7/var/www/python-projects/worksol/offboarding/sidebar.pyoffboarding_accessibilityr   %   sb    JLL))-8 B7<<445B&w||'@'@A 	 zs   AA# #A*c                 X    t        |       d   xr | j                  j                  d      S )Nenabled_resignation_requestz"offboarding.view_resignationletter)r   r   has_perm)r   r
   r   r   r   s        r    resignation_letter_accessibilityr   1   s1    &w/% F
,,

 D
EF    c                 z    | j                   j                  d      xs t        | j                   j                        S )zA
    Check if the user has permission to view the dashboard.
    r   )r   r   r   r   )r   r   s     r   dashboard_accessibilityr   7   s4    
 <<((7 ;!!< r   N)__doc__django.urlsr   django.utils.translationr   _base.context_processorsr   +offboarding.templatetags.offboarding_filterr   r   MENUIMG_SRCACCESSIBILITYSUBMENUSr   r   r    r   r   <module>r+      s      6 ?
 	
&?
 +34F .!23
 '(67O$	Fr   