from django.urls import path
from . import views
app_name = 'utils'

urlpatterns = [
   path('',views.index,name ='index'),
   path('dashboard/',views.dashboard,name='dashboard'),
   path('set_structure/<int:structure_id>/',views.set_structure,name='dashboard'),

   path('stock/',views.stock,name='stock'),
   path('stock/search/',views.stock_search,name='stock'),
   path('stock/add/',views.stock_add,name='stock_add'),
   path('stock/type_add/<int:cat_id>/',views.stock_type_add,name='stock_type_add'),
   path('stock/edit/<int:product_id>/',views.stock_add,name='stock_add'),
   path('stock/add/form/',views.stock_add_form,name='stock_add_form'),
   path('stock/trans/',views.stock_trans,name='stock_trans'),
   path('stock/trans/sort/',views.stock_trans_sort,name='stock_trans_sort'),
   path('stock/trans/<int:produit>/',views.stock_trans,name='stock_trans_sort'),
   path('stock/benef/',views.stock_benef,name='stock_benef'),
   path('stock/rapport/',views.stock_rapport,name='stock_rapport'),
   path('stock/ravit/',views.stock_ravit,name='stock_ravit'),
   path('stock/promo/',views.stock_promo,name='stock_promo'),  
   path('stock/infos/<str:type_element>/<int:element_id>/',views.stock_infos,name="infos"),


   path('solds/',views.solds,name="solds"),
   path('solds/add/',views.solds_add,name='stock_add'),
   path('solds/search/',views.solds_search,name='sold_search'),

   path('ajax/to_promote/',views.ajax_promo,name='ajax_promo'),
   path('ajax/get_type_product/',views.ajax_get_type_product,name='ajax_get_type_product'),   
   path('ajax/get_product/',views.ajax_get_product,name='ajax_get_product'),
   path('ajax/get_transaction/',views.ajax_get_transaction,name='ajax_get_transaction'),
   path('ajax/get_facture/',views.ajax_get_facture,name='ajax_get_facture'),
   path('ajax/save_trans/',views.ajax_save_trans,name='ajax_save_trans'),
   path('ajax/save_type_product/',views.save_type_product,name='ajax_save_type_product'),
   path('ajax/search_client/',views.ajax_search_client,name='ajax_search_client'),
   path('sell/',views.saler_shop,name='saler_shop'),

   path('RH/',views.RH,name='RH'),
   path('RH/add/',views.RH_add,name='RH_add'),
   path('RH/add/form/',views.RH_add_form,name='RH_add_form'),

   path('customers/',views.customers,name='customers'),
   path('customers/add/',views.customers_add,name='customers_add'),
   path('customers/add/form/',views.customers_add_form,name='customers_add_form'),

   path('compta/',views.compta,name='compta'),


   path('partners/',views.partners,name='partners'),
   path('partners/<int:partner_id>/',views.partners_details,name='partners_details'),
   path('partners/<int:partner_id>/add/<int:mode_add>/',views.partners_add,name='partners_add'),
   
   path('ravit/',views.ravit,name='ravit'),
   path('ravit/add/<int:mode_add>/',views.ravit_add,name='ravit_add'),

   path('enterprise/',views.enterprise,name='enterprise'),
   path('xerxes/',views.xerxes,name='xerxes'),
   path('log/',views.log,name='log_form'),
   path('logout/',views.log_out,name='logout')
]
