Orders: - Удаление разрешено только для черновиков (draft) - Запрет удаления заказов с оплатой (amount_paid > 0) - Кнопка "Удалить" скрыта для недопустимых заказов Customers: - Inline-редактирование полей клиента - Улучшен дизайн карточки клиента - Добавлена история заказов и кошелька 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
24 lines
1.1 KiB
Python
24 lines
1.1 KiB
Python
from django.urls import path
|
|
from . import views
|
|
|
|
app_name = 'customers'
|
|
|
|
urlpatterns = [
|
|
path('', views.customer_list, name='customer-list'),
|
|
path('create/', views.customer_create, name='customer-create'),
|
|
path('import/', views.customer_import, name='customer-import'),
|
|
path('export/', views.customer_export, name='customer-export'),
|
|
path('<int:pk>/', views.customer_detail, name='customer-detail'),
|
|
path('<int:pk>/delete/', views.customer_delete, name='customer-delete'),
|
|
path('<int:pk>/wallet/deposit/', views.wallet_deposit, name='wallet-deposit'),
|
|
path('<int:pk>/wallet/withdraw/', views.wallet_withdraw, name='wallet-withdraw'),
|
|
|
|
# Contact channels
|
|
path('<int:customer_pk>/channels/add/', views.add_contact_channel, name='add-contact-channel'),
|
|
path('channels/<int:pk>/delete/', views.delete_contact_channel, name='delete-contact-channel'),
|
|
|
|
# AJAX API endpoints
|
|
path('api/search/', views.api_search_customers, name='api-search-customers'),
|
|
path('api/create/', views.api_create_customer, name='api-create-customer'),
|
|
path('<int:pk>/api/update/', views.api_update_customer, name='api-update-customer'),
|
|
] |