Implement editing of supplemental files
Currently, the user can only upload and delete supplemental files, but not edit them.
The supplemental files are being used by Dataset dashboard single view and Dataset Parts dashboard single view, so both need to support editing of them.
-
Add an edit button to supplemental files -
Link the button to an edit view for supplemental files, with the same layout and structure as the create supplemental view (dasboard/data/create-supplemental.blade) -
Same permission rules apply for editing as for Delete action. -
Adapt the App\Livewire\Data\CreateSupplemental component: -
Rename it to FormSupplemental -
Adapt it so it accepts the edited item and correctly fills out the fields (See other Livewire*\Form components for examples). The creation should be kept as is. -
Only allow editing the 'description' field, file-upload field should be read-only! The file should be downloadable from this field (try to use component tooltip for that if nothing else works). -
Add update function that is run when user clicks submit in the view and updates the corresponding model.
-
-
Include translations for title and heading, and any other required
Edited by Grega Lipovšček