changes 0328092025

This commit is contained in:
Simon Pocrnjič
2025-09-28 22:36:47 +02:00
parent b40ee9dcde
commit 7e8e0a479b
61 changed files with 4306 additions and 654 deletions
@@ -9,7 +9,8 @@ import { useForm } from '@inertiajs/vue3'
const props = defineProps({
show: { type: Boolean, default: false },
client_case: { type: Object, required: true },
contract: { type: Object, required: true },
// Contract can initially be null while dialog is hidden; make it optional to avoid prop warning
contract: { type: Object, default: null },
})
const emit = defineEmits(['close', 'created'])
@@ -23,6 +24,10 @@ const form = useForm({
})
const submit = () => {
if (!props.contract) {
// No contract selected; do nothing safely
return
}
form.post(route('clientCase.contract.object.store', { client_case: props.client_case.uuid, uuid: props.contract.uuid }), {
preserveScroll: true,
onSuccess: () => { emit('created'); form.reset(); close() },