mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-02 17:59:14 +02:00
formated and linted
This commit is contained in:
@@ -5,17 +5,18 @@ import router from "../router";
|
||||
import tokenStore from "../store/tokenStore.ts";
|
||||
import { ref } from "vue";
|
||||
|
||||
const tableData = ref(moduleStore().modules.map((module) => {
|
||||
return {
|
||||
Course: module.course,
|
||||
Module: module,
|
||||
}
|
||||
})
|
||||
const tableData = ref(
|
||||
moduleStore().modules.map((module) => {
|
||||
return {
|
||||
Course: module.course,
|
||||
Module: module,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
const columns = ref([
|
||||
{ field: 'Course', header: 'Course' },
|
||||
{ field: 'Module', header: 'Module' },
|
||||
{ field: "Course", header: "Course" },
|
||||
{ field: "Module", header: "Module" },
|
||||
]);
|
||||
|
||||
async function finalStep() {
|
||||
@@ -28,36 +29,48 @@ async function finalStep() {
|
||||
<template>
|
||||
<div class="flex flex-column">
|
||||
<div class="flex align-items-center justify-content-center h-4rem m-2">
|
||||
<h3>
|
||||
Rename your selected Modules to your liking.
|
||||
</h3>
|
||||
<h3>Rename your selected Modules to your liking.</h3>
|
||||
</div>
|
||||
<div class="card flex align-items-center justify-content-center m-2">
|
||||
<DataTable :value="tableData" editMode="cell" tableClass="editable-cells-table" responsiveLayout="scroll">
|
||||
<Column v-for="col of columns" :key="col.field" :field="col.field" :header="col.header">
|
||||
<template #body="{ data, field }" >
|
||||
<div>{{ field === 'Module' ? data[field].userDefinedName : data[field] }}</div>
|
||||
</template>
|
||||
<template #editor="{ data, field }">
|
||||
<template v-if="field !== 'Module'">
|
||||
<div>{{ data[field] }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<InputText class="w-full" v-model="data[field].userDefinedName" autofocus />
|
||||
</template>
|
||||
</template>
|
||||
</Column>
|
||||
</DataTable>
|
||||
<DataTable
|
||||
:value="tableData"
|
||||
edit-mode="cell"
|
||||
table-class="editable-cells-table"
|
||||
responsive-layout="scroll"
|
||||
>
|
||||
<Column
|
||||
v-for="col of columns"
|
||||
:key="col.field"
|
||||
:field="col.field"
|
||||
:header="col.header"
|
||||
>
|
||||
<template #body="{ data, field }">
|
||||
<div>
|
||||
{{
|
||||
field === "Module" ? data[field].userDefinedName : data[field]
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
<template #editor="{ data, field }">
|
||||
<template v-if="field !== 'Module'">
|
||||
<div>{{ data[field] }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<InputText
|
||||
v-model="data[field].userDefinedName"
|
||||
class="w-full"
|
||||
autofocus
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</Column>
|
||||
</DataTable>
|
||||
</div>
|
||||
|
||||
<div class="flex align-items-center justify-content-center h-4rem m-2">
|
||||
<Button @click="finalStep()">Next Step</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
Reference in New Issue
Block a user