{"id":23508,"date":"2026-03-26T13:51:00","date_gmt":"2026-03-26T19:51:00","guid":{"rendered":"https:\/\/sporticamx.com\/?page_id=23508"},"modified":"2026-03-26T18:31:10","modified_gmt":"2026-03-27T00:31:10","slug":"reporte-de-dispositivos-dashboard","status":"publish","type":"page","link":"https:\/\/sporticamx.com\/index.php\/reporte-de-dispositivos-dashboard\/","title":{"rendered":"Reporte de dispositivos dashboard"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"23508\" class=\"elementor elementor-23508\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8051eac e-flex e-con-boxed e-con e-parent\" data-id=\"8051eac\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-776de39 elementor-widget elementor-widget-html\" data-id=\"776de39\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!DOCTYPE html>\r\n<html lang=\"es\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Dashboard T\u00e9cnico | Sportica Prestige<\/title>\r\n    <script src=\"https:\/\/cdn.tailwindcss.com\"><\/script>\r\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Montserrat:wght@400;600;700&display=swap\" rel=\"stylesheet\">\r\n    <style>\r\n        body { font-family: 'Montserrat', sans-serif; background-color: #ffffff; color: #000; }\r\n        .dashboard-container { width: 100%; overflow-x: auto; border: 1px solid #eee; border-radius: 4px; }\r\n        .table-prestige { width: 100%; border-collapse: collapse; min-width: 1000px; }\r\n        .table-prestige th { text-transform: uppercase; font-size: 10px; letter-spacing: 2px; color: #999; border-bottom: 1px solid #eee; padding: 20px 15px; text-align: left; }\r\n        \r\n        .status-badge { padding: 5px 14px; border-radius: 20px; font-size: 9px; font-weight: 700; text-transform: uppercase; display: inline-block; white-space: nowrap; }\r\n        .status-activo { background: #e6fffa; color: #38b2ac; }\r\n        .status-falla { background: #fff5f5; color: #e53e3e; }\r\n        .status-revision { background: #fffaf0; color: #dd6b20; }\r\n        \r\n        .btn-edit { color: #d4af37; font-weight: 700; font-size: 11px; transition: all 0.3s; padding: 10px 15px; cursor: pointer; }\r\n        .btn-edit:hover { color: #000; background-color: #fcf8eb; }\r\n\r\n        \/* Animaci\u00f3n de Alerta para reportes antiguos *\/\r\n        @keyframes alertaPulso {\r\n            0% { background-color: #fff; }\r\n            50% { background-color: #fff5f5; }\r\n            100% { background-color: #fff; }\r\n        }\r\n        .alerta-tiempo { animation: alertaPulso 2s infinite; border-left: 4px solid #e53e3e !important; }\r\n    <\/style>\r\n<\/head>\r\n<body class=\"p-4 md:p-10\">\r\n\r\n    <div class=\"max-w-7xl mx-auto\">\r\n        <header class=\"flex flex-col md:flex-row justify-between items-start md:items-center mb-8 gap-4\">\r\n            <div>\r\n                <h1 class=\"text-3xl font-bold tracking-tighter uppercase leading-none\">Reporte de Incidencias<\/h1>\r\n                <p class=\"text-[10px] text-stone-400 uppercase tracking-[0.4em] mt-2 font-semibold\">Gesti\u00f3n T\u00e9cnica  Sportica Exclusive<\/p>\r\n            <\/div>\r\n            <button onclick=\"accesoProtegido('https:\/\/sporticamx.com\/index.php\/reporte-de-dispositivos\/')\" class=\"bg-black text-white px-8 py-4 text-[10px] font-bold uppercase tracking-widest hover:bg-[#d4af37] transition-all shadow-lg\">\r\n                + Nuevo Reporte\r\n            <\/button>\r\n        <\/header>\r\n\r\n        <div class=\"mb-6 relative\">\r\n            <input type=\"text\" id=\"buscador\" onkeyup=\"filtrarTabla()\" placeholder=\"BUSCAR POR CLUB, DISPOSITIVO O RESPONSABLE...\" \r\n            class=\"w-full border-b-2 border-stone-100 py-4 px-2 text-[11px] font-bold uppercase tracking-widest focus:outline-none focus:border-black transition-colors placeholder-stone-300\">\r\n            <span class=\"absolute right-4 top-4 opacity-20\">\ud83d\udd0d<\/span>\r\n        <\/div>\r\n\r\n        <div class=\"dashboard-container\">\r\n            <table class=\"table-prestige\" id=\"tablaMaster\">\r\n                <thead>\r\n                    <tr>\r\n                        <th style=\"width: 120px;\">Fecha<\/th>\r\n                        <th style=\"width: 160px;\">Club<\/th>\r\n                        <th>Dispositivo \/ Seguimiento<\/th>\r\n                        <th style=\"width: 160px;\">Estatus<\/th>\r\n                        <th style=\"width: 140px;\">Responsable<\/th>\r\n                        <th style=\"width: 130px; text-align: center;\">Acciones<\/th>\r\n                    <\/tr>\r\n                <\/thead>\r\n                <tbody id=\"lista-reportes\">\r\n                    <tr><td colspan=\"6\" class=\"text-center py-24 text-stone-300 italic text-xs\">Sincronizando...<\/td><\/tr>\r\n                <\/tbody>\r\n            <\/table>\r\n        <\/div>\r\n        \r\n        <footer class=\"mt-12 pt-6 border-t border-gray-100 flex justify-between items-center text-[10px] text-stone-400 uppercase tracking-widest\">\r\n            <p class=\"italic font-bold text-stone-300\">Sportica Exclusive Prestige<\/p>\r\n            <p>\u00a9 2026 Reservado<\/p>\r\n        <\/footer>\r\n    <\/div>\r\n\r\n    <script>\r\n        const CLAVE_TECNICA = \"sportica2026\";\r\n\r\n        function accesoProtegido(urlDestino) {\r\n            const password = prompt(\"\ud83d\udd11 ZONA PRIVADA SPORTICA\\nIngrese clave t\u00e9cnica:\");\r\n            if (password === CLAVE_TECNICA) { window.location.href = urlDestino; }\r\n            else if (password !== null) { alert(\"\u274c Clave incorrecta.\"); }\r\n        }\r\n\r\n        \/\/ FILTRADO DIN\u00c1MICO\r\n        function filtrarTabla() {\r\n            const input = document.getElementById(\"buscador\");\r\n            const filter = input.value.toUpperCase();\r\n            const table = document.getElementById(\"tablaMaster\");\r\n            const tr = table.getElementsByTagName(\"tr\");\r\n\r\n            for (let i = 1; i < tr.length; i++) {\r\n                const textoFila = tr[i].textContent || tr[i].innerText;\r\n                tr[i].style.display = textoFila.toUpperCase().indexOf(filter) > -1 ? \"\" : \"none\";\r\n            }\r\n        }\r\n\r\n        async function cargarReportes() {\r\n            try {\r\n                const respuesta = await fetch('\/obtener_reportes.php');\r\n                const reportes = await respuesta.json();\r\n                const tablaBody = document.getElementById('lista-reportes');\r\n                tablaBody.innerHTML = ''; \r\n\r\n                const ahora = new Date();\r\n\r\n                reportes.forEach(reporte => {\r\n                    \/\/ L\u00f3gica de alerta (m\u00e1s de 48 horas en falla)\r\n                    const fechaReporte = new Date(reporte.fecha);\r\n                    const diffHoras = Math.abs(ahora - fechaReporte) \/ 36e5;\r\n                    const esCritico = (diffHoras > 48 && reporte.estatus.toLowerCase().includes('falla'));\r\n\r\n                    const fila = `\r\n                        <tr class=\"transition-colors border-b border-gray-50 ${esCritico ? 'alerta-tiempo' : 'hover:bg-stone-50\/50'}\">\r\n                            <td class=\"py-8 px-4 text-stone-400 text-xs\">${reporte.fecha}<\/td>\r\n                            <td class=\"py-8 px-4 font-bold italic text-black text-sm uppercase\">${reporte.club} ${esCritico ? '\u26a0\ufe0f' : ''}<\/td>\r\n                            <td class=\"py-8 px-4\">\r\n                                <div class=\"font-bold text-gray-900 text-[13px] mb-2 uppercase tracking-tight\">${reporte.dispositivo}<\/div>\r\n                                <div class=\"text-[11px] text-stone-500 leading-relaxed bg-stone-50 p-4 border-l-2 border-[#d4af37] italic\">\r\n                                    \ud83d\udccc ${reporte.observaciones || \"Sin observaciones.\"}\r\n                                <\/div>\r\n                            <\/td>\r\n                            <td class=\"py-8 px-4\"><span class=\"status-badge ${getClaseStatus(reporte.estatus)}\">${reporte.estatus}<\/span><\/td>\r\n                            <td class=\"py-8 px-4 text-stone-500 font-bold text-[10px] uppercase\">${reporte.responsable}<\/td>\r\n                            <td class=\"py-8 px-4 text-center\">\r\n                                <button onclick=\"accesoProtegido('\/editar-reporte.php?id=${reporte.id}')\" class=\"btn-edit uppercase tracking-widest\">Gestionar<\/button>\r\n                            <\/td>\r\n                        <\/tr>\r\n                    `;\r\n                    tablaBody.innerHTML += fila;\r\n                });\r\n            } catch (e) { console.log(e); }\r\n        }\r\n\r\n        function getClaseStatus(s) {\r\n            const st = s.toLowerCase();\r\n            return st.includes('activo') ? 'status-activo' : st.includes('falla') ? 'status-falla' : 'status-revision';\r\n        }\r\n\r\n        document.addEventListener('DOMContentLoaded', cargarReportes);\r\n    <\/script>\r\n<\/body>\r\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Dashboard T\u00e9cnico | Sportica Prestige Reporte de Incidencias Gesti\u00f3n T\u00e9cnica Sportica Exclusive + Nuevo Reporte \ud83d\udd0d Fecha Club Dispositivo \/ Seguimiento Estatus Responsable Acciones Sincronizando&#8230; Sportica Exclusive Prestige \u00a9 2026 Reservado<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_eb_attr":"","footnotes":""},"class_list":["post-23508","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/pages\/23508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/comments?post=23508"}],"version-history":[{"count":43,"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/pages\/23508\/revisions"}],"predecessor-version":[{"id":23567,"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/pages\/23508\/revisions\/23567"}],"wp:attachment":[{"href":"https:\/\/sporticamx.com\/index.php\/wp-json\/wp\/v2\/media?parent=23508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}