fix: resa più rapida la navigazione fra i ticket, torna alla lista non ricarica tutto.
This commit is contained in:
@@ -325,7 +325,10 @@ const Filters = {
|
|||||||
<span class="filter-label">A Data/Ora</span>
|
<span class="filter-label">A Data/Ora</span>
|
||||||
<input type="datetime-local" class="filter-select" data-filter="date_to" id="filter-date-to" value="${this.state.date_to || ''}" style="width: 170px; padding: 4px 8px; font-family: inherit; font-size: 0.85rem;" />
|
<input type="datetime-local" class="filter-select" data-filter="date_to" id="filter-date-to" value="${this.state.date_to || ''}" style="width: 170px; padding: 4px 8px; font-family: inherit; font-size: 0.85rem;" />
|
||||||
</div>
|
</div>
|
||||||
<div class="filters-actions">
|
<div class="filters-actions" style="display:flex; gap:6px; align-items:center;">
|
||||||
|
<button class="btn btn-primary btn-xs" id="filter-refresh" title="Aggiorna lista ticket" style="display:inline-flex; align-items:center; gap:4px; height:26px; padding:0 10px; font-size:0.78rem;">
|
||||||
|
🔄 Aggiorna
|
||||||
|
</button>
|
||||||
<button class="btn btn-ghost btn-xs" id="filter-reset">Reset</button>
|
<button class="btn btn-ghost btn-xs" id="filter-reset">Reset</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -622,6 +625,13 @@ const Filters = {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const refreshBtn = document.getElementById('filter-refresh');
|
||||||
|
if (refreshBtn) {
|
||||||
|
refreshBtn.addEventListener('click', () => {
|
||||||
|
if (onFilterChange) onFilterChange();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const resetBtn = document.getElementById('filter-reset');
|
const resetBtn = document.getElementById('filter-reset');
|
||||||
if (resetBtn) {
|
if (resetBtn) {
|
||||||
resetBtn.addEventListener('click', () => {
|
resetBtn.addEventListener('click', () => {
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ const TicketListView = {
|
|||||||
|
|
||||||
async render() {
|
async render() {
|
||||||
const container = document.getElementById('view-container');
|
const container = document.getElementById('view-container');
|
||||||
|
if (!container.querySelector('.ticket-table-wrapper') && !container.querySelector('.ticket-table')) {
|
||||||
container.innerHTML = '<div class="loading-screen"><div class="spinner"></div><p>Caricamento ticket...</p></div>';
|
container.innerHTML = '<div class="loading-screen"><div class="spinner"></div><p>Caricamento ticket...</p></div>';
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Fetch lookups for filter dropdowns
|
// Fetch lookups for filter dropdowns
|
||||||
|
|||||||
Reference in New Issue
Block a user