{"id":32320,"date":"2025-10-14T10:26:13","date_gmt":"2025-10-14T13:26:13","guid":{"rendered":"https:\/\/www.mtess.gov.py\/?page_id=32320"},"modified":"2025-11-19T09:20:07","modified_gmt":"2025-11-19T12:20:07","slug":"observatorio-laboral-2","status":"publish","type":"page","link":"https:\/\/www.mtess.gov.py\/?page_id=32320","title":{"rendered":"OBSERVATORIO LABORAL"},"content":{"rendered":"\n<div class=\"wp-block-uagb-container uagb-block-69c3ea7c alignfull uagb-is-root-container\"><div class=\"uagb-container-inner-blocks-wrap\">\n<!-- \ud83d\udcda SECCI\u00d3N DOCUMENTOS CON BUSCADOR Y SEO -->\n<div id=\"biblioteca-documentos\" class=\"container my-4\">\n  <!-- Bootstrap -->\n  <link\n    href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.2\/dist\/css\/bootstrap.min.css\"\n    rel=\"stylesheet\"\n  \/>\n  <link\n    rel=\"stylesheet\"\n    href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap-icons@1.11.1\/font\/bootstrap-icons.css\"\n  \/>\n\n  <style>\n    #biblioteca-documentos .card {\n      border-radius: 10px;\n      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n      transition: transform 0.15s ease, box-shadow 0.15s ease;\n      border: none;\n    }\n    #biblioteca-documentos .card:hover {\n      transform: translateY(-3px);\n      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);\n    }\n    #biblioteca-documentos .pdf-icon {\n      font-size: 2.8rem;\n      color: #E52421;\n    }\n    #biblioteca-documentos .xlsx-icon {\n      font-size: 2.8rem;\n      color: #217346;\n    }\n    #biblioteca-documentos .card-title a {\n      text-decoration: none;\n      color: #0d0d0d;\n    }\n    #biblioteca-documentos .card-title a:hover {\n      color: #21409A;\n      text-decoration: underline;\n    }\n    #biblioteca-documentos .card-text {\n      font-size: 0.9rem;\n      color: #444;\n    }\n    #biblioteca-documentos .date {\n      font-size: 0.8rem;\n      color: #666;\n    }\n    #biblioteca-documentos .section-title {\n      border-bottom: 3px solid #21409A;\n      display: inline-block;\n      padding-bottom: 6px;\n      margin-bottom: 1rem;\n      color: #21409A;\n      font-weight: 700;\n      text-transform: uppercase;\n    }\n    #biblioteca-documentos .btn-ver-mas {\n      background: linear-gradient(135deg, #21409A, #E52421);\n      border: none;\n      color: #fff;\n      font-weight: 600;\n      padding: 8px 14px;\n      border-radius: 8px;\n      transition: filter 0.2s ease;\n    }\n    #biblioteca-documentos .btn-ver-mas:hover { filter: brightness(1.1); }\n    #biblioteca-documentos .search-input {\n      max-width: 420px;\n      margin: 0 auto 20px;\n    }\n  <\/style>\n\n  <!-- \ud83d\udd0d Buscador -->\n  <div class=\"text-center mb-3\">\n    <h3 class=\"section-title\">\ud83d\udcc4 Documentos<\/h3>\n    <input\n      type=\"text\"\n      id=\"buscador\"\n      class=\"form-control search-input\"\n      placeholder=\"Buscar documento por t\u00edtulo o descripci\u00f3n...\"\n    \/>\n    <div class=\"text-muted mt-2\">\n      <span id=\"doc-count\">0<\/span> publicaciones\n    <\/div>\n  <\/div>\n\n  <!-- Resultados -->\n  <div\n    class=\"row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4\"\n    id=\"documentos-list\"\n  ><\/div>\n\n  <div class=\"text-center mt-4\">\n    <button id=\"verMasBtn\" class=\"btn-ver-mas d-none\">Ver m\u00e1s<\/button>\n  <\/div>\n\n  <script>\n    const JSON_URL =\n      \"https:\/\/www.mtess.gov.py\/wp-content\/uploads\/2025\/11\/documentos_dol.json\"; \/\/ \ud83d\udd39 tu JSON real\n    const MAX_POR_PAGINA = 30;\n    let todos = [];\n    let filtrados = [];\n    let pagina = 0;\n\n    async function cargarDocumentos() {\n      try {\n        const res = await fetch(JSON_URL, { cache: \"no-cache\" });\n        todos = await res.json();\n        filtrados = [...todos];\n        document.getElementById(\"doc-count\").textContent = todos.length;\n        mostrarPagina();\n        configurarBoton();\n        generarSEOData(todos);\n      } catch (error) {\n        console.error(\"Error cargando documentos:\", error);\n      }\n    }\n\n    function crearCard(doc) {\n      const col = document.createElement(\"div\");\n      col.className = \"col\";\n      col.innerHTML = `\n        <div class=\"card h-100\">\n          <div class=\"card-body d-flex align-items-start\">\n            <div class=\"me-3 pdf-icon\"><i class=\"bi bi-file-earmark-pdf-fill\"><\/i><\/div>\n            <div>\n              <h6 class=\"card-title mb-1\">\n                <a href=\"${doc.archivo}\" target=\"_blank\" rel=\"noopener\">${doc.titulo}<\/a>\n              <\/h6>\n              <p class=\"card-text mb-1\">${doc.descripcion || \"\"}<\/p>\n              <div class=\"date\">\ud83d\udcc5 ${doc.fecha_publicacion || \"\"}<\/div>\n            <\/div>\n          <\/div>\n        <\/div>`;\n      return col;\n    }\n\n    function mostrarPagina() {\n      const contenedor = document.getElementById(\"documentos-list\");\n      const inicio = pagina * MAX_POR_PAGINA;\n      const fin = inicio + MAX_POR_PAGINA;\n      const docs = filtrados.slice(inicio, fin);\n      docs.forEach((doc) => contenedor.appendChild(crearCard(doc)));\n      pagina++;\n      if (pagina * MAX_POR_PAGINA >= filtrados.length) {\n        document.getElementById(\"verMasBtn\").classList.add(\"d-none\");\n      }\n    }\n\n    function configurarBoton() {\n      const btn = document.getElementById(\"verMasBtn\");\n      if (filtrados.length > MAX_POR_PAGINA) {\n        btn.classList.remove(\"d-none\");\n        btn.onclick = mostrarPagina;\n      }\n    }\n\n    \/\/ \ud83d\udd0d B\u00fasqueda instant\u00e1nea\n    document.getElementById(\"buscador\").addEventListener(\"input\", (e) => {\n      const valor = e.target.value.toLowerCase();\n      const contenedor = document.getElementById(\"documentos-list\");\n      contenedor.innerHTML = \"\";\n      pagina = 0;\n      filtrados = todos.filter(\n        (doc) =>\n          doc.titulo.toLowerCase().includes(valor) ||\n          (doc.descripcion && doc.descripcion.toLowerCase().includes(valor))\n      );\n      document.getElementById(\"doc-count\").textContent = filtrados.length;\n      mostrarPagina();\n      configurarBoton();\n    });\n\n    \/\/ \ud83e\udde0 SEO: genera JSON-LD estructurado\n    function generarSEOData(lista) {\n      const items = lista.map((doc) => ({\n        \"@type\": \"CreativeWork\",\n        name: doc.titulo,\n        description: doc.descripcion || \"\",\n        url: doc.archivo,\n        datePublished: doc.fecha_publicacion || \"\",\n        fileFormat: \"application\/pdf\"\n      }));\n\n      const structuredData = {\n        \"@context\": \"https:\/\/schema.org\",\n        \"@type\": \"CollectionPage\",\n        name: \"Biblioteca de Documentos - MTESS\",\n        description:\n          \"Colecci\u00f3n completa de documentos y publicaciones en formato PDF del Ministerio de Trabajo, Empleo y Seguridad Social.\",\n        hasPart: items\n      };\n\n      const script = document.createElement(\"script\");\n      script.type = \"application\/ld+json\";\n      script.textContent = JSON.stringify(structuredData);\n      document.head.appendChild(script);\n    }\n\n    cargarDocumentos();\n  <\/script>\n<\/div>\n\n<!-- \ud83d\udcca SECCI\u00d3N ESTAD\u00cdSTICAS CON BUSCADOR Y SEO -->\n<div id=\"biblioteca-estadisticas\" class=\"container my-5\">\n  <style>\n    #biblioteca-estadisticas .card {\n      border-radius: 10px;\n      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n      transition: transform 0.15s ease, box-shadow 0.15s ease;\n      border: none;\n    }\n    #biblioteca-estadisticas .card:hover {\n      transform: translateY(-3px);\n      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);\n    }\n    #biblioteca-estadisticas .xlsx-icon {\n      font-size: 2.8rem;\n      color: #217346;\n    }\n    #biblioteca-estadisticas .card-title a {\n      text-decoration: none;\n      color: #0d0d0d;\n    }\n    #biblioteca-estadisticas .card-title a:hover {\n      color: #21409A;\n      text-decoration: underline;\n    }\n    #biblioteca-estadisticas .card-text {\n      font-size: 0.9rem;\n      color: #444;\n    }\n    #biblioteca-estadisticas .date {\n      font-size: 0.8rem;\n      color: #666;\n    }\n    #biblioteca-estadisticas .section-title {\n      border-bottom: 3px solid #217346;\n      display: inline-block;\n      padding-bottom: 6px;\n      margin-bottom: 1rem;\n      color: #217346;\n      font-weight: 700;\n      text-transform: uppercase;\n    }\n    #biblioteca-estadisticas .btn-ver-mas {\n      background: linear-gradient(135deg, #217346, #21409A);\n      border: none;\n      color: #fff;\n      font-weight: 600;\n      padding: 8px 14px;\n      border-radius: 8px;\n      transition: filter 0.2s ease;\n    }\n    #biblioteca-estadisticas .btn-ver-mas:hover { filter: brightness(1.1); }\n    #biblioteca-estadisticas .search-input {\n      max-width: 420px;\n      margin: 0 auto 20px;\n    }\n  <\/style>\n\n  <!-- \ud83d\udd0d Buscador -->\n  <div class=\"text-center mb-3\">\n    <h3 class=\"section-title\">\ud83d\udcca Estad\u00edsticas<\/h3>\n    <input\n      type=\"text\"\n      id=\"buscador-estadisticas\"\n      class=\"form-control search-input\"\n      placeholder=\"Buscar estad\u00edstica por t\u00edtulo o descripci\u00f3n...\"\n    \/>\n    <div class=\"text-muted mt-2\">\n      <span id=\"estadisticas-count\">0<\/span> publicaciones\n    <\/div>\n  <\/div>\n\n  <!-- Resultados -->\n  <div\n    class=\"row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4\"\n    id=\"estadisticas-list\"\n  ><\/div>\n\n  <div class=\"text-center mt-4\">\n    <button id=\"verMasBtnEstadisticas\" class=\"btn-ver-mas d-none\">Ver m\u00e1s<\/button>\n  <\/div>\n\n  <script>\n    const JSON_URL_ESTADISTICAS =\n      \"https:\/\/www.mtess.gov.py\/wp-content\/uploads\/2025\/11\/estadisticas_dol.json\";\n    const MAX_POR_PAGINA_ESTADISTICAS = 30;\n    let todasEstadisticas = [];\n    let filtradasEstadisticas = [];\n    let paginaEstadisticas = 0;\n\n    async function cargarEstadisticas() {\n      try {\n        const res = await fetch(JSON_URL_ESTADISTICAS, { cache: \"no-cache\" });\n        todasEstadisticas = await res.json();\n        filtradasEstadisticas = [...todasEstadisticas];\n        document.getElementById(\"estadisticas-count\").textContent = todasEstadisticas.length;\n        mostrarPaginaEstadisticas();\n        configurarBotonEstadisticas();\n        generarSEODataEstadisticas(todasEstadisticas);\n      } catch (error) {\n        console.error(\"Error cargando estad\u00edsticas:\", error);\n      }\n    }\n\n    function crearCardEstadistica(doc) {\n      const col = document.createElement(\"div\");\n      col.className = \"col\";\n      col.innerHTML = `\n        <div class=\"card h-100\">\n          <div class=\"card-body d-flex align-items-start\">\n            <div class=\"me-3 xlsx-icon\"><i class=\"bi bi-file-earmark-spreadsheet-fill\"><\/i><\/div>\n            <div>\n              <h6 class=\"card-title mb-1\">\n                <a href=\"${doc.archivo}\" target=\"_blank\" rel=\"noopener\">${doc.titulo}<\/a>\n              <\/h6>\n              <p class=\"card-text mb-1\">${doc.descripcion || \"\"}<\/p>\n              <div class=\"date\">\ud83d\udcc5 ${doc.fecha_publicacion || \"\"}<\/div>\n            <\/div>\n          <\/div>\n        <\/div>`;\n      return col;\n    }\n\n    function mostrarPaginaEstadisticas() {\n      const contenedor = document.getElementById(\"estadisticas-list\");\n      const inicio = paginaEstadisticas * MAX_POR_PAGINA_ESTADISTICAS;\n      const fin = inicio + MAX_POR_PAGINA_ESTADISTICAS;\n      const docs = filtradasEstadisticas.slice(inicio, fin);\n      docs.forEach((doc) => contenedor.appendChild(crearCardEstadistica(doc)));\n      paginaEstadisticas++;\n      if (paginaEstadisticas * MAX_POR_PAGINA_ESTADISTICAS >= filtradasEstadisticas.length) {\n        document.getElementById(\"verMasBtnEstadisticas\").classList.add(\"d-none\");\n      }\n    }\n\n    function configurarBotonEstadisticas() {\n      const btn = document.getElementById(\"verMasBtnEstadisticas\");\n      if (filtradasEstadisticas.length > MAX_POR_PAGINA_ESTADISTICAS) {\n        btn.classList.remove(\"d-none\");\n        btn.onclick = mostrarPaginaEstadisticas;\n      }\n    }\n\n    \/\/ \ud83d\udd0d B\u00fasqueda instant\u00e1nea para estad\u00edsticas\n    document.getElementById(\"buscador-estadisticas\").addEventListener(\"input\", (e) => {\n      const valor = e.target.value.toLowerCase();\n      const contenedor = document.getElementById(\"estadisticas-list\");\n      contenedor.innerHTML = \"\";\n      paginaEstadisticas = 0;\n      filtradasEstadisticas = todasEstadisticas.filter(\n        (doc) =>\n          doc.titulo.toLowerCase().includes(valor) ||\n          (doc.descripcion && doc.descripcion.toLowerCase().includes(valor))\n      );\n      document.getElementById(\"estadisticas-count\").textContent = filtradasEstadisticas.length;\n      mostrarPaginaEstadisticas();\n      configurarBotonEstadisticas();\n    });\n\n    \/\/ \ud83e\udde0 SEO: genera JSON-LD estructurado para estad\u00edsticas\n    function generarSEODataEstadisticas(lista) {\n      const items = lista.map((doc) => ({\n        \"@type\": \"Dataset\",\n        name: doc.titulo,\n        description: doc.descripcion || \"\",\n        url: doc.archivo,\n        datePublished: doc.fecha_publicacion || \"\",\n        fileFormat: \"application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n      }));\n\n      const structuredData = {\n        \"@context\": \"https:\/\/schema.org\",\n        \"@type\": \"CollectionPage\",\n        name: \"Biblioteca de Estad\u00edsticas - MTESS\",\n        description:\n          \"Colecci\u00f3n completa de estad\u00edsticas y datos en formato XLSX del Ministerio de Trabajo, Empleo y Seguridad Social.\",\n        hasPart: items\n      };\n\n      const script = document.createElement(\"script\");\n      script.type = \"application\/ld+json\";\n      script.textContent = JSON.stringify(structuredData);\n      document.head.appendChild(script);\n    }\n\n    cargarEstadisticas();\n  <\/script>\n<\/div>\n<\/div><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udcc4 Documentos 0 publicaciones Ver m\u00e1s \ud83d\udcca Estad\u00edsticas 0 publicaciones Ver m\u00e1s<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-32320","page","type-page","status-publish","hentry"],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"depicter-thumbnail":false},"uagb_author_info":{"display_name":"Roberto Ayala","author_link":"https:\/\/www.mtess.gov.py\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"\ud83d\udcc4 Documentos 0 publicaciones Ver m\u00e1s \ud83d\udcca Estad\u00edsticas 0 publicaciones Ver m\u00e1s","_links":{"self":[{"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=\/wp\/v2\/pages\/32320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32320"}],"version-history":[{"count":20,"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=\/wp\/v2\/pages\/32320\/revisions"}],"predecessor-version":[{"id":32992,"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=\/wp\/v2\/pages\/32320\/revisions\/32992"}],"wp:attachment":[{"href":"https:\/\/www.mtess.gov.py\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}