feat: update API controllers, validations, and Vue components
All checks were successful
CI / container-job (push) Successful in 49s
All checks were successful
CI / container-job (push) Successful in 49s
- 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.
This commit is contained in:
parent
36cd7a757b
commit
b540547e4c
34 changed files with 1757 additions and 1018 deletions
|
@ -2,6 +2,56 @@ import { defineStore } from 'pinia';
|
|||
import axios from 'axios';
|
||||
import { Dataset } from '@/Dataset';
|
||||
import menu from '@/menu';
|
||||
// import type Person from '#models/person';
|
||||
|
||||
export interface User {
|
||||
id: number;
|
||||
login: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
email: string;
|
||||
password: string;
|
||||
created_at: DateTime;
|
||||
updatedAt: DateTime;
|
||||
lastLoginAt: DateTime;
|
||||
isActive: boolean;
|
||||
isVerified: boolean;
|
||||
roles: string[];
|
||||
permissions: string[];
|
||||
settings: Record<string, any>;
|
||||
profile: {
|
||||
avatar: string;
|
||||
bio: string;
|
||||
location: string;
|
||||
website: string;
|
||||
social: {
|
||||
twitter: string;
|
||||
facebook: string;
|
||||
linkedin: string;
|
||||
github: string;
|
||||
}
|
||||
};
|
||||
metadata: Record<string, any>;
|
||||
verifyPassword: (plainPassword: string) => Promise<boolean>;
|
||||
}
|
||||
|
||||
interface DateTime {
|
||||
get: (unit: keyof DateTime) => number;
|
||||
getPossibleOffsets: () => DateTime[];
|
||||
toRelativeCalendar: (options?: ToRelativeCalendarOptions) => string | null;
|
||||
toFormat: (format: string) => string;
|
||||
toISO: () => string;
|
||||
toJSON: () => string;
|
||||
toString: () => string;
|
||||
toLocaleString: (options?: Intl.DateTimeFormatOptions) => string;
|
||||
toUTC: () => DateTime;
|
||||
toLocal: () => DateTime;
|
||||
valueOf: () => number;
|
||||
toMillis: () => number;
|
||||
toSeconds: () => number;
|
||||
toUnixInteger: () => number;
|
||||
}
|
||||
|
||||
|
||||
export interface Person {
|
||||
id: number;
|
||||
|
@ -9,10 +59,12 @@ export interface Person {
|
|||
email: string;
|
||||
name_type: string;
|
||||
identifier_orcid: string;
|
||||
datasetCount: string;
|
||||
dataset_count: number;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
interface TransactionItem {
|
||||
amount: number;
|
||||
account: string;
|
||||
|
@ -61,7 +113,7 @@ export const MainService = defineStore('main', {
|
|||
isFieldFocusRegistered: false,
|
||||
|
||||
/* Sample data for starting dashboard(commonly used) */
|
||||
clients: [],
|
||||
clients: [] as Array<User>,
|
||||
history: [] as Array<TransactionItem>,
|
||||
|
||||
// api based data
|
||||
|
@ -184,7 +236,7 @@ export const MainService = defineStore('main', {
|
|||
this.totpState = state;
|
||||
},
|
||||
|
||||
async fetchChartData(year: string) {
|
||||
fetchChartData(year: string) {
|
||||
// sampleDataKey= authors or datasets
|
||||
axios
|
||||
.get(`/api/statistic/${year}`)
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue