diff --git a/public/css/style.css b/public/css/style.css index 4ac3fde..5b1972c 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1232,6 +1232,31 @@ body { 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 { display: flex; diff --git a/public/js/views/ricercaSpudorata.js b/public/js/views/ricercaSpudorata.js index 81d81b2..3f9740f 100644 --- a/public/js/views/ricercaSpudorata.js +++ b/public/js/views/ricercaSpudorata.js @@ -96,53 +96,80 @@ const RicercaSpudorataView = { -
-
- 0 selezionati - - -
-
- Stato - -
-
- Coda - - - -
-
- Owner - -
-
- Responsabile - -
- ${(App.lookups.types || []).length > 0 ? ` +
+ +
+ 0 selezionati
- Tipo - - ${App.lookups.types.map(t => ``).join('')} + ${(App.lookups.states || []).map(s => ``).join('')}
- ` : ''} - - - - - +
+ Coda + + + +
+
+ Owner + +
+
+ Responsabile + +
+ ${(App.lookups.types || []).length > 0 ? ` +
+ Tipo + +
+ ` : ''} +
+ + +
+
+ + + + +
+
+ + + +
+
diff --git a/public/js/views/ticketDetail.js b/public/js/views/ticketDetail.js index 42524c6..58b4d41 100644 --- a/public/js/views/ticketDetail.js +++ b/public/js/views/ticketDetail.js @@ -12,7 +12,8 @@ const TicketDetailView = { if (!this.ticketId) return; const body = this.noteQuill ? this.noteQuill.root.innerHTML.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 : ''; if ((body !== '


' && body !== '') || subject !== '' || time_unit !== '' || this.noteAttachments.length > 0 || ticket_state_id !== '') { @@ -3587,7 +3588,11 @@ const TicketDetailView = {
-
+
+
+ + +
@@ -3991,6 +3996,9 @@ const TicketDetailView = { if (document.getElementById('note-time-units')) { 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) { document.getElementById('note-ticket-state').value = noteDraft.ticket_state_id; } @@ -4024,6 +4032,7 @@ const TicketDetailView = { const customerIdInput = document.getElementById('qe-customer-id'); const noteSubjectInput = document.getElementById('note-subject'); const noteTimeUnitsInput = document.getElementById('note-time-units'); + const noteTimeUnitsBottomInput = document.getElementById('note-time-units-bottom'); const noteCreateTimeInput = document.getElementById('note-create-time'); const checkChanges = () => { @@ -4047,7 +4056,8 @@ const TicketDetailView = { const noteBodyText = (this.noteQuill ? this.noteQuill.root.innerText : '').trim(); 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 (noteCreateTimeInput && noteCreateTimeInput.value) hasChanges = true; @@ -4065,7 +4075,20 @@ const TicketDetailView = { noteSubjectInput.addEventListener('input', checkChanges); } 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) { noteCreateTimeInput.addEventListener('change', checkChanges); @@ -4093,6 +4116,7 @@ const TicketDetailView = { if (noteSubjectInput) noteSubjectInput.value = ''; if (this.noteQuill) this.noteQuill.root.innerHTML = ''; if (noteTimeUnitsInput) noteTimeUnitsInput.value = ''; + if (noteTimeUnitsBottomInput) noteTimeUnitsBottomInput.value = ''; if (noteCreateTimeInput) noteCreateTimeInput.value = ''; this.noteAttachments = []; this.updateNoteAttachmentList(); diff --git a/public/js/views/ticketList.js b/public/js/views/ticketList.js index 488f947..631cf6c 100644 --- a/public/js/views/ticketList.js +++ b/public/js/views/ticketList.js @@ -250,53 +250,81 @@ const TicketListView = { container.innerHTML = ` -
-
- 0 selezionati - - -
-
- Stato - -
-
- Coda - - - -
-
- Owner - -
-
- Responsabile - -
- ${(App.lookups.types || []).length > 0 ? ` + +
+ +
+ 0 selezionati
- Tipo - - ${App.lookups.types.map(t => ``).join('')} + ${(App.lookups.states || []).map(s => ``).join('')}
- ` : ''} - - - - - +
+ Coda + + + +
+
+ Owner + +
+
+ Responsabile + +
+ ${(App.lookups.types || []).length > 0 ? ` +
+ Tipo + +
+ ` : ''} +
+ + +
+
+ + + + +
+
+ + + +
+
${Filters.renderBar(App.lookups)}