style: riviste parti dell'interfaccia dei ticket. feat: aggiunta possiblità di modificare il tempo inserito nelle note ed aggiunta voce per tempo nel menu azioni rapide
This commit is contained in:
@@ -338,7 +338,7 @@ const TicketCreateView = {
|
||||
|
||||
// 2. Customer User pre-population with first match
|
||||
try {
|
||||
const companies = await App.api('/api/customer-companies/search?q=cliente');
|
||||
const companies = await App.api('/api/customer-companies/search?q=');
|
||||
if (companies.length > 0 && customerIdInput && companySearchInput) {
|
||||
const defaultCompany = companies[0];
|
||||
customerIdInput.value = defaultCompany.customer_id;
|
||||
@@ -388,11 +388,7 @@ const TicketCreateView = {
|
||||
userSearchInput.addEventListener('input', () => {
|
||||
clearTimeout(userDebounce);
|
||||
const q = userSearchInput.value.trim();
|
||||
if (q.length < 2) {
|
||||
userSuggestionsDiv.style.display = 'none';
|
||||
customerUserIdInput.value = '';
|
||||
return;
|
||||
}
|
||||
// Do not block empty query to allow all results on focus
|
||||
|
||||
userDebounce = setTimeout(async () => {
|
||||
try {
|
||||
@@ -432,6 +428,11 @@ const TicketCreateView = {
|
||||
}
|
||||
}, 300);
|
||||
});
|
||||
userSearchInput.addEventListener('focus', () => {
|
||||
userSearchInput.value = '';
|
||||
customerUserIdInput.value = '';
|
||||
userSearchInput.dispatchEvent(new Event('input'));
|
||||
});
|
||||
}
|
||||
|
||||
// Owner Autocomplete (dynamic backend search)
|
||||
|
||||
Reference in New Issue
Block a user