from django.urls import path, include
from common.views.barrier_views import BarrierDashboardView
from common.views.employee_views import EmployeeDashboardView, EmployeeCompanyListView, EmployeeCompanyCreateView, \
    EmployeeCompanyUpdateView, EmployeeLineListView, EmployeeLineCreateView, EmployeeLineUpdateView
from common.views.client_views import ClientDashboardView, ClientCompanyListView, ClientCompanyCreateView, \
    ClientCompanyUpdateView, ClientLineListView, ClientLineCreateView, ClientLineUpdateView
from common.views.shared_views import IndexView, DashboardRedirectView
urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('dashboard/', include([
        path('', DashboardRedirectView.as_view(), name='dashboard'),
        path('client/', ClientDashboardView.as_view(), name='client_dashboard'),
        path('barrier/', BarrierDashboardView.as_view(), name='barrier_dashboard'),
        path('employee/', EmployeeDashboardView.as_view(), name='employee_dashboard'),
    ])),
    path('client/company/', include([
        path('', ClientCompanyListView.as_view(), name='client_company'),
        path('create/', ClientCompanyCreateView.as_view(), name='client_company_create'),
        path('<int:pk>/edit/', ClientCompanyUpdateView.as_view(), name='client_company_edit'),
    ])),
    path('client/line/', include([
        path('', ClientLineListView.as_view(), name='client_line'),
        path('create/', ClientLineCreateView.as_view(), name='client_line_create'),
        path('<int:pk>/edit/', ClientLineUpdateView.as_view(), name='client_line_update'),
    ])),
    path('employee/company/', include([
        path('', EmployeeCompanyListView.as_view(), name='employee_company'),
        path('create/', EmployeeCompanyCreateView.as_view(), name='employee_company_create'),
        path('<int:pk>/edit/', EmployeeCompanyUpdateView.as_view(), name='employee_company_update'),
    ])),
    path('employee/line/', include([
        path('', EmployeeLineListView.as_view(), name='employee_line'),
        path('create/', EmployeeLineCreateView.as_view(), name='employee_line_create'),
        path('<int:pk>/edit/', EmployeeLineUpdateView.as_view(), name='employee_line_update'),
    ])),
]
