mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-10 13:43:49 +02:00
fix:#24 linted and formatted
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
import moduleStore from '../store/moduleStore';
|
||||
import router from '../router';
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import moduleStore from "../store/moduleStore";
|
||||
import router from "../router";
|
||||
|
||||
const store = moduleStore();
|
||||
const AdditionalModuleTable = defineAsyncComponent(
|
||||
@@ -21,8 +21,10 @@ async function nextStep() {
|
||||
</h3>
|
||||
</div>
|
||||
<AdditionalModuleTable />
|
||||
<div class="flex align-items-center justify-content-end h-4rem m-2 w-full lg:w-10">
|
||||
<Button
|
||||
<div
|
||||
class="flex align-items-center justify-content-end h-4rem m-2 w-full lg:w-10"
|
||||
>
|
||||
<Button
|
||||
:disabled="store.isEmpty()"
|
||||
class="col-12 md:col-4 mb-3 align-self-end"
|
||||
icon="pi pi-arrow-right"
|
||||
|
@@ -66,7 +66,7 @@ async function getModules() {
|
||||
label: $t('courseSelection.nextStep'),
|
||||
icon: 'pi pi-arrow-right',
|
||||
disabled: store.isEmpty(),
|
||||
onClick: () => router.push('/additional-modules')
|
||||
onClick: () => router.push('/additional-modules'),
|
||||
}"
|
||||
>
|
||||
<template #selection="{ flexSpecs }">
|
||||
|
@@ -1,56 +1,44 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, useSlots } from 'vue';
|
||||
import { computed, useSlots } from "vue";
|
||||
|
||||
defineProps<{
|
||||
hideContent: boolean,
|
||||
headline: string,
|
||||
subTitle?: string,
|
||||
icon?: string,
|
||||
hideContent: boolean;
|
||||
headline: string;
|
||||
subTitle?: string;
|
||||
icon?: string;
|
||||
button?: {
|
||||
label: string,
|
||||
icon: string,
|
||||
disabled: boolean,
|
||||
onClick: () => void
|
||||
}
|
||||
}>()
|
||||
label: string;
|
||||
icon: string;
|
||||
disabled: boolean;
|
||||
onClick: () => void;
|
||||
};
|
||||
}>();
|
||||
|
||||
const slots = useSlots()
|
||||
const hasSlot = (name:string) => {
|
||||
return !!slots[name];
|
||||
}
|
||||
const slots = useSlots();
|
||||
const hasSlot = (name: string) => {
|
||||
return !!slots[name];
|
||||
};
|
||||
const hasContent = computed(() => {
|
||||
return hasSlot('content')
|
||||
})
|
||||
return hasSlot("content");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
<div
|
||||
class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out mt-0"
|
||||
:class="{'md:mt-8': hideContent}"
|
||||
:class="{ 'md:mt-8': hideContent }"
|
||||
>
|
||||
<div class="flex align-items-center justify-content-center gap-2 mx-2">
|
||||
<h3 class="text-4xl">
|
||||
{{ headline }}
|
||||
</h3>
|
||||
<i
|
||||
v-if="icon"
|
||||
:class="icon"
|
||||
style="font-size: 2rem"
|
||||
></i>
|
||||
<i v-if="icon" :class="icon" style="font-size: 2rem"></i>
|
||||
</div>
|
||||
<div
|
||||
v-if="subTitle"
|
||||
class="flex justify-content-center"
|
||||
>
|
||||
<div v-if="subTitle" class="flex justify-content-center">
|
||||
<h5 class="text-2xl m-2">{{ subTitle }}</h5>
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-wrap mx-0 gap-2 my-4 w-full lg:w-8"
|
||||
>
|
||||
<slot
|
||||
name="selection"
|
||||
flex-specs="flex-1 m-0"
|
||||
></slot>
|
||||
<div class="flex flex-wrap mx-0 gap-2 my-4 w-full lg:w-8">
|
||||
<slot name="selection" flex-specs="flex-1 m-0"></slot>
|
||||
</div>
|
||||
<div
|
||||
v-if="button"
|
||||
@@ -64,18 +52,22 @@ const hasContent = computed(() => {
|
||||
@click="button.onClick()"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
<div
|
||||
v-if="hasContent"
|
||||
:class="
|
||||
[hideContent?
|
||||
['opacity-0', 'pointer-events-none', 'h-1rem', 'overflow-hidden'] :
|
||||
['opacity-100', 'transition-all', 'transition-duration-500', 'transition-ease-in-out']
|
||||
,
|
||||
'w-full', 'lg:w-8']"
|
||||
>
|
||||
<slot
|
||||
name="content"
|
||||
></slot>
|
||||
:class="[
|
||||
hideContent
|
||||
? ['opacity-0', 'pointer-events-none', 'h-1rem', 'overflow-hidden']
|
||||
: [
|
||||
'opacity-100',
|
||||
'transition-all',
|
||||
'transition-duration-500',
|
||||
'transition-ease-in-out',
|
||||
],
|
||||
'w-full',
|
||||
'lg:w-8',
|
||||
]"
|
||||
>
|
||||
<slot name="content"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@@ -80,7 +80,7 @@ function loadCalendar(): void {
|
||||
label: $t('editCalendarView.loadCalendar'),
|
||||
icon: 'pi pi-arrow-down',
|
||||
disabled: !isToken(token),
|
||||
onClick: loadCalendar
|
||||
onClick: loadCalendar,
|
||||
}"
|
||||
>
|
||||
<template #selection="{ flexSpecs }">
|
||||
|
@@ -39,9 +39,7 @@ rooms().then(
|
||||
/>
|
||||
</template>
|
||||
<template #content>
|
||||
<RoomOccupation
|
||||
:room="selectedRoom.name"
|
||||
/>
|
||||
<RoomOccupation :room="selectedRoom.name" />
|
||||
</template>
|
||||
</DynamicPage>
|
||||
</template>
|
||||
|
@@ -21,7 +21,9 @@ async function nextStep() {
|
||||
</h3>
|
||||
</div>
|
||||
<AdditionalModuleTable />
|
||||
<div class="flex align-items-center justify-content-end h-4rem m-2 w-full lg:w-10">
|
||||
<div
|
||||
class="flex align-items-center justify-content-end h-4rem m-2 w-full lg:w-10"
|
||||
>
|
||||
<Button
|
||||
:disabled="store.isEmpty()"
|
||||
class="col-12 md:col-4 mb-3 align-self-end"
|
||||
|
@@ -3,7 +3,10 @@ import { computed, inject, Ref, ref } from "vue";
|
||||
import { Module } from "../../model/module.ts";
|
||||
import moduleStore from "../../store/moduleStore";
|
||||
import { fetchAllModules } from "../../api/fetchCourse.ts";
|
||||
import {deleteIndividualFeed, saveIndividualFeed} from "../../api/createFeed.ts";
|
||||
import {
|
||||
deleteIndividualFeed,
|
||||
saveIndividualFeed,
|
||||
} from "../../api/createFeed.ts";
|
||||
import tokenStore from "../../store/tokenStore";
|
||||
import router from "../../router";
|
||||
import ModuleTemplateDialog from "../../components/ModuleTemplateDialog.vue";
|
||||
@@ -61,25 +64,23 @@ async function deleteFeed() {
|
||||
() => {
|
||||
toast.add({
|
||||
severity: "success",
|
||||
summary: t('editCalendarView.toast.success'),
|
||||
detail: t('editCalendarView.toast.successDetail'),
|
||||
summary: t("editCalendarView.toast.success"),
|
||||
detail: t("editCalendarView.toast.successDetail"),
|
||||
life: 3000,
|
||||
});
|
||||
visible.value = false;
|
||||
router.push("/");
|
||||
|
||||
},
|
||||
() => {
|
||||
toast.add({
|
||||
severity: "error",
|
||||
summary: t('editCalendarView.toast.error'),
|
||||
detail: t('editCalendarView.toast.errorDetail'),
|
||||
summary: t("editCalendarView.toast.error"),
|
||||
detail: t("editCalendarView.toast.errorDetail"),
|
||||
life: 3000,
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -89,9 +90,7 @@ async function deleteFeed() {
|
||||
<ModuleTemplateDialog />
|
||||
</div>
|
||||
<div class="w-full lg:w-8 flex flex-column">
|
||||
<div
|
||||
class="card flex align-items-center justify-content-center my-2"
|
||||
>
|
||||
<div class="card flex align-items-center justify-content-center my-2">
|
||||
<DataTable
|
||||
:value="tableData"
|
||||
edit-mode="cell"
|
||||
@@ -112,7 +111,9 @@ async function deleteFeed() {
|
||||
)
|
||||
"
|
||||
@update:model-value="
|
||||
tableData.forEach((module) => (module.Module.reminder = $event))
|
||||
tableData.forEach(
|
||||
(module) => (module.Module.reminder = $event),
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
@@ -188,9 +189,30 @@ async function deleteFeed() {
|
||||
<div
|
||||
class="flex flex-column sm:flex-row flex-wrap justify-content-between gap-2 w-full"
|
||||
>
|
||||
<Button type="button" severity="danger" outlined icon="pi pi-trash" :label="$t('editCalendarView.delete')" @click="visible = true"/>
|
||||
<Button type="button" severity="info" outlined icon="pi pi-plus" :label="$t('editCalendarView.addModules')" @click="router.push('edit-additional-modules')"/>
|
||||
<Button type="button" severity="success" outlined icon="pi pi-save" :label="$t('editCalendarView.save')" @click="finalStep()"/>
|
||||
<Button
|
||||
type="button"
|
||||
severity="danger"
|
||||
outlined
|
||||
icon="pi pi-trash"
|
||||
:label="$t('editCalendarView.delete')"
|
||||
@click="visible = true"
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
severity="info"
|
||||
outlined
|
||||
icon="pi pi-plus"
|
||||
:label="$t('editCalendarView.addModules')"
|
||||
@click="router.push('edit-additional-modules')"
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
severity="success"
|
||||
outlined
|
||||
icon="pi pi-save"
|
||||
:label="$t('editCalendarView.save')"
|
||||
@click="finalStep()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</DataTable>
|
||||
@@ -198,15 +220,31 @@ async function deleteFeed() {
|
||||
</div>
|
||||
</div>
|
||||
<div class="card flex justify-content-center">
|
||||
<Dialog v-model:visible="visible" modal header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }">
|
||||
<Dialog
|
||||
v-model:visible="visible"
|
||||
modal
|
||||
header="Header"
|
||||
:style="{ width: '50rem' }"
|
||||
:breakpoints="{ '1199px': '75vw', '575px': '90vw' }"
|
||||
>
|
||||
<template #header>
|
||||
<div class="inline-flex align-items-center justify-content-center gap-2">
|
||||
<span class="font-bold white-space-nowrap">{{ $t('editCalendarView.dialog.headline') }}</span>
|
||||
<div
|
||||
class="inline-flex align-items-center justify-content-center gap-2"
|
||||
>
|
||||
<span class="font-bold white-space-nowrap">{{
|
||||
$t("editCalendarView.dialog.headline")
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<p class="m-0">{{ $t('editCalendarView.dialog.subTitle') }}</p>
|
||||
<p class="m-0">{{ $t("editCalendarView.dialog.subTitle") }}</p>
|
||||
<template #footer>
|
||||
<Button :label="$t('editCalendarView.dialog.delete')" severity="danger" icon="pi pi-trash" autofocus @click="deleteFeed()" />
|
||||
<Button
|
||||
:label="$t('editCalendarView.dialog.delete')"
|
||||
severity="danger"
|
||||
icon="pi pi-trash"
|
||||
autofocus
|
||||
@click="deleteFeed()"
|
||||
/>
|
||||
</template>
|
||||
</Dialog>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user