hotfix (dataset): improve dataset classification and review workflow

- Renamed "Collections" to "Classify" in dataset category views for submitters and editors to better reflect the page's purpose.
- Modified the `SectionTitleLineWithButton` component to conditionally render the cog button based on the `showCogButton` prop.
- Updated the Dataset Edit and Create views to use `textarea` instead of `text` for title and description input fields, allowing for multi-line text.
- Added authorization checks for dataset review and reject actions in the `Reviewer/DatasetController`, and passed the `can` object to the `Review` view.
- Added a "Reject" button to the dataset review page, visible only to users with the `dataset-review-reject` permission and when the dataset is in the 'approved' state.
- Improved the display of dataset information in index views by adding dark mode styling to table headers.
- Removed unused code and comments from the Dashboard.vue file.
- Removed the `show-header-icon` property from the CardBox component in the Create.vue file.
- Updated dependencies
This commit is contained in:
Kaimbacher 2025-04-24 18:25:07 +02:00
parent c3ae4327b7
commit c245c8e97d
12 changed files with 277 additions and 253 deletions

View file

@ -1,6 +1,6 @@
<template>
<LayoutAuthenticated>
<Head title="Collections"></Head>
<Head title="Classify"></Head>
<SectionMain>
<SectionTitleLineWithButton :icon="mdiLibraryShelves" title="Library Classification" main>
<div class="bg-lime-100 shadow rounded-lg p-6 mb-6 flex items-center justify-between">

View file

@ -115,23 +115,23 @@ const formatServerState = (state: string) => {
<table>
<thead>
<tr>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider dark:text-white">
<!-- <Sort label="Dataset Title" attribute="title" :search="form.search" /> -->
Title
</th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider dark:text-white">
Submitter
</th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider dark:text-white">
State
</th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider dark:text-white">
Editor
</th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider dark:text-white">
Date of last modification
</th>
<th scope="col" class="relative px-6 py-3" v-if="can.edit || can.delete">
<th scope="col" class="relative px-6 py-3 dark:text-white" v-if="can.edit || can.delete">
<span class="sr-only">Actions</span>
</th>
</tr>
@ -141,7 +141,7 @@ const formatServerState = (state: string) => {
<tr v-for="dataset in props.datasets.data" :key="dataset.id"
:class="[getRowClass(dataset)]">
<td data-label="Login"
class="py-4 whitespace-nowrap text-gray-700 dark:text-white table-title">
class="py-4 whitespace-nowrap text-gray-700 table-title">
<!-- <Link v-bind:href="stardust.route('settings.user.show', [user.id])"
class="no-underline hover:underline text-cyan-600 dark:text-cyan-400">
{{ user.login }}
@ -149,10 +149,10 @@ const formatServerState = (state: string) => {
<!-- {{ user.id }} -->
{{ dataset.main_title }}
</td>
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
<td class="py-4 whitespace-nowrap text-gray-700">
<div class="text-sm">{{ dataset.user.login }}</div>
</td>
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
<td class="py-4 whitespace-nowrap text-gray-700">
<div class="text-sm"> {{ formatServerState(dataset.server_state) }}</div>
<div v-if="dataset.server_state === 'rejected_reviewer' && dataset.reject_reviewer_note"
class="inline-block relative ml-2 group">
@ -171,23 +171,23 @@ const formatServerState = (state: string) => {
</div>
</td>
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white"
<td class="py-4 whitespace-nowrap text-gray-700"
v-if="dataset.server_state === 'released'">
<div class="text-sm" :title="dataset.server_date_modified">
Preferred reviewer: {{ dataset.preferred_reviewer }}
</div>
</td>
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white"
<td class="py-4 whitespace-nowrap text-gray-700"
v-else-if="dataset.server_state === 'editor_accepted' || dataset.server_state === 'rejected_reviewer'">
<div class="text-sm" :title="dataset.server_date_modified">
In approval by: {{ dataset.editor?.login }}
</div>
</td>
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white" v-else>
<td class="py-4 whitespace-nowrap text-gray-700" v-else>
<div class="text-sm">{{ dataset.editor?.login }}</div>
</td>
<td data-label="modified" class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
<td data-label="modified" class="py-4 whitespace-nowrap text-gray-700">
<div class="text-sm" :title="dataset.server_date_modified">
{{ dataset.server_date_modified }}
</div>
@ -224,7 +224,7 @@ const formatServerState = (state: string) => {
<BaseButton
v-if="can.edit && (dataset.server_state == 'editor_accepted' || dataset.server_state == 'rejected_reviewer')"
:route-name="stardust.route('editor.dataset.categorize', [dataset.id])"
color="info" :icon="mdiLibraryShelves" :label="'Sets'" small
color="info" :icon="mdiLibraryShelves" :label="'Classify'" small
class="col-span-1">
</BaseButton>