commit compras1 2911
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-29 05:28:30 +02:00
parent 1ddabbbdcc
commit 448948a487
137 changed files with 9481 additions and 1926 deletions
+3 -17
View File
@@ -1,5 +1,6 @@
import { usePreparationDirty } from '@/hooks/use-preparation-dirty';
import { Head, Link, useForm } from '@inertiajs/react';
import { useEffect, useRef } from 'react';
import { useRef } from 'react';
import { FormErrors, PageTitle, Panel } from '@/components/procurement';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -69,23 +70,8 @@ export default function Dossier({
file: null as File | null,
},
);
const ref = useRef<HTMLFormElement>(null);
const ref = usePreparationDirty(form.isDirty);
const fileRef = useRef<HTMLInputElement>(null);
useEffect(() => {
const current = ref.current;
window.dispatchEvent(
new CustomEvent('sgc:context-dirty', {
detail: { form: current, dirty: form.isDirty },
}),
);
return () => {
window.dispatchEvent(
new CustomEvent('sgc:context-dirty', {
detail: { form: current, dirty: false },
}),
);
};
}, [form.isDirty]);
const correction = (document: Document) => {
form.setData({
operation_key: crypto.randomUUID(),