- HomeController.ts: addes api method for showing number of publications per month for given year
All checks were successful
CI Pipeline / japa-tests (push) Successful in 50s
All checks were successful
CI Pipeline / japa-tests (push) Successful in 50s
- adapted command ValidateChecksum.ts: on published files are checked. better information logging - better LineChart.vue component: showing real statistics - start/routes/apu.ts: added Route.get('/statistic/:year', 'HomeController.findPublicationsPerMonth');
This commit is contained in:
parent
8cef7390d7
commit
68928b5e07
10 changed files with 260 additions and 74 deletions
|
@ -110,13 +110,13 @@ let dataset: Dataset;
|
|||
if (Object.keys(mainService.dataset).length == 0) {
|
||||
// language = ref('');
|
||||
dataset = {
|
||||
language: language,
|
||||
language: language.value,
|
||||
licenses: [],
|
||||
rights: false,
|
||||
type: '',
|
||||
creating_corporation: 'Tethys RDR',
|
||||
titles: [{ value: '', type: 'Main', language: language }],
|
||||
descriptions: [{ value: '', type: 'Abstract', language: language }],
|
||||
titles: [{ value: '', type: 'Main', language: language.value }],
|
||||
descriptions: [{ value: '', type: 'Abstract', language: language.value }],
|
||||
authors: [],
|
||||
contributors: [],
|
||||
project_id: undefined,
|
||||
|
@ -150,11 +150,11 @@ if (Object.keys(mainService.dataset).length == 0) {
|
|||
// mainService.setDataset(dataset, language);
|
||||
} else {
|
||||
// console.log(mainService.dataset);
|
||||
language = ref(mainService.dataset.language);
|
||||
language.value = mainService.dataset.language;
|
||||
|
||||
// dataset = mainService.dataset;
|
||||
dataset = {
|
||||
language: language,
|
||||
language: mainService.dataset.language,
|
||||
licenses: mainService.dataset.licenses,
|
||||
rights: mainService.dataset.rights,
|
||||
type: mainService.dataset.type,
|
||||
|
@ -171,20 +171,23 @@ if (Object.keys(mainService.dataset).length == 0) {
|
|||
files: mainService.dataset.files,
|
||||
// upload: mainService.dataset.upload,
|
||||
};
|
||||
for (let index in mainService.dataset.titles) {
|
||||
let title: Title = mainService.dataset.titles[index];
|
||||
if (title.type == 'Main') {
|
||||
title.language = language;
|
||||
}
|
||||
}
|
||||
for (let index in mainService.dataset.descriptions) {
|
||||
let description: Description = mainService.dataset.descriptions[index];
|
||||
if (description.type == 'Abstract') {
|
||||
description.language = language;
|
||||
}
|
||||
}
|
||||
// for (let index in mainService.dataset.titles) {
|
||||
// let title: Title = mainService.dataset.titles[index];
|
||||
// if (title.type == 'Main') {
|
||||
// title.language = language;
|
||||
// }
|
||||
// }
|
||||
// for (let index in mainService.dataset.descriptions) {
|
||||
// let description: Description = mainService.dataset.descriptions[index];
|
||||
// if (description.type == 'Abstract') {
|
||||
// description.language = language;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// const form = useForm<Dataset>({
|
||||
// language: language,
|
||||
// licenses: [],
|
||||
|
@ -205,6 +208,21 @@ let form = useForm<Dataset>(dataset as Dataset);
|
|||
// },
|
||||
// });
|
||||
|
||||
watch(language, (currentValue) => {
|
||||
if (currentValue != "") {
|
||||
form.language = currentValue;
|
||||
const mainTitle = form.titles?.find((title) => title.type === 'Main');
|
||||
if (mainTitle) {
|
||||
mainTitle.language = currentValue;
|
||||
}
|
||||
const mainAbstract = form.descriptions?.find((desc) => desc.type === 'Abstract');
|
||||
if (mainAbstract) {
|
||||
mainAbstract.language = currentValue;
|
||||
}
|
||||
mainService.setDataset(form.data());
|
||||
}
|
||||
});
|
||||
|
||||
let elevation = ref('no_elevation');
|
||||
watch(elevation, (currentValue) => {
|
||||
if (currentValue == 'absolut') {
|
||||
|
@ -297,7 +315,7 @@ const submit = async () => {
|
|||
// formStep.value++;
|
||||
await form
|
||||
.transform((data) => ({
|
||||
...data,
|
||||
...data,
|
||||
files: files,
|
||||
rights: form.rights && form.rights == true ? 'true' : 'false',
|
||||
}))
|
||||
|
@ -498,7 +516,7 @@ Removes a selected keyword
|
|||
<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 mx-2 flex-1">
|
||||
<FormControl required v-model="form.language" :type="'select'"
|
||||
<FormControl required v-model="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">
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue