Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e79779aae | |||
| 7a4bbdb331 | |||
| 26477f03e5 | |||
| 774e6e95ee | |||
| 8940d1df72 | |||
| 1073dc9eef | |||
| 417e434222 | |||
| 7b47ebc484 | |||
| ca9ef1738c | |||
| 2aae5909cd | |||
| 6b0adc5cb8 |
+1
-1
File diff suppressed because one or more lines are too long
Vendored
-9
File diff suppressed because one or more lines are too long
Vendored
+9
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html lang=en><head><link href=css/app.4e535138.css rel=preload as=style><link href=css/chunk-vendors.cbc2a074.css rel=preload as=style><link href=js/app.ee6afc8b.js rel=preload as=script><link href=js/chunk-vendors.5b53642e.js rel=preload as=script><link href=css/chunk-vendors.cbc2a074.css rel=stylesheet><link href=css/app.4e535138.css rel=stylesheet></head><head><meta name=viewport content="width=device-width,initial-scale=1"><meta charset=utf-8><link rel=stylesheet href=https://unpkg.com/purecss@1.0.0/build/pure-min.css integrity=sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w crossorigin=anonymous><link rel=stylesheet href=https://unpkg.com/purecss@1.0.0/build/grids-responsive-min.css><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css><link rel=stylesheet type=text/css href=style.css media=screen><link rel=stylesheet href=https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css integrity=sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB crossorigin=anonymous><title>HACKATHON REGISTRO</title><link rel="shortcut icon" href=img/icono.png><body><noscript><strong>We're sorry but hack_unam doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.5b53642e.js></script><script src=js/app.ee6afc8b.js></script></body></head></html>
|
<!DOCTYPE html><html lang=en><head><link href=css/app.3cd89414.css rel=preload as=style><link href=css/chunk-vendors.e8d11e2d.css rel=preload as=style><link href=js/app.2bf72a8f.js rel=preload as=script><link href=js/chunk-vendors.921f3df1.js rel=preload as=script><link href=css/chunk-vendors.e8d11e2d.css rel=stylesheet><link href=css/app.3cd89414.css rel=stylesheet></head><head><meta name=viewport content="width=device-width,initial-scale=1"><meta charset=utf-8><link rel=stylesheet href=https://unpkg.com/purecss@1.0.0/build/pure-min.css integrity=sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w crossorigin=anonymous><link rel=stylesheet href=https://unpkg.com/purecss@1.0.0/build/grids-responsive-min.css><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css><link rel=stylesheet type=text/css href=style.css media=screen><link rel=stylesheet href=https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css integrity=sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB crossorigin=anonymous><title>HACKATHON REGISTRO</title><link rel="shortcut icon" href=img/icono.png><body><noscript><strong>We're sorry but hack_unam doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.921f3df1.js></script><script src=js/app.2bf72a8f.js></script></body></head></html>
|
||||||
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
Generated
+3
-3
@@ -2455,9 +2455,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"bootstrap": {
|
"bootstrap": {
|
||||||
"version": "4.5.0",
|
"version": "4.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.2.tgz",
|
||||||
"integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA=="
|
"integrity": "sha512-vlGn0bcySYl/iV+BGA544JkkZP5LB3jsmkeKLFQakCOwCM3AOk7VkldBz4jrzSe+Z0Ezn99NVXa1o45cQY4R6A=="
|
||||||
},
|
},
|
||||||
"bootstrap-vue": {
|
"bootstrap-vue": {
|
||||||
"version": "2.15.0",
|
"version": "2.15.0",
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"bootstrap": "^4.5.0",
|
"bootstrap": "^4.5.2",
|
||||||
"bootstrap-vue": "^2.15.0",
|
"bootstrap-vue": "^2.15.0",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"sweetalert": "^2.1.2",
|
"sweetalert": "^2.1.2",
|
||||||
|
|||||||
+2
-1
@@ -11,10 +11,11 @@ import Vue from "vue";
|
|||||||
import { BootstrapVue, IconsPlugin } from "bootstrap-vue";
|
import { BootstrapVue, IconsPlugin } from "bootstrap-vue";
|
||||||
|
|
||||||
Vue.use(BootstrapVue);
|
Vue.use(BootstrapVue);
|
||||||
|
|
||||||
Vue.use(IconsPlugin);
|
Vue.use(IconsPlugin);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App"
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ import Header from "./../view/headerAdmin.vue";
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
//HelloWorld
|
//HelloWorld
|
||||||
Header,
|
Header
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -61,7 +61,7 @@ export default {
|
|||||||
password: "",
|
password: "",
|
||||||
error: false,
|
error: false,
|
||||||
mal: null,
|
mal: null,
|
||||||
resp: null,
|
resp: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -75,33 +75,33 @@ export default {
|
|||||||
entrar() {
|
entrar() {
|
||||||
const data = {
|
const data = {
|
||||||
usuario: this.usuario,
|
usuario: this.usuario,
|
||||||
password: this.password,
|
password: this.password
|
||||||
};
|
};
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.post(`${config.api}/login`, data)
|
.post(`${config.api}/login`, data)
|
||||||
.then(async (respose) => {
|
.then(async respose => {
|
||||||
this.resp = respose.data;
|
this.resp = respose.data;
|
||||||
if (respose.data.err == false) {
|
if (respose.data.err == false) {
|
||||||
await swal(`Bienvenido ${this.usuario}`, "", "success");
|
await swal(`Bienvenido ${this.usuario}`, "", "success");
|
||||||
|
|
||||||
window.localStorage.setItem("id_usuario", respose.data.id_usuario);
|
window.localStorage.setItem("id_usuario", respose.data.id_usuario);
|
||||||
this.$router.push("/");
|
this.$router.push("/Registros");
|
||||||
} else {
|
} else {
|
||||||
this.error = true;
|
this.error = true;
|
||||||
await swal(" Usuario o Contraseña incorrecta.", "", "error");
|
await swal(" Usuario o Contraseña incorrecta.", "", "error");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch(err => {
|
||||||
swal(" Usuario o Contraseña incorrecta.", "", "error");
|
swal(" Usuario o Contraseña incorrecta.", "", "error");
|
||||||
this.resp = err;
|
this.resp = err;
|
||||||
this.error = true;
|
this.error = true;
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,272 @@
|
|||||||
|
<template>
|
||||||
|
<section class="admin-login">
|
||||||
|
<!--Importar componente de header para login -->
|
||||||
|
<Header />
|
||||||
|
<div>
|
||||||
|
<h1>Hackaton UNAM-AWS</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-md navbar-light ">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<nav class="navbar navbar-dark">
|
||||||
|
<button
|
||||||
|
class=" navbar-toggler van btn-sm colorB"
|
||||||
|
type="button"
|
||||||
|
id="toggle-menu"
|
||||||
|
data-toggle="collapse"
|
||||||
|
data-target="#navbarNav"
|
||||||
|
aria-controls="navbarNav"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-label="Toggle navigation"
|
||||||
|
v-on:click="toggle()"
|
||||||
|
>
|
||||||
|
<span class=" navbar-toggler-icon m-1"></span>
|
||||||
|
Opciones
|
||||||
|
</button>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<div class="nav-item nav-link " @click="numPanel = 1">
|
||||||
|
<a>Equipos</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<div class="nav-item nav-link " @click="numPanel = 2">
|
||||||
|
<a>Participantes</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container" v-if="numPanel == 1">
|
||||||
|
<div class="row">
|
||||||
|
<table class="table">
|
||||||
|
<thead class="thead-dark">
|
||||||
|
<tr class="titulo">
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th scope="col">Nombre del Equipo</th>
|
||||||
|
<th scope="col">Numero de Integrantes</th>
|
||||||
|
<th scope="col">Nombre del Lider</th>
|
||||||
|
<th scope="col">Correo</th>
|
||||||
|
<th scope="col">Carrera</th>
|
||||||
|
<th scope="col">Campus</th>
|
||||||
|
<th scope="col">Fecha de Registro</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="item in registros" :key="item.idEquipo">
|
||||||
|
<th scope="row">{{ item.idEquipo }}</th>
|
||||||
|
<td>{{ item.nombreEquipo }}</td>
|
||||||
|
<td>{{ item.numeroIntegrantes }}</td>
|
||||||
|
<td>{{ item.nombre }}</td>
|
||||||
|
<td>{{ item.correo }}</td>
|
||||||
|
<td>{{ item.carrera }}</td>
|
||||||
|
<td>{{ item.campus }}</td>
|
||||||
|
<td>{{ item.fecha }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container" v-if="numPanel == 2">
|
||||||
|
<div class="row">
|
||||||
|
<table class="table">
|
||||||
|
<thead class="thead-dark">
|
||||||
|
<tr class="titulo">
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th scope="col">Nombre</th>
|
||||||
|
<th scope="col">Apellido Paterno</th>
|
||||||
|
<th scope="col">Apellido Materno</th>
|
||||||
|
<th scope="col">Correo</th>
|
||||||
|
<th scope="col">Nombre del Aquipo</th>
|
||||||
|
<th scope="col">Campus</th>
|
||||||
|
<th scope="col">Carrera</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="item in persona" :key="item.idPersona">
|
||||||
|
<th scope="row">{{ item.idPersona }}</th>
|
||||||
|
<td>{{ item.nombre }}</td>
|
||||||
|
<td>{{ item.apellidoP }}</td>
|
||||||
|
<td>{{ item.apellidoM }}</td>
|
||||||
|
<td>{{ item.correo }}</td>
|
||||||
|
<td>{{ item.nombreEquipo }}</td>
|
||||||
|
<td>{{ item.campus }}</td>
|
||||||
|
<td>{{ item.carrera }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
import config from "../config/config.js";
|
||||||
|
|
||||||
|
import Header from "./../view/headerAdmin.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
//HelloWorld
|
||||||
|
Header
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
registros: [],
|
||||||
|
numPanel: 1,
|
||||||
|
persona: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggle: function() {
|
||||||
|
let element = document.getElementById("navbarNav");
|
||||||
|
element.classList.toggle("block");
|
||||||
|
element.classList.add("mystyle");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
let equipos = await axios.get(`${config.api}/getRegistro`);
|
||||||
|
equipos = equipos.data.data;
|
||||||
|
for (let i = 0; i < equipos.length; i++) {
|
||||||
|
if (equipos[i].fechaRegistro !== null) {
|
||||||
|
let time = new Date(equipos[i].fechaRegistro);
|
||||||
|
equipos[i].fechaRegistro = new Date(equipos[i].fechaRegistro)
|
||||||
|
.toISOString()
|
||||||
|
.slice(0, 19)
|
||||||
|
.split("T");
|
||||||
|
time = time.toLocaleTimeString();
|
||||||
|
equipos[i].fechaRegistro = `${equipos[i].fechaRegistro[0]} / ${time}`;
|
||||||
|
}
|
||||||
|
this.registros.push({
|
||||||
|
idEquipo: i + 1,
|
||||||
|
nombreEquipo: equipos[i].nombreEquipo,
|
||||||
|
numeroIntegrantes: equipos[i].numeroIntegrantes,
|
||||||
|
nombre: equipos[i].nombre,
|
||||||
|
correo: equipos[i].correo,
|
||||||
|
carrera: equipos[i].carrera,
|
||||||
|
campus: equipos[i].campus,
|
||||||
|
fecha: equipos[i].fechaRegistro
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let personaQuery = await axios.get(`${config.api}/getPersona`);
|
||||||
|
personaQuery = personaQuery.data.data;
|
||||||
|
for (let i = 0; i < personaQuery.length; i++) {
|
||||||
|
this.persona.push({
|
||||||
|
idPersona: i + 1,
|
||||||
|
nombre: personaQuery[i].nombre,
|
||||||
|
apellidoP: personaQuery[i].apellidoP,
|
||||||
|
apellidoM: personaQuery[i].apellidoM,
|
||||||
|
correo: personaQuery[i].correo,
|
||||||
|
nombreEquipo: personaQuery[i].nombreEquipo,
|
||||||
|
campus: personaQuery[i].campus,
|
||||||
|
carrera: personaQuery[i].carrera
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
if (!window.localStorage.getItem("id_usuario")) this.$router.push("/");
|
||||||
|
else this.id = window.localStorage.getItem("id_usuario");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
h1 {
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
margin-bottom: 3.5rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titulo {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1024px) {
|
||||||
|
h1 {
|
||||||
|
margin-top: 3rem;
|
||||||
|
margin-bottom: 4rem;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item {
|
||||||
|
-webkit-transition-duration: 0.4s; /* Safari */
|
||||||
|
transition-duration: 0.4s;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.nav-item:hover {
|
||||||
|
background-color: #343a40;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.navbar-brand {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
.mystyle {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.block {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
.menu {
|
||||||
|
background-color: #bb8800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu nav ul {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu nav ul div {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu nav ul li {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu nav ul li a {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.van {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.colorB {
|
||||||
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -16,8 +16,8 @@ export default {
|
|||||||
//HelloWorld
|
//HelloWorld
|
||||||
Header,
|
Header,
|
||||||
Form,
|
Form,
|
||||||
Footer,
|
Footer
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
const config = {
|
const config = {
|
||||||
//api: "http://localhost:3001"
|
//Local
|
||||||
|
//api: "http://localhost:3000"
|
||||||
|
|
||||||
|
//Pruebas
|
||||||
|
//api: "https://venus.acatlan.unam.mx/hackaton"
|
||||||
|
|
||||||
|
//Produccion
|
||||||
api: "https://venus.acatlan.unam.mx/indiana_hackaton"
|
api: "https://venus.acatlan.unam.mx/indiana_hackaton"
|
||||||
};
|
};
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import Form from "./components/usuario.vue";
|
import Form from "./components/usuario.vue";
|
||||||
import Login from "./components/login.vue";
|
import Login from "./components/login.vue";
|
||||||
|
import Panel from "./components/panelAdmin.vue";
|
||||||
export const routes = [
|
export const routes = [
|
||||||
{ path: "/", component: Form, name: "form" },
|
{ path: "/", component: Form, name: "form" },
|
||||||
{ path: "/panelAdmin", component: Login, name: "Login" },
|
{ path: "/panelAdmin", component: Login, name: "Login" },
|
||||||
|
{ path: "/Registros", component: Panel, name: "Panel" }
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user