Fix(Taiga #2033 | License): Fix Excavation Report #350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Issue with saving many excavation report tiles and freeze of page if report was uploaded without validated document name field.
Fixes
Changed cardinality to n
Made a custom version of the workflow-component-abstract
Added a disableAdd button which is passed to the loaded component
Created a custom component for the nodegroup for the report
Disable and enable the add button if the mandatory field is filled
This also fixes the edit button which was not working
Test
Reload the License model
coral reload
Navigate to the excavation report page
Try to add a report without the name, the add button should be disabled
Enter the name and the add button should be enabled
Add one report and save and continue
Return to the excavation report and the report should still be there
Add another report and save again
Return to see if the addtional report is shown
Hit edit and it should populate the fields
Check the instance to see if the tile is present
Check other many tile components such as location on the add heritage to see that this has not been affected by the change.
Note
There is a pr up on arches for fixing this issue but it focuses on validation at the backend, we will need to implement this at a later date which may change how this is implemented
archesproject/arches-her#1232