Refactor Form Submission Logic and Improve File Handling

- Updated `FormController.php` to correct the file path concatenation for temporary file retrieval, enhancing clarity in file management.
- Modified `FormSubmissionResource.php` to improve the filtering logic for file fields, ensuring only valid files are processed.
- Streamlined the constructor in `StoreFormSubmissionJob.php` for better readability and consistency.
- Enhanced file handling in `StoreFormSubmissionJob.php` by refining the logic for moving files from temporary to permanent storage, ensuring accurate file management.
- Improved the `FormSubmissionFormatter.php` to handle file URLs more robustly with error handling for signed routes.
- Updated `PartialSubmissionTest.php` to remove the hardcoded success message, improving test reliability.
- Refactored `OpenFormField.vue` to simplify the disabled state logic for form fields, enhancing maintainability.
- Adjusted `usePartialSubmission.js` to improve the synchronization mechanism during visibility changes, ensuring data integrity.

These changes aim to enhance the overall functionality, maintainability, and reliability of the form submission process and file handling logic.
This commit is contained in:
Julien Nahum
2025-05-07 20:03:47 +02:00
parent 053abbf31b
commit 2edd0816d4
8 changed files with 81 additions and 92 deletions

View File

@@ -29,6 +29,7 @@ export function createFormModeStrategy(mode) {
// Display behaviors
display: {
showHiddenFields: false,
enableDisabledFields: false,
showFormCleanings: true,
showFontLink: false
},
@@ -71,6 +72,7 @@ export function createFormModeStrategy(mode) {
strategy.validation.performActualSubmission = false
strategy.display.showHiddenFields = true
strategy.display.enableDisabledFields = true
break
case FormMode.EDIT: