mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-24 05:28:49 +02:00
added frontend and updated backend with docker, wrote some initial instructions
This commit is contained in:
18
frontend/src/store/moduleStore.ts
Normal file
18
frontend/src/store/moduleStore.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Module } from "../model/module.ts";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
const moduleStore = defineStore("moduleStore", {
|
||||
state: () => ({
|
||||
modules: [] as Module[],
|
||||
}),
|
||||
actions: {
|
||||
addModule(module: Module) {
|
||||
this.modules.push(module);
|
||||
},
|
||||
removeModule(module: Module) {
|
||||
this.modules.splice(this.modules.indexOf(module), 1);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default moduleStore;
|
Reference in New Issue
Block a user