Files
smoothschedule/smoothschedule/tickets/urls.py
poduck 200a6b3dd4 feat: Enhance ticketing system with categories, templates, SLA tracking, and fix frontend integration
- Add ticket categories (billing, technical, feature_request, etc.) with type-specific options
- Add TicketTemplate and CannedResponse models for quick ticket creation
- Implement SLA tracking with due_at and first_response_at fields
- Add is_platform_admin and is_customer helper functions to fix permission checks
- Register models in Django admin with filters and fieldsets
- Enhance signals with error handling for WebSocket notifications
- Fix frontend API URLs for templates and canned responses
- Update PlatformSupport page to use real ticketing API
- Add comprehensive i18n translations for all ticket fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 05:32:36 -05:00

32 lines
994 B
Python

from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
TicketViewSet, TicketCommentViewSet,
TicketTemplateViewSet, CannedResponseViewSet
)
app_name = 'tickets'
router = DefaultRouter()
# Main tickets endpoint - will be at /api/tickets/
router.register(r'', TicketViewSet, basename='ticket')
# Nested comments route - will be at /api/tickets/{ticket_pk}/comments/
router.register(
r'(?P<ticket_pk>[^/.]+)/comments',
TicketCommentViewSet,
basename='ticket-comment'
)
# Separate router for templates and canned responses
templates_router = DefaultRouter()
templates_router.register(r'', TicketTemplateViewSet, basename='ticket-template')
canned_router = DefaultRouter()
canned_router.register(r'', CannedResponseViewSet, basename='canned-response')
urlpatterns = [
path('', include(router.urls)),
path('templates/', include(templates_router.urls)),
path('canned-responses/', include(canned_router.urls)),
]