Big changes added events for decisions

This commit is contained in:
Simon Pocrnjič
2025-10-22 23:20:04 +02:00
parent 872b76b012
commit 67ebe4b225
36 changed files with 2240 additions and 189 deletions
@@ -28,7 +28,7 @@ const decisions = ref(
: []
);
const emit = defineEmits(["close"]);
const emit = defineEmits(["close", "saved"]);
const close = () => emit("close");
const form = useForm({
@@ -123,6 +123,8 @@ const store = async () => {
onSuccess: () => {
close();
form.reset("due_date", "amount", "note");
// Notify parent to react (e.g., refresh, redirect in phone mode when no contracts left)
emit("saved");
},
});
};