from django.urls import path

from . import views

urlpatterns = [
    path("list", views.TransactionListView.as_view(), name="transactions"),
    path("new", views.TransactionCreateView.as_view(), name="new_transaction"),
    path("<transaction>", views.TransactionDetailView.as_view(), name="transaction"),
    path(
        "<transaction>/edit",
        views.TransactionUpdateView.as_view(),
        name="edit_transaction",
    ),
    path(
        "<transaction>/delete",
        views.TransactionDeleteView.as_view(),
        name="del_transaction",
    ),
    path(
        "<transaction>/invoice/new",
        views.InvoiceCreateView.as_view(),
        name="new_invoice",
    ),
    path(
        "<transaction>/invoice/multiple",
        views.MultipleInvoiceCreateView.as_view(),
        name="multiple_invoice",
    ),
    path(
        "<transaction>/invoice/<invoice>",
        views.InvoiceUpdateView.as_view(),
        name="invoice",
    ),
    path(
        "<transaction>/invoice/<invoice>/delete",
        views.InvoiceDeleteView.as_view(),
        name="del_invoice",
    ),
]
