Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
086ec64
Mostrar loader cuando se hace login
July230 Jul 5, 2025
2dfb3b3
Mover logica dentro del try
July230 Jul 5, 2025
10288ae
Corregir errores de eslint
July230 Jul 7, 2025
d015de4
Corregir error eslint
July230 Jul 7, 2025
4565a12
Merge pull request #224 from CodeAnd-Co/fix/IJEC_loader_login
DanielQueijeiro Jul 10, 2025
fc95984
avance en UI
DiegolHacker Jul 11, 2025
25dabf1
Merge branch 'develop' of https://github.com/CodeAnd-Co/App-Local-Tra…
DiegolHacker Jul 11, 2025
03d6ef3
interfaz
DiegolHacker Jul 14, 2025
2a35a1f
Progreso en crear, consultar, y eliminar plantilla
DiegolHacker Jul 18, 2025
5a00ac9
arreglar eliminar plantilla
DanielQueijeiro Jul 18, 2025
ec1fc31
progreso
DiegolHacker Jul 22, 2025
314f5de
Filtros guardados
DiegolHacker Jul 25, 2025
6194a54
progreso
DiegolHacker Jul 25, 2025
0f46194
Mejorar css de plantillas
DanielQueijeiro Jul 26, 2025
62bc663
Hacer que cuando carguen una plantilla los contadores sean correctos
DanielQueijeiro Jul 26, 2025
6740d52
mejorar de nuevo estetica xd
DanielQueijeiro Jul 26, 2025
494ea2c
mensaje de limite de caracteres en titulo
DanielQueijeiro Jul 26, 2025
a5c019f
verificar datos
DanielQueijeiro Jul 26, 2025
ed1ba02
plantillas funcionando
DiegolHacker Jul 27, 2025
17d6b70
arreglar eslint
DanielQueijeiro Jul 27, 2025
6cd4606
formulas
DanielQueijeiro Jul 27, 2025
8d32043
mostrar tambien filtros
DanielQueijeiro Jul 27, 2025
511d8f9
xd
DanielQueijeiro Jul 27, 2025
34770a7
devtools
DanielQueijeiro Jul 27, 2025
f1347c0
Merge pull request #225 from CodeAnd-Co/feat/DFJ_no-ref_plantillas-fi…
DanielQueijeiro Jul 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

const { consultarPlantilla: consultarPlantillaAPI} = require('../../domain/plantillasAPI/consultarPlantilla.js');

