feat(v2): streamline saved searches and favorites flows

This commit is contained in:
Alfredo Di Stasio
2026-03-13 14:40:38 +01:00
parent 0ed4fc57b8
commit 20d3ee7dae
6 changed files with 198 additions and 4 deletions

View File

@ -1,3 +1,4 @@
<div id="saved-search-table">
{% if saved_searches %}
<div class="table-wrap mt-4">
<table class="data-table">
@ -21,7 +22,14 @@
<div class="flex flex-wrap gap-2">
<a class="btn-secondary" href="{% url 'scouting:saved_search_run' saved_search.pk %}">Run</a>
<a class="btn-secondary" href="{% url 'scouting:saved_search_edit' saved_search.pk %}">Edit</a>
<form method="post" action="{% url 'scouting:saved_search_delete' saved_search.pk %}">
<form
method="post"
action="{% url 'scouting:saved_search_delete' saved_search.pk %}"
hx-post="{% url 'scouting:saved_search_delete' saved_search.pk %}"
hx-target="#saved-search-table"
hx-swap="outerHTML"
hx-indicator="#htmx-loading"
>
{% csrf_token %}
<button class="btn-secondary" type="submit">Delete</button>
</form>
@ -35,3 +43,4 @@
{% else %}
<div class="empty-state mt-4">No saved searches yet.</div>
{% endif %}
</div>