Skip to content

Commit

Permalink
fix en tablas sin paginación
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiasBais committed Apr 18, 2024
1 parent 17938f9 commit 9601aca
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 34 deletions.
3 changes: 2 additions & 1 deletion frontend/static/componentes/tabla.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class Tabla {
// TODO Feature: Conseguir la cantidad de páginas. Quizá con otra consulta...
let tabla = document.getElementById(this.#id);
let fieldset = tabla.querySelector('tfoot fieldset');
fieldset.className = 'fieldset-paginacion';
if (this.#mostrarPaginacion)
fieldset.className = 'fieldset-paginacion';

fetch(this.#endpointPaginacion, {
credentials: 'include',
Expand Down
64 changes: 32 additions & 32 deletions frontend/static/componentes/titulo.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
class Titulo {
titulo;
elemento;
#tipo
#clases
id
titulo;
elemento;
#tipo
#clases
id

constructor(elemento = 'h1', clave, titulo, clases,id) {
constructor(elemento = 'h1', clave, titulo, clases, id) {

this.#tipo = {
'1': 'is-1',
'2': 'is-2',
'3': 'is-3',
'4': 'is-4',
'5': 'is-5',
'6': 'is-6'
}[clave];
this.#tipo = {
'1': 'is-1',
'2': 'is-2',
'3': 'is-3',
'4': 'is-4',
'5': 'is-5',
'6': 'is-6'
}[clave];

// this.#elemento = {
// '1': 'h1',
// '2': 'h2',
// '3': 'h3',
// '4': 'h4',
// '5': 'h5'
// }[clave];
this.elemento = elemento;
this.titulo = titulo;
this.#clases = clases || '';
this.id=id;
}
// this.#elemento = {
// '1': 'h1',
// '2': 'h2',
// '3': 'h3',
// '4': 'h4',
// '5': 'h5'
// }[clave];
this.elemento = elemento;
this.titulo = titulo;
this.#clases = clases || '';
this.id = id;
}

render() {
return `
<${this.elemento} class='title ${this.#tipo} ${this.#clases}' ${this.id?`id="${this.id}"`:''}>${this.titulo}</${this.elemento}>
render() {
return `
<${this.elemento} class='title ${this.#tipo} ${this.#clases}' ${this.id ? `id="${this.id}"` : ''}>${this.titulo}</${this.elemento}>
`;
}
}

export {Titulo};
}

export { Titulo };
2 changes: 1 addition & 1 deletion frontend/static/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ form > fieldset{
margin-right: auto;
border: 2px solid #f2f2f2;
overflow: hidden;
overflow-x: scroll;
overflow-x: auto;
scroll-behavior: smooth;
margin-bottom: 1rem;
padding-bottom: 1rem;
Expand Down

0 comments on commit 9601aca

Please sign in to comment.