\ No newline at end of file
diff --git a/src/main/webapp/src/components/blocks/CreatePanel.vue b/src/main/webapp/src/components/blocks/CreatePanel.vue
new file mode 100644
index 0000000..9fcf0df
--- /dev/null
+++ b/src/main/webapp/src/components/blocks/CreatePanel.vue
@@ -0,0 +1,23 @@
+
+
+
+
+ Create Panel
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/src/components/pages/CreatePage.vue b/src/main/webapp/src/components/pages/CreatePage.vue
index bcf4e02..a7ccb6b 100644
--- a/src/main/webapp/src/components/pages/CreatePage.vue
+++ b/src/main/webapp/src/components/pages/CreatePage.vue
@@ -1,36 +1,37 @@
-
- Create Page
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/src/models/board/Answer.ts b/src/main/webapp/src/models/board/Answer.ts
new file mode 100644
index 0000000..cf8abe9
--- /dev/null
+++ b/src/main/webapp/src/models/board/Answer.ts
@@ -0,0 +1,10 @@
+import type { BoardEntry } from './BoardEntry';
+
+export class Answer{
+ constructor(
+ public text: string,
+ public image: URL | undefined,
+ public boardEntry: BoardEntry,
+ id: number | undefined = undefined,
+ ){}
+}
\ No newline at end of file
diff --git a/src/main/webapp/src/models/board/Board.ts b/src/main/webapp/src/models/board/Board.ts
new file mode 100644
index 0000000..0793ed6
--- /dev/null
+++ b/src/main/webapp/src/models/board/Board.ts
@@ -0,0 +1,11 @@
+import type { User } from '../user/User';
+import type { Category } from './Category';
+
+export class Board{
+ constructor(
+ public name: string,
+ public categories: Array = [],
+ public owner: User | undefined = undefined,
+ private id: number | undefined = undefined,
+ ){}
+}
\ No newline at end of file
diff --git a/src/main/webapp/src/models/board/BoardEntry.ts b/src/main/webapp/src/models/board/BoardEntry.ts
new file mode 100644
index 0000000..dd796a8
--- /dev/null
+++ b/src/main/webapp/src/models/board/BoardEntry.ts
@@ -0,0 +1,13 @@
+import type { Answer } from './Answer';
+import type { Category } from './Category';
+import type { Question } from './Question';
+
+export class BoardEntry{
+ constructor(
+ public name: string,
+ public category: Category,
+ public answer: Answer,
+ public questions: Array,
+ id: number | undefined = undefined,
+ ){}
+}
\ No newline at end of file
diff --git a/src/main/webapp/src/models/board/Category.ts b/src/main/webapp/src/models/board/Category.ts
new file mode 100644
index 0000000..67538f7
--- /dev/null
+++ b/src/main/webapp/src/models/board/Category.ts
@@ -0,0 +1,12 @@
+import type { Board } from './Board';
+import type { BoardEntry } from './BoardEntry';
+
+export class Category{
+ constructor(
+ public name: string,
+ public description: string,
+ public board: Board,
+ public boardEntries: Array = [],
+ id: number | undefined,
+ ){}
+}
\ No newline at end of file
diff --git a/src/main/webapp/src/models/board/Question.ts b/src/main/webapp/src/models/board/Question.ts
new file mode 100644
index 0000000..7b7bad3
--- /dev/null
+++ b/src/main/webapp/src/models/board/Question.ts
@@ -0,0 +1,12 @@
+import type { BoardEntry } from './BoardEntry';
+import type { QuestionType } from './QuestionType';
+
+export class Question{
+ constructor(
+ public text: string,
+ public questionType: QuestionType,
+ public boardEntry: BoardEntry,
+ public image: URL | undefined,
+ id: number | undefined = undefined,
+ ) {}
+}
\ No newline at end of file
diff --git a/src/main/webapp/src/models/board/QuestionType.ts b/src/main/webapp/src/models/board/QuestionType.ts
new file mode 100644
index 0000000..89747e4
--- /dev/null
+++ b/src/main/webapp/src/models/board/QuestionType.ts
@@ -0,0 +1,8 @@
+export class QuestionType {
+ constructor(
+ public title: string,
+ public description: string,
+ public active: boolean,
+ id: number | undefined = undefined,
+ ){}
+}
\ No newline at end of file
diff --git a/src/main/webapp/src/models/user/User.ts b/src/main/webapp/src/models/user/User.ts
index 630cb53..e2fd23a 100644
--- a/src/main/webapp/src/models/user/User.ts
+++ b/src/main/webapp/src/models/user/User.ts
@@ -1,4 +1,5 @@
export type User = {
username: string,
profilePictureFilename: string | undefined,
+ id: number | undefined,
}
\ No newline at end of file
diff --git a/src/main/webapp/src/stores/UserStore.ts b/src/main/webapp/src/stores/UserStore.ts
index dd06f01..05c148b 100644
--- a/src/main/webapp/src/stores/UserStore.ts
+++ b/src/main/webapp/src/stores/UserStore.ts
@@ -5,25 +5,22 @@ import { authService } from '@/services/AuthService';
import { AxiosError } from 'axios';
export const useUserStore = defineStore( 'user', () => {
- const username = ref( '' );
- const profilePicture = ref( null );
- const loggedIn = ref( false );
+ const loggedIn = computed( () => {
+ return user.value !== null;
+ })
+ const user = ref(null);
- const getUserOutput = computed( () => `${username.value}` );
+ const getUserOutput = computed( () => `${user.value?.username}` );
const pfpSource = computed( () => {
- return profilePicture.value ?? "/src/assets/images/PFP_BearHead.svg"
+ return user.value?.profilePictureFilename ?? "/src/assets/images/PFP_BearHead.svg"
})
- function loginUser( user: User ) {
- username.value = user.username;
- profilePicture.value = user.profilePictureFilename ?? null;
- loggedIn.value = true;
+ function loginUser( userParam: User ) {
+ user.value = userParam;
}
function logoutUser() {
- username.value = '';
- profilePicture.value = null;
- loggedIn.value = false;
+ user.value = null;
}
function getCheckUser(): Promise {
@@ -43,8 +40,9 @@ export const useUserStore = defineStore( 'user', () => {
return {
//Refs
- username,
- profilePicture,
+ // username,
+ // profilePicture,
+ user,
loggedIn,
userCheckPromise,