profile page connected to backend and PATCH added, plagiatCheck updated and sertificate generate updated base backend types
This commit is contained in:
@@ -21,8 +21,7 @@ const INITIAL_FORM: PlagiarismFormState = {
|
||||
file: null,
|
||||
certificate: true,
|
||||
text: '',
|
||||
total_price: 41200,
|
||||
document_type: 'boshqa',
|
||||
type: 'boshqa',
|
||||
};
|
||||
|
||||
const PRICE: PriceCalculate = {
|
||||
@@ -145,16 +144,17 @@ export function usePlagiarismForm() {
|
||||
return; // Don't open modal if invalid
|
||||
}
|
||||
|
||||
console.log('new');
|
||||
const fd = new FormData();
|
||||
fd.append('title', form.title.trim());
|
||||
fd.append('text', `${user?.name} ${user?.surname}` || '');
|
||||
fd.append('file', form.file!); // File object — multipart/form-data
|
||||
fd.append('text', form.text || '');
|
||||
fd.append('file', form.file!);
|
||||
fd.append('certificate', String(form.certificate));
|
||||
fd.append('total_price', '41200');
|
||||
fd.append('type', form.document_type);
|
||||
fd.append('type', form.type);
|
||||
console.log('sended data: ', fd);
|
||||
checkdocumentRequest.mutate(fd);
|
||||
},
|
||||
[form],
|
||||
[form, localUser],
|
||||
);
|
||||
|
||||
const handleSubmit = useCallback(async () => {
|
||||
|
||||
Reference in New Issue
Block a user