Align service-record PDF/DOCX generation with task-level data and naming. - Use Task.service_report_note as report note source - Use Task.scheduled_date for service-record dates - Rename per-task exports to MT...SN... format - Add monthly SN/PN ZIP download endpoints with 7-day retention - Add calendar 'Preuzmi sve' modal with both bulk download actions - Prefill work-hours day/date from scheduled_date for empty tables - Remove duplicate note table and clean extra DOCX page breaks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
29 lines
1.9 KiB
Python
29 lines
1.9 KiB
Python
from rest_framework.routers import DefaultRouter
|
|
from django.urls import path
|
|
from .views import (
|
|
CraneViewSet, VehicleViewSet, WorkOrderViewSet, VehicleServiceRecordViewSet,
|
|
WorkOrderInvoiceViewSet, ServiceContextNoteViewSet, VehicleNotificationViewSet, VehicleServicePhotoViewSet, VehicleServiceAttachmentViewSet, pusher_auth,
|
|
monthly_servicer_report_docx, monthly_costs_report_docx, monthly_service_tasks_archive, monthly_work_orders_archive, MonthlyServicerDayEntryViewSet,
|
|
)
|
|
|
|
router = DefaultRouter()
|
|
router.register(r'vehicles', VehicleViewSet, basename='vehicle')
|
|
router.register(r'cranes', CraneViewSet, basename='crane')
|
|
router.register(r'work-orders', WorkOrderViewSet, basename='workorder')
|
|
router.register(r'work-order-invoices', WorkOrderInvoiceViewSet, basename='work-order-invoice')
|
|
router.register(r'service-notes', ServiceContextNoteViewSet, basename='service-context-note')
|
|
router.register(r'service-records', VehicleServiceRecordViewSet, basename='service-record')
|
|
router.register(r'notifications', VehicleNotificationViewSet, basename='vehicle-notification')
|
|
router.register(r'service-photos', VehicleServicePhotoViewSet, basename='service-photo')
|
|
router.register(r'service-attachments', VehicleServiceAttachmentViewSet, basename='service-attachment')
|
|
router.register(r'monthly-servicer-day-entries', MonthlyServicerDayEntryViewSet, basename='monthly-servicer-day-entry')
|
|
|
|
urlpatterns = router.urls
|
|
|
|
urlpatterns += [
|
|
path('pusher-auth/', pusher_auth, name='pusher-auth'),
|
|
path('reports/monthly-servicer/', monthly_servicer_report_docx, name='monthly-servicer-report'),
|
|
path('reports/monthly-costs/', monthly_costs_report_docx, name='monthly-costs-report'),
|
|
path('reports/monthly-service-tasks-archive/', monthly_service_tasks_archive, name='monthly-service-tasks-archive'),
|
|
path('reports/monthly-work-orders-archive/', monthly_work_orders_archive, name='monthly-work-orders-archive'),
|
|
] |