Spaces:
Running
Running
necesito que haya una sección de documentos cargados y los liste para trasabilidad, junto con eso el analisis tiene que ser por iniciativas del documento subido que reporten a los objetivos estrategicos del PDI alineados con los marcos del CFIR
Browse files- README.md +7 -4
- components/footer.js +52 -0
- components/navbar.js +35 -0
- index.html +115 -19
- script.js +224 -0
- style.css +48 -19
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji: 😻
|
| 4 |
colorFrom: yellow
|
| 5 |
-
colorTo:
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: DocuSync Aligner Pro 🚀
|
|
|
|
| 3 |
colorFrom: yellow
|
| 4 |
+
colorTo: gray
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
components/footer.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background-color: #1e293b;
|
| 8 |
+
}
|
| 9 |
+
.footer-link:hover {
|
| 10 |
+
color: #93c5fd;
|
| 11 |
+
transform: translateX(2px);
|
| 12 |
+
}
|
| 13 |
+
</style>
|
| 14 |
+
<footer class="text-gray-300 py-8 mt-12">
|
| 15 |
+
<div class="container mx-auto px-4">
|
| 16 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
| 17 |
+
<div>
|
| 18 |
+
<h3 class="text-lg font-semibold text-white mb-4">DocuMatch</h3>
|
| 19 |
+
<p class="mb-4">Herramienta de análisis de alineación estratégica para documentos institucionales.</p>
|
| 20 |
+
<div class="flex space-x-4">
|
| 21 |
+
<a href="#" class="hover:text-white"><i data-feather="twitter"></i></a>
|
| 22 |
+
<a href="#" class="hover:text-white"><i data-feather="linkedin"></i></a>
|
| 23 |
+
<a href="#" class="hover:text-white"><i data-feather="github"></i></a>
|
| 24 |
+
</div>
|
| 25 |
+
</div>
|
| 26 |
+
<div>
|
| 27 |
+
<h3 class="text-lg font-semibold text-white mb-4">Enlaces</h3>
|
| 28 |
+
<ul class="space-y-2">
|
| 29 |
+
<li><a href="#" class="footer-link transition flex items-center"><i data-feather="chevron-right" class="w-4 h-4 mr-1"></i> Inicio</a></li>
|
| 30 |
+
<li><a href="#" class="footer-link transition flex items-center"><i data-feather="chevron-right" class="w-4 h-4 mr-1"></i> Documentación</a></li>
|
| 31 |
+
<li><a href="#" class="footer-link transition flex items-center"><i data-feather="chevron-right" class="w-4 h-4 mr-1"></i> Preguntas frecuentes</a></li>
|
| 32 |
+
<li><a href="#" class="footer-link transition flex items-center"><i data-feather="chevron-right" class="w-4 h-4 mr-1"></i> Privacidad</a></li>
|
| 33 |
+
</ul>
|
| 34 |
+
</div>
|
| 35 |
+
<div>
|
| 36 |
+
<h3 class="text-lg font-semibold text-white mb-4">Contacto</h3>
|
| 37 |
+
<ul class="space-y-2">
|
| 38 |
+
<li class="flex items-center"><i data-feather="mail" class="w-4 h-4 mr-2"></i> contacto@documatch.com</li>
|
| 39 |
+
<li class="flex items-center"><i data-feather="phone" class="w-4 h-4 mr-2"></i> +1 (555) 123-4567</li>
|
| 40 |
+
<li class="flex items-center"><i data-feather="map-pin" class="w-4 h-4 mr-2"></i> Ciudad de México, MX</li>
|
| 41 |
+
</ul>
|
| 42 |
+
</div>
|
| 43 |
+
</div>
|
| 44 |
+
<div class="border-t border-gray-700 mt-8 pt-6 text-center text-sm">
|
| 45 |
+
<p>© ${new Date().getFullYear()} DocuMatch. Todos los derechos reservados.</p>
|
| 46 |
+
</div>
|
| 47 |
+
</div>
|
| 48 |
+
</footer>
|
| 49 |
+
`;
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
customElements.define('custom-footer', CustomFooter);
|
components/navbar.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.navbar {
|
| 7 |
+
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
|
| 8 |
+
}
|
| 9 |
+
.nav-link:hover {
|
| 10 |
+
transform: translateY(-2px);
|
| 11 |
+
}
|
| 12 |
+
</style>
|
| 13 |
+
<nav class="navbar text-white shadow-lg">
|
| 14 |
+
<div class="container mx-auto px-4 py-3">
|
| 15 |
+
<div class="flex justify-between items-center">
|
| 16 |
+
<div class="flex items-center space-x-2">
|
| 17 |
+
<i data-feather="file-text" class="w-6 h-6"></i>
|
| 18 |
+
<a href="/" class="text-xl font-bold">DocuMatch</a>
|
| 19 |
+
</div>
|
| 20 |
+
<div class="hidden md:flex items-center space-x-6">
|
| 21 |
+
<a href="#" class="nav-link transition hover:text-blue-200">Inicio</a>
|
| 22 |
+
<a href="#" class="nav-link transition hover:text-blue-200">Cómo funciona</a>
|
| 23 |
+
<a href="#" class="nav-link transition hover:text-blue-200">Ejemplos</a>
|
| 24 |
+
<a href="#" class="nav-link transition hover:text-blue-200">Contacto</a>
|
| 25 |
+
</div>
|
| 26 |
+
<button class="md:hidden focus:outline-none">
|
| 27 |
+
<i data-feather="menu" class="w-6 h-6"></i>
|
| 28 |
+
</button>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
</nav>
|
| 32 |
+
`;
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,115 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="es">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>DocuMatch | PDI-CFIR Analyzer</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
</head>
|
| 12 |
+
<body class="bg-gray-50 min-h-screen">
|
| 13 |
+
<custom-navbar></custom-navbar>
|
| 14 |
+
|
| 15 |
+
<main class="container mx-auto px-4 py-8">
|
| 16 |
+
<div class="max-w-4xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-6">
|
| 17 |
+
<div class="text-center mb-8">
|
| 18 |
+
<h1 class="text-3xl font-bold text-gray-800 mb-2">DocuMatch Analyzer</h1>
|
| 19 |
+
<p class="text-gray-600">Sube tus documentos y marcos funcionales para analizar su alineación con PDI y CFIR</p>
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
<div class="grid md:grid-cols-2 gap-6 mb-8">
|
| 23 |
+
<div class="upload-card bg-blue-50 p-6 rounded-lg border-2 border-dashed border-blue-200">
|
| 24 |
+
<div class="flex flex-col items-center justify-center h-full">
|
| 25 |
+
<i data-feather="upload" class="w-12 h-12 text-blue-500 mb-4"></i>
|
| 26 |
+
<h3 class="text-lg font-semibold text-gray-700 mb-2">Documento a Analizar</h3>
|
| 27 |
+
<p class="text-gray-500 text-center mb-4">Sube el documento que deseas evaluar contra los marcos PDI y CFIR</p>
|
| 28 |
+
<input type="file" id="documentInput" class="hidden" accept=".pdf,.doc,.docx,.txt">
|
| 29 |
+
<button onclick="document.getElementById('documentInput').click()" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition">
|
| 30 |
+
Seleccionar Archivo
|
| 31 |
+
</button>
|
| 32 |
+
</div>
|
| 33 |
+
</div>
|
| 34 |
+
|
| 35 |
+
<div class="upload-card bg-purple-50 p-6 rounded-lg border-2 border-dashed border-purple-200">
|
| 36 |
+
<div class="flex flex-col items-center justify-center h-full">
|
| 37 |
+
<i data-feather="file-text" class="w-12 h-12 text-purple-500 mb-4"></i>
|
| 38 |
+
<h3 class="text-lg font-semibold text-gray-700 mb-2">Marcos Funcionales</h3>
|
| 39 |
+
<p class="text-gray-500 text-center mb-4">Sube los documentos PDI y CFIR para comparar</p>
|
| 40 |
+
<input type="file" id="frameworksInput" class="hidden" accept=".pdf,.doc,.docx,.txt" multiple>
|
| 41 |
+
<button onclick="document.getElementById('frameworksInput').click()" class="bg-purple-500 hover:bg-purple-600 text-white px-4 py-2 rounded-lg transition">
|
| 42 |
+
Subir Marcos
|
| 43 |
+
</button>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
</div>
|
| 47 |
+
<div id="uploadedDocuments" class="hidden mb-8">
|
| 48 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Documentos Cargados</h2>
|
| 49 |
+
<div class="bg-white border rounded-lg shadow-sm overflow-hidden">
|
| 50 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 51 |
+
<thead class="bg-gray-50">
|
| 52 |
+
<tr>
|
| 53 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Documento</th>
|
| 54 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tipo</th>
|
| 55 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Fecha</th>
|
| 56 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Acciones</th>
|
| 57 |
+
</tr>
|
| 58 |
+
</thead>
|
| 59 |
+
<tbody id="documentsList" class="bg-white divide-y divide-gray-200">
|
| 60 |
+
<!-- Documents will be listed here -->
|
| 61 |
+
</tbody>
|
| 62 |
+
</table>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
|
| 66 |
+
<div id="analysisSection" class="hidden">
|
| 67 |
+
<div class="flex justify-between items-center mb-4">
|
| 68 |
+
<h2 class="text-xl font-semibold text-gray-800">Análisis por Iniciativas</h2>
|
| 69 |
+
<button id="analyzeBtn" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-lg flex items-center">
|
| 70 |
+
<i data-feather="play" class="mr-2"></i> Analizar Iniciativas
|
| 71 |
+
</button>
|
| 72 |
+
</div>
|
| 73 |
+
<div class="grid md:grid-cols-2 gap-6">
|
| 74 |
+
<div class="p-4 bg-white border rounded-lg shadow-sm">
|
| 75 |
+
<h3 class="font-medium text-gray-700 mb-3 flex items-center">
|
| 76 |
+
<i data-feather="check-circle" class="text-green-500 mr-2"></i> Alineación con PDI
|
| 77 |
+
</h3>
|
| 78 |
+
<div id="pdiResults" class="text-gray-600">
|
| 79 |
+
<!-- Results will be populated here -->
|
| 80 |
+
</div>
|
| 81 |
+
</div>
|
| 82 |
+
|
| 83 |
+
<div class="p-4 bg-white border rounded-lg shadow-sm">
|
| 84 |
+
<h3 class="font-medium text-gray-700 mb-3 flex items-center">
|
| 85 |
+
<i data-feather="check-circle" class="text-blue-500 mr-2"></i> Alineación con CFIR
|
| 86 |
+
</h3>
|
| 87 |
+
<div id="cfirResults" class="text-gray-600">
|
| 88 |
+
<!-- Results will be populated here -->
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<div class="mt-6 p-4 bg-yellow-50 border border-yellow-200 rounded-lg">
|
| 94 |
+
<h3 class="font-medium text-yellow-700 mb-2 flex items-center">
|
| 95 |
+
<i data-feather="alert-triangle" class="mr-2"></i> Recomendaciones
|
| 96 |
+
</h3>
|
| 97 |
+
<div id="recommendations" class="text-yellow-600">
|
| 98 |
+
<!-- Recommendations will be populated here -->
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</main>
|
| 104 |
+
|
| 105 |
+
<custom-footer></custom-footer>
|
| 106 |
+
|
| 107 |
+
<script src="components/navbar.js"></script>
|
| 108 |
+
<script src="components/footer.js"></script>
|
| 109 |
+
<script src="script.js"></script>
|
| 110 |
+
<script>
|
| 111 |
+
feather.replace();
|
| 112 |
+
</script>
|
| 113 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 114 |
+
</body>
|
| 115 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
+
const documentInput = document.getElementById('documentInput');
|
| 3 |
+
const frameworksInput = document.getElementById('frameworksInput');
|
| 4 |
+
const analyzeBtn = document.getElementById('analyzeBtn');
|
| 5 |
+
const analysisSection = document.getElementById('analysisSection');
|
| 6 |
+
const uploadedDocuments = document.getElementById('uploadedDocuments');
|
| 7 |
+
const documentsList = document.getElementById('documentsList');
|
| 8 |
+
let uploadedFiles = [];
|
| 9 |
+
|
| 10 |
+
// Show documents section when files are selected
|
| 11 |
+
documentInput.addEventListener('change', function() {
|
| 12 |
+
if (this.files.length > 0) {
|
| 13 |
+
uploadedFiles.push({
|
| 14 |
+
name: this.files[0].name,
|
| 15 |
+
type: 'Documento',
|
| 16 |
+
date: new Date().toLocaleString()
|
| 17 |
+
});
|
| 18 |
+
updateDocumentsList();
|
| 19 |
+
uploadedDocuments.classList.remove('hidden');
|
| 20 |
+
}
|
| 21 |
+
});
|
| 22 |
+
|
| 23 |
+
frameworksInput.addEventListener('change', function() {
|
| 24 |
+
if (this.files.length > 0) {
|
| 25 |
+
Array.from(this.files).forEach(file => {
|
| 26 |
+
uploadedFiles.push({
|
| 27 |
+
name: file.name,
|
| 28 |
+
type: 'Marco',
|
| 29 |
+
date: new Date().toLocaleString()
|
| 30 |
+
});
|
| 31 |
+
});
|
| 32 |
+
updateDocumentsList();
|
| 33 |
+
uploadedDocuments.classList.remove('hidden');
|
| 34 |
+
}
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
function updateDocumentsList() {
|
| 38 |
+
documentsList.innerHTML = '';
|
| 39 |
+
uploadedFiles.forEach((file, index) => {
|
| 40 |
+
const row = document.createElement('tr');
|
| 41 |
+
row.className = 'hover:bg-gray-50';
|
| 42 |
+
row.innerHTML = `
|
| 43 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 44 |
+
<div class="flex items-center">
|
| 45 |
+
<i data-feather="${file.type === 'Documento' ? 'file-text' : 'book'}" class="w-5 h-5 text-blue-500 mr-2"></i>
|
| 46 |
+
<span class="text-sm font-medium text-gray-900">${file.name}</span>
|
| 47 |
+
</div>
|
| 48 |
+
</td>
|
| 49 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 50 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${file.type === 'Documento' ? 'bg-green-100 text-green-800' : 'bg-purple-100 text-purple-800'}">
|
| 51 |
+
${file.type}
|
| 52 |
+
</span>
|
| 53 |
+
</td>
|
| 54 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${file.date}</td>
|
| 55 |
+
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
| 56 |
+
<button onclick="removeDocument(${index})" class="text-red-600 hover:text-red-900 mr-3">
|
| 57 |
+
<i data-feather="trash-2" class="w-4 h-4"></i>
|
| 58 |
+
</button>
|
| 59 |
+
<button onclick="viewDocument(${index})" class="text-blue-600 hover:text-blue-900">
|
| 60 |
+
<i data-feather="eye" class="w-4 h-4"></i>
|
| 61 |
+
</button>
|
| 62 |
+
</td>
|
| 63 |
+
`;
|
| 64 |
+
documentsList.appendChild(row);
|
| 65 |
+
});
|
| 66 |
+
feather.replace();
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
window.removeDocument = function(index) {
|
| 70 |
+
uploadedFiles.splice(index, 1);
|
| 71 |
+
updateDocumentsList();
|
| 72 |
+
if (uploadedFiles.length === 0) {
|
| 73 |
+
uploadedDocuments.classList.add('hidden');
|
| 74 |
+
analysisSection.classList.add('hidden');
|
| 75 |
+
}
|
| 76 |
+
};
|
| 77 |
+
|
| 78 |
+
window.viewDocument = function(index) {
|
| 79 |
+
alert(`Visualizando documento: ${uploadedFiles[index].name}`);
|
| 80 |
+
// In a real app, this would open a document viewer
|
| 81 |
+
};
|
| 82 |
+
// Analyze button functionality
|
| 83 |
+
analyzeBtn.addEventListener('click', function() {
|
| 84 |
+
if (!documentInput.files[0] || !frameworksInput.files[0]) {
|
| 85 |
+
alert('Por favor sube ambos: el documento a analizar y los marcos funcionales');
|
| 86 |
+
return;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
// Simulate analysis (in a real app, this would call an API)
|
| 90 |
+
simulateAnalysis();
|
| 91 |
+
});
|
| 92 |
+
function simulateAnalysis() {
|
| 93 |
+
analyzeBtn.disabled = true;
|
| 94 |
+
analyzeBtn.innerHTML = '<i data-feather="loader" class="animate-spin mr-2"></i> Analizando iniciativas...';
|
| 95 |
+
feather.replace();
|
| 96 |
+
|
| 97 |
+
// Simulate processing delay
|
| 98 |
+
setTimeout(() => {
|
| 99 |
+
// Generate mock initiatives analysis
|
| 100 |
+
const initiatives = [
|
| 101 |
+
{
|
| 102 |
+
name: 'Digitalización de procesos',
|
| 103 |
+
pdiObjectives: ['OE1. Transformación digital', 'OE3. Eficiencia operativa'],
|
| 104 |
+
cfirAspects: ['Intervención', 'Contexto interno'],
|
| 105 |
+
match: 82,
|
| 106 |
+
details: [
|
| 107 |
+
{ aspect: 'Alineación con OE1', match: 90, comment: 'Excelente cobertura de objetivos de digitalización' },
|
| 108 |
+
{ aspect: 'Alineación con OE3', match: 75, comment: 'Podría incluir más métricas de eficiencia' },
|
| 109 |
+
{ aspect: 'CFIR: Intervención', match: 80, comment: 'Buen diseño de la intervención' },
|
| 110 |
+
{ aspect: 'CFIR: Contexto interno', match: 65, comment: 'Necesita mayor análisis del contexto actual' }
|
| 111 |
+
]
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
name: 'Capacitación continua',
|
| 115 |
+
pdiObjectives: ['OE2. Desarrollo de talento', 'OE4. Cultura organizacional'],
|
| 116 |
+
cfirAspects: ['Características individuales', 'Proceso de implementación'],
|
| 117 |
+
match: 78,
|
| 118 |
+
details: [
|
| 119 |
+
{ aspect: 'Alineación con OE2', match: 85, comment: 'Cubre bien los objetivos de desarrollo' },
|
| 120 |
+
{ aspect: 'Alineación con OE4', match: 70, comment: 'Podría fortalecer aspectos culturales' },
|
| 121 |
+
{ aspect: 'CFIR: Características individuales', match: 82, comment: 'Buena consideración de competencias' },
|
| 122 |
+
{ aspect: 'CFIR: Proceso de implementación', match: 60, comment: 'Falta plan detallado de implementación' }
|
| 123 |
+
]
|
| 124 |
+
}
|
| 125 |
+
];
|
| 126 |
+
|
| 127 |
+
const recommendations = [
|
| 128 |
+
'Priorizar la iniciativa de digitalización por su alto alineamiento estratégico',
|
| 129 |
+
'Reforzar el análisis de contexto organizacional en todas las iniciativas',
|
| 130 |
+
'Establecer indicadores claros para medir impacto en cultura organizacional'
|
| 131 |
+
];
|
| 132 |
+
// Display initiatives analysis
|
| 133 |
+
displayInitiativesAnalysis(initiatives, recommendations);
|
| 134 |
+
analyzeBtn.disabled = false;
|
| 135 |
+
analyzeBtn.innerHTML = '<i data-feather="refresh-cw" class="mr-2"></i> Reanalizar';
|
| 136 |
+
feather.replace();
|
| 137 |
+
}, 3000);
|
| 138 |
+
}
|
| 139 |
+
function displayInitiativesAnalysis(initiatives, recommendations) {
|
| 140 |
+
const pdiContainer = document.getElementById('pdiResults');
|
| 141 |
+
const cfirContainer = document.getElementById('cfirResults');
|
| 142 |
+
const recContainer = document.getElementById('recommendations');
|
| 143 |
+
|
| 144 |
+
// Clear previous results
|
| 145 |
+
pdiContainer.innerHTML = '';
|
| 146 |
+
cfirContainer.innerHTML = '';
|
| 147 |
+
recContainer.innerHTML = '';
|
| 148 |
+
|
| 149 |
+
// Display initiatives analysis
|
| 150 |
+
initiatives.forEach(initiative => {
|
| 151 |
+
const initiativeCard = document.createElement('div');
|
| 152 |
+
initiativeCard.className = 'mb-6 p-4 bg-white border rounded-lg shadow-sm analysis-result';
|
| 153 |
+
initiativeCard.innerHTML = `
|
| 154 |
+
<div class="flex justify-between items-start mb-3">
|
| 155 |
+
<div>
|
| 156 |
+
<h3 class="font-semibold text-lg text-gray-800">${initiative.name}</h3>
|
| 157 |
+
<div class="flex items-center mt-1">
|
| 158 |
+
<span class="text-sm font-medium mr-2">Alineamiento general:</span>
|
| 159 |
+
<span class="text-sm font-semibold ${initiative.match > 75 ? 'text-green-600' : initiative.match > 50 ? 'text-yellow-600' : 'text-red-600'}">${initiative.match}%</span>
|
| 160 |
+
</div>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="flex space-x-2">
|
| 163 |
+
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800">
|
| 164 |
+
${initiative.pdiObjectives.length} objetivos PDI
|
| 165 |
+
</span>
|
| 166 |
+
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800">
|
| 167 |
+
${initiative.cfirAspects.length} aspectos CFIR
|
| 168 |
+
</span>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="grid md:grid-cols-2 gap-4">
|
| 173 |
+
<div>
|
| 174 |
+
<h4 class="font-medium text-gray-700 mb-2">Objetivos PDI relacionados:</h4>
|
| 175 |
+
<ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
|
| 176 |
+
${initiative.pdiObjectives.map(obj => `<li>${obj}</li>`).join('')}
|
| 177 |
+
</ul>
|
| 178 |
+
</div>
|
| 179 |
+
<div>
|
| 180 |
+
<h4 class="font-medium text-gray-700 mb-2">Aspectos CFIR:</h4>
|
| 181 |
+
<ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
|
| 182 |
+
${initiative.cfirAspects.map(aspect => `<li>${aspect}</li>`).join('')}
|
| 183 |
+
</ul>
|
| 184 |
+
</div>
|
| 185 |
+
</div>
|
| 186 |
+
|
| 187 |
+
<div class="mt-4">
|
| 188 |
+
<h4 class="font-medium text-gray-700 mb-2">Detalles de alineación:</h4>
|
| 189 |
+
<div class="space-y-3">
|
| 190 |
+
${initiative.details.map(detail => `
|
| 191 |
+
<div>
|
| 192 |
+
<div class="flex justify-between mb-1 text-sm">
|
| 193 |
+
<span>${detail.aspect}</span>
|
| 194 |
+
<span class="font-semibold">${detail.match}%</span>
|
| 195 |
+
</div>
|
| 196 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 197 |
+
<div class="h-2 rounded-full ${detail.aspect.includes('OE') ? 'bg-green-500' : 'bg-blue-500'}" style="width: ${detail.match}%"></div>
|
| 198 |
+
</div>
|
| 199 |
+
<p class="text-xs mt-1 text-gray-500">${detail.comment}</p>
|
| 200 |
+
</div>
|
| 201 |
+
`).join('')}
|
| 202 |
+
</div>
|
| 203 |
+
</div>
|
| 204 |
+
`;
|
| 205 |
+
pdiContainer.appendChild(initiativeCard);
|
| 206 |
+
});
|
| 207 |
+
|
| 208 |
+
// Display recommendations
|
| 209 |
+
const recHeader = document.createElement('h3');
|
| 210 |
+
recHeader.className = 'font-medium text-yellow-700 mb-3 flex items-center';
|
| 211 |
+
recHeader.innerHTML = '<i data-feather="alert-triangle" class="mr-2"></i> Recomendaciones estratégicas';
|
| 212 |
+
recContainer.appendChild(recHeader);
|
| 213 |
+
|
| 214 |
+
recommendations.forEach((rec, index) => {
|
| 215 |
+
const recItem = document.createElement('div');
|
| 216 |
+
recItem.className = 'mb-3 p-3 bg-yellow-50 border border-yellow-100 rounded-lg flex items-start analysis-result';
|
| 217 |
+
recItem.innerHTML = `
|
| 218 |
+
<span class="flex-shrink-0 bg-yellow-100 text-yellow-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 text-sm font-medium">${index + 1}</span>
|
| 219 |
+
<span class="text-yellow-700">${rec}</span>
|
| 220 |
+
`;
|
| 221 |
+
recContainer.appendChild(recItem);
|
| 222 |
+
});
|
| 223 |
+
}
|
| 224 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,57 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Custom styles that can't be easily achieved with Tailwind */
|
| 2 |
+
.upload-card {
|
| 3 |
+
transition: all 0.3s ease;
|
| 4 |
+
min-height: 250px;
|
| 5 |
}
|
| 6 |
|
| 7 |
+
.upload-card:hover {
|
| 8 |
+
transform: translateY(-2px);
|
| 9 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
|
| 10 |
}
|
| 11 |
|
| 12 |
+
#documentInput, #frameworksInput {
|
| 13 |
+
display: none;
|
| 14 |
+
}
|
| 15 |
+
/* Animation for analysis results */
|
| 16 |
+
@keyframes fadeIn {
|
| 17 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 18 |
+
to { opacity: 1; transform: translateY(0); }
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.analysis-result {
|
| 22 |
+
animation: fadeIn 0.5s ease forwards;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* Document table styles */
|
| 26 |
+
#documentsList tr {
|
| 27 |
+
transition: background-color 0.2s ease;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
#documentsList tr:hover {
|
| 31 |
+
background-color: #f9fafb;
|
| 32 |
}
|
| 33 |
|
| 34 |
+
#documentsList button {
|
| 35 |
+
transition: all 0.2s ease;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
+
#documentsList button:hover {
|
| 39 |
+
transform: scale(1.1);
|
| 40 |
}
|
| 41 |
+
/* Custom scrollbar */
|
| 42 |
+
::-webkit-scrollbar {
|
| 43 |
+
width: 8px;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
::-webkit-scrollbar-track {
|
| 47 |
+
background: #f1f1f1;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
::-webkit-scrollbar-thumb {
|
| 51 |
+
background: #888;
|
| 52 |
+
border-radius: 4px;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
::-webkit-scrollbar-thumb:hover {
|
| 56 |
+
background: #555;
|
| 57 |
+
}
|