from django.urls import path
from . import views

app_name = 'myadmin'

urlpatterns = [
    path(
        '',
        views.myadmin_home,
        name='myadmin_home'
    ),

    path(
        'property-care/properties/review/',
        views.property_care_property_review_list,
        name='property_care_property_review_list'
    ),

    path(
        'property-care/properties/<int:pk>/review/',
        views.property_care_property_review_detail,
        name='property_care_property_review_detail'
    ),

    path(
        'property-care/properties/<int:pk>/approve/',
        views.property_care_property_approve,
        name='property_care_property_approve'
    ),

    path(
        'property-care/properties/<int:pk>/reject/',
        views.property_care_property_reject,
        name='property_care_property_reject'
    ),

    path(
        'property-care/properties/<int:pk>/care-plan/',
        views.property_care_final_plan_manage,
        name='property_care_final_plan_manage'
    ),

    path(
        'property-care/properties/<int:pk>/care-plan/finalize/',
        views.property_care_final_plan_finalize,
        name='property_care_final_plan_finalize'
    ),

    # =========================================================
    # PROPERTY CARE — MAINTENANCE VISITS
    # =========================================================

    path(
        'property-care/visits/',
        views.property_care_visit_list,
        name='property_care_visit_list'
    ),

    path(
        'property-care/properties/<int:property_id>/visits/add/',
        views.property_care_visit_create,
        name='property_care_visit_create'
    ),

    path(
        'property-care/visits/<int:pk>/',
        views.property_care_visit_detail,
        name='property_care_visit_detail'
    ),

    path(
        'property-care/visits/<int:pk>/edit/',
        views.property_care_visit_update,
        name='property_care_visit_update'
    ),

    path(
        'property-care/visits/<int:pk>/photos/add/',
        views.property_care_visit_photo_upload,
        name='property_care_visit_photo_upload'
    ),

    path(
        'property-care/visits/<int:pk>/photos/<int:photo_id>/delete/',
        views.property_care_visit_photo_delete,
        name='property_care_visit_photo_delete'
    ),

    # =========================================================
    # PROPERTY CARE — INSPECTION REPORTS
    # =========================================================

    path(
        'property-care/visits/<int:visit_id>/inspection-report/add/',
        views.property_care_inspection_report_create,
        name='property_care_inspection_report_create'
    ),

    path(
        'property-care/inspection-reports/<int:pk>/',
        views.property_care_inspection_report_detail,
        name='property_care_inspection_report_detail'
    ),

    path(
        'property-care/inspection-reports/<int:pk>/photos/add/',
        views.property_care_inspection_report_photo_upload,
        name='property_care_inspection_report_photo_upload'
    ),

    path(
        'property-care/inspection-reports/<int:pk>/photos/<int:photo_id>/delete/',
        views.property_care_inspection_report_photo_delete,
        name='property_care_inspection_report_photo_delete'
    ),
]