from django.urls import path
from . import views
from django.urls import path
from .views import export_to_excel_or_pdf

urlpatterns = [
    path('', views.home, name='home'), # the IOS / PC check is in this view in view.py
    #path('login/', views.login_user, name='login'),
    path('logout/', views.logout_user, name='logout'),
    path('register/', views.register_user, name='register'),
    path('record/<int:pk>', views.customer_record, name='record'),
    path('delete_record/<int:pk>', views.delete_record, name='delete_record'),
    path('add_record/', views.add_record, name='add_record'),
    path('update_record/<int:pk>', views.update_record, name='update_record'),
    path('update_record_mobile/<int:pk>', views.update_record_mobile, name='update_record_mobile'),
    path('main_search_records/', views.main_search_records,name='main_search_records'),
    path('search_contact_relations/', views.search_contact_relations, name='search_contact_relations'),
    path('search_company_relations/', views.search_company_relations, name='search_company_relations'),
    path('search_project_relations/', views.search_project_relations, name='search_project_relations'),
    path('search_interaction_relations/', views.search_interaction_relations, name='search_interaction_relations'),
    path('article_filter_mobile/', views.article_filter_mobile,name='article_filter_mobile'),
    path('update_selectbox_sales_documents_edit/', views.update_selectbox_sales_documents_edit, name='update_selectbox_sales_documents_edit'),
    path("save_deposit_info/", views.save_deposit_info, name="save_deposit_info"),
    path("delete_deposit_info/", views.delete_deposit_info, name="delete_deposit_info"),
    path('update_project_mobile/', views.update_project_mobile,name='update_project_mobile'),
    path('update_company_mobile/', views.update_company_mobile,name='update_company_mobile'),
    path('update_contact_mobile/', views.update_contact_mobile, name='update_contact_mobile'),
    path('update_address_mobile/', views.update_address_mobile, name='update_address_mobile'),
    path('get_sales_documents_ref_contact/', views.get_sales_documents_ref_contact, name='get_sales_documents_ref_contact'),
    path('save_sales_documents_ref_contact/', views.save_sales_documents_ref_contact, name='save_sales_documents_ref_contact'),
    path('update_sales_documents_and_company_addresses/', views.update_sales_documents_and_company_addresses, name='update_sales_documents_and_company_addresses'),
    path('update_selectbox_company_mobile/', views.update_selectbox_company_mobile, name='update_selectbox_company_mobile'),
    path('update_selectbox_contact_mobile/', views.update_selectbox_contact_mobile, name='update_selectbox_contact_mobile'),
    path('update_selectbox_project_mobile/', views.update_selectbox_project_mobile, name='update_selectbox_project_mobile'),
    path('update_selectbox_address_mobile/', views.update_selectbox_address_mobile, name='update_selectbox_address_mobile'),
    path('get_sales_documents_product_price/', views.get_sales_documents_product_price, name='get_sales_documents_product_price'),
    path('update_sales_documents_edit/', views.update_sales_documents_edit, name='update_sales_documents_edit'),
    path('create_product_ajax/', views.create_product_ajax, name='create_product_ajax'),




    path('update_project_last_modification_date/', views.update_project_last_modification_date, name='update_project_last_modification_date'),
    path('update_sales_documents_last_modification_date/', views.update_sales_documents_last_modification_date, name='update_sales_documents_last_modification_date'),
    path('update_selectbox_interaction_project/', views.update_selectbox_interaction_project, name='update_selectbox_interaction_project'),
    path('sales_documents_all_forms_save_without_refresh/', views.sales_documents_all_forms_save_without_refresh, name='sales_documents_all_forms_save_without_refresh'),
    path('duplicate_sales_document/', views.duplicate_sales_document, name='duplicate_sales_document'),

    path('check_project_last_modification_date/', views.check_project_last_modification_date, name='check_project_last_modification_date'),
    path('check_address_last_modification_date/', views.check_address_last_modification_date, name='check_address_last_modification_date'),
    path("update_toggle_sales_documents_save_without_refresh/",views.update_toggle_sales_documents_save_without_refresh,name="update_toggle_sales_documents_save_without_refresh"),

    path('update_contact_mobile_save_without_refresh/', views.update_contact_mobile_save_without_refresh,name='update_contact_mobile_save_without_refresh'),
    path('update_company_mobile_save_without_refresh/', views.update_company_mobile_save_without_refresh, name='update_company_mobile_save_without_refresh'),
    path('update_project_mobile_save_without_refresh/', views.update_project_mobile_save_without_refresh, name='update_project_mobile_save_without_refresh'),
    path('update_address_mobile_save_without_refresh/', views.update_address_mobile_save_without_refresh, name='update_address_mobile_save_without_refresh'),
    path('add_or_remove_existing_contact_to_current_company/', views.add_or_remove_existing_contact_to_current_company,name='add_or_remove_existing_contact_to_current_company'),
    path('update_contact_interaction/', views.update_contact_interaction, name='update_contact_interaction'),
    path('update_company_interaction/', views.update_company_interaction, name='update_company_interaction'),
    path('update_project_interaction/', views.update_project_interaction, name='update_project_interaction'),
    path('update_interaction/', views.update_interaction, name='update_interaction'),
    path('update_interaction_save_without_refresh/', views.update_interaction_save_without_refresh, name='update_interaction_save_without_refresh'),
    path('get_email_form_contacts_of_company/', views.get_email_form_contacts_of_company, name='get_email_form_contacts_of_company'),
    path('get_email_form_django_users/', views.get_email_form_django_users, name='get_email_form_django_users'),

    path('test/', views.test,name='test'),
    path('export_to_excel_or_pdf/<str:xlsx_or_pdf>/<int:current_sales_documents_id>/',export_to_excel_or_pdf,name='export_to_excel_or_pdf'),

]

