{"id":1261,"date":"2024-03-14T20:15:20","date_gmt":"2024-03-15T00:15:20","guid":{"rendered":"http:\/\/tec-2046\/msweb\/?page_id=1261"},"modified":"2024-05-24T17:40:37","modified_gmt":"2024-05-24T21:40:37","slug":"coordinadores-regionales","status":"publish","type":"page","link":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/coordinadores-regionales\/","title":{"rendered":"Coordinadores regionales"},"content":{"rendered":"\n<script>\n        window.addEventListener('load', ()=>{\n            obtenerCoordinadores().then(result => {\n                mostrarTablaCoordinadores( result );\n                document.getElementById('caja-busqueda').style.display = 'inline';\n            });\n        });\n\n        function obtenerCoordinadores() {\n            return new Promise(async (res, rej)=>{\n                try {\n                    let peticion = await fetch('\/mswebapis\/040417040223coord.php');\n                    let result = await peticion.json();\n                    res(result);\n                } catch (error) {\n                    rej(error);\n                }\n            });\n        }\n    \n        function mostrarTablaCoordinadores( coordinadores ) {\n            \/\/ Validar si hay registros de coordinadores\n            if ( coordinadores.length ) {\n                let contenedor = document.getElementById('coordinadores-info');\n                let tabla = undefined;\n                let filas = '';\n                coordinadores.forEach((coordinador)=>{\n                    filas += `\n                    <tr>\n                        <td><b>${coordinador.estado}<\/b><\/td>\n                        <td>${coordinador.nombre} ${coordinador.apellido}<\/td>\n                        <td>${coordinador.correo}<\/td>\n                        <td>${coordinador.celular}<\/td>\n                    <\/tr>`;\n                    tabla = `\n                    <div class=\"container-fluid\">\n                        <table id=\"tabla-coordinadores\" class=\"table table-striped\">\n                            <thead>\n                                <tr class=\"bg-primary text-white\">\n                                    <th>ESTADO<\/th>\n                                    <th>NOMBRE<\/th>\n                                    <th>CORREO<\/th>\n                                    <th>CELULAR<\/th>\n                                <\/tr>\n                            <\/thead>\n                            <tbody>${filas}<\/tbody>\n                        <\/table>\n                    <\/div>\n                    `;\n                });\n                contenedor.innerHTML = tabla;\n            }\n        }\n    \n        function searchTable( elem ) {\n            const table = document.getElementById(elem.getAttribute('data-id-table'));\n            if ( table ) {\n                let buscar = elem.value.normalize(\"NFD\").replace(\/[\\u0300-\\u036f]\/g, \"\");\n                table.querySelectorAll('tbody tr').forEach(( tr )=>{\n                    if ( tr.innerText.trim().toLowerCase().normalize(\"NFD\").replace(\/[\\u0300-\\u036f]\/g, \"\").indexOf( buscar ) < 0 ) { \/\/ No existe\n                        tr.classList.add('d-none');\n                    } else {\n                        tr.classList.remove('d-none');\n                    }\n                })\n            }\n        }\n    <\/script>\n<style>\n        .bg-primary{ background-color: #003DA5!important; }\n    <\/style>\n    <div class=\"container-fluid\">\n        <div id=\"caja-busqueda\" class=\"row d-flex justify-content-end mb-3\" style=\"display: none;\">\n            <div class=\"col-sm-6\">\n                <input type=\"search\" name=\"searchtable\" class=\"form-control bordered\" placeholder=\"Buscar...\" data-id-table=\"tabla-coordinadores\" style=\"border: 1px solid #7a7a7a;\" oninput=\"searchTable(this)\">\n            <\/div>\n        <\/div>\n        <div class=\"row\">\n            <div class=\"col-12\">\n                <div id=\"coordinadores-info\">\n                    <span class=\"d-block text-center\">Cargando...<\/span>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Cargando&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/pages\/1261"}],"collection":[{"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/comments?post=1261"}],"version-history":[{"count":4,"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/pages\/1261\/revisions"}],"predecessor-version":[{"id":1698,"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/pages\/1261\/revisions\/1698"}],"wp:attachment":[{"href":"http:\/\/www.misionsucre.gob.ve\/msweb\/index.php\/wp-json\/wp\/v2\/media?parent=1261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}