/**
* Crea una plantilla a través de la API y retorna la respuesta obtenida.
* @async
* @function consultarPlantillas
* @param {string} token - Token de autenticación.
* @returns {Promise<Object>} Respuesta del servidor.
* @throws {Error} Si no se pudo consultar las plantillas.
*/
async function consultarPlantilla(nombrePlantilla){
try{
const respuesta = await consultarPlantillaAPI(nombrePlantilla, localStorage.getItem('token'));
return respuesta;
} catch(error){
throw new Error('No se pudo consultar la plantilla', error);
}
}
module.exports = {
consultarPlantilla
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

const { consultarPlantillas: consultarPlantillasAPI} = require('../../domain/plantillasAPI/consultarPlantillas.js');

/**
* Crea una plantilla a través de la API y retorna la respuesta obtenida.
* @async
* @function consultarPlantillas
* @param {string} token - Token de autenticación.
* @returns {Promise<Object>} Respuesta del servidor.
* @throws {Error} Si no se pudo consultar las plantillas.
*/
async function consultarPlantillas(){
try{
const respuesta = await consultarPlantillasAPI(localStorage.getItem('token'));
return respuesta;
} catch(error){
throw new Error('No se pudieron consultar las plantillas', error);
}
}
module.exports = {
consultarPlantillas
};
23 changes: 23 additions & 0 deletions harvester-app/src/backend/casosUso/plantillas/crearPlantilla.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

const { crearPlantilla: crearPlantillaAPI} = require('../../domain/plantillasAPI/crearPlantilla.js');

/**
* Crea una plantilla a través de la API y retorna la respuesta obtenida.
* @async
* @function crearPlantilla
* @param {string} nombre - Nombre de la plantilla.
* @param {string} datos - Contenido de la plantilla.
* @returns {Promise<Object>} Respuesta del servidor.
* @throws {Error} Si no se pudo crear la plantilla.
*/
async function crearPlantilla(nombre, datos){
try{
const respuesta = await crearPlantillaAPI(nombre, datos, localStorage.getItem('token'));
return respuesta;
} catch(error){
throw new Error('No se pudo crear la plantilla', error);
}
}
module.exports = {
crearPlantilla
};
22 changes: 22 additions & 0 deletions harvester-app/src/backend/casosUso/plantillas/eliminarPlantilla.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

const { eliminarPlantilla: eliminarPlantillaAPI} = require('../../domain/plantillasAPI/eliminarPlantilla.js');

/**
* Crea una plantilla a través de la API y retorna la respuesta obtenida.
* @async
* @function eliminarPlantilla
* @param {string} token - Token de autenticación.
* @returns {Promise<Object>} Respuesta del servidor.
* @throws {Error} Si no se pudo eliminar la plantilla.
*/
async function eliminarPlantilla(nombrePlantilla){
try{
const respuesta = await eliminarPlantillaAPI(nombrePlantilla, localStorage.getItem('token'));
return respuesta;
} catch(error){
throw new Error('No se pudo eliminar la plantilla', error);
}
}
module.exports = {
eliminarPlantilla
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { URL_BASE } = require(`${rutaBase}src/framework/utils/scripts/constantes.js`);

async function consultarPlantilla(nombrePlantilla, token) {
const respuesta = await fetch(`${URL_BASE}/plantillas/consultarPlantilla/${nombrePlantilla}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
});

const datos = await respuesta.json();

return { ok: respuesta.ok, ...datos };
}

module.exports = {
consultarPlantilla,
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const { URL_BASE } = require('../../../framework/utils/js/constantes');
const { URL_BASE } = require(`${rutaBase}src/framework/utils/scripts/constantes.js`);

async function plantillas() {
const respuesta = await fetch(`${URL_BASE}/plantillas/consultar`, {
async function consultarPlantillas(token) {
const respuesta = await fetch(`${URL_BASE}/plantillas/consultarPlantillas`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
}
});

Expand All @@ -14,5 +15,5 @@ async function plantillas() {
}

module.exports = {
plantillas,
consultarPlantillas,
};
28 changes: 28 additions & 0 deletions harvester-app/src/backend/domain/plantillasAPI/crearPlantilla.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const { URL_BASE } = require(`${rutaBase}src/framework/utils/scripts/constantes.js`);
/**
*
* @module formulaApi
* @description Módulo para interactuar con la API de fórmulas.
* @param {string} nombre
* @param {string} datos
* @param {string} token
* @returns {Promise<Object>} Respuesta de la API.
* @throws {Error} Si no se pudo guardar la fórmula.
*/
async function crearPlantilla(titulo, contenido, token) {
const respuesta = await fetch(`${URL_BASE}/plantillas/guardarPlantilla`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({titulo, contenido}),
});

const datos = await respuesta.json();
return { ok: respuesta.ok, ...datos };
}

module.exports = {
crearPlantilla,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { URL_BASE } = require(`${rutaBase}src/framework/utils/scripts/constantes.js`);

async function eliminarPlantilla(nombrePlantilla, token) {
const respuesta = await fetch(`${URL_BASE}/plantillas/eliminarPlantilla/${nombrePlantilla}`, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
},
});

const datos = await respuesta.json();

return { ok: respuesta.ok, ...datos };
}

module.exports = {
eliminarPlantilla,
};

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ body,
overflow-x: auto;
}

.ventana-principal{
width: 100%;
}
.seccion-elemento-reporte {
display: grid;
grid-template-rows: auto, 1fr auto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.ventana-principal {
width: 100%
width: 100%;
height: 100%;
}


Expand Down
Loading
Loading