from django.urls import path
from . import views

app_name = 'finance'

urlpatterns = [
    # Dashboard & Reports
    path('', views.dashboard, name='dashboard'),
    path('dashboard/data/', views.dashboard_data, name='dashboard_data'),
    path('dashboard/super-admin/', views.dashboard_super_admin, name='dashboard_super_admin'),
    path('dashboard/store-manager/', views.dashboard_store_manager, name='dashboard_store_manager'),
    path('dashboard/storekeeper/', views.dashboard_storekeeper, name='dashboard_storekeeper'),
    path('dashboard/accountant/', views.dashboard_accountant, name='dashboard_accountant'),
    path('dashboard/sales-officer/', views.dashboard_sales_officer, name='dashboard_sales_officer'),
    path('dashboard/auditor/', views.dashboard_auditor, name='dashboard_auditor'),
    path('profit-loss/', views.profit_loss, name='profit_loss'),
    
    # Accounts
    path('accounts/', views.account_list, name='account_list'),
    path('accounts/create/', views.account_create, name='account_create'),
    path('accounts/<int:pk>/', views.account_detail, name='account_detail'),

    # Expense Categories
    path('categories/', views.category_list, name='category_list'),
    path('categories/create/', views.category_create, name='category_create'),

    # Expenses
    path('expenses/', views.expense_list, name='expense_list'),
    path('expenses/create/', views.expense_create, name='expense_create'),
    path('expenses/<int:pk>/', views.expense_detail, name='expense_detail'),

    # Other Income
    path('income/', views.income_list, name='income_list'),
    path('income/create/', views.income_create, name='income_create'),

    # Owner Draw
    path('draws/', views.draw_list, name='draw_list'),
    path('draws/create/', views.draw_create, name='draw_create'),

    #csv
    path('export/expenses/', views.export_expenses_csv, name='export_expenses'),
    path('export/profit-loss/', views.export_profit_loss_csv, name='export_profit_loss'),
]
