formated and linted

This commit is contained in:
Elmar Kresse
2023-10-17 21:16:58 +02:00
parent 4148b0c185
commit 10d0ae0d8a
23 changed files with 581 additions and 378 deletions

View File

@@ -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>