fixed frontend (format, lint, build)

This commit is contained in:
masterElmar
2023-11-01 22:31:12 +01:00
parent a8dce8207b
commit 0fc6e249d2
10 changed files with 277 additions and 208 deletions

View File

@@ -18,7 +18,7 @@ const tableData = ref(
const columns = ref([
{ field: "Course", header: "Course" },
{ field: "Module", header: "Module" },
{ field: "Reminder", header: "Reminder"}
{ field: "Reminder", header: "Reminder" },
]);
async function finalStep() {
@@ -43,11 +43,18 @@ async function finalStep() {
>
<template #header>
<div class="flex align-items-center justify-content-end">
Enable all notifications:
Enable all notifications:
<InputSwitch
class="mx-4"
:model-value="tableData.reduce((acc, curr) => acc && curr.Module.reminder, true)"
@update:model-value="tableData.forEach((module) => module.Module.reminder = $event)"
:model-value="
tableData.reduce(
(acc, curr) => acc && curr.Module.reminder,
true,
)
"
@update:model-value="
tableData.forEach((module) => (module.Module.reminder = $event))
"
/>
</div>
</template>
@@ -63,15 +70,15 @@ async function finalStep() {
<template v-if="field === 'Module'">
{{ data[field].userDefinedName }}
</template>
<template v-else-if="field === 'Reminder'" class="align-content-center">
<Button
<template v-else-if="field === 'Reminder'">
<Button
:icon="data.Module.reminder ? 'pi pi-bell' : 'pi pi-times'"
:severity="data.Module.reminder ? 'warning' : 'secondary'"
rounded
outlined
class="small-button"
@click = "data.Module.reminder = !data.Module.reminder"
></Button>
@click="data.Module.reminder = !data.Module.reminder"
></Button>
</template>
<template v-else>
{{ data[field] }}
@@ -91,14 +98,14 @@ async function finalStep() {
v-model="data.Module.reminder"
class="align-self-center"
/>-->
<Button
<Button
:icon="data.Module.reminder ? 'pi pi-bell' : 'pi pi-times'"
:severity="data.Module.reminder ? 'warning' : 'secondary'"
rounded
outlined
class="small-button"
@click = "data.Module.reminder = !data.Module.reminder"
></Button>
@click="data.Module.reminder = !data.Module.reminder"
></Button>
</template>
<template v-else>
<div>{{ data[field] }}</div>
@@ -115,9 +122,9 @@ async function finalStep() {
</template>
<style scoped>
.small-button.p-button {
width: 2rem;
height: 2rem;
padding: 0;
}
.small-button.p-button {
width: 2rem;
height: 2rem;
padding: 0;
}
</style>