Actualizar proveedores.html
This commit is contained in:
@@ -370,14 +370,19 @@
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
async function loadOpsForGuild(guildId) {
|
||||
async function loadOpsForGuild(guildId) {
|
||||
const sel = document.getElementById('impOperator');
|
||||
if(!guildId) { sel.innerHTML = '<option value="">-- Automática --</option>'; return; }
|
||||
if(!guildId) {
|
||||
sel.innerHTML = '<option value="">-- Automática --</option>';
|
||||
filterStatusOptions(); // <--- ACTUALIZAR ESTADOS
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await fetch(`${API_URL}/operators?guild_id=${guildId}`, { headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } });
|
||||
const data = await res.json();
|
||||
sel.innerHTML = '<option value="">-- Automática --</option>';
|
||||
data.operators.forEach(op => sel.innerHTML += `<option value="${op.id}">${op.full_name}</option>`);
|
||||
filterStatusOptions(); // <--- ACTUALIZAR ESTADOS
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user