<% let hasCheckedHorarios = checkedHorarios ? (checkedHorarios.length > 0 ? true: false) : false; %>
<% horarios.forEach(function(item) { let hasHorarioToUpdate = horariosAEditar.find(obj => obj.horario_id === item.id); let checkedWord = hasHorarioToUpdate ? "checked" : ""; let hideWord = hasHorarioToUpdate ? "": "hidden"; let existRecord = hasHorarioToUpdate ? true: false; %> <% }) %>
Horarios disponibles para el <%=formatedDate%>
<% if(hasCheckedHorarios) { %> <% if(checkedHorarios.some(obj => obj.horario_id == item.id)){ %> <% } else { %>
>
<% } %> <% } else { %>
>
<% } %>