from django.urls import path

from .views import SaveCellsView , SaveMonthSummaryView, halfyear_settings,MonthlySheetView, monthly_sheet_root,set_halfyear_interval,AbrechnungView, SaveAbrechnungCellsView
from . import views
from .views import RechnungView

urlpatterns = [
    path('', views.clients_list, name='clients_list'),
    path('table-one/', views.table_one_view, name='table_one'),
    path('table-two/', views.table_two_view, name='table_two'),
    path('add-entry/<str:model_name>/', views.add_entry, name='add_entry'),
    path('update-entry/<str:model_name>/', views.update_entry, name='update_entry'),
    path('delete-entry/<str:model_name>/', views.delete_entry, name='delete_entry'),
    path('betriebskosten/', views.betriebskosten_list, name='betriebskosten_list'),
    path('betriebskosten/create/', views.betriebskosten_create, name='betriebskosten_create'),
    path('betriebskosten/delete/', views.betriebskosten_delete, name='betriebskosten_delete'),
    path('betriebskosten/update-personalkosten/', views.update_personalkosten, name='update_personalkosten'),
    path("abrechnung/", AbrechnungView.as_view(), name="abrechnung"),
    path("abrechnung/autosave/", SaveAbrechnungCellsView.as_view(), name="abrechnung_autosave"),
    path("abrechnung/save/", SaveAbrechnungCellsView.as_view(), name="save_abrechnung"),
    path('check-sheets/', views.CheckSheetView.as_view(), name='check_sheets'),

    path('test-formula/', views.TestFormulaView.as_view(), name='test_formula'),

    path("rechnung/", RechnungView.as_view(), name="rechnung"),
    path('sheet/', monthly_sheet_root, name='monthly_sheet_root'),
    path('set-halfyear-interval/', set_halfyear_interval, name='set_halfyear_interval'),
    path('halfyear-bilanz/', views.halfyear_balance_view, name='halfyear_balance'),
    path('sheet/<int:year>/<int:month>/', MonthlySheetView.as_view(), name='monthly_sheet'),
  
    path('settings/halfyear/', halfyear_settings, name='halfyear_settings'),
    path('summary/<int:year>/<int:start_month>/', views.SummarySheetView.as_view(), name='summary_sheet'),
    path("save-cells/", SaveCellsView.as_view(), name="save_cells"),   
    path('save-month-summary/', SaveMonthSummaryView.as_view(), name='save_month_summary'),
    path('calculate/', views.CalculateView.as_view(), name='calculate'),

]