fix(prospecting): add missing /prospecting prefix and fix broken template macros
Some checks failed
Some checks failed
The API router was missing prefix="/prospecting", causing all endpoints to register at /api/v1/admin/stats instead of /api/v1/admin/prospecting/stats. Also fix 500 errors on prospects, leads, and scan-jobs pages caused by importing non-existent macro names (table_empty → table_empty_state, pagination_controls → pagination). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ from .admin_leads import router as admin_leads_router
|
||||
from .admin_prospects import router as admin_prospects_router
|
||||
from .admin_stats import router as admin_stats_router
|
||||
|
||||
router = APIRouter()
|
||||
router = APIRouter(prefix="/prospecting")
|
||||
|
||||
router.include_router(admin_prospects_router, tags=["prospecting-prospects"])
|
||||
router.include_router(admin_enrichment_router, tags=["prospecting-enrichment"])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "admin/base.html" %}
|
||||
{% from 'shared/macros/headers.html' import page_header %}
|
||||
{% from 'shared/macros/alerts.html' import loading_state, error_state %}
|
||||
{% from 'shared/macros/pagination.html' import pagination_controls %}
|
||||
{% from 'shared/macros/pagination.html' import pagination %}
|
||||
|
||||
{% block title %}Leads{% endblock %}
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ pagination_controls() }}
|
||||
{{ pagination() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends "admin/base.html" %}
|
||||
{% from 'shared/macros/headers.html' import page_header %}
|
||||
{% from 'shared/macros/alerts.html' import loading_state, error_state %}
|
||||
{% from 'shared/macros/tables.html' import table_header, table_empty %}
|
||||
{% from 'shared/macros/pagination.html' import pagination_controls %}
|
||||
{% from 'shared/macros/tables.html' import table_header, table_empty_state %}
|
||||
{% from 'shared/macros/pagination.html' import pagination %}
|
||||
|
||||
{% block title %}Prospects{% endblock %}
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
|
||||
{{ table_empty_state(7, title='No prospects found', show_condition='prospects.length === 0') }}
|
||||
<template x-for="p in prospects" :key="p.id">
|
||||
<tr class="text-gray-700 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700">
|
||||
<td class="px-4 py-3">
|
||||
@@ -123,10 +124,9 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ table_empty('No prospects found') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ pagination_controls() }}
|
||||
{{ pagination() }}
|
||||
|
||||
<!-- Create Prospect Modal --> {# noqa: FE-004 #}
|
||||
<div x-show="showCreateModal" x-cloak
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "admin/base.html" %}
|
||||
{% from 'shared/macros/headers.html' import page_header %}
|
||||
{% from 'shared/macros/alerts.html' import loading_state, error_state %}
|
||||
{% from 'shared/macros/pagination.html' import pagination_controls %}
|
||||
{% from 'shared/macros/pagination.html' import pagination %}
|
||||
|
||||
{% block title %}Scan Jobs{% endblock %}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ pagination_controls() }}
|
||||
{{ pagination() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
|
||||
Reference in New Issue
Block a user