from django.urls import path from . import views from allauth.account import views as allauth_views from django.conf.urls import ( handler400, handler403, handler404, handler500 ) urlpatterns = [ # main URLs path('', views.HomeView.as_view(), name='landing_page'), path('welcome/', views.WelcomeView.as_view(), name='welcome'), # Accounts URLs path('login/', views.Login.as_view(), name='account_login'), path('logout/', allauth_views.LogoutView.as_view(template_name='account/logout.html'), name='account_logout'), # path('signup/', allauth_views.SignupView.as_view(template_name='account/signup.html'), name='account_signup'), path('signup/', views.dealer_signup, name='account_signup'), path('password/change/', allauth_views.PasswordChangeView.as_view(template_name='account/password_change.html'), name='account_change_password'), path('password/reset/', allauth_views.PasswordResetView.as_view(template_name='account/password_reset.html'), name='account_reset_password'), path('password/reset/done/', allauth_views.PasswordResetDoneView.as_view(template_name='account/password_reset_done.html'), name='account_password_reset_done'), path('login/code/', allauth_views.RequestLoginCodeView.as_view(template_name='account/request_login_code.html')), #Dashboards path('dashboards/accounting/', views.AccountingDashboard.as_view(), name='accounting'), path('test/', views.TestView.as_view(), name='test'), # Dealer URLs path('dealers//', views.DealerDetailView.as_view(), name='dealer_detail'), path('dealers//update/', views.DealerUpdateView.as_view(), name='dealer_update'), path('dealers/activity/', views.UserActivityLogListView.as_view(), name='dealer_activity'), # path('dealers//delete/', views.DealerDeleteView.as_view(), name='dealer_delete'), # CRM URLs path('customers/', views.CustomerListView.as_view(), name='customer_list'), path('customers//', views.CustomerDetailView.as_view(), name='customer_detail'), path('customers/create/', views.CustomerCreateView.as_view(), name='customer_create'), path('customers//update/', views.CustomerUpdateView.as_view(), name='customer_update'), path('customers//delete/', views.delete_customer, name='customer_delete'), path('customers//create_lead/', views.create_lead, name='create_lead'), path('customers//opportunities/create/', views.OpportunityCreateView.as_view(), name='create_opportunity'), path('crm/leads/', views.LeadListView.as_view(), name='lead_list'), path('crm/opportunities//', views.OpportunityDetailView.as_view(), name='opportunity_detail'), path('crm/opportunities//edit/', views.OpportunityUpdateView.as_view(), name='update_opportunity'), path('crm/opportunities/', views.OpportunityListView.as_view(), name='opportunity_list'), path('crm/opportunities//delete/', views.delete_opportunity, name='delete_opportunity'), path('crm/opportunities//logs/', views.OpportunityLogsView.as_view(), name='opportunity_logs'), path('crm/notifications/', views.NotificationListView.as_view(), name='notifications_history'), path('crm/fetch_notifications/', views.fetch_notifications, name='fetch_notifications'), path('crm/notifications//mark_as_read/', views.mark_notification_as_read, name='mark_notification_as_read'), #Vendor URLs path('vendors', views.VendorListView.as_view(), name='vendor_list'), path('vendors//', views.VendorDetailView.as_view(), name='vendor_detail'), path('vendors/create/', views.VendorCreateView.as_view(), name='vendor_create'), path('vendors//update/', views.VendorUpdateView.as_view(), name='vendor_update'), path('vendors//delete/', views.VendorDetailView.as_view(), name='vendor_delete'), # Car URLs path('cars/inventory/', views.CarInventory.as_view(), name='car_inventory_all'), path('cars/inventory////', views.CarInventory.as_view(), name='car_inventory'), path('cars/inventory/stats', views.inventory_stats_view, name='inventory_stats'), path('cars//', views.CarDetailView.as_view(), name='car_detail'), path('cars//update/', views.CarUpdateView.as_view(), name='car_update'), path('cars//delete/', views.CarDeleteView.as_view(), name='car_delete'), path('cars//finance/create/', views.CarFinanceCreateView.as_view(), name='car_finance_create'), path('cars/finance//update/', views.CarFinanceUpdateView.as_view(), name='car_finance_update'), path('cars/add/', views.CarCreateView.as_view(), name='car_add'), path('ajax/', views.AjaxHandlerView.as_view(), name='ajax_handler'), path('cars//add-color/', views.CarColorCreate.as_view(), name='add_color'), path('cars//location/add/', views.CarLocationCreateView.as_view(), name='add_car_location'), path('cars//location/update/', views.CarLocationUpdateView.as_view(), name='transfer'), # path('cars//colors//update/',views.CarColorUpdateView.as_view(),name='color_update'), path('cars/reserve//', views.reserve_car_view, name='reserve_car'), path('reservations//', views.manage_reservation, name='reservations'), path('cars//add-custom-card/', views.CustomCardCreateView.as_view(), name='add_custom_card'), # Sales URLs quotation_create path('sales/quotations/create/', views.QuotationCreateView.as_view(), name='quotation_create'), path('sales/quotations//', views.QuotationDetailView.as_view(), name='quotation_detail'), path('sales/quotations/', views.QuotationListView.as_view(), name='quotation_list'), path('sales/quotations//confirm/', views.confirm_quotation, name='confirm_quotation'), path('sales/orders/detail//', views.SalesOrderDetailView.as_view(), name='order_detail'), path('quotation//pdf/', views.download_quotation_pdf, name='quotation_pdf'), path('generate_invoice//', views.generate_invoice, name='generate_invoice'), path('sales/quotations//mark_quotation/', views.mark_quotation, name='mark_quotation'), path('sales/quotations//post_quotation/', views.post_quotation, name='post_quotation'), path('sales/quotations//invoice_detail/', views.invoice_detail, name='invoice_detail'), path('subscriptions', views.SubscriptionPlans.as_view(), name='subscriptions'), #Payment URLs # path('sales/quotations//payment/', views.PaymentCreateView.as_view(), name='payment_create'), path('sales/quotations//payment/', views.payment_create, name='payment_create'), # Users URLs path('user/create/', views.UserCreateView.as_view(), name='user_create'), path('user//update/', views.UserUpdateView.as_view(), name='user_update'), path('user//', views.UserDetailView.as_view(), name='user_detail'), path('user/', views.UserListView.as_view(), name='user_list'), path('user//confirm/', views.UserDeleteview, name='user_delete'), # Organization URLs path('organizations/', views.OrganizationListView.as_view(), name='organization_list'), path('organizations//', views.OrganizationDetailView.as_view(), name='organization_detail'), path('organizations/create/', views.OrganizationCreateView.as_view(), name='organization_create'), path('organizations//update/', views.OrganizationUpdateView.as_view(), name='organization_update'), path('organizations//delete/', views.OrganizationDeleteView.as_view(), name='organization_delete'), # Representative URLs path('representatives/', views.RepresentativeListView.as_view(), name='representative_list'), path('representatives//', views.RepresentativeDetailView.as_view(), name='representative_detail'), path('representatives/create/', views.RepresentativeCreateView.as_view(), name='representative_create'), path('representatives//update/', views.RepresentativeUpdateView.as_view(), name='representative_update'), path('representatives//delete/', views.RepresentativeDeleteView.as_view(), name='representative_delete'), #Ledger URLS #Bank Account path('bank_accounts/', views.BankAccountListView.as_view(), name='bank_account_list'), path('bank_accounts//', views.BankAccountDetailView.as_view(), name='bank_account_detail'), path('bank_accounts/create/', views.BankAccountCreateView.as_view(), name='bank_account_create'), path('bank_accounts//update/', views.BankAccountUpdateView.as_view(), name='bank_account_update'), path('bank_accounts//delete/', views.bank_account_delete, name='bank_account_delete'), # Account path('coa_accounts/', views.AccountListView.as_view(), name='account_list'), path('coa_accounts//', views.AccountDetailView.as_view(), name='account_detail'), path('coa_accounts/create/', views.AccountCreateView.as_view(), name='account_create'), path('coa_accounts//update/', views.AccountUpdateView.as_view(), name='account_update'), path('coa_accounts//delete/', views.account_delete, name='account_delete'), # Estimate path('sales/estimates/', views.EstimateListView.as_view(), name='estimate_list'), path('sales/estimates//', views.EstimateDetailView.as_view(), name='estimate_detail'), path('sales/estimates/create/', views.create_estimate, name='estimate_create'), path('sales/estimates//estimate_mark_as/', views.estimate_mark_as, name='estimate_mark_as'), path('sales/estimates//preview/', views.EstimatePreviewView.as_view(), name='estimate_preview'), path('sales/estimates//payment_request/', views.PaymentRequest.as_view(), name='payment_request'), path('sales/estimates//send_email', views.send_email_view, name='send_email'), # Invoice path('sales/invoices/', views.InvoiceListView.as_view(), name='invoice_list'), path('sales/invoices//create/', views.invoice_create, name='invoice_create'), path('sales/invoices//', views.InvoiceDetailView.as_view(), name='invoice_detail'), path('sales/invoices//preview/', views.InvoicePreviewView.as_view(), name='invoice_preview'), path('sales/invoices//invoice_mark_as/', views.invoice_mark_as, name='invoice_mark_as'), # path('sales/estimates//preview/', views.EstimatePreviewView.as_view(), name='estimate_preview'), # path('send_email/', views.send_email, name='send_email'), #Payment path('sales/payments/', views.PaymentListView, name='payment_list'), path('sales/payments//create/', views.PaymentCreateView, name='payment_create'), path('sales/payments/create/', views.PaymentCreateView, name='payment_create'), path('sales/payments//payment_details/', views.PaymentDetailView, name='payment_details'), # path('sales/payments//update/', views.JournalEntryUpdateView.as_view(), name='payment_update'), # path('sales/payments//delete/', views.JournalEntryDeleteView.as_view(), name='payment_delete'), # path('sales/payments//preview/', views.JournalEntryPreviewView.as_view(), name='payment_preview'), # # Journal # path('sales/journal//create/', views.JournalEntryCreateView.as_view(), name='journal_create'), #Items path('items/services/', views.ItemServiceListView.as_view(), name='item_service_list'), path('items/services/create/', views.ItemServiceCreateView.as_view(), name='item_service_create'), ] handler404 = 'inventory.views.custom_page_not_found_view' handler500 = 'inventory.views.custom_error_view' handler403 = 'inventory.views.custom_permission_denied_view' handler400 = 'inventory.views.custom_bad_request_view'