Actualizar asignados.html
This commit is contained in:
@@ -596,11 +596,20 @@ function renderServices(servicesToRender = localServices) {
|
||||
delayHtml = `<span class="bg-rose-100 text-rose-600 text-[8px] font-black px-2 py-0.5 rounded uppercase tracking-widest ml-2">Retraso: ${delayDays} días</span>`;
|
||||
}
|
||||
|
||||
let guildName = raw["Gremio"] || raw["GREMIO"];
|
||||
if (!guildName && s.guild_id) {
|
||||
const guildObj = systemGuilds.find(g => String(g.id) === String(s.guild_id));
|
||||
let guildName = raw["Gremio"] || raw["GREMIO"] || raw["Especialidad"] || "";
|
||||
|
||||
// ¡AQUÍ ESTÁ LA CLAVE! El ID viene dentro del JSON (raw) o en el servicio (s)
|
||||
const idGremio = s.guild_id || raw.guild_id;
|
||||
|
||||
if (!guildName && idGremio) {
|
||||
const guildObj = systemGuilds.find(g => String(g.id) === String(idGremio));
|
||||
if (guildObj) guildName = guildObj.name;
|
||||
}
|
||||
|
||||
if (!guildName && s.guild && s.guild.name) {
|
||||
guildName = s.guild.name;
|
||||
}
|
||||
|
||||
guildName = guildName || "Varios";
|
||||
|
||||
return `
|
||||
|
||||
Reference in New Issue
Block a user