Document views

* replaces function based views for creating, editing, removing and fetching documents with class based views
    * implemented for all major data types
This commit is contained in:
2022-08-22 07:52:22 +02:00
parent 7b35591f5d
commit a73046aa02
9 changed files with 313 additions and 362 deletions

View File

@@ -11,7 +11,8 @@ from intervention.autocomplete.intervention import InterventionAutocomplete
from intervention.views.check import check_view
from intervention.views.compensation import remove_compensation_view
from intervention.views.deduction import new_deduction_view, edit_deduction_view, remove_deduction_view
from intervention.views.document import new_document_view, get_document_view, remove_document_view, edit_document_view
from intervention.views.document import NewInterventionDocumentView, GetInterventionDocumentView, \
RemoveInterventionDocumentView, EditInterventionDocumentView
from intervention.views.intervention import index_view, new_view, new_id_view, detail_view, edit_view, remove_view
from intervention.views.log import InterventionLogView
from intervention.views.record import InterventionRecordView
@@ -41,10 +42,10 @@ urlpatterns = [
path('<id>/compensation/<comp_id>/remove', remove_compensation_view, name='remove-compensation'),
# Documents
path('<id>/document/new/', new_document_view, name='new-doc'),
path('<id>/document/<doc_id>', get_document_view, name='get-doc'),
path('<id>/document/<doc_id>/remove/', remove_document_view, name='remove-doc'),
path('<id>/document/<doc_id>/edit/', edit_document_view, name='edit-doc'),
path('<id>/document/new/', NewInterventionDocumentView.as_view(), name='new-doc'),
path('<id>/document/<doc_id>', GetInterventionDocumentView.as_view(), name='get-doc'),
path('<id>/document/<doc_id>/remove/', RemoveInterventionDocumentView.as_view(), name='remove-doc'),
path('<id>/document/<doc_id>/edit/', EditInterventionDocumentView.as_view(), name='edit-doc'),
# Deductions
path('<id>/deduction/new', new_deduction_view, name='new-deduction'),