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
+194
-90
No files matched your search
@@ -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 !== '<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 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;" />
|
||||
<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>
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user