hotfix(dataset): improve dataset management and UI enhancements
- Added tooltips to display reject notes from editors and reviewers on dataset index pages for submitters and editors. - Implemented custom ordering for datasets in submitter and editor index views, prioritizing datasets rejected by editors or reviewers. - Changed "Review" button label to "View" on the reviewer dataset index page. - Changed "Review" button label to "Accept" on the reviewer dataset review page. - Added project_id to the dataset model. - Updated dependencies (vite, @pkgr/core, caniuse-lite, electron-to-chromium, http-proxy-middleware). - Replaced the static doctypes array with the DatasetTypes enum. - Updated favicon.
This commit is contained in:
parent
dbd2bf2e9d
commit
2cb33a779c
9 changed files with 151 additions and 93 deletions
|
@ -98,7 +98,7 @@ const formatServerState = (state: string) => {
|
|||
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
|
||||
<!-- <Sort label="Dataset Title" attribute="title" :search="form.search" /> -->
|
||||
Dataset Title
|
||||
</th>
|
||||
</th>
|
||||
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
|
||||
<!-- <Sort label="Email" attribute="email" :search="form.search" /> -->
|
||||
Server State
|
||||
|
@ -114,16 +114,33 @@ const formatServerState = (state: string) => {
|
|||
|
||||
<tbody class="bg-white divide-y divide-gray-200">
|
||||
<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">
|
||||
<td data-label="Login"
|
||||
class="py-4 whitespace-nowrap text-gray-700 dark:text-white 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 }}
|
||||
</Link> -->
|
||||
<!-- {{ user.id }} -->
|
||||
{{ dataset.main_title }}
|
||||
{{ dataset.main_title }}
|
||||
</td>
|
||||
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
|
||||
{{ formatServerState(dataset.server_state) }}
|
||||
<div v-if="dataset.server_state === 'rejected_editor' && dataset.reject_editor_note"
|
||||
class="inline-block relative ml-2 group">
|
||||
<button
|
||||
class="w-5 h-5 rounded-full bg-gray-200 text-gray-600 text-xs flex items-center justify-center focus:outline-none hover:bg-gray-300">
|
||||
i
|
||||
</button>
|
||||
<div
|
||||
class="absolute left-0 top-full mt-1 w-64 bg-white shadow-lg rounded-md p-3 text-xs text-left z-50 transform scale-0 origin-top-left transition-transform duration-100 group-hover:scale-100">
|
||||
<p
|
||||
class="text-gray-700 max-h-40 overflow-y-auto overflow-x-hidden whitespace-normal break-words">
|
||||
{{ dataset.reject_editor_note }}
|
||||
</p>
|
||||
<div class="absolute -top-1 left-1 w-2 h-2 bg-white transform rotate-45">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td data-label="modified" class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
|
||||
|
@ -131,15 +148,17 @@ const formatServerState = (state: string) => {
|
|||
{{ dataset.server_date_modified }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-4 whitespace-nowrap text-right text-sm font-medium text-gray-700 dark:text-white">
|
||||
<td
|
||||
class="py-4 whitespace-nowrap text-right text-sm font-medium text-gray-700 dark:text-white">
|
||||
<BaseButtons v-if="validStates.includes(dataset.server_state)"
|
||||
type="justify-start lg:justify-end" no-wrap>
|
||||
<!-- release created dataset -->
|
||||
<BaseButton v-if="can.edit"
|
||||
:route-name="stardust.route('dataset.release', [dataset.id])" color="info"
|
||||
:icon="mdiLockOpen" :label="'Release'" small />
|
||||
<BaseButton v-if="can.edit" :route-name="stardust.route('dataset.edit', [dataset.id])"
|
||||
color="info" :icon="mdiSquareEditOutline" :label="'Edit'" small />
|
||||
<BaseButton v-if="can.edit"
|
||||
:route-name="stardust.route('dataset.edit', [dataset.id])" color="info"
|
||||
:icon="mdiSquareEditOutline" :label="'Edit'" small />
|
||||
<BaseButton v-if="can.edit"
|
||||
:route-name="stardust.route('dataset.categorize', [dataset.id])" color="info"
|
||||
:icon="mdiLibraryShelves" :label="'Library'" small />
|
||||
|
@ -152,7 +171,7 @@ const formatServerState = (state: string) => {
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="py-4">
|
||||
<Pagination v-bind:data="datasets.meta" />
|
||||
<Pagination v-bind:data="datasets.meta" />
|
||||
</div>
|
||||
</CardBox>
|
||||
</SectionMain>
|
||||
|
@ -160,13 +179,17 @@ const formatServerState = (state: string) => {
|
|||
</template>
|
||||
|
||||
<style scoped lang="css">
|
||||
|
||||
.table-title {
|
||||
max-width: 200px; /* set a maximum width */
|
||||
overflow: hidden; /* hide overflow */
|
||||
text-overflow: ellipsis; /* show ellipsis for overflowed text */
|
||||
white-space: nowrap; /* prevent wrapping */
|
||||
max-width: 200px;
|
||||
/* set a maximum width */
|
||||
overflow: hidden;
|
||||
/* hide overflow */
|
||||
text-overflow: ellipsis;
|
||||
/* show ellipsis for overflowed text */
|
||||
white-space: nowrap;
|
||||
/* prevent wrapping */
|
||||
}
|
||||
|
||||
.table-fixed {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
@ -208,6 +231,4 @@ const formatServerState = (state: string) => {
|
|||
color: whitesmoke;
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue