from django.urls import path
from . import views

app_name = 'hr'

urlpatterns = [
    path('', views.HRDashboardView.as_view(), name='dashboard'),
    path('employees/', views.EmployeeListView.as_view(), name='employee_list'),
    path('employees/add/', views.EmployeeCreateView.as_view(), name='employee_add'),
    path('employees/<int:pk>/', views.EmployeeDetailView.as_view(), name='employee_detail'),
    path('employees/<int:pk>/edit/', views.EmployeeUpdateView.as_view(), name='employee_edit'),
    path('departments/', views.DepartmentListView.as_view(), name='department_list'),
    path('attendance/', views.AttendanceListView.as_view(), name='attendance_list'),
    path('leave/', views.LeaveRequestListView.as_view(), name='leave_list'),
    path('leave/add/', views.LeaveRequestCreateView.as_view(), name='leave_add'),
    
    # Biometric Devices
    path('devices/', views.BiometricDeviceListView.as_view(), name='device_list'),
    path('devices/add/', views.BiometricDeviceCreateView.as_view(), name='device_add'),
    path('devices/<int:pk>/edit/', views.BiometricDeviceUpdateView.as_view(), name='device_edit'),
    path('devices/<int:pk>/delete/', views.BiometricDeviceDeleteView.as_view(), name='device_delete'),
    path('devices/<int:pk>/test/', views.test_device_connection, name='device_test'),
    path('devices/<int:pk>/sync/', views.sync_device_logs, name='device_sync'),
]