Private
Public Access
correjida funcionalidad de alta, modificacion y eliminacion de repuestos
This commit is contained in:
1 parent
6c900f0afd
commit
6b9cd844e4
12 files changed
+139
-63
No files matched your search
@@ -7,18 +7,18 @@
|
||||
show = $bindable(),
|
||||
onclose,
|
||||
repuesto
|
||||
}: { show?: boolean; onclose: () => void; repuesto: { id: number } } = $props();
|
||||
}: { show?: boolean; onclose: () => void; repuesto: { ID: number } } = $props();
|
||||
|
||||
let error = $state('');
|
||||
|
||||
async function handleSubmit(e: Event) {
|
||||
e.preventDefault();
|
||||
error = '';
|
||||
if (!repuesto.id) {
|
||||
if (!repuesto.ID) {
|
||||
error = 'No se pudo obtener la id del Repuesto? recarga la pagina.';
|
||||
return;
|
||||
}
|
||||
const result = await altaRepuesto(repuesto.id);
|
||||
const result = await altaRepuesto(repuesto.ID);
|
||||
if (result !== 'Ok') {
|
||||
error = result;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user