mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 10:49:14 +02:00
formated and linted
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
computed,
|
||||
Ref,
|
||||
ref,
|
||||
} from "vue";
|
||||
import { computed, Ref, ref } from "vue";
|
||||
import { Module } from "../../model/module";
|
||||
import moduleStore from "../../store/moduleStore";
|
||||
import { fetchAllModules } from "../../api/fetchCourse";
|
||||
@@ -29,10 +25,6 @@ const fetchedModules = async () => {
|
||||
return await fetchAllModules();
|
||||
};
|
||||
|
||||
function deleteAllModules() {
|
||||
moduleStore().removeAllModules();
|
||||
}
|
||||
|
||||
function deleteModule(module: Module) {
|
||||
console.debug(module);
|
||||
moduleStore().removeModule(module);
|
||||
@@ -55,12 +47,14 @@ async function finalStep() {
|
||||
|
||||
<template>
|
||||
<div class="flex flex-column card-container mx-8 mt-2">
|
||||
<div class="flex align-items-center justify-content-center border-round m-2">
|
||||
<div
|
||||
class="flex align-items-center justify-content-center border-round m-2"
|
||||
>
|
||||
<DataTable
|
||||
:value="tableData"
|
||||
editMode="cell"
|
||||
tableClass="editable-cells-table"
|
||||
responsiveLayout="scroll"
|
||||
edit-mode="cell"
|
||||
table-class="editable-cells-table"
|
||||
responsive-layout="scroll"
|
||||
>
|
||||
<Column
|
||||
v-for="col of columns"
|
||||
@@ -70,7 +64,9 @@ async function finalStep() {
|
||||
>
|
||||
<template #body="{ data, field }">
|
||||
<div>
|
||||
{{field === "Module" ? data[field].userDefinedName : data[field]}}
|
||||
{{
|
||||
field === "Module" ? data[field].userDefinedName : data[field]
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
<template #editor="{ data, field }">
|
||||
@@ -79,8 +75,8 @@ async function finalStep() {
|
||||
</template>
|
||||
<template v-else>
|
||||
<InputText
|
||||
class="w-full"
|
||||
v-model="data[field].userDefinedName"
|
||||
class="w-full"
|
||||
autofocus
|
||||
/>
|
||||
</template>
|
||||
@@ -89,22 +85,23 @@ async function finalStep() {
|
||||
<Column>
|
||||
<template #body="{ data }">
|
||||
<Button
|
||||
@click="deleteModule(data['Module'])"
|
||||
icon="pi pi-trash"
|
||||
severity="danger"
|
||||
outlined
|
||||
rounded
|
||||
aria-label="Cancel"
|
||||
@click="deleteModule(data['Module'])"
|
||||
/>
|
||||
</template>
|
||||
</Column>
|
||||
</DataTable>
|
||||
</div>
|
||||
<div class="flex align-items-center justify-content-center border-round m-2">
|
||||
<div
|
||||
class="flex align-items-center justify-content-center border-round m-2"
|
||||
>
|
||||
<Button label="Save Calendar" @click="finalStep()" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
Reference in New Issue
Block a user