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:
parent
c3ae4327b7
commit
c245c8e97d
12 changed files with 277 additions and 253 deletions
|
@ -10,6 +10,7 @@ import BaseButtons from '@/Components/BaseButtons.vue';
|
|||
import { stardust } from '@eidellev/adonis-stardust/client';
|
||||
import { mdiArrowLeftBoldOutline, mdiGlasses } from '@mdi/js';
|
||||
import FormValidationErrors from '@/Components/FormValidationErrors.vue';
|
||||
import { mdiReiterate } from '@mdi/js';
|
||||
|
||||
const props = defineProps({
|
||||
dataset: {
|
||||
|
@ -20,6 +21,10 @@ const props = defineProps({
|
|||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
can: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
|
||||
const flash: Ref<any> = computed(() => {
|
||||
|
@ -56,8 +61,8 @@ const handleSubmit = async (e) => {
|
|||
<Head title="Review dataset" />
|
||||
<SectionMain>
|
||||
<SectionTitleLineWithButton :icon="mdiGlasses" title="Review approved dataset" main>
|
||||
<BaseButton :route-name="stardust.route('reviewer.dataset.list')" :icon="mdiArrowLeftBoldOutline" label="Back"
|
||||
color="white" rounded-full small />
|
||||
<BaseButton :route-name="stardust.route('reviewer.dataset.list')" :icon="mdiArrowLeftBoldOutline"
|
||||
label="Back" color="white" rounded-full small />
|
||||
</SectionTitleLineWithButton>
|
||||
<CardBox form @submit.prevent="handleSubmit">
|
||||
<FormValidationErrors v-bind:errors="errors" />
|
||||
|
@ -69,24 +74,23 @@ const handleSubmit = async (e) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex flex-col">
|
||||
<div class="flex flex-row items-center justify-between dark:bg-slate-900 bg-gray-200 p-2 mb-2"
|
||||
v-for="(fieldValue, field) in fields" :key="field">
|
||||
|
||||
<label :for="field" class="font-bold h-6 mt-3 text-xs leading-8 uppercase">{{ field }}</label>
|
||||
<label :for="field" class="font-bold h-6 mt-3 text-xs leading-8 uppercase">{{ field }}</label>
|
||||
<span class="text-sm text-gray-600" v-html="fieldValue"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<template #footer>
|
||||
<BaseButtons>
|
||||
<!-- <BaseButton type="submit" color="info" label="Receive"
|
||||
:class="{ 'opacity-25': router.processing }" :disabled="form.processing" /> -->
|
||||
<BaseButton type="submit" color="info" label="Accept" />
|
||||
<BaseButton v-if="can.reject && (dataset.server_state == 'approved')"
|
||||
:route-name="stardust.route('reviewer.dataset.reject', [dataset.id])" color="info"
|
||||
:icon="mdiReiterate" :label="'Reject'" />
|
||||
</BaseButtons>
|
||||
</template>
|
||||
</CardBox>
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue