- add validator for checking languages of translated titles and description
- add notification messages via notiwind.ts - add Project.ts - add new component TabelPersons.vue - add additional routes - npm updates
This commit is contained in:
parent
59a99ff3c8
commit
080c21126b
24 changed files with 979 additions and 349 deletions
|
@ -1,10 +1,13 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import axios from 'axios';
|
||||
import { Dataset } from '@/Dataset';
|
||||
|
||||
interface Person {
|
||||
export interface Person {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
name_type: string;
|
||||
identifier_orcid: string;
|
||||
datasetCount: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
@ -12,7 +15,7 @@ interface Person {
|
|||
interface TransactionItem {
|
||||
amount: number;
|
||||
account: string;
|
||||
name: string;
|
||||
name: string;
|
||||
date: string;
|
||||
type: string;
|
||||
business: string;
|
||||
|
@ -31,8 +34,13 @@ export const MainService = defineStore('main', {
|
|||
/* Sample data for starting dashboard(commonly used) */
|
||||
clients: [],
|
||||
history: [] as Array<TransactionItem>,
|
||||
|
||||
// api based data
|
||||
authors: [] as Array<Person>,
|
||||
// persons: [] as Array<Person>,
|
||||
datasets: [],
|
||||
|
||||
dataset: {} as Dataset,
|
||||
}),
|
||||
actions: {
|
||||
// payload = authenticated user
|
||||
|
@ -48,6 +56,27 @@ export const MainService = defineStore('main', {
|
|||
}
|
||||
},
|
||||
|
||||
setDataset(payload) {
|
||||
this.dataset = payload;
|
||||
|
||||
// this.dataset = {
|
||||
// language: language,
|
||||
// licenses: payload.licenses,
|
||||
// rights: payload.rights,
|
||||
// type: payload.type,
|
||||
// creating_corporation: payload.creating_corporation,
|
||||
// titles: payload.titles,
|
||||
// descriptions: payload.descriptions,
|
||||
// authors: payload.authors,
|
||||
// project_id: payload.project_id,
|
||||
// embargo_date: payload.embargo_date,
|
||||
// } as Dataset;
|
||||
// for (let index in payload.titles) {
|
||||
// let title = payload.titles[index];
|
||||
// title.language = language;
|
||||
// }
|
||||
},
|
||||
|
||||
fetch(sampleDataKey) {
|
||||
// sampleDataKey= clients or history
|
||||
axios
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue