from django.urls import path
from leads import views
from .views import MarkNotesReadView

app_name = 'leads'

urlpatterns = [
    
    path('list/',views.list_customer, name='list'),
    path('create/',views.create_customer, name='create'),
    path('convert-lead-to-customer/<int:id>/',views.convert_to_customer, name='convert_to_customer'),
    path('post/',views.post_lead, name='post'),
    path('edit/<int:id>/',views.edit_customer, name='edit'),
    path('show/<int:id>/',views.show_customer, name='show'),
    # path('reset-send-credentials/<int:id>/',views.reset_password, name='resetpassword'),
    # path('reset-send-credentials-contact/<int:id>/',views.reset_password_contact, name='resetpasswordadditionalcontact'),
    path('get-last-note/', views.get_last_note, name='get_last_note'),
    # path('activity/<int:id>/',views.activity_customer, name='activity_customer'),
    path('note/<int:id>/',views.note_customer, name='note_customer'),
    path('all-note/<int:id>/',views.all_note_customer, name='all_note_customer'),
    path('all-lead-notes/',views.all_lead_note, name='all_lead_note'),
    # path('synch/<int:id>/', views.sync_myob_customer, name='myob_synch'),
    # path('synchAll/', views.sync_myob_customer_all, name='myob_synch_all'),
    path('delete/<int:id>/', views.delete_customer, name='delete'),

    # path('deletecontact/<int:id>/', views.delete_customer_contact, name='deletecontact'),    
    # path('reset-password-customer/', views.reset_password, name='reset_password'),
    path('note-list/',views.note_list_customer, name='note_list'),
    path('note-activity/<int:id>/',views.note_activity, name='note_activity'),
    
    path('add-customer-note/<int:id>/', views.add_customer_note, name='add_customer_note'),
    path('update-lead-status/<int:id>/', views.update_lead_status, name='update_lead_status'),
    
    path('add-lead-attachment/<int:id>/', views.add_lead_attachment, name='add_lead_attachment'),
    path('lead-attachments-view/<int:lead_id>/', views.lead_attachments_view, name='lead_attachments_view'),
    path('update-customer-note/<int:id>/', views.update_customer_note, name='update_customer_note'), 
    path('note-delete/<int:id>/', views.note_delete, name='note_delete'),
    path('mark-notes-read/', MarkNotesReadView.as_view(), name='mark-notes-read'),
    path('process-note-action/<int:note_id>/', views.process_note_action, name='process_note_action'),
    path('export/leads/', views.export_leads_csv, name='export_list'),
    path('add-quote/<int:id>/', views.add_quote, name='add_quote'),
    path('add-lead-quote/', views.add_lead_quote, name='add_lead_quote'),
    path('post-quote/', views.create_Lead_Quotation, name='create_Lead_Quotation'),
    path('list-quote/', views.Lead_Quotation_list, name='Lead_Quotation_list'),
    path('list-quote/<int:lead_id>', views.Lead_Quotation_list_by_lead, name='list_quote_lead'), 
    path('edit-quote/<int:id>/', views.edit_quote, name='Lead_edit_quote'),
    path('send-quotation-mail/<int:id>/', views.send_quotation_mail_lead, name='send_quotation_mail'),
    path('send-note-email/<int:lead_id>/<int:note_id>/',  views.send_lead_note_email, name='send_lead_note_email'),
    path('CustToLeadInsert/',views.CustToLeadInsert, name='CustToLeadInsert'),
    path('cron/addDemoNote/', views.cron_addDemoNote, name='cron_addDemoNote'), # order_item id need
]
