added UserDefined Module Naming

This commit is contained in:
Elmar Kresse
2023-09-22 15:54:34 +02:00
parent 20ec88d8d2
commit 99618c57c1
15 changed files with 249 additions and 150 deletions

View File

@@ -3,9 +3,8 @@ import { ref, Ref } from "vue";
import { Module } from "../model/module.ts";
import { fetchAllModules } from "../api/fetchCourse.ts";
import moduleStore from "../store/moduleStore.ts";
import { createIndividualFeed } from "../api/createFeed.ts";
import { MultiSelectAllChangeEvent } from "primevue/multiselect";
import tokenStore from "../store/tokenStore.ts";
import router from "../router";
const fetchedModules = async () => {
@@ -23,14 +22,12 @@ fetchedModules().then(
})),
);
async function finalStep() {
async function nextStep() {
selectedModules.value.forEach((module: Module) => {
moduleStore().addModule(module);
});
const token: string = await createIndividualFeed(moduleStore().modules);
tokenStore().setToken(token);
await router.push("/calendar-link");
await router.push("/rename-modules");
}
const display = (module: Module) => module.Name + " (" + module.Course + ")";
@@ -90,7 +87,7 @@ function selectChange() {
</MultiSelect>
</div>
<div class="flex align-items-center justify-content-center h-4rem m-2">
<Button @click="finalStep()"> Create Calendar</Button>
<Button @click="nextStep()">Next Step</Button>
</div>
</div>
</template>