release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
2 changed files with 54 additions and 23 deletions
Showing only changes of commit 05fd255a51 - Show all commits

View File

@ -1,20 +1,51 @@
interface Session { declare namespace FG {
expires: Date; interface Event {
token: string; id: number;
lifetime: number; begin: Date;
browser: string; end?: Date;
platform: string; description: string;
} kind: EventKind;
interface User { slots: Array<EventSlot>;
}
interface EventKind {
id: number;
name: string;
}
interface EventSlot {
id: number;
start: Date;
end?: any;
slots: Array<any>;
}
interface Job {
userid: string;
value: number;
}
type JobKind = string;
interface JobSlot {
id: number;
needed_persons: number;
kind: JobKind;
jobs: Array<Job>;
}
interface User {
userid: string; userid: string;
display_name: string; display_name: string;
firstname: string; firstname: string;
lastname: string; lastname: string;
mail: string; mail: string;
roles: Array<Role>; roles: Array<Role>;
} }
type Permission = string; interface Session {
interface Role { expires: Date;
token: string;
lifetime: number;
browser: string;
platform: string;
}
type Permission = string;
interface Role {
name: string; name: string;
permissions: Array<Permission>; permissions: Array<Permission>;
}
} }

View File

@ -11,8 +11,8 @@ export interface UserStateInterface extends LoginResponse {
} }
export interface LoginResponse { export interface LoginResponse {
user: User; user: FG.User;
session: Session; session: FG.Session;
} }
const state: UserStateInterface = { const state: UserStateInterface = {
@ -35,10 +35,10 @@ const state: UserStateInterface = {
}; };
const mutations: MutationTree<UserStateInterface> = { const mutations: MutationTree<UserStateInterface> = {
setUser (state, data: User) { setUser (state, data: FG.User) {
state.user = data; state.user = data;
}, },
setSession (state, data: Session) { setSession (state, data: FG.Session) {
state.session = data; state.session = data;
}, },
setLoginLoading (state, data: boolean) { setLoginLoading (state, data: boolean) {