fix: corretto funzionamento dei filtri per gli stati aperti dei ticket (ignora lo stato dei ticket)
This commit is contained in:
@@ -311,6 +311,14 @@ const DashboardView = {
|
||||
<div class="multiselect-list" id="form-select-responsibles"></div>
|
||||
</div>
|
||||
|
||||
<div style="display:flex; align-items:center; gap:var(--space-sm); margin-top:4px; background:var(--bg-offset); padding: var(--space-sm); border-radius: var(--radius-md); border: 1px dashed var(--border-light);">
|
||||
<input type="checkbox" id="form-series-bypass-state" style="width:18px; height:18px; cursor:pointer; margin:0;">
|
||||
<label for="form-series-bypass-state" style="font-weight:500; font-size:0.85rem; cursor:pointer; user-select:none; margin:0; display:flex; flex-direction:column;">
|
||||
<span>Ignora lo stato dei ticket</span>
|
||||
<span style="font-size:0.75rem; color:var(--text-tertiary); font-weight:normal;">Se attivo, mostra tutti i ticket creati nel periodo indipendentemente dal loro stato attuale.</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div style="display:flex; justify-content:flex-end; gap:var(--space-sm); border-top:1px solid var(--border-subtle); padding-top:var(--space-md); margin-top:var(--space-xs); flex-shrink:0;">
|
||||
<button type="button" class="btn btn-ghost btn-sm" id="btn-series-form-cancel">Annulla</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Salva Serie</button>
|
||||
@@ -413,6 +421,7 @@ const DashboardView = {
|
||||
const queues = this.getSelectedIds('form-select-queues');
|
||||
const owners = this.getSelectedIds('form-select-owners');
|
||||
const responsibles = this.getSelectedIds('form-select-responsibles');
|
||||
const bypass_state_filter = document.getElementById('form-series-bypass-state').checked ? 1 : 0;
|
||||
|
||||
// Preserve current visibility if editing
|
||||
let is_visible = 1;
|
||||
@@ -421,7 +430,7 @@ const DashboardView = {
|
||||
if (existing) is_visible = existing.is_visible;
|
||||
}
|
||||
|
||||
const payload = { name, statuses, types, queues, owners, responsibles, color, is_visible };
|
||||
const payload = { name, statuses, types, queues, owners, responsibles, color, is_visible, bypass_state_filter };
|
||||
|
||||
try {
|
||||
if (seriesId) {
|
||||
@@ -726,6 +735,7 @@ const DashboardView = {
|
||||
idInput.value = line ? line.id : '';
|
||||
nameInput.value = line ? line.name : '';
|
||||
colorInput.value = line ? line.color : '#4f46e5';
|
||||
document.getElementById('form-series-bypass-state').checked = line ? !!line.bypass_state_filter : false;
|
||||
|
||||
this.renderMultiselect('form-select-statuses', App.lookups.states || [], statuses);
|
||||
this.renderMultiselect('form-select-types', App.lookups.types || [], types);
|
||||
|
||||
Reference in New Issue
Block a user