tethys.backend/resources/js/Pages/Editor/Dataset/Doi.vue
Arno Kaimbacher b540547e4c
All checks were successful
CI / container-job (push) Successful in 49s
feat: update API controllers, validations, and Vue components
- Modified Api/Authors.Controller.ts to use only personal types and sort by dataset_count.
- Completely rewritten AvatarController.ts.
- Added new Api/CollectionsController.ts for querying collections and collection_roles.
- Modified Api/DatasetController.ts to preload titles, identifier and order by server_date_published.
- Modified FileController.ts to serve files from /storage/app/data/ instead of /storage/app/public.
- Added new Api/UserController for requesting submitters (getSubmitters).
- Improved OaiController.ts with performant DB queries for better ResumptionToken handling.
- Modified Submitter/DatasetController.ts by adding a categorize method for library classification.
- Rewritten ResumptionToken.ts.
- Improved TokenWorkerService.ts to utilize browser fingerprint.
- Edited dataset.ts by adding the doiIdentifier property.
- Enhanced person.ts to improve the fullName property.
- Completely rewritten AsideMenuItem.vue component.
- Updated CarBoxClient.vue to use TypeScript.
- Added new CardBoxDataset.vue for displaying recent datasets on the dashboard.
- Completely rewritten TableSampleClients.vue for the dashboard.
- Completely rewritten UserAvatar.vue.
- Made small layout changes in Dashboard.vue.
- Added new Category.vue for browsing scientific collections.
- Adapted the pinia store in main.ts.
- Added additional routes in start/routes.ts and start/api/routes.ts.
- Improved referenceValidation.ts for better ISBN existence checking.
- NPM dependency updates.
2025-03-14 17:39:58 +01:00

99 lines
4.3 KiB
Vue

<script setup lang="ts">
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
import SectionMain from '@/Components/SectionMain.vue';
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
import { router, Head, usePage } from '@inertiajs/vue3';
import { computed, Ref } from 'vue';
import CardBox from '@/Components/CardBox.vue';
import BaseButton from '@/Components/BaseButton.vue';
import BaseButtons from '@/Components/BaseButtons.vue';
import { stardust } from '@eidellev/adonis-stardust/client';
import { mdiArrowLeftBoldOutline, mdiIdentifier } from '@mdi/js';
import FormValidationErrors from '@/Components/FormValidationErrors.vue';
// import Notification from '@/utils/toast';
const props = defineProps({
dataset: {
type: Object,
default: () => ({}),
},
});
const flash: Ref<any> = computed(() => {
return usePage().props.flash;
});
const errors: Ref<any> = computed(() => {
return usePage().props.errors;
});
const handleSubmit = async (e) => {
e.preventDefault();
// Notification.showInfo(`doi implementation is in developement. Create DOI for dataset ${props.dataset.publish_id} later on`);
await router.put(stardust.route('editor.dataset.doiStore', [props.dataset.publish_id]));
// await form.put(stardust.route('dataset.releaseUpdate', [props.dataset.id]));
};
</script>
<template>
<LayoutAuthenticated>
<Head title="Mint DOI" />
<SectionMain>
<SectionTitleLineWithButton :icon="mdiIdentifier" title="Mint DOI for dataset" main>
<BaseButton
:route-name="stardust.route('editor.dataset.list')"
:icon="mdiArrowLeftBoldOutline"
label="Back"
color="white"
rounded-full
small
/>
</SectionTitleLineWithButton>
<CardBox form @submit.prevent="handleSubmit">
<FormValidationErrors v-bind:errors="errors" />
<!-- <div class="flex flex-col md:flex-row items-center"> -->
<!-- <div class="w-full">
<label class="block font-bold mb-2" for="owner">Submitter:</label>
<div class="w-full p-2 rounded-md">{{ dataset.user.login }}</div>
</div> -->
<div class="w-full">
<label class="block font-bold mb-2" for="title">Tethys Publish ID:</label>
<div class="w-full p-2 rounded-md" v-if="dataset.publish_id">
{{ dataset.publish_id }}
</div>
</div>
<div class="w-full">
<label class="block font-bold mb-2" for="title">Dataset main title:</label>
<div class="w-full p-2 rounded-md" v-if="dataset.main_title">
{{ dataset.main_title }}
</div>
<div class="w-full p-2 rounded-md" v-else>No title available</div>
</div>
<div class="w-full">
<label class="block font-bold mb-2" for="title">Dataset abstract:</label>
<div class="w-full p-2 rounded-md" v-if="dataset.main_abstract">
{{ dataset.main_abstract }}
</div>
<div class="w-full p-2 rounded-md" v-else>No abstract available</div>
</div>
<!-- </div> -->
<div v-if="flash && flash.warning" class="flex flex-col mt-6 animate-fade-in">
<div class="bg-yellow-500 border-l-4 border-orange-400 text-white p-4" role="alert">
<p class="font-bold">Be Warned</p>
<p>{{ flash.warning }}</p>
</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="Mint DOI" />
</BaseButtons>
</template>
</CardBox>
</SectionMain>
</LayoutAuthenticated>
</template>