- use latest prettier 3.0 with eslint-plugin-prettier: 5.0.0-alpha.2
All checks were successful
CI Pipeline / japa-tests (push) Successful in 46s
All checks were successful
CI Pipeline / japa-tests (push) Successful in 46s
- npm normal updates - add all xslt and style asstes in extra folder public/assets2 - linting corrections - delete local .env.test from git tracking: git rm --cached .env.test - add .env.test into .gitignore file - add edit functionality for editing by submitter - npm updates -added xslt3 packeage for builfing sef files - added Language.ts class vor language table - added version to datasetxml2oai-pmh.xslt
This commit is contained in:
parent
f403c3109f
commit
4714dfdd94
70 changed files with 22920 additions and 17407 deletions
|
@ -10,9 +10,9 @@ import { stardust } from '@eidellev/adonis-stardust/client';
|
|||
|
||||
defineProps({
|
||||
user: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
roles: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
|
@ -25,7 +25,7 @@ defineProps({
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<LayoutAuthenticated :user="user">
|
||||
<LayoutAuthenticated>
|
||||
<Head title="View user" />
|
||||
<SectionMain>
|
||||
<SectionTitleLineWithButton :icon="mdiAccountKey" title="View user" main>
|
||||
|
|
|
@ -71,9 +71,9 @@ const datasets = computed(() => mainService.datasets);
|
|||
<div class="grid grid-cols-1 gap-6 lg:grid-cols-3 mb-6">
|
||||
<CardBoxWidget trend="12%" trend-type="up" color="text-emerald-500" :icon="mdiAccountMultiple"
|
||||
:number="authors.length" label="Authors" />
|
||||
<CardBoxWidget trend="193" trend-type="info" color="text-blue-500" :icon="mdiDatabaseOutline" :number="datasets.length"
|
||||
label="Publications" />
|
||||
<!-- <CardBoxWidget trend="193" trend-type="info" color="text-blue-500" :icon="mdiCartOutline" :number="datasets.length"
|
||||
<CardBoxWidget trend="193" trend-type="info" color="text-blue-500" :icon="mdiDatabaseOutline"
|
||||
:number="datasets.length" label="Publications" />
|
||||
<!-- <CardBoxWidget trend="193" trend-type="info" color="text-blue-500" :icon="mdiCartOutline" :number="datasets.length"
|
||||
prefix="$" label="Publications" /> -->
|
||||
<CardBoxWidget trend="Overflow" trend-type="alert" color="text-red-500" :icon="mdiChartTimelineVariant"
|
||||
:number="256" suffix="%" label="Performance" />
|
||||
|
@ -81,20 +81,14 @@ const datasets = computed(() => mainService.datasets);
|
|||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
|
||||
<div class="flex flex-col justify-between">
|
||||
<CardBoxClient
|
||||
v-for="client in authorBarItems"
|
||||
:key="client.id"
|
||||
:name="client.name"
|
||||
:email="client.email"
|
||||
:date="client.created_at"
|
||||
:text="client.datasetCount"
|
||||
/>
|
||||
<CardBoxClient v-for="client in authorBarItems" :key="client.id" :name="client.name"
|
||||
:email="client.email" :date="client.created_at" :text="client.datasetCount" />
|
||||
</div>
|
||||
<div class="flex flex-col justify-between">
|
||||
<CardBoxTransaction v-for="(transaction, index) in transactionBarItems" :key="index"
|
||||
:amount="transaction.amount" :date="transaction.date" :business="transaction.business"
|
||||
:type="transaction.type" :name="transaction.name" :account="transaction.account" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<SectionBannerStarOnGitHub />
|
||||
|
@ -116,6 +110,33 @@ const datasets = computed(() => mainService.datasets);
|
|||
<CardBox :icon="mdiMonitorCellphone" title="Responsive table" has-table>
|
||||
<TableSampleClients />
|
||||
</CardBox>
|
||||
|
||||
<CardBox>
|
||||
<p class="mb-3 text-gray-500 dark:text-gray-400">
|
||||
Discover the power of Tethys, the cutting-edge web backend solution that revolutionizes the way you
|
||||
handle
|
||||
research data. At the heart of Tethys lies our meticulously developed research data repository, which
|
||||
leverages state-of-the-art CI/CD techniques to deliver a seamless and efficient experience.
|
||||
</p>
|
||||
<p class="mb-3 text-gray-500 dark:text-gray-400">
|
||||
CI/CD, or Continuous Integration and Continuous Deployment, is a modern software development approach
|
||||
that
|
||||
ensures your code undergoes automated testing, continuous integration, and frequent deployment. By
|
||||
embracing
|
||||
CI/CD techniques, we ensure that every code change in our research data repository is thoroughly
|
||||
validated,
|
||||
enhancing reliability and accelerating development cycles.
|
||||
</p>
|
||||
<p class="mb-3 text-gray-500 dark:text-gray-400">
|
||||
With Tethys, you can say goodbye to the complexities of manual deployments and embrace a streamlined
|
||||
process
|
||||
that eliminates errors and minimizes downtime. Our CI/CD pipeline automatically verifies each code
|
||||
commit,
|
||||
runs comprehensive tests, and deploys the repository seamlessly, ensuring that your research data is
|
||||
always
|
||||
up-to-date and accessible.
|
||||
</p>
|
||||
</CardBox>
|
||||
</SectionMain>
|
||||
<!-- </section> -->
|
||||
|
||||
|
|
278
resources/js/Pages/Submitter/Dataset/Edit.vue
Normal file
278
resources/js/Pages/Submitter/Dataset/Edit.vue
Normal file
|
@ -0,0 +1,278 @@
|
|||
<template>
|
||||
<LayoutAuthenticated>
|
||||
|
||||
<Head title="Edit dataset" />
|
||||
<SectionMain>
|
||||
<SectionTitleLineWithButton :icon="mdiImageText" title="Update dataset" main>
|
||||
<BaseButton :route-name="stardust.route('dataset.list')" :icon="mdiArrowLeftBoldOutline" label="Back"
|
||||
color="white" rounded-full small />
|
||||
</SectionTitleLineWithButton>
|
||||
|
||||
<!-- max-w-2xl max-width: 42rem; /* 672px */ -->
|
||||
<!-- <div class="max-w-2xl mx-auto"> -->
|
||||
|
||||
<CardBox :form="true">
|
||||
<div class="mb-4">
|
||||
<!-- <label for="title" class="block text-gray-700 font-bold mb-2">Title:</label>
|
||||
<input
|
||||
type="text"
|
||||
id="title"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
||||
v-model="form.language"
|
||||
/> -->
|
||||
<div class="flex flex-col md:flex-row">
|
||||
<FormField label="Language *" help="required: select dataset main language"
|
||||
:class="{ 'text-red-400': errors.language }" class="w-full flex-1">
|
||||
<FormControl required v-model="form.language" :type="'select'" placeholder="[Enter Language]"
|
||||
:errors="form.errors.language" :options="{ de: 'de', en: 'en' }">
|
||||
<div class="text-red-400 text-sm" v-if="form.errors.language">
|
||||
{{ form.errors.language.join(', ') }}
|
||||
</div>
|
||||
</FormControl>
|
||||
</FormField>
|
||||
</div>
|
||||
<FormField label="Dataset Type *" help="required: dataset type"
|
||||
:class="{ 'text-red-400': form.errors.type }">
|
||||
<FormControl required v-model="form.type" :type="'select'" placeholder="-- select type --"
|
||||
:errors="errors.type" :options="doctypes">
|
||||
<div class="text-red-400 text-sm" v-if="form.errors.type && Array.isArray(form.errors.type)">
|
||||
{{ form.errors.type.join(', ') }}
|
||||
</div>
|
||||
</FormControl>
|
||||
</FormField>
|
||||
|
||||
<!-- titles -->
|
||||
<CardBox class="mb-6 shadow" :has-form-data="true" title="Titles" :icon="mdiFinance"
|
||||
:header-icon="mdiPlusCircle" v-on:header-icon-click="addTitle()">
|
||||
<div class="flex flex-col md:flex-row">
|
||||
<FormField label="Main Title *" help="required: main title"
|
||||
:class="{ 'text-red-400': form.errors['titles.0.value'] }" class="w-full mr-1 flex-1">
|
||||
<FormControl required v-model="form.titles[0].value" type="text"
|
||||
placeholder="[enter main title]">
|
||||
<div class="text-red-400 text-sm"
|
||||
v-if="form.errors['titles.0.value'] && Array.isArray(form.errors['titles.0.value'])">
|
||||
{{ form.errors['titles.0.value'].join(', ') }}
|
||||
</div>
|
||||
</FormControl>
|
||||
</FormField>
|
||||
<FormField label="Main Title Language*" help="required: main title language"
|
||||
:class="{ 'text-red-400': form.errors['titles.0.language'] }" class="w-full ml-1 flex-1">
|
||||
<FormControl required v-model="form.titles[0].language" type="text" :is-read-only="true">
|
||||
<div class="text-red-400 text-sm"
|
||||
v-if="form.errors['titles.0.language'] && Array.isArray(form.errors['titles.0.language'])">
|
||||
{{ form.errors['titles.0.language'].join(', ') }}
|
||||
</div>
|
||||
</FormControl>
|
||||
</FormField>
|
||||
</div>
|
||||
|
||||
<label v-if="form.titles.length > 1">additional titles </label>
|
||||
<!-- <BaseButton :icon="mdiPlusCircle" @click.prevent="addTitle()" color="modern" rounded-full small /> -->
|
||||
<table class="table-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th v-if="checkable" /> -->
|
||||
<th scope="col">Title Value *</th>
|
||||
<th>Title Type*</th>
|
||||
<th>Title Language*</th>
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="(item, index) in form.titles" :key="index">
|
||||
<tr v-if="item.type != 'Main'">
|
||||
<!-- <td scope="row">{{ index + 1 }}</td> -->
|
||||
<td scope="row">
|
||||
<FormControl required v-model="form.titles[index].value" type="text"
|
||||
placeholder="[enter main title]">
|
||||
<div class="text-red-400 text-sm"
|
||||
v-if="form.errors[`titles.${index}.value`]">
|
||||
{{ form.errors[`titles.${index}.value`].join(', ') }}
|
||||
</div>
|
||||
</FormControl>
|
||||
</td>
|
||||
<td>
|
||||
<FormControl required v-model="form.titles[index].type" type="select"
|
||||
:options="titletypes" placeholder="[select title type]">
|
||||
<div class="text-red-400 text-sm"
|
||||
v-if="Array.isArray(form.errors[`titles.${index}.type`])">
|
||||
{{ form.errors[`titles.${index}.type`].join(', ') }}
|
||||
</div>
|
||||
</FormControl>
|
||||
</td>
|
||||
<td>
|
||||
<FormControl required v-model="form.titles[index].language" type="select"
|
||||
:options="{ de: 'de', en: 'en' }" placeholder="[select title language]">
|
||||
<div class="text-red-400 text-sm"
|
||||
v-if="form.errors[`titles.${index}.language`]">
|
||||
{{ form.errors[`titles.${index}.language`].join(', ') }}
|
||||
</div>
|
||||
</FormControl>
|
||||
</td>
|
||||
<td>
|
||||
<td class="before:hidden lg:w-1 whitespace-nowrap">
|
||||
<BaseButtons type="justify-start lg:justify-end" no-wrap>
|
||||
<!-- <BaseButton color="info" :icon="mdiEye" small @click="isModalActive = true" /> -->
|
||||
<BaseButton color="danger" :icon="mdiTrashCan" small
|
||||
@click.prevent="removeTitle(index)" />
|
||||
</BaseButtons>
|
||||
</td>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</CardBox>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="description" class="block text-gray-700 font-bold mb-2">Description:</label>
|
||||
<textarea id="description"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
||||
v-model="form.type"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<!-- <label for="project" class="block text-gray-700 font-bold mb-2">Project:</label>
|
||||
<select
|
||||
id="project"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
||||
v-model="dataset.project_id"
|
||||
>
|
||||
<option v-for="project in projects" :key="project.id" :value="project.id" class="block px-4 py-2 text-gray-700">
|
||||
{{ project.label }}
|
||||
</option>
|
||||
</select> -->
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="license" class="block text-gray-700 font-bold mb-2">License:</label>
|
||||
<!-- <select
|
||||
id="license"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
||||
v-model="dataset.license_id"
|
||||
>
|
||||
<option v-for="license in licenses" :key="license.id" :value="license.id" class="block px-4 py-2 text-gray-700">
|
||||
{{ license.name_long }}
|
||||
</option>
|
||||
</select> -->
|
||||
</div>
|
||||
<!-- Add more input fields for the other properties of the dataset -->
|
||||
<!-- <button
|
||||
type="submit"
|
||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
|
||||
>
|
||||
Save
|
||||
</button> -->
|
||||
<template #footer>
|
||||
<BaseButtons>
|
||||
<BaseButton type="submit" label="Submit" color="info" :class="{ 'opacity-25': form.processing }"
|
||||
:disabled="form.processing">
|
||||
</BaseButton>
|
||||
</BaseButtons>
|
||||
</template>
|
||||
</CardBox>
|
||||
<!-- </div> -->
|
||||
</SectionMain>
|
||||
</LayoutAuthenticated>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
||||
import { Dataset, Title } from '@/Dataset';
|
||||
import FormField from '@/Components/FormField.vue';
|
||||
import FormControl from '@/Components/FormControl.vue';
|
||||
import SectionMain from '@/Components/SectionMain.vue';
|
||||
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
|
||||
import { mdiImageText, mdiArrowLeftBoldOutline, mdiPlusCircle, mdiFinance, mdiTrashCan } from '@mdi/js';
|
||||
// import BaseDivider from '@/Components/BaseDivider.vue';
|
||||
import BaseButton from '@/Components/BaseButton.vue';
|
||||
import BaseButtons from '@/Components/BaseButtons.vue';
|
||||
import CardBox from '@/Components/CardBox.vue';
|
||||
import { stardust } from '@eidellev/adonis-stardust/client';
|
||||
|
||||
const props = defineProps({
|
||||
dataset: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
languages: {},
|
||||
doctypes: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
titletypes: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
errors: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
|
||||
// const projects = reactive([]);
|
||||
// const licenses = reactive([]);
|
||||
|
||||
let form = useForm<Dataset>(props.dataset as Dataset);
|
||||
// const form = useForm({
|
||||
// _method: 'put',
|
||||
// login: props.user.login,
|
||||
// email: props.user.email,
|
||||
// password: '',
|
||||
// password_confirmation: '',
|
||||
// roles: props.userHasRoles, // fill actual user roles from db
|
||||
// });
|
||||
|
||||
// async created() {
|
||||
// // Fetch the list of projects and licenses from the server
|
||||
// const response = await fetch('/api/datasets/edit/' + this.dataset.id);
|
||||
// const data = await response.json();
|
||||
// this.projects = data.projects;
|
||||
// this.licenses = data.licenses;
|
||||
// }
|
||||
const addTitle = () => {
|
||||
let newTitle: Title = { value: '', language: '', type: '' };
|
||||
//this.dataset.files.push(uploadedFiles[i]);
|
||||
form.titles.push(newTitle);
|
||||
};
|
||||
const removeTitle = (key) => {
|
||||
form.titles.splice(key, 1);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<!-- <style>
|
||||
.max-w-2xl {
|
||||
max-width: 2xl;
|
||||
}
|
||||
|
||||
.text-2xl {
|
||||
font-size: 2xl;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mb-4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.text-gray-700 {
|
||||
color: #4b5563;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(66, 72, 78, 0.05),
|
||||
0 1px 2px 0 rgba(66, 72, 78, 0.08),
|
||||
0 2px 4px 0 rgba(66, 72, 78, 0.12),
|
||||
0 4px 8px 0 rgba(66, 72, 78, 0.16);
|
||||
}
|
||||
</style> -->
|
|
@ -2,7 +2,7 @@
|
|||
// import { Head, Link, useForm, usePage } from '@inertiajs/inertia-vue3';
|
||||
import { Head, usePage } from '@inertiajs/vue3';
|
||||
import { ComputedRef } from 'vue';
|
||||
import { mdiSquareEditOutline, mdiTrashCan, mdiAlertBoxOutline } from '@mdi/js';
|
||||
import { mdiSquareEditOutline, mdiTrashCan, mdiAlertBoxOutline, mdiLockOpen } from '@mdi/js';
|
||||
import { computed } from 'vue';
|
||||
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
||||
import SectionMain from '@/Components/SectionMain.vue';
|
||||
|
@ -44,6 +44,10 @@ const flash: ComputedRef<any> = computed(() => {
|
|||
return usePage().props.flash;
|
||||
});
|
||||
|
||||
// const errors: ComputedRef<any> = computed(() => {
|
||||
// return usePage().props.errors;
|
||||
// });
|
||||
|
||||
// const form = useForm({
|
||||
// search: props.filters.search,
|
||||
// });
|
||||
|
@ -62,9 +66,13 @@ const flash: ComputedRef<any> = computed(() => {
|
|||
<LayoutAuthenticated>
|
||||
<Head title="Submit Dataset" />
|
||||
<SectionMain>
|
||||
<!-- <FormValidationErrors v-bind:errors="errors" /> -->
|
||||
<NotificationBar v-if="flash.message" color="success" :icon="mdiAlertBoxOutline">
|
||||
{{ flash.message }}
|
||||
</NotificationBar>
|
||||
<NotificationBar v-if="flash.warning" color="warning" :icon="mdiAlertBoxOutline">
|
||||
{{ flash.warning }}
|
||||
</NotificationBar>
|
||||
|
||||
<!-- table -->
|
||||
<CardBox class="mb-6" has-table>
|
||||
|
@ -105,13 +113,22 @@ const flash: ComputedRef<any> = computed(() => {
|
|||
<BaseButtons type="justify-start lg:justify-end" no-wrap>
|
||||
<!-- release created dataset -->
|
||||
<BaseButton
|
||||
v-if="can.delete && (dataset.server_state === 'inprogress' || dataset.server_state === 'rejected_editor')"
|
||||
v-if="can.edit"
|
||||
:route-name="stardust.route('dataset.release', [dataset.id])"
|
||||
color="info"
|
||||
:icon="mdiSquareEditOutline"
|
||||
:icon="mdiLockOpen"
|
||||
:label="'Release'"
|
||||
small
|
||||
/>
|
||||
<!-- && (dataset.server_state === 'inprogress' || dataset.server_state === 'rejected_editor')" -->
|
||||
<BaseButton
|
||||
v-if="can.edit"
|
||||
:route-name="stardust.route('dataset.edit', [dataset.id])"
|
||||
color="info"
|
||||
:icon="mdiSquareEditOutline"
|
||||
:label="'Edit'"
|
||||
small
|
||||
/>
|
||||
<!-- @click="destroy(dataset.id)" -->
|
||||
<BaseButton v-if="can.delete" color="danger" :icon="mdiTrashCan" small />
|
||||
</BaseButtons>
|
||||
|
|
|
@ -107,10 +107,10 @@ const handleSubmit = async (e) => {
|
|||
{{ flash.message }}
|
||||
class="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4"
|
||||
</NotificationBar> -->
|
||||
<div v-if="flash && flash.message" class="flex flex-col mt-6 animate-fade-in">
|
||||
<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.message }}</p>
|
||||
<p>{{ flash.warning }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -52,15 +52,15 @@ export default class RegisterViewComponent extends Vue {
|
|||
type: Object,
|
||||
default: () => ({}),
|
||||
})
|
||||
errors: IErrorMessage;
|
||||
public errors: IErrorMessage;
|
||||
|
||||
// Data Property
|
||||
form: InertiaForm<any> = useForm({
|
||||
public form: InertiaForm<any> = useForm({
|
||||
email: '',
|
||||
password: '',
|
||||
});
|
||||
|
||||
results: Array<any> = [];
|
||||
public results: Array<any> = [];
|
||||
|
||||
// Component method
|
||||
public async submit(): Promise<void> {
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue