This commit is contained in:
Lizandro Guarnizo
2025-02-06 14:49:52 -05:00
parent 6d8f1bcd6f
commit 6442e46f13
7 changed files with 126 additions and 46 deletions
-22
View File
@@ -1,22 +0,0 @@
<!-- Container Principal -->
<div x-data="modals" @keydown.escape="closeModal" class="bg-white rounded-lg shadow">
<div class="container mx-auto p-6 w-full ">
<h1 class="text-2xl font-bold mb-4">Oficina Virtual</h1>
<div class="justify-between w-full md:flex">
<p class="mb-4 text-sm">Bienvenido a la oficina virtual de GASES DEL ORIENTE S.A E.S.P</p>
<a href="/"><button type="submit" class="bg-[#8eb02f] text-white px-4 py-2 rounded flex space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-5">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18" />
</svg>
<p> Volver a la pagina principal </p>
</button>
</a>
<!-- Agregar el GIF de carga -->
<div x-show="loading" class="fixed inset-0 bg-gray-800 bg-opacity-75 flex z-50 justify-center items-center">
<img src="../img/loading.gif" alt="Cargando..." class="w-16 h-16" />
</div>
</div>
+20 -8
View File
@@ -1,10 +1,22 @@
<h1>{{.Title}}</h1>
{{if .user}}
Hello, {{.user.FirstName}} - ID: {{.user.ID}}!
<!-- Container Principal -->
<div x-data="modals" @keydown.escape="closeModal" class="bg-white rounded-lg shadow">
<div class="container mx-auto p-6 w-full ">
<h1 class="text-2xl font-bold mb-4">Oficina Virtual</h1>
<div class="justify-between w-full md:flex">
<p class="mb-4 text-sm">Bienvenido a la oficina virtual de Usite</p>
<a href="/"><button type="submit" class="bg-[#8eb02f] text-white px-4 py-2 rounded flex space-x-2">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-5">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18" />
</svg>
<p> Volver a la pagina principal </p>
</button>
</a>
<!-- Agregar el GIF de carga -->
<div x-show="loading" class="fixed inset-0 bg-gray-800 bg-opacity-75 flex z-50 justify-center items-center">
<img src="../img/loading.gif" alt="Cargando..." class="w-16 h-16" />
</div>
<script src="/js/payment.js"></script>
{{end}}
<script src="/js/manifest.js"></script>
<script src="/js/vendor.js"></script>
{{template "partials/footer" .}}
</div>
+64
View File
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gases del Oriente</title>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
<script src="https://cdn.tailwindcss.com"></script>
<!-- Cargar jQuery primero -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Luego cargar Select2 -->
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<style>
[x-cloak] {
display: none !important;
}
</style>
</head>
<body class="bg-gray-200 w-full">
<main class="flex justify-between w-full">
<div class="w-full px-3 py-3 h-[calc(100vh-64px)] overflow-auto">
{{embed}}
</div>
</main>
<div x-data="sessionTimeout" x-init="init()" x-cloak class="hidden sm:block">
<!-- Contador General de Inactividad -->
<div x-show="!showModal" class="fixed top-2 right-20 border text rounded-lg p-2 bg-gray-100 text-sm">
<p>Tiempo restante: <span x-text="formatTime(inactivityCountdown)"></span></p>
</div>
<!-- Modal -->
<div x-show="showModal" class="fixed inset-0 flex items-center justify-center bg-gray-800 bg-opacity-75">
<div class="bg-white rounded-lg shadow-md p-8 w-[600px] relative">
<h2 class="text-xl font-bold mb-6 text-center">¿Deseas continuar?</h2>
<p class="text-gray-600 mb-6 text-center text-base">
Has estado inactivo. Elige "Continuar" para seguir con tu sesión o "Cerrar sesión" para salir.
</p>
<!-- Contador del tiempo para responder -->
<p class="text-center text-red-500 font-semibold mb-4">
Tiempo para responder: <span x-text="countdown"></span> seg
</p>
<div class="flex justify-around">
<button @click="continueSession"
class="px-6 py-3 bg-[#8eb02f] text-white text-base rounded-lg hover:bg-[#698126]">
Continuar
</button>
<form action="/do/logout" method="POST" class="inline-block">
<button type="submit"
class="px-6 py-3 bg-gray-500 text-white text-base rounded-lg hover:bg-gray-600">
Cerrar sesión
</button>
</form>
</div>
</div>
</div>
</div>
</body>
</html>