Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge de los pocos cambios de Deploy al main repo #40

Merged
merged 13 commits into from
Dec 5, 2024
Merged
Binary file added backoffice/public/img_media_fondo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47,192 changes: 47,192 additions & 0 deletions backoffice/public/img_media_fondo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
478 changes: 240 additions & 238 deletions backoffice/src/pages/Certamen.tsx

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion backoffice/src/pages/Escultores.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from "@tanstack/react-table";
import NuevoEscultorPopup from "../components/crearEscultor";
import EditarEscultorPopup from "../components/editarEscultor";
import { useNavigate } from "react-router-dom";
import { url } from "../utils";

declare module "@tanstack/react-table" {
Expand Down Expand Up @@ -46,6 +47,7 @@ type Escultor = {

export default function Escultores() {
const columnHelper = createColumnHelper<Escultor>();
const navigate = useNavigate();

const columns = [
columnHelper.accessor("nombre", {
Expand Down Expand Up @@ -76,7 +78,7 @@ export default function Escultores() {
<div className="acciones_container">
<button onClick={() => openEditPopup(props.row.original.id)}><i className="material-symbols-outlined">&#xe3c9;</i></button>

<button onClick={() => window.location.href = `/ver-escultor/${props.row.original.id}`}>
<button onClick={() => navigate(`/ver-escultor/${props.row.original.id}`)}>
<i className="material-symbols-outlined">&#xe8f4;</i></button>
</div>
);
Expand Down
91 changes: 47 additions & 44 deletions backoffice/src/pages/Esculturas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {

import NuevaEsculturaPopup from "../components/crearEscultura";
import EditarEsculturaPopup from "../components/editarEscultura";
import { useNavigate } from "react-router-dom";
import { url } from "../utils";


Expand Down Expand Up @@ -65,50 +66,52 @@ function limitarPalabras(texto: string, max: number): string {


export default function Esculturas() {
const columnHelper = createColumnHelper<Escultura>();
const columns = [

columnHelper.accessor("nombre", {
header: () => "Nombre",
cell: (info) => info.renderValue(),
footer: (info) => info.column.id,
}),
columnHelper.accessor("escultor", {
header: () => "Escultor",
cell: (info) => info.renderValue(),
footer: (info) => info.column.id,
}),
columnHelper.accessor("nacionalidad", {
header: () => "Nacionalidad",
cell: (info) => info.renderValue(),
footer: (info) => info.column.id,
}),
columnHelper.accessor("descripcion", {
header: () => "Descripción",
cell: (info) => (
<span title={info.getValue()}>{limitarPalabras(info.getValue(), 6)}</span>
),
footer: (info) => info.column.id,
}),
columnHelper.display({
id: "acciones",
header: "Acciones",
cell: (props) => {
const openEditPopup = (id: number) => {
setEsculturaEditId(id);
setIsPopupEditOpen(true);
};

return (
<div className="acciones_container">
<button onClick={() => openEditPopup(props.row.original.id)}><i className="material-symbols-outlined">&#xe3c9;</i></button>
<button onClick={() =>window.location.href = `/ver-escultura/${props.row.original.id}`}>
<i className="material-symbols-outlined">&#xe8f4;</i></button>
</div>
);
},
}),
];
const columnHelper = createColumnHelper<Escultura>();

const navigate = useNavigate();
const columns = [

columnHelper.accessor("nombre", {
header: () => "Nombre",
cell: (info) => info.renderValue(),
footer: (info) => info.column.id,
}),
columnHelper.accessor("escultor", {
header: () => "Escultor",
cell: (info) => info.renderValue(),
footer: (info) => info.column.id,
}),
columnHelper.accessor("nacionalidad", {
header: () => "Nacionalidad",
cell: (info) => info.renderValue(),
footer: (info) => info.column.id,
}),
columnHelper.accessor("descripcion", {
header: () => "Descripción",
cell: (info) => (
<span title={info.getValue()}>{limitarPalabras(info.getValue(), 6)}</span>
),
footer: (info) => info.column.id,
}),
columnHelper.display({
id: "acciones",
header: "Acciones",
cell: (props) => {
const openEditPopup = (id: number) => {
setEsculturaEditId(id);
setIsPopupEditOpen(true);
};

return (
<div className="acciones_container">
<button onClick={() => openEditPopup(props.row.original.id)}><i className="material-symbols-outlined">&#xe3c9;</i></button>
<button onClick={() => navigate(`/ver-escultura/${props.row.original.id}`)}>
<i className="material-symbols-outlined">&#xe8f4;</i></button>
</div>
);
},
}),
];



Expand Down
5 changes: 4 additions & 1 deletion backoffice/src/pages/pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
justify-content: center;
align-items: center;
height: 100vh;
background-image: url(https://storage.cloud.google.com/bienaldelchaco/img/media/fondo.jpg);
background-image: url(../img_media_fondo.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
Expand Down Expand Up @@ -364,6 +364,8 @@
@media (max-width: 500px) {
.login-form {
padding: 24px;
width: 100%;
max-width: 100%;
}
input {
font-size: 14px;
Expand All @@ -384,4 +386,5 @@
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));

}

}
3 changes: 1 addition & 2 deletions landing/src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
>&#xeae2;</i
>
</button>
<button><i class="material-icons" title="Contraste">&#xeb37;</i></button
>

</div>
</header>

Expand Down
10 changes: 8 additions & 2 deletions landing/src/pages/certamen.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ if (anio !== 2022 && anio !== 2025) {
<div class="overlay"></div>
<div class="popUp-container">
<article class="popup">
<div class="cerrar-popup-container">
<div class="cerrar-popup-container " style="
width: 100%;
display: flex;
justify-content: end;
margin-top:0;">
<button class="cerrar-popup">x</button>
</div>

<div>
<h4 id="nombre-escultor"></h4>
<h4 id="nombre-escultor" class="h4-center" style=" font-size: 1.5rem;
font-weight: 700;
text-align: center;"></h4>
<p>
Los votos de todos los escultores se contabilizarán para
obtener al ganador del certamen
Expand Down
19 changes: 16 additions & 3 deletions landing/src/pages/qr.astro
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import "../styles/styles.css";
</head>
<body>
<main>
<img src={background.src} alt="" class="qr-background" />
<img src="src/assets/img_media_fondo.jpg" alt="" class="qr-background" />
<section class="qr-section">
<div class="center-logo">
<svg
Expand Down Expand Up @@ -103,10 +103,23 @@ import "../styles/styles.css";

if (escultorId) {
const qrUrl = `${URL_EVENTOS}/generar_qr/?escultor_id=${escultorId}`;

const setQr = document.getElementById("qr") as HTMLImageElement;
setQr.src = qrUrl;

const updateQr = () => {
if (setQr) {

const timestamp = new Date().getTime();
setQr.src = `${qrUrl}&t=${timestamp}`;
}
};


updateQr();


setInterval(updateQr, 60000);
} else {
console.error("No se proporcionó el id del escultor.");
}
</script>

9 changes: 8 additions & 1 deletion landing/src/scripts/certamen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,14 @@ async function loadEscultores(baseUrl: string, evento_id:number, estado: boolean

const contenido = estado
? `<div class="calificacion-premio">
<i class="material-icons-outlined premio-${puesto} premio" id="certamen-tag-footer">&#xe7af;</i>
<i class="material-icons-outlined premio" id="premio-${puesto}"
style="${
puesto === 1 ? "color: #ffcd29"
: puesto === 2 ? "color: #b4b4b4"
: puesto === 3 && "color: #cd7f32"
}

">&#xe7af;</i>
</div>`
: votado
? `<div class="calificacion">
Expand Down
2 changes: 1 addition & 1 deletion landing/src/scripts/validar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Toastify from "toastify-js";
import { API_URL } from "astro:env/client";
import "toastify-js/src/toastify.css";
import { getUrlParams } from "./utils";
valida;


const TIME_LIMIT_MINS = 1.0;

Expand Down
1 change: 1 addition & 0 deletions landing/src/scripts/votar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ if (form) {
window.location.href = "/certamen";
}, 3000);
} else {
localStorage.setItem("userEmail", correo);
Toastify({
text: "¡Error al enviar la calificación, usted ya voto a este escultor!",
duration: 3000,
Expand Down
18 changes: 13 additions & 5 deletions landing/src/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ footer {
margin-top: 15px;
}

.action-btns button {
.action-btns{
display: inline-flex;
justify-content: center;
gap: 20px;
Expand Down Expand Up @@ -1089,13 +1089,13 @@ center {
color: #4e4e4e;
}

.premio-1{
#premio-1{
color: #ffcd29 !important;
}
.premio-2{
#premio-2{
color: #b4b4b4 !important;
}
.premio-3{
#premio-3{
color: #cd7f32 !important;
}

Expand Down Expand Up @@ -1584,6 +1584,12 @@ form {
justify-content: end;
}

.justify-right{
width: 100% !important;
display: flex !important;
justify-content: end !important;
}

.cerrar-popup {
color: #8c8c8c;
font-size: 24px;
Expand All @@ -1607,12 +1613,14 @@ form {
transform: scale(0.9);
}

.popup div h4 {
.h4-center {
font-size: 1.5rem;
font-weight: 700;
text-align: center;
}



.popup div p {
text-align: center;
margin-top: 16px;
Expand Down
Loading