from django.urls import path
from.views import *
from django.contrib.auth.decorators import login_required
from . import views
from django.contrib.auth import views as auth_views
app_name = 'produits'
urlpatterns = [
    path('', login_view, name='login'),
    path('home/',login_required(home),name='home'),
    
    path('pdp_journalier/', login_required(pdp_journalier), name = 'pdp_journalier'),
    path('pdp_menseuel/', login_required(pdp_menseuel), name = 'pdp_menseuel'),
    path('couverture_pf/', login_required(couverture_pf), name = 'couverture_pf'),
    path('index/', login_required(index), name = 'index'),
    path('home/', login_required(home), name = 'home'),
    path('pdp/',login_required(pdp),name = 'pdp'),
    path('prd_pdp_detail/',login_required(prd_pdp_detail),name = 'prd_pdp_detail'),
    path('appros/',login_required(appros),name = 'appros'),
    path('Can_prd/',login_required(production),name = 'can_prd'),
    path('Stock_min/',login_required(Stock_Min),name = 'stock_min'),
    path('Cbn/',login_required(Cbn),name = 'Cbn'),
    path('pdp_semulat/',login_required(pdp_semulat),name = 'pdp_semulat'),
    path('chargement/',login_required(Chargement_list),name = 'chargement'),
    path('commande/',login_required(Commande_list),name = 'commande'),
    path('add_chargement/',login_required(add_chargement),name = 'add_chargement'),
    path('add_commande/',login_required(add_commande),name = 'add_commande'),
    path('add_chargement_lines/',login_required(add_chargement_lines),name = 'add_chargement_lines'),
    path('add_chargement_lines_IMP/',login_required(add_chargement_lines_IMP),name = 'add_chargement_lines_IMP'),
    path('add_commande_lines_IMP/',login_required(add_commande_lines_IMP),name = 'add_commande_lines_IMP'),
    path('add_commande_lines/',login_required(add_commande_lines),name = 'add_commande_lines'),
    path('update_chargement_lines/',login_required(update_chargement_lines),name = 'update_chargement_lines'),
    path('update_commande_lines/',login_required(update_commande_lines),name = 'update_commande_lines'),
    path('chargement_show/',login_required(chargement_show),name = 'chargement_show'),
    path('commade_show/',login_required(Commande_show),name = 'commade_show'),
    path('Get_Chargement/',login_required(Get_Chargement),name = 'Get_Chargement'),
    path('Simulation_Chargement/',login_required(Simulation_Chargement),name = 'Simulation_Chargement'),
    path('Simulation_Commande/',login_required(Simulation_Commande),name = 'Simulation_Commande'),    
    path('Stock_ERP/',login_required(Stock_ERP),name = 'Stock_ERP'),
    
    path('Import_Stock_Init/',login_required(Import_Stock_Init),name = 'Import_Stock_Init'),
    path('Save_Stock_Prevu_view/',login_required(Save_Stock_Prevu_view),name = 'Save_Stock_Prevu_view'),
    path('Save_Stock_Prevu/',login_required(Save_Stock_Prevu),name = 'Save_Stock_Prevu'),
    path('Prevision_vente/',login_required(Prevision_vente),name = 'Prevision_vente'),
    path('Import_Prevision_file/',login_required(Import_Prevision_file),name = 'Import_Prevision_file'),
    path('Transfert_Inter_Composany/',login_required(Transfert_Inter_Composany),name = 'Transfert_Inter_Composany'),
    path('Plan_Approu/',login_required(Plan_Approu),name = 'Plan_Approu'),
    path('Calcule_besoin/',login_required(Calcule_Besoin),name = 'Calcule_besoin'),
    path('Simulation_Chargement_calcule/',login_required(Simulation_Chargement_calcule),name = 'Simulation_Chargement_calcule'),
    path('Simulation_Chargement_calcule_V2/',login_required(Simulation_Chargement_calcule_V2),name = 'Simulation_Chargement_calcule_V2'),
    path('Simulation_Commande_calcule/',login_required(Simulation_Commande_calcule),name = 'Simulation_Commande_calcule'),
    path('import_chargement/',login_required(import_chargement),name = 'import_chargement'),
    path('import_commande/',login_required(import_commande),name = 'import_commande'),
    path('logout/', auth_views.LogoutView.as_view(), name='logout'),
    path('refresh/',refresh_data, name='refresh'),
]