Added dropdown for Saved Filters.

This commit is contained in:
Julio-Oliveira-Encora 2024-04-26 10:16:31 -03:00
parent 6ec7fe5fda
commit 6013cc16bf
4 changed files with 6 additions and 7 deletions

Binary file not shown.

Binary file not shown.

View File

@ -7,14 +7,9 @@ import {isTruthy} from "./util";
*/
function handleSavedFilterChange(event: Event): void {
const savedFilter = event.currentTarget as HTMLSelectElement;
const savedFilterLength = savedFilter.options.length;
let baseUrl = savedFilter.baseURI.split("?")[0];
let preFilter = "?";
if (savedFilterLength === 0) {
return;
}
const selectedOptions = Array.from(savedFilter.options)
.filter(option => option.selected)
.map(option => `filter_id=${option.value}`)

View File

@ -14,10 +14,14 @@
</div>
</div>
<div class="col-3 d-print-none">
<span id="savedfilter">{{ filter_form.filter_id }}</span>
<div class="col-sm-auto d-print-none">
<label for="id_filter_id" class="my-1">{{ filter_form.filter_id.label }}</label>
</div>
<div class="col-sm-auto d-print-none">
{{ filter_form.filter_id }}
</div>
<div class="col-auto ms-auto d-print-none">
{% if request.user.is_authenticated and table_modal %}