Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
861 changes: 861 additions & 0 deletions apps/admin_dashboard/src/main.tsx

Large diffs are not rendered by default.

617 changes: 615 additions & 2 deletions apps/api/src/five08/backend/api.py

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions apps/api/src/five08/backend/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ class BackendRouteSurface(Protocol):
dashboard_assign_onboarder_handler: RouteHandler
dashboard_audit_events_handler: RouteHandler
dashboard_bulk_update_projects_handler: RouteHandler
dashboard_candidate_blurb_draft_handler: RouteHandler
dashboard_candidate_blurbs_handler: RouteHandler
dashboard_configuration_handler: RouteHandler
dashboard_create_project_handler: RouteHandler
dashboard_erpnext_account_managers_handler: RouteHandler
dashboard_erpnext_contacts_handler: RouteHandler
dashboard_erpnext_cost_centers_handler: RouteHandler
dashboard_erpnext_customers_handler: RouteHandler
dashboard_gig_detail_handler: RouteHandler
dashboard_gig_candidate_blurb_draft_handler: RouteHandler
dashboard_gig_candidate_blurbs_handler: RouteHandler
dashboard_gigs_handler: RouteHandler
dashboard_handler: RouteHandler
dashboard_job_leads_handler: RouteHandler
Expand Down Expand Up @@ -116,6 +120,10 @@ def register_routes(app: FastAPI, api: BackendRouteSurface) -> None:
dashboard_assign_onboarder_handler = api.dashboard_assign_onboarder_handler
dashboard_audit_events_handler = api.dashboard_audit_events_handler
dashboard_bulk_update_projects_handler = api.dashboard_bulk_update_projects_handler
dashboard_candidate_blurb_draft_handler = (
api.dashboard_candidate_blurb_draft_handler
)
dashboard_candidate_blurbs_handler = api.dashboard_candidate_blurbs_handler
dashboard_configuration_handler = api.dashboard_configuration_handler
dashboard_create_project_handler = api.dashboard_create_project_handler
dashboard_erpnext_account_managers_handler = (
Expand All @@ -125,6 +133,10 @@ def register_routes(app: FastAPI, api: BackendRouteSurface) -> None:
dashboard_erpnext_cost_centers_handler = api.dashboard_erpnext_cost_centers_handler
dashboard_erpnext_customers_handler = api.dashboard_erpnext_customers_handler
dashboard_gig_detail_handler = api.dashboard_gig_detail_handler
dashboard_gig_candidate_blurb_draft_handler = (
api.dashboard_gig_candidate_blurb_draft_handler
)
dashboard_gig_candidate_blurbs_handler = api.dashboard_gig_candidate_blurbs_handler
dashboard_gigs_handler = api.dashboard_gigs_handler
dashboard_handler = api.dashboard_handler
dashboard_delete_job_channel_handler = api.dashboard_delete_job_channel_handler
Expand Down Expand Up @@ -241,6 +253,36 @@ def register_routes(app: FastAPI, api: BackendRouteSurface) -> None:
dashboard_gig_detail_handler,
methods=["GET"],
)
app.add_api_route(
"/dashboard/api/people/{crm_contact_id}/blurbs",
dashboard_candidate_blurbs_handler,
methods=["GET", "POST"],
)
app.add_api_route(
"/dashboard/api/people/{crm_contact_id}/blurbs/draft",
dashboard_candidate_blurb_draft_handler,
methods=["POST"],
)
app.add_api_route(
"/dashboard/api/gigs/{engagement_id}/applications/{application_id}/blurbs",
dashboard_candidate_blurbs_handler,
methods=["GET", "POST"],
)
app.add_api_route(
"/dashboard/api/gigs/{engagement_id}/applications/{application_id}/blurbs/draft",
dashboard_candidate_blurb_draft_handler,
methods=["POST"],
)
app.add_api_route(
"/dashboard/api/gigs/{engagement_id}/blurbs",
dashboard_gig_candidate_blurbs_handler,
methods=["POST"],
)
app.add_api_route(
"/dashboard/api/gigs/{engagement_id}/blurbs/draft",
dashboard_gig_candidate_blurb_draft_handler,
methods=["POST"],
)
app.add_api_route(
"/dashboard/api/gig-leads",
dashboard_job_leads_handler,
Expand Down
42 changes: 42 additions & 0 deletions apps/api/src/five08/backend/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,48 @@ class DashboardGigApplicationCreateRequest(BaseModel):
crm_profile: str = Field(min_length=1, max_length=500)


class DashboardCandidateBlurbSaveRequest(BaseModel):
"""Payload for saving a reusable or gig-scoped candidate blurb."""

text: str = Field(min_length=1, max_length=4_000)
scope: Literal["general", "gig"] = "general"
author_kind: Literal["candidate", "candidate_attributed", "team", "ai"] = (
"candidate_attributed"
)
source: Literal[
"dashboard",
"discord_message",
"discord_command",
"discord_dm_paste",
"ai",
] = "dashboard"
status: Literal["draft", "approved"] = "approved"
generation_metadata: dict[str, Any] | None = None
replaces_blurb_id: str | None = Field(default=None, max_length=64)


class DashboardCandidateBlurbDraftRequest(BaseModel):
"""Optional controls for a candidate blurb draft request."""

scope: Literal["general", "gig"] = "general"


class DashboardGigCandidateBlurbSaveRequest(DashboardCandidateBlurbSaveRequest):
"""Save a gig blurb for a candidate who has no application yet."""

person_id: str | None = Field(default=None, max_length=255)
crm_contact_id: str | None = Field(default=None, max_length=255)
discord_user_id: str | None = Field(default=None, max_length=255)


class DashboardGigCandidateBlurbDraftRequest(DashboardCandidateBlurbDraftRequest):
"""Draft a gig blurb for a candidate who has no application yet."""

person_id: str | None = Field(default=None, max_length=255)
crm_contact_id: str | None = Field(default=None, max_length=255)
discord_user_id: str | None = Field(default=None, max_length=255)


class DashboardConfigurationUpdateRequest(BaseModel):
"""Payload for updating one admin-managed configuration value."""

Expand Down
Loading