fix: corretta gestione proprietario e responsaibile da pagina ticket e a mio carico
This commit is contained in:
@@ -100,6 +100,13 @@ const TicketListView = {
|
||||
${(App.lookups.users || []).map(u => `<option value="${u.id}">${u.first_name} ${u.last_name}</option>`).join('')}
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<span class="filter-label">Responsabile</span>
|
||||
<select class="filter-select" id="batch-responsible">
|
||||
<option value="">—</option>
|
||||
${(App.lookups.users || []).map(u => `<option value="${u.id}">${u.first_name} ${u.last_name}</option>`).join('')}
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-group" style="position:relative;">
|
||||
<span class="filter-label">Cliente</span>
|
||||
<input type="text" class="form-input filter-select" id="batch-customer-search" placeholder="Cerca cliente..." autocomplete="off" style="width:160px; padding: 4px 8px; font-family: inherit; font-size: 0.85rem;" />
|
||||
@@ -429,6 +436,8 @@ const TicketListView = {
|
||||
if (batchQueue) batchQueue.value = '';
|
||||
const batchOwner = document.getElementById('batch-owner');
|
||||
if (batchOwner) batchOwner.value = '';
|
||||
const batchResponsible = document.getElementById('batch-responsible');
|
||||
if (batchResponsible) batchResponsible.value = '';
|
||||
|
||||
this.updateBatchBar();
|
||||
});
|
||||
@@ -559,6 +568,7 @@ const TicketListView = {
|
||||
const batchState = document.getElementById('batch-state')?.value;
|
||||
const batchQueue = document.getElementById('batch-queue')?.value;
|
||||
const batchOwner = document.getElementById('batch-owner')?.value;
|
||||
const batchResponsible = document.getElementById('batch-responsible')?.value;
|
||||
const batchCustomerSearch = document.getElementById('batch-customer-search')?.value.trim();
|
||||
let batchCustomerUserId = document.getElementById('batch-customer-user-id')?.value;
|
||||
let batchCustomerId = document.getElementById('batch-customer-id')?.value;
|
||||
@@ -573,6 +583,11 @@ const TicketListView = {
|
||||
if (batchState) updates.ticket_state_id = parseInt(batchState);
|
||||
if (batchQueue) updates.queue_id = parseInt(batchQueue);
|
||||
if (batchOwner) updates.user_id = parseInt(batchOwner);
|
||||
if (batchResponsible) {
|
||||
updates.responsible_user_id = parseInt(batchResponsible);
|
||||
} else if (batchOwner) {
|
||||
updates.responsible_user_id = parseInt(batchOwner);
|
||||
}
|
||||
if (batchCustomerUserId) updates.customer_user_id = batchCustomerUserId;
|
||||
if (batchCustomerId) updates.customer_id = batchCustomerId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user