diff --git a/front/.dockerignore b/front/.dockerignore
index 9807e7d..44c53e7 100644
--- a/front/.dockerignore
+++ b/front/.dockerignore
@@ -20,3 +20,7 @@ AGENTS.md
.idea
*.log
+
+.opencode
+
+bun.lock
diff --git a/front/src/routes/logs/ExportarLogs.js b/front/src/routes/logs/ExportarLogs.js
index fa194e4..b29405b 100644
--- a/front/src/routes/logs/ExportarLogs.js
+++ b/front/src/routes/logs/ExportarLogs.js
@@ -2,6 +2,13 @@ export class ExportarLogs {
#data;
constructor(logs) {
+ logs.forEach((x) => {
+ x.detalles.forEach((y) => {
+ if (typeof y.valorAnterior == 'undefined') {
+ y.valorAnterior = '.';
+ }
+ });
+ });
this.#data = this.#extraerInfo(logs);
}
diff --git a/front/src/routes/repuestos/+page.svelte b/front/src/routes/repuestos/+page.svelte
index a5759a7..e0cca81 100644
--- a/front/src/routes/repuestos/+page.svelte
+++ b/front/src/routes/repuestos/+page.svelte
@@ -12,9 +12,10 @@
TableHeader,
TableRow
} from 'carbon-components-svelte';
- import { Add, Edit, Information, TrashCan } from 'carbon-icons-svelte';
+ import { ArrowUp, Add, Edit, Information, TrashCan } from 'carbon-icons-svelte';
import CrearRepuestoForm from './CrearRepuestoForm.svelte';
import EliminarRepuestoForm from './EliminarRepuestoForm.svelte';
+ import AltaRepuestoForm from './AltaRepuestoForm.svelte';
import ModalStructured from '$lib/components/ModalStructured.svelte';
import EditarRepuestoForm from './EditarRepuestoForm.svelte';
@@ -26,10 +27,12 @@
let openCrear = $state(false);
let openEliminar = $state(false);
let openInfo = $state(false);
+ let openAlta = $state(false);
let openEditar = $state(false);
let repuestoEliminar = $state({ id: 0 });
let repuestoEditar = $state({ id: 0 });
+ let repuestoAlta = $state({ id: 0 });
let repuestoInfo = $state();
$effect(() => {
@@ -43,7 +46,8 @@
{ key: 'nombre', value: 'Nombre' },
{ key: 'descripcion', value: 'Descripción' },
{ key: 'precio', value: 'Precio' },
- { key: 'marcaId', value: 'Marca' }
+ { key: 'marcaId', value: 'Marca' },
+ { key: 'deleted_at', value: 'Estado' }
];
@@ -101,15 +105,27 @@
size="small"
icon={Information}>Ver registro
-
+ {#if p.deleted_at == '✔'}
+
+ {:else}
+
+ {/if}
{/each}
@@ -136,6 +152,15 @@
repuesto={repuestoEliminar}
>
+ {
+ openAlta = false;
+ repuestoAlta = { id: 0 };
+ }}
+ repuesto={repuestoAlta}
+>
+
{
diff --git a/front/src/routes/repuestos/+page.ts b/front/src/routes/repuestos/+page.ts
index d4d23a6..cd9d008 100644
--- a/front/src/routes/repuestos/+page.ts
+++ b/front/src/routes/repuestos/+page.ts
@@ -8,6 +8,11 @@ export async function load({ fetch, depends }) {
let error = '';
if (typeof repuestos === 'string') {
error = repuestos;
+ } else {
+ if (typeof repuestos[0].deleted_at !== 'undefined')
+ repuestos.forEach((x) => {
+ x.deleted_at = x.deleted_at ? '✗' : '✔';
+ });
}
return {
repuestos: repuestos,