style: riposizionati pulsanti modifiche rapide delle pagine ticket, a mio carico e ricerca spudorata.
This commit is contained in:
1 parent
ce904756dd
commit
0b6907969d
4 files changed
+128
-24
No files matched your search
@@ -1232,6 +1232,31 @@ body {
|
|||||||
color: var(--accent-primary-hover);
|
color: var(--accent-primary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.batch-bar-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--space-sm);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-bar-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
gap: 6px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-bar-right .btn svg {
|
||||||
|
transition: transform 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.batch-bar-right .btn:not(:disabled):hover svg {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
/* ---- Pagination ---- */
|
/* ---- Pagination ---- */
|
||||||
.pagination {
|
.pagination {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -96,12 +96,10 @@ const RicercaSpudorataView = {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Batch Actions Bar -->
|
<!-- Batch Actions Bar -->
|
||||||
<div class="batch-bar" id="batch-bar">
|
<div class="batch-bar" id="batch-bar" style="display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap;">
|
||||||
<div style="display:flex; align-items:center; gap:var(--space-sm);">
|
<!-- Colonna Sinistra: Configurazioni e Filtri di Modifica -->
|
||||||
<span class="batch-count" id="batch-count">0 selezionati</span>
|
<div class="batch-bar-left" style="display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; flex: 1; min-width: 300px;">
|
||||||
<button class="btn btn-ghost btn-xs" id="batch-select-all">Seleziona visibili</button>
|
<span class="batch-count" id="batch-count" style="margin-right: 4px;">0 selezionati</span>
|
||||||
<button class="btn btn-ghost btn-xs" id="batch-copy-tns" style="margin-left: 8px;">Copia numeri</button>
|
|
||||||
</div>
|
|
||||||
<div class="filter-group">
|
<div class="filter-group">
|
||||||
<span class="filter-label">Stato</span>
|
<span class="filter-label">Stato</span>
|
||||||
<select class="filter-select" id="batch-state">
|
<select class="filter-select" id="batch-state">
|
||||||
@@ -138,11 +136,40 @@ const RicercaSpudorataView = {
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
` : ''}
|
` : ''}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Colonna Destra: Pulsanti delle Azioni -->
|
||||||
|
<div class="batch-bar-right" style="display: flex; flex-direction: column; align-items: flex-end; gap: 6px;">
|
||||||
|
<div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end;">
|
||||||
<button class="btn btn-primary btn-sm" id="batch-apply">Applica</button>
|
<button class="btn btn-primary btn-sm" id="batch-apply">Applica</button>
|
||||||
<button class="btn btn-primary btn-sm" id="batch-add-group" disabled style="background: var(--accent-primary); border-color: var(--accent-primary); margin-left: 8px;">Aggiungi a gruppo</button>
|
<button class="btn btn-primary btn-sm" id="batch-add-group" disabled title="Aggiungi a gruppo" style="background: var(--accent-primary); border-color: var(--accent-primary); height: 32px; width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;">
|
||||||
<button class="btn btn-primary btn-sm" id="batch-merge" disabled style="background: rgba(160, 65, 71, 0.32); border-color: var(--accent-primary); color: var(--text-primary); margin-left: 8px;">Unisci Selezionati</button>
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
|
||||||
<button class="btn btn-primary btn-sm" id="batch-open-tabs" disabled style="background: var(--accent-primary); border-color: var(--accent-primary); margin-left: 8px;">Apri ticket in schede</button>
|
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
||||||
<button class="btn btn-ghost btn-xs" id="batch-cancel">Annulla</button>
|
<circle cx="9" cy="7" r="4"></circle>
|
||||||
|
<path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
|
||||||
|
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-sm" id="batch-merge" disabled title="Unisci Selezionati" style="background: rgba(160, 65, 71, 0.32); border-color: var(--accent-primary); color: var(--text-primary); height: 32px; width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
|
||||||
|
<circle cx="18" cy="18" r="3"></circle>
|
||||||
|
<circle cx="6" cy="6" r="3"></circle>
|
||||||
|
<path d="M6 21V9a9 9 0 0 0 9 9"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-sm" id="batch-open-tabs" disabled title="Apri ticket in schede" style="background: var(--accent-primary); border-color: var(--accent-primary); height: 32px; width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
|
||||||
|
<path d="M2 9a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9z"></path>
|
||||||
|
<path d="M6 3h12a2 2 0 0 1 2 2v12"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center; gap: 6px; justify-content: flex-end;">
|
||||||
|
<button class="btn btn-ghost btn-xs" id="batch-select-all">Seleziona visibili</button>
|
||||||
|
<button class="btn btn-ghost btn-xs" id="batch-copy-tns">Copia numeri</button>
|
||||||
|
<button class="btn btn-ghost btn-xs" id="batch-cancel" title="Annulla selezione">Annulla</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Filters Bar (Operates 100% Client-Side in Memory) -->
|
<!-- Filters Bar (Operates 100% Client-Side in Memory) -->
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ const TicketDetailView = {
|
|||||||
if (!this.ticketId) return;
|
if (!this.ticketId) return;
|
||||||
const body = this.noteQuill ? this.noteQuill.root.innerHTML.trim() : '';
|
const body = this.noteQuill ? this.noteQuill.root.innerHTML.trim() : '';
|
||||||
const subject = document.getElementById('note-subject') ? document.getElementById('note-subject').value.trim() : '';
|
const subject = document.getElementById('note-subject') ? document.getElementById('note-subject').value.trim() : '';
|
||||||
const time_unit = document.getElementById('note-time-units') ? document.getElementById('note-time-units').value.trim() : '';
|
const time_unit = (document.getElementById('note-time-units') ? document.getElementById('note-time-units').value.trim() : '') ||
|
||||||
|
(document.getElementById('note-time-units-bottom') ? document.getElementById('note-time-units-bottom').value.trim() : '');
|
||||||
const ticket_state_id = document.getElementById('note-ticket-state') ? document.getElementById('note-ticket-state').value : '';
|
const ticket_state_id = document.getElementById('note-ticket-state') ? document.getElementById('note-ticket-state').value : '';
|
||||||
|
|
||||||
if ((body !== '<p><br></p>' && body !== '') || subject !== '' || time_unit !== '' || this.noteAttachments.length > 0 || ticket_state_id !== '') {
|
if ((body !== '<p><br></p>' && body !== '') || subject !== '' || time_unit !== '' || this.noteAttachments.length > 0 || ticket_state_id !== '') {
|
||||||
@@ -3587,7 +3588,11 @@ const TicketDetailView = {
|
|||||||
<div class="upload-file-list" id="note-file-list" style="margin-bottom: var(--space-sm);"></div>
|
<div class="upload-file-list" id="note-file-list" style="margin-bottom: var(--space-sm);"></div>
|
||||||
|
|
||||||
<div style="display:flex; gap:var(--space-md); justify-content:space-between; align-items:center; flex-wrap:wrap;">
|
<div style="display:flex; gap:var(--space-md); justify-content:space-between; align-items:center; flex-wrap:wrap;">
|
||||||
<div>
|
<div style="display:flex; align-items:center; gap:var(--space-sm); flex-wrap:wrap;">
|
||||||
|
<div style="display:flex; align-items:center; gap:6px;">
|
||||||
|
<label for="note-time-units-bottom" style="font-size:0.8rem; font-weight:600; color:var(--text-secondary);">Tempo (min):</label>
|
||||||
|
<input type="number" step="any" min="0" class="note-subject-input" id="note-time-units-bottom" placeholder="minuti" style="width:90px; margin-bottom:0; height:32px; padding:4px 8px; font-size:0.85rem;" />
|
||||||
|
</div>
|
||||||
<input type="file" id="note-attachments" multiple style="display:none;" />
|
<input type="file" id="note-attachments" multiple style="display:none;" />
|
||||||
<button type="button" class="btn btn-ghost btn-sm" id="btn-note-add-attachments" style="height:32px; padding: 4px 10px; font-size: 0.85rem; display: flex; align-items: center; gap: 4px;">📎 Allega file</button>
|
<button type="button" class="btn btn-ghost btn-sm" id="btn-note-add-attachments" style="height:32px; padding: 4px 10px; font-size: 0.85rem; display: flex; align-items: center; gap: 4px;">📎 Allega file</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -3991,6 +3996,9 @@ const TicketDetailView = {
|
|||||||
if (document.getElementById('note-time-units')) {
|
if (document.getElementById('note-time-units')) {
|
||||||
document.getElementById('note-time-units').value = noteDraft.time_unit || '';
|
document.getElementById('note-time-units').value = noteDraft.time_unit || '';
|
||||||
}
|
}
|
||||||
|
if (document.getElementById('note-time-units-bottom')) {
|
||||||
|
document.getElementById('note-time-units-bottom').value = noteDraft.time_unit || '';
|
||||||
|
}
|
||||||
if (document.getElementById('note-ticket-state') && noteDraft.ticket_state_id) {
|
if (document.getElementById('note-ticket-state') && noteDraft.ticket_state_id) {
|
||||||
document.getElementById('note-ticket-state').value = noteDraft.ticket_state_id;
|
document.getElementById('note-ticket-state').value = noteDraft.ticket_state_id;
|
||||||
}
|
}
|
||||||
@@ -4024,6 +4032,7 @@ const TicketDetailView = {
|
|||||||
const customerIdInput = document.getElementById('qe-customer-id');
|
const customerIdInput = document.getElementById('qe-customer-id');
|
||||||
const noteSubjectInput = document.getElementById('note-subject');
|
const noteSubjectInput = document.getElementById('note-subject');
|
||||||
const noteTimeUnitsInput = document.getElementById('note-time-units');
|
const noteTimeUnitsInput = document.getElementById('note-time-units');
|
||||||
|
const noteTimeUnitsBottomInput = document.getElementById('note-time-units-bottom');
|
||||||
const noteCreateTimeInput = document.getElementById('note-create-time');
|
const noteCreateTimeInput = document.getElementById('note-create-time');
|
||||||
|
|
||||||
const checkChanges = () => {
|
const checkChanges = () => {
|
||||||
@@ -4047,7 +4056,8 @@ const TicketDetailView = {
|
|||||||
const noteBodyText = (this.noteQuill ? this.noteQuill.root.innerText : '').trim();
|
const noteBodyText = (this.noteQuill ? this.noteQuill.root.innerText : '').trim();
|
||||||
if (noteBodyText.length > 0) hasChanges = true;
|
if (noteBodyText.length > 0) hasChanges = true;
|
||||||
|
|
||||||
const noteTimeUnitsVal = parseFloat(noteTimeUnitsInput ? noteTimeUnitsInput.value : '0') || 0;
|
const timeValStr = (noteTimeUnitsInput ? noteTimeUnitsInput.value : '') || (noteTimeUnitsBottomInput ? noteTimeUnitsBottomInput.value : '');
|
||||||
|
const noteTimeUnitsVal = parseFloat(timeValStr || '0') || 0;
|
||||||
if (noteTimeUnitsVal > 0) hasChanges = true;
|
if (noteTimeUnitsVal > 0) hasChanges = true;
|
||||||
|
|
||||||
if (noteCreateTimeInput && noteCreateTimeInput.value) hasChanges = true;
|
if (noteCreateTimeInput && noteCreateTimeInput.value) hasChanges = true;
|
||||||
@@ -4065,7 +4075,20 @@ const TicketDetailView = {
|
|||||||
noteSubjectInput.addEventListener('input', checkChanges);
|
noteSubjectInput.addEventListener('input', checkChanges);
|
||||||
}
|
}
|
||||||
if (noteTimeUnitsInput) {
|
if (noteTimeUnitsInput) {
|
||||||
noteTimeUnitsInput.addEventListener('input', checkChanges);
|
noteTimeUnitsInput.addEventListener('input', () => {
|
||||||
|
if (noteTimeUnitsBottomInput && noteTimeUnitsBottomInput.value !== noteTimeUnitsInput.value) {
|
||||||
|
noteTimeUnitsBottomInput.value = noteTimeUnitsInput.value;
|
||||||
|
}
|
||||||
|
checkChanges();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (noteTimeUnitsBottomInput) {
|
||||||
|
noteTimeUnitsBottomInput.addEventListener('input', () => {
|
||||||
|
if (noteTimeUnitsInput && noteTimeUnitsInput.value !== noteTimeUnitsBottomInput.value) {
|
||||||
|
noteTimeUnitsInput.value = noteTimeUnitsBottomInput.value;
|
||||||
|
}
|
||||||
|
checkChanges();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (noteCreateTimeInput) {
|
if (noteCreateTimeInput) {
|
||||||
noteCreateTimeInput.addEventListener('change', checkChanges);
|
noteCreateTimeInput.addEventListener('change', checkChanges);
|
||||||
@@ -4093,6 +4116,7 @@ const TicketDetailView = {
|
|||||||
if (noteSubjectInput) noteSubjectInput.value = '';
|
if (noteSubjectInput) noteSubjectInput.value = '';
|
||||||
if (this.noteQuill) this.noteQuill.root.innerHTML = '';
|
if (this.noteQuill) this.noteQuill.root.innerHTML = '';
|
||||||
if (noteTimeUnitsInput) noteTimeUnitsInput.value = '';
|
if (noteTimeUnitsInput) noteTimeUnitsInput.value = '';
|
||||||
|
if (noteTimeUnitsBottomInput) noteTimeUnitsBottomInput.value = '';
|
||||||
if (noteCreateTimeInput) noteCreateTimeInput.value = '';
|
if (noteCreateTimeInput) noteCreateTimeInput.value = '';
|
||||||
this.noteAttachments = [];
|
this.noteAttachments = [];
|
||||||
this.updateNoteAttachmentList();
|
this.updateNoteAttachmentList();
|
||||||
|
|||||||
@@ -250,12 +250,11 @@ const TicketListView = {
|
|||||||
|
|
||||||
container.innerHTML = `
|
container.innerHTML = `
|
||||||
<!-- Batch Actions Bar -->
|
<!-- Batch Actions Bar -->
|
||||||
<div class="batch-bar" id="batch-bar">
|
<!-- Batch Actions Bar -->
|
||||||
<div style="display:flex; align-items:center; gap:var(--space-sm);">
|
<div class="batch-bar" id="batch-bar" style="display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap;">
|
||||||
<span class="batch-count" id="batch-count">0 selezionati</span>
|
<!-- Colonna Sinistra: Configurazioni e Filtri di Modifica -->
|
||||||
<button class="btn btn-ghost btn-xs" id="batch-select-all">Seleziona visibili</button>
|
<div class="batch-bar-left" style="display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; flex: 1; min-width: 300px;">
|
||||||
<button class="btn btn-ghost btn-xs" id="batch-copy-tns" style="margin-left: 8px;">Copia numeri</button>
|
<span class="batch-count" id="batch-count" style="margin-right: 4px;">0 selezionati</span>
|
||||||
</div>
|
|
||||||
<div class="filter-group">
|
<div class="filter-group">
|
||||||
<span class="filter-label">Stato</span>
|
<span class="filter-label">Stato</span>
|
||||||
<select class="filter-select" id="batch-state">
|
<select class="filter-select" id="batch-state">
|
||||||
@@ -292,11 +291,40 @@ const TicketListView = {
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
` : ''}
|
` : ''}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Colonna Destra: Pulsanti delle Azioni -->
|
||||||
|
<div class="batch-bar-right" style="display: flex; flex-direction: column; align-items: flex-end; gap: 6px;">
|
||||||
|
<div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end;">
|
||||||
<button class="btn btn-primary btn-sm" id="batch-apply">Applica</button>
|
<button class="btn btn-primary btn-sm" id="batch-apply">Applica</button>
|
||||||
<button class="btn btn-primary btn-sm" id="batch-add-group" disabled style="background: var(--accent-primary); border-color: var(--accent-primary); margin-left: 8px;">Aggiungi a gruppo</button>
|
<button class="btn btn-primary btn-sm" id="batch-add-group" disabled title="Aggiungi a gruppo" style="background: var(--accent-primary); border-color: var(--accent-primary); height: 32px; width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;">
|
||||||
<button class="btn btn-primary btn-sm" id="batch-merge" disabled style="background: rgba(160, 65, 71, 0.32); border-color: var(--accent-primary); color: var(--text-primary); margin-left: 8px;">Unisci Selezionati</button>
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
|
||||||
<button class="btn btn-primary btn-sm" id="batch-open-tabs" disabled style="background: var(--accent-primary); border-color: var(--accent-primary); margin-left: 8px;">Apri ticket in schede</button>
|
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
||||||
<button class="btn btn-ghost btn-xs" id="batch-cancel">Annulla</button>
|
<circle cx="9" cy="7" r="4"></circle>
|
||||||
|
<path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
|
||||||
|
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-sm" id="batch-merge" disabled title="Unisci Selezionati" style="background: rgba(160, 65, 71, 0.32); border-color: var(--accent-primary); color: var(--text-primary); height: 32px; width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
|
||||||
|
<circle cx="18" cy="18" r="3"></circle>
|
||||||
|
<circle cx="6" cy="6" r="3"></circle>
|
||||||
|
<path d="M6 21V9a9 9 0 0 0 9 9"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-sm" id="batch-open-tabs" disabled title="Apri ticket in schede" style="background: var(--accent-primary); border-color: var(--accent-primary); height: 32px; width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
|
||||||
|
<path d="M2 9a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9z"></path>
|
||||||
|
<path d="M6 3h12a2 2 0 0 1 2 2v12"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center; gap: 6px; justify-content: flex-end;">
|
||||||
|
<button class="btn btn-ghost btn-xs" id="batch-select-all">Seleziona visibili</button>
|
||||||
|
<button class="btn btn-ghost btn-xs" id="batch-copy-tns">Copia numeri</button>
|
||||||
|
<button class="btn btn-ghost btn-xs" id="batch-cancel" title="Annulla selezione">Annulla</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${Filters.renderBar(App.lookups)}
|
${Filters.renderBar(App.lookups)}
|
||||||
|
|||||||
Reference in new issue
Block a user