Changes 0128092025

This commit is contained in:
Simon Pocrnjič
2025-09-28 11:05:00 +02:00
parent a913cfc381
commit 765beb78b7
15 changed files with 480 additions and 150 deletions
@@ -84,7 +84,8 @@ const store = () => {
},
onSuccess: () => {
close();
form.reset();
// Preserve selected contract across submissions; reset only user-editable fields
form.reset('due_date', 'amount', 'note');
},
onError: (errors) => {
console.log('Validation or server error:', errors);
@@ -95,6 +96,17 @@ const store = () => {
});
}
// When the drawer opens, always sync the current contractUuid into the form,
// even if the value hasn't changed (prevents stale/null contract_uuid after reset)
watch(
() => props.show,
(visible) => {
if (visible) {
form.contract_uuid = props.contractUuid || null;
}
}
);
</script>
<template>
<DialogModal :show="show" @close="close">