commit fix bugs

This commit is contained in:
dalia.florinda
2025-12-19 10:01:43 +01:00
parent af8a8b67c3
commit 9c254c9c28
6 changed files with 40 additions and 19 deletions

View File

@@ -76,6 +76,16 @@ const isInputFilled = computed(() => {
return inputValue && Array.isArray(inputValue) && inputValue.length > 0;
}
// For file uploads, check if the file has been uploaded
if (input.type === 'singlefile' || input.type === 'singlefile_acceptall') {
return inputValue !== undefined && inputValue !== '';
}
// For multifile, it's optional so always return true
if (input.type === 'multifile') {
return true;
}
return inputValue !== undefined && inputValue !== '';
});
});
@@ -191,8 +201,13 @@ const onDynamicPickerChange = (inputName, value) => {
// ============= File Upload Handlers =============
const handleFileUpload = (data) => {
console.log('handleFileUpload - data.fileName:', data.fileName);
console.log('handleFileUpload - data.response:', data.response);
console.log('handleFileUpload - data.inputName:', data.inputName);
if (data.inputName === 'SingleFileUpload') {
formData.value['SingleFileUpload'] = data.fileName;
formData.value['Folder'] = data.response;
numberPrFiles.value += 1;
} else {
formData.value['MultiFileUpload'] = data.response;