Commit 39b53be9 by Joel Florentin

se retocaron los filtros en la lista postulantes jsp

parent 620489c0
const cargoSelect = document.querySelector("#cargoId"); const cargoSelect = document.querySelector("#cargoId");
const convoBlock = document.querySelector("#convocatoriaBlock");
function listarConvocatorias(id){ function listarConvocatorias(id){
const ConvocatoriaAmostrar = convocatorias.filter(c=>c.cargoId==id); const ConvocatoriaAmostrar = convocatorias.filter(c=>c.cargoId==id);
if(ConvocatoriaAmostrar.length>0) {
convoBlock.style.display = "";
}
else{
convoBlock.style.display = "none";
}
const convocatoria = document.querySelector("select[name=convId]"); const convocatoria = document.querySelector("select[name=convId]");
const frag = document.createDocumentFragment(); const frag = document.createDocumentFragment();
let optionDefault = document.createElement("option"); let optionDefault = document.createElement("option");
optionDefault.value = ""; optionDefault.value = "";
optionDefault.innerHTML = "Seleccione"; optionDefault.innerHTML = "Todas";
frag.appendChild(optionDefault); frag.appendChild(optionDefault);
for (const conv of ConvocatoriaAmostrar) { for (const conv of ConvocatoriaAmostrar) {
const opt = document.createElement("option"); const opt = document.createElement("option");
......
...@@ -53,7 +53,7 @@ contentType="text/html;charset=UTF-8" language="java" %> ...@@ -53,7 +53,7 @@ contentType="text/html;charset=UTF-8" language="java" %>
<td><a href="/cargo/${cargo.id}">Editar cargo</a></td> <td><a href="/cargo/${cargo.id}">Editar cargo</a></td>
<td> <td>
<c:if test="${!cargo.isExisteConvocatoria()}"> <c:if test="${!cargo.isExisteConvocatoria()}">
<a class="btn btn-secondary" href="/convocatoria/crear/${cargo.id}">abrirConvocatoria</a> <a class="btn btn-secondary" href="/convocatoria/crear/${cargo.id}">Abrir Convocatoria</a>
</c:if> </c:if>
</td> </td>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment