feat: aggiunta ricerca spudorata. progress: ripreso con il tentativo di invio delle mail che non creino nuovi ticket
This commit is contained in:
1 parent
3650bf5790
commit
8d24759a15
18 files changed
+1661
-98
No files matched your search
@@ -23,6 +23,15 @@ const Filters = {
|
||||
customer_user_id: '',
|
||||
date_from: '',
|
||||
date_to: '',
|
||||
},
|
||||
spudorata: {
|
||||
queue_id: '',
|
||||
state_id: '',
|
||||
priority_id: '',
|
||||
user_id: '',
|
||||
customer_user_id: '',
|
||||
date_from: '',
|
||||
date_to: '',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -38,11 +47,15 @@ const Filters = {
|
||||
|
||||
// Dynamic state getter based on active mode
|
||||
get state() {
|
||||
return this.allStates[this.currentMode];
|
||||
return this.allStates[this.currentMode] || this.allStates.general;
|
||||
},
|
||||
|
||||
set state(val) {
|
||||
this.allStates[this.currentMode] = val;
|
||||
if (this.allStates[this.currentMode]) {
|
||||
this.allStates[this.currentMode] = val;
|
||||
} else {
|
||||
this.allStates.general = val;
|
||||
}
|
||||
},
|
||||
|
||||
/** Load saved filters from localStorage */
|
||||
@@ -56,6 +69,10 @@ const Filters = {
|
||||
if (savedMy) {
|
||||
Object.assign(this.allStates.my, JSON.parse(savedMy));
|
||||
}
|
||||
const savedSpudorata = localStorage.getItem('otrs_turbo_filters_spudorata');
|
||||
if (savedSpudorata) {
|
||||
Object.assign(this.allStates.spudorata, JSON.parse(savedSpudorata));
|
||||
}
|
||||
// Always sync mode 'my' user_id to activeAgentId
|
||||
const activeAgentId = localStorage.getItem('activeAgentId') || '1';
|
||||
this.allStates.my.user_id = activeAgentId;
|
||||
@@ -222,7 +239,7 @@ const Filters = {
|
||||
<span class="multiselect-label" id="queue-multiselect-label" style="text-overflow:ellipsis; overflow:hidden; white-space:nowrap;">${App.escapeHtml(queueLabel)}</span>
|
||||
<span style="font-size:0.6rem; color:var(--text-muted); margin-left:6px;">▼</span>
|
||||
</div>
|
||||
<div class="multiselect-popover" id="queue-multiselect-popover" style="display:none; position:absolute; left:0; top:100%; width: 280px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm); box-shadow:var(--shadow-md); z-index:1002; padding:var(--space-xs); margin-top:4px;">
|
||||
<div class="multiselect-popover" id="queue-multiselect-popover" style="display:none; position:absolute; left:0; top:100%; min-width: 480px; width: max-content; max-width: 85vw; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm); box-shadow:var(--shadow-md); z-index:1002; padding:var(--space-xs); margin-top:4px;">
|
||||
<input type="text" class="form-input ms-search" placeholder="Cerca coda..." style="width:100%; padding:4px 8px; font-size:0.78rem; margin-bottom:6px; box-sizing:border-box;" autocomplete="off" />
|
||||
<div class="ms-items-container" style="display:flex; flex-direction:column; gap:2px; max-height:300px; overflow-y:auto; padding-bottom:6px; border-bottom:1px solid var(--border-subtle);">
|
||||
${(lookups.queues || []).map(q => {
|
||||
@@ -230,7 +247,7 @@ const Filters = {
|
||||
const isSelected = selectedList.includes(String(q.id));
|
||||
const activeStyle = isSelected ? 'background: var(--accent-primary); color: #fff;' : '';
|
||||
return `
|
||||
<div class="ms-item ${isSelected ? 'active' : ''}" data-value="${q.id}" style="padding: 4px 8px; border-radius: var(--radius-sm); font-size: 0.8rem; cursor: pointer; user-select: none; transition: background 0.1s ease; ${activeStyle}">
|
||||
<div class="ms-item ${isSelected ? 'active' : ''}" data-value="${q.id}" style="padding: 4px 8px; border-radius: var(--radius-sm); font-size: 0.8rem; cursor: pointer; user-select: none; transition: background 0.1s ease; white-space: nowrap; ${activeStyle}">
|
||||
${App.escapeHtml(q.name)}
|
||||
</div>
|
||||
`;
|
||||
|
||||
Reference in new issue
Block a user