# ============================================================
# ADDITIVE: Candidate Portal URLs
# Mounted from hrnexus/urls.py as:  path('api/', include('Recruitment.urls_portal'))
# HR / Admin : /api/recruitment/hiring-plus/candidate-links/...
# Candidate  : /api/recruitment/hiring-plus/public/portal/<token>/...   (no login)
# ============================================================
from django.urls import path
from rest_framework.routers import SimpleRouter

from . import views_portal as v

router = SimpleRouter()
P = "recruitment/hiring-plus/"
router.register(P + "candidate-links", v.CandidatePortalLinkViewSet, basename="hp-candidate-links")

PUB = P + "public/portal/<str:token>/"
urlpatterns = [
    path(PUB, v.PortalHome.as_view(), name="portal_home"),
    path(PUB + "submit/", v.PortalSubmit.as_view(), name="portal_submit"),
    path(PUB + "education/", v.PortalEducationList.as_view(), name="portal_edu"),
    path(PUB + "education/<int:pk>/", v.PortalEducationItem.as_view(), name="portal_edu_item"),
    path(PUB + "experience/", v.PortalExperienceList.as_view(), name="portal_exp"),
    path(PUB + "experience/<int:pk>/", v.PortalExperienceItem.as_view(), name="portal_exp_item"),
    path(PUB + "documents/", v.PortalDocuments.as_view(), name="portal_docs"),
    path(PUB + "documents/<int:pk>/", v.PortalDocumentItem.as_view(), name="portal_doc_item"),
] + router.urls
