from django.conf.urls import patterns, url

from . import views


urlpatterns = patterns('',
    url(r'^$',
        views.DashboardView.as_view(),
        name="dashboard"),

    # Organizations
    url(r'^organization/$',
        views.OrganizationListView.as_view(),
        name="organization-list"),
    url(r'^organization/selector/$',
        views.OrganizationSelectorView.as_view(),
        name="organization-selector"),
    url(r'^organization/create/$',
        views.OrganizationCreateView.as_view(),
        name="organization-create"),
    url(r'^organization/(?P<pk>\d+)/edit/$',
        views.OrganizationUpdateView.as_view(),
        name="organization-edit"),
    url(r'^organization/(?P<pk>\d+)/detail/$',
        views.OrganizationDetailView.as_view(),
        name="organization-detail"),
    url(r'^organization/(?P<pk>\d+)/select/$',
        views.OrganizationSelectionView.as_view(),
        name="organization-select"),

    # Tax Rates
    url(r'^tax_rates/$',
        views.TaxRateListView.as_view(),
        name="tax_rate-list"),
    url(r'^tax_rates/create/$',
        views.TaxRateCreateView.as_view(),
        name="tax_rate-create"),
    url(r'^tax_rates/(?P<pk>\d+)/edit/$',
        views.TaxRateUpdateView.as_view(),
        name="tax_rate-edit"),
    url(r'^tax_rates/(?P<pk>\d+)/delete/$',
        views.TaxRateDeleteView.as_view(),
        name="tax_rate-delete"),

    # Estimates
    url(r'^estimate/$',
        views.EstimateListView.as_view(),
        name="estimate-list"),
    url(r'^estimate/create/$',
        views.EstimateCreateView.as_view(),
        name="estimate-create"),
    url(r'^estimate/(?P<pk>\d+)/edit/$',
        views.EstimateUpdateView.as_view(),
        name="estimate-edit"),
    url(r'^estimate/(?P<pk>\d+)/delete/$',
        views.EstimateDeleteView.as_view(),
        name="estimate-delete"),
    url(r'^estimate/(?P<pk>\d+)/detail/$',
        views.EstimateDetailView.as_view(),
        name="estimate-detail"),

    # Invoices
    url(r'^invoice/$',
        views.InvoiceListView.as_view(),
        name="invoice-list"),
    url(r'^invoice/create/$',
        views.InvoiceCreateView.as_view(),
        name="invoice-create"),
    url(r'^invoice/(?P<pk>\d+)/edit/$',
        views.InvoiceUpdateView.as_view(),
        name="invoice-edit"),
    url(r'^invoice/(?P<pk>\d+)/delete/$',
        views.InvoiceDeleteView.as_view(),
        name="invoice-delete"),
    url(r'^invoice/(?P<pk>\d+)/detail/$',
        views.InvoiceDetailView.as_view(),
        name="invoice-detail"),

    # Bills
    url(r'^bill/$',
        views.BillListView.as_view(),
        name="bill-list"),
    url(r'^bill/create/$',
        views.BillCreateView.as_view(),
        name="bill-create"),
    url(r'^bill/(?P<pk>\d+)/edit/$',
        views.BillUpdateView.as_view(),
        name="bill-edit"),
    url(r'^bill/(?P<pk>\d+)/delete/$',
        views.BillDeleteView.as_view(),
        name="bill-delete"),
    url(r'^bill/(?P<pk>\d+)/detail/$',
        views.BillDetailView.as_view(),
        name="bill-detail"),

    # ExpenseClaims
    url(r'^expense-claim/$',
        views.ExpenseClaimListView.as_view(),
        name="expense_claim-list"),
    url(r'^expense-claim/create/$',
        views.ExpenseClaimCreateView.as_view(),
        name="expense_claim-create"),
    url(r'^expense-claim/(?P<pk>\d+)/edit/$',
        views.ExpenseClaimUpdateView.as_view(),
        name="expense_claim-edit"),
    url(r'^expense-claim/(?P<pk>\d+)/delete/$',
        views.ExpenseClaimDeleteView.as_view(),
        name="expense_claim-delete"),
    url(r'^expense-claim/(?P<pk>\d+)/detail/$',
        views.ExpenseClaimDetailView.as_view(),
        name="expense_claim-detail"),

    # Payments
    url(r'^payment/(?P<pk>\d+)/edit/$',
        views.PaymentUpdateView.as_view(),
        name="payment-edit"),
    url(r'^payment/(?P<pk>\d+)/delete/$',
        views.PaymentDeleteView.as_view(),
        name="payment-delete"),
)
