# coding : utf-8
from django.urls import path, re_path
from .views import user_auth_views, main_frame_views, department_views, employee_views, overview

urlpatterns = [
    re_path('^login/$', user_auth_views.login, name='login'),
    path('logout', user_auth_views.logout, name='logout'),
    path('', main_frame_views.index, name='main_frame'),
    # 部门管理
    path('department_list', department_views.department_list, name='department_list'),
    path('department_tree_json', department_views.department_tree_json, name="department_tree_json"),
    path('add_department', department_views.add_department, name='add_department'),
    path('edit_remove_department', department_views.edit_remove_department, name='edit_remove_department'),
    path('employee_level', department_views.department_level, name='employee_level'),
    path('employee_level_json', department_views.employee_level_json, name='employee_level_json'),
    path('employee_level_add', department_views.employee_level_add, name='employee_level_add'),
    path('employee_level_edit', department_views.employee_level_edit, name='employee_level_edit'),
    path('employee_level_del', department_views.employee_level_del, name='employee_level_del'),
    path('position_list', department_views.position_list, name='position_list'),
    path('position_json', department_views.position_json, name='position_json'),
    path('position_add', department_views.position_add, name='position_add'),
    path('position_edit', department_views.position_edit, name='position_edit'),
    path('position_del', department_views.position_del, name='position_del'),
    path('department_manager', department_views.department_manager, name='department_manager'),
    path('department_json', department_views.department_json, name='department_json'),
    path('department_manager_edit', department_views.department_manager_edit, name='department_manager_edit'),
    # 员工管理
    path('employee_list', employee_views.employee_list, name='employee_list'),
    path('employee_list_json', employee_views.employee_list_json, name='employee_list_json'),
    path('employee_add', employee_views.employee_add, name='employee_add'),
    path('employee_edit', employee_views.employee_edit, name='employee_edit'),
    path('employee_del', employee_views.employee_del, name='employee_del'),
    path('employee_promote_list', employee_views.employee_promote_list, name='employee_promote_list'),
    path('employee_promote', employee_views.employee_promote, name='employee_promote'),
    re_path('^employee_attandance/$', employee_views.employee_attandance, name='employee_attandance'),
    path('employee_attandance_template_download', employee_views.employee_attandance_template_download, name='employee_attandance_template_download'),
    path('employee_attandance_save_viewlist_json', employee_views.employee_attandance_save_viewlist_json, name='employee_attandance_save_viewlist_json'),
    path('employee_attendance_list_json', employee_views.employee_attendance_list_json, name='employee_attendance_list_json'),
    path('employee_attandance_save', employee_views.employee_attandance_save, name='employee_attandance_save'),
    path('employee_person_stat', employee_views.employee_person_stat, name='employee_person_stat'),
    path('employee_person_promotion_list_json', employee_views.employee_person_promotion_list_json, name='employee_person_promotion_list_json'),
    path('employee_attendance_chart_json', employee_views.employee_attendance_chart_json, name='employee_attendance_chart_json'),
    # 系统用户权限管理
    path('add_a_user', user_auth_views.add_a_user, name='add_a_user'),
    path('user_list_json', user_auth_views.user_list_json, name='user_list_json'),
    path('user_add', user_auth_views.user_add, name='user_add'),
    path('user_del', user_auth_views.user_del, name='user_del'),
    path('user_edit', user_auth_views.user_edit, name='user_edit'),
    path('add_a_usergroup', user_auth_views.add_a_usergroup, name='add_a_usergroup'),
    path('usergroup_list_json', user_auth_views.usergroup_list_json, name='usergroup_list_json'),
    path('group_add', user_auth_views.group_add, name='group_add'),
    path('group_del', user_auth_views.group_del, name='group_del'),
    path('group_edit', user_auth_views.group_edit, name='group_edit'),
    path('group_priv', user_auth_views.group_priv, name='group_priv'),
    path('group_priv_json', user_auth_views.group_priv_json, name='group_priv_json'),
    path('group_priv_add', user_auth_views.group_priv_add, name='group_priv_add'),
    path('group_priv_del', user_auth_views.group_priv_del, name='group_priv_del'),
    path('group_priv_edit', user_auth_views.group_priv_edit, name='group_priv_edit'),
    path('group_priv_tree_json', user_auth_views.group_priv_tree_json, name='group_priv_tree_json'),
    # 总览
    path('overview', overview.overview, name='overview'),
    path('overview_list_json', overview.overview_list_json, name='overview_list_json'),
    path('employee_amount_by_department', overview.employee_amount_by_department, name='employee_amount_by_department'),
    path('employee_gender_by_department', overview.employee_gender_by_department, name='employee_gender_by_department'),
    path('employee_attendance_log', overview.employee_attendance_log, name='employee_attendance_log'),
    path('employee_promote_log', overview.employee_promote_log, name='employee_promote_log'),
]