hotfix: enhance editor dataset management and UI improvements
- Implemented dataset editing functionality for editor roles, including fetching, updating, and categorizing datasets. - Added routes and controller actions for editing, updating, and categorizing datasets within the editor interface. - Integrated UI components for managing dataset metadata, subjects, references, and files. - Enhanced keyword management with features for adding, editing, and deleting keywords, including handling keywords used by multiple datasets. - Improved reference management with features for adding, editing, and deleting dataset references. - Added validation for dataset updates using the `updateEditorDatasetValidator`. - Updated the dataset edit form to include components for managing titles, descriptions, authors, contributors, licenses, coverage, subjects, references, and files. - Implemented transaction management for dataset updates to ensure data consistency. - Added a download route for files associated with datasets. - Improved the UI for displaying and interacting with datasets in the editor index view, including adding edit and categorize buttons. - Fixed an issue where the file size was not correctly calculated. - Added a tooltip to the keyword value column in the TableKeywords component to explain the editability of keywords. - Added a section to display keywords that are marked for deletion. - Added a section to display references that are marked for deletion. - Added a restore button to the references to delete section to restore references. - Updated the SearchCategoryAutocomplete component to support read-only mode. - Updated the FormControl component to support read-only mode. - Added icons and styling improvements to various components. - Added a default value for subjectsToDelete and referencesToDelete in the dataset model. - Updated the FooterBar component to use the JustboilLogo component. - Updated the app.ts file to fetch chart data without a year parameter. - Updated the Login.vue file to invert the logo in dark mode. - Updated the AccountInfo.vue file to add a Head component.
This commit is contained in:
parent
10d159a57a
commit
f04c1f6327
30 changed files with 2284 additions and 539 deletions
|
@ -106,7 +106,7 @@ router
|
|||
|
||||
// Auth routes
|
||||
router
|
||||
.get('/app/login', async({ inertia }: HttpContext) => {
|
||||
.get('/app/login', async ({ inertia }: HttpContext) => {
|
||||
try {
|
||||
await db.connection().rawQuery('SELECT 1');
|
||||
} catch (error) {
|
||||
|
@ -364,6 +364,35 @@ router
|
|||
.as('editor.dataset.rejectUpdate')
|
||||
.where('id', router.matchers.number())
|
||||
.use([middleware.auth(), middleware.can(['dataset-editor-reject'])]);
|
||||
|
||||
router
|
||||
.get('/dataset/:id/edit', [EditorDatasetController, 'edit'])
|
||||
.as('editor.dataset.edit')
|
||||
// .where('id', router.matchers.number())
|
||||
.use([middleware.auth(), middleware.can(['dataset-editor-update'])]);
|
||||
router
|
||||
.put('/dataset/:id/update', [EditorDatasetController, 'update'])
|
||||
.as('editor.dataset.update')
|
||||
.where('id', router.matchers.number())
|
||||
.use([middleware.auth(), middleware.can(['dataset-editor-update'])]);
|
||||
|
||||
router
|
||||
.get('/dataset/:id/categorize', [EditorDatasetController, 'categorize'])
|
||||
.as('editor.dataset.categorize')
|
||||
.where('id', router.matchers.number())
|
||||
.use([middleware.auth(), middleware.can(['dataset-editor-update'])]);
|
||||
router
|
||||
.put('/dataset/:id/categorizeUpdate', [EditorDatasetController, 'categorizeUpdate'])
|
||||
.as('editor.dataset.categorizeUpdate')
|
||||
.where('id', router.matchers.number())
|
||||
.use([middleware.auth(), middleware.can(['dataset-editor-update'])]);
|
||||
|
||||
router
|
||||
.get('/file/download/:id', [EditorDatasetController, 'download'])
|
||||
.as('editor.file.download')
|
||||
.where('id', router.matchers.number())
|
||||
.use([middleware.auth(), middleware.can(['dataset-editor-update'])]);
|
||||
|
||||
router
|
||||
.get('dataset/:id/publish', [EditorDatasetController, 'publish'])
|
||||
.as('editor.dataset.publish')
|
||||
|
@ -384,10 +413,10 @@ router
|
|||
.as('editor.dataset.doiStore')
|
||||
.where('id', router.matchers.number())
|
||||
.use([middleware.auth(), middleware.can(['dataset-publish'])]);
|
||||
router
|
||||
.put('/dataset/:id/update', [EditorDatasetController, 'update'])
|
||||
.as('editor.dataset.update')
|
||||
.use([middleware.auth(), middleware.can(['dataset-editor-edit'])]);
|
||||
// router
|
||||
// .put('/dataset/:id/update', [EditorDatasetController, 'update'])
|
||||
// .as('editor.dataset.update')
|
||||
// .use([middleware.auth(), middleware.can(['dataset-editor-edit'])]);
|
||||
})
|
||||
.prefix('editor');
|
||||
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue