mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2026-01-17 12:02:26 +01:00
refactor pages to new folder structure
This commit is contained in:
117
frontend/src/view/CalendarLink.vue
Normal file
117
frontend/src/view/CalendarLink.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<!--
|
||||
Calendar implementation for the HTWK Leipzig timetable. Evaluation and display of the individual dates in iCal format.
|
||||
Copyright (C) 2024 HTWKalender support@htwkalender.de
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<script lang="ts" setup>
|
||||
import tokenStore from "@/store/tokenStore.ts";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
import { computed, onMounted } from "vue";
|
||||
import router from "@/router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
const toast = useToast();
|
||||
|
||||
const domain = window.location.hostname;
|
||||
|
||||
const getLink = () =>
|
||||
"https://" + domain + "/api/feed?token=" + tokenStore().token;
|
||||
|
||||
const show = () => {
|
||||
toast.add({
|
||||
severity: "info",
|
||||
summary: t("calendarLink.copyToastSummary"),
|
||||
detail: t("calendarLink.copyToastNotification"),
|
||||
life: 3000,
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
rerouteIfTokenIsEmpty();
|
||||
});
|
||||
|
||||
function rerouteIfTokenIsEmpty() {
|
||||
if (tokenStore().token == "") {
|
||||
router.push("/");
|
||||
}
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
// Copy the text inside the text field
|
||||
navigator.clipboard.writeText(getLink()).then(show, () => {
|
||||
toast.add({
|
||||
severity: "error",
|
||||
summary: t("calendarLink.copyToastError"),
|
||||
detail: t("calendarLink.copyToastErrorDetail"),
|
||||
life: 3000,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const forwardToGoogle = () => {
|
||||
window.open(
|
||||
"https://calendar.google.com/calendar/u/0/r?cid=" +
|
||||
encodeURI(getLink().replace("https://", "http://")),
|
||||
);
|
||||
};
|
||||
|
||||
const forwardToMicrosoft = () => {
|
||||
window.open(
|
||||
"https://outlook.live.com/owa?path=/calendar/action/compose&rru=addsubscription&name=HTWK%20Kalender&url=" +
|
||||
encodeURI(getLink()),
|
||||
);
|
||||
};
|
||||
|
||||
const actions = computed(() => [
|
||||
{
|
||||
label: t("calendarLink.copyToClipboard"),
|
||||
icon: "pi pi-copy",
|
||||
command: copyToClipboard,
|
||||
},
|
||||
{
|
||||
label: t("calendarLink.toGoogleCalendar"),
|
||||
icon: "pi pi-google",
|
||||
command: forwardToGoogle,
|
||||
},
|
||||
{
|
||||
label: t("calendarLink.toMicrosoftCalendar"),
|
||||
icon: "pi pi-microsoft",
|
||||
command: forwardToMicrosoft,
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-column mt-8">
|
||||
<div class="flex align-items-center justify-content-center m-2">
|
||||
<h2 class="text-base md:text-2xl">
|
||||
{{ getLink() }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="flex align-items-center justify-content-center m-2">
|
||||
<Menu :model="actions" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:deep(
|
||||
.p-menu .p-menuitem .p-menuitem-content .p-menuitem-link .p-menuitem-icon
|
||||
) {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
</style>
|
||||
@@ -21,13 +21,13 @@ import { computed, ComputedRef, Ref, ref, watch } from "vue";
|
||||
import {
|
||||
fetchCourseBySemester,
|
||||
fetchModulesByCourseAndSemester,
|
||||
} from "../api/fetchCourse";
|
||||
import DynamicPage from "./DynamicPage.vue";
|
||||
import ModuleSelection from "../components/ModuleSelection.vue";
|
||||
import { Module } from "../model/module.ts";
|
||||
} from "@/api/fetchCourse";
|
||||
import DynamicPage from "@/view/DynamicPage.vue";
|
||||
import ModuleSelection from "@/components/ModuleSelection.vue";
|
||||
import { Module } from "@/model/module.ts";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import moduleStore from "../store/moduleStore";
|
||||
import router from "../router";
|
||||
import moduleStore from "@/store/moduleStore";
|
||||
import router from "@/router";
|
||||
|
||||
async function getModules() {
|
||||
modules.value = await fetchModulesByCourseAndSemester(
|
||||
|
||||
288
frontend/src/view/Faq.vue
Normal file
288
frontend/src/view/Faq.vue
Normal file
@@ -0,0 +1,288 @@
|
||||
<!--
|
||||
Calendar implementation for the HTWK Leipzig timetable. Evaluation and display of the individual dates in iCal format.
|
||||
Copyright (C) 2024 HTWKalender support@htwkalender.de
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex align-items-center justify-content-center flex-column">
|
||||
<div class="flex align-items-center justify-content-center m-2">
|
||||
<h1>{{ $t("faqView.headline") }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-column lg:col-7">
|
||||
<div class="grid my-2">
|
||||
<div class="col">
|
||||
{{ $t("faqView.firstQuestion") }}
|
||||
</div>
|
||||
<div class="col">
|
||||
{{ $t("faqView.firstAnswer") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.secondQuestion") }}</div>
|
||||
<div class="col">
|
||||
{{ $t("faqView.secondAnswer") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.thirdQuestion") }}</div>
|
||||
<div class="col">
|
||||
<Accordion>
|
||||
<AccordionTab :header="$t('faqView.thirdAnswer.tabTitle')">
|
||||
<ol>
|
||||
<li>{{ $t("faqView.thirdAnswer.google.first") }}</li>
|
||||
<li>
|
||||
{{ $t("faqView.thirdAnswer.google.second") }}
|
||||
</li>
|
||||
<li>
|
||||
{{ $t("faqView.thirdAnswer.google.third") }}
|
||||
</li>
|
||||
<li>
|
||||
{{ $t("faqView.thirdAnswer.google.fourth") }}
|
||||
</li>
|
||||
</ol>
|
||||
</AccordionTab>
|
||||
<AccordionTab
|
||||
:header="$t('faqView.thirdAnswer.microsoft_outlook.title')"
|
||||
>
|
||||
<p>
|
||||
{{
|
||||
$t("faqView.thirdAnswer.microsoft_outlook.outlook_2010.title")
|
||||
}}
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.first",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.second",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.third",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.fourth",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2010.fifth",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
{{
|
||||
$t("faqView.thirdAnswer.microsoft_outlook.outlook_2007.title")
|
||||
}}
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.first",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.second",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.third",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.fourth",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.fifth",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
{{
|
||||
$t(
|
||||
"faqView.thirdAnswer.microsoft_outlook.outlook_2007.sixth",
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
</ol>
|
||||
</AccordionTab>
|
||||
<AccordionTab :header="$t('faqView.thirdAnswer.apple_osx.title')">
|
||||
<ol>
|
||||
<li>{{ $t("faqView.thirdAnswer.apple_osx.first") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.apple_osx.second") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.apple_osx.third") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.apple_osx.fourth") }}</li>
|
||||
</ol>
|
||||
</AccordionTab>
|
||||
<AccordionTab :header="$t('faqView.thirdAnswer.thunderbird.title')">
|
||||
<ol>
|
||||
<li>{{ $t("faqView.thirdAnswer.thunderbird.one") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.thunderbird.two") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.thunderbird.three") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.thunderbird.four") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.thunderbird.five") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.thunderbird.six") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.thunderbird.seven") }}</li>
|
||||
</ol>
|
||||
</AccordionTab>
|
||||
<AccordionTab :header="$t('faqView.thirdAnswer.iphone.title')">
|
||||
<p>{{ $t("faqView.thirdAnswer.iphone.description") }}</p>
|
||||
|
||||
<ol>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.one") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.two") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.three") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.four") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.five") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.six") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.seven") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.eight") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.iphone.nine") }}</li>
|
||||
</ol>
|
||||
</AccordionTab>
|
||||
<AccordionTab header="Android">
|
||||
<p>{{ $t("faqView.thirdAnswer.android.description") }}</p>
|
||||
</AccordionTab>
|
||||
<AccordionTab header="Windows Phone">
|
||||
<p>{{ $t("faqView.thirdAnswer.windows_phone.description") }}</p>
|
||||
<ol>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.one") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.two") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.three") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.four") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.five") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.six") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.seven") }}</li>
|
||||
<li>{{ $t("faqView.thirdAnswer.windows_phone.eight") }}</li>
|
||||
</ol>
|
||||
</AccordionTab>
|
||||
</Accordion>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.fourthQuestion") }}</div>
|
||||
<div class="col">{{ $t("faqView.fourthAnswer") }}</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.fifthQuestion") }}</div>
|
||||
<div class="col">{{ $t("faqView.fifthAnswer") }}</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col my-2">{{ $t("faqView.sixthQuestion") }}</div>
|
||||
<div class="col">{{ $t("faqView.sixthAnswer") }}</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.seventhQuestion") }}</div>
|
||||
<div class="col">{{ $t("faqView.seventhAnswer") }}</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.eighthQuestion") }}</div>
|
||||
<div class="col">{{ $t("faqView.eighthAnswer") }}</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.ninthQuestion") }}</div>
|
||||
<div class="col">
|
||||
{{ $t("faqView.ninthAnswer") }}
|
||||
<a href="https://git.imn.htwk-leipzig.de/ekresse/htwkalender"
|
||||
>Gitlab</a
|
||||
>.
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid my-2">
|
||||
<div class="col">{{ $t("faqView.crossPromoQuestion") }}</div>
|
||||
<div class="col">
|
||||
{{ $t("faqView.crossPromo.teaser") }}
|
||||
<div class="flex flex-column gap-3 my-3">
|
||||
<Card v-for="promoPage in new Array('mensa', 'htwkarte')" :key="promoPage">
|
||||
<template #title>
|
||||
<div class="flex flex-row align-items-start">
|
||||
<Avatar :image="'/promo/' + promoPage + '.png'" class="mr-2 flex-shrink-0" size="xlarge" />
|
||||
<div class="flex flex-column gap-1">
|
||||
<div>
|
||||
{{$t("faqView.crossPromo." + promoPage + ".title") }}
|
||||
</div>
|
||||
<div class="p-card-subtitle text-base">
|
||||
<a :href="$t('faqView.crossPromo.' + promoPage + '.link')">
|
||||
{{$t("faqView.crossPromo." + promoPage + ".link") }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #content>
|
||||
<p class="m-0">
|
||||
{{ $t("faqView.crossPromo." + promoPage + ".description") }}
|
||||
</p>
|
||||
</template>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ $t("faqView.notFound") }}<br />
|
||||
<a href="mailto:support@htwkalender.de">support@htwkalender.de</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.grid > .col {
|
||||
flex-basis: 15rem;
|
||||
}
|
||||
|
||||
.grid > .col:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<script lang="ts" setup>
|
||||
import moduleStore from "../store/moduleStore";
|
||||
import router from "../router";
|
||||
import AdditionalModuleTable from "../components/AdditionalModuleTable.vue";
|
||||
import moduleStore from "@/store/moduleStore";
|
||||
import router from "@/router";
|
||||
import AdditionalModuleTable from "@/components/AdditionalModuleTable.vue";
|
||||
|
||||
const store = moduleStore();
|
||||
|
||||
191
frontend/src/view/create/RenameModules.vue
Normal file
191
frontend/src/view/create/RenameModules.vue
Normal file
@@ -0,0 +1,191 @@
|
||||
<!--
|
||||
Calendar implementation for the HTWK Leipzig timetable. Evaluation and display of the individual dates in iCal format.
|
||||
Copyright (C) 2024 HTWKalender support@htwkalender.de
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<script setup lang="ts">
|
||||
import moduleStore from "@/store/moduleStore.ts";
|
||||
import { createIndividualFeed } from "@/api/createFeed.ts";
|
||||
import router from "@/router";
|
||||
import tokenStore from "@/store/tokenStore.ts";
|
||||
import { Ref, computed, inject, ref, onMounted } from "vue";
|
||||
import ModuleTemplateDialog from "@/components/ModuleTemplateDialog.vue";
|
||||
import { onlyWhitespace } from "@/helpers/strings.ts";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { Module } from "@/model/module.ts";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
const store = moduleStore();
|
||||
const tableData: Ref<{ Course: string; Module: Module }[]> = ref([
|
||||
{ Course: "", Module: {} as Module },
|
||||
]);
|
||||
|
||||
onMounted(
|
||||
() =>
|
||||
(tableData.value = store.getAllModules().map((module) => {
|
||||
return {
|
||||
Course: module.course,
|
||||
Module: module,
|
||||
};
|
||||
})),
|
||||
);
|
||||
|
||||
const mobilePage = inject("mobilePage") as Ref<boolean>;
|
||||
|
||||
const columns = computed(() => [
|
||||
{ field: "Course", header: t("moduleInformation.course") },
|
||||
{ field: "Module", header: t("moduleInformation.module") },
|
||||
{ field: "Reminder", header: t("renameModules.reminder") },
|
||||
]);
|
||||
|
||||
const toast = useToast();
|
||||
const requestIsPending = ref(false);
|
||||
|
||||
async function finalStep() {
|
||||
requestIsPending.value = true;
|
||||
const createFeed: Promise<string> = createIndividualFeed(
|
||||
store.getAllModules(),
|
||||
);
|
||||
|
||||
// Check if createFeed Promise is resolved
|
||||
createFeed.then(async (token: string) => {
|
||||
tokenStore().setToken(token);
|
||||
requestIsPending.value = false;
|
||||
await router.push("/calendar-link");
|
||||
});
|
||||
|
||||
// if createFeed Promise is rejected
|
||||
createFeed.catch(() => {
|
||||
toast.add({
|
||||
severity: "error",
|
||||
summary: t("renameModules.error"),
|
||||
detail: t("renameModules.TooManyRequests"),
|
||||
life: 3000,
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-column align-items-center mb-7">
|
||||
<div class="flex align-items-center justify-content-center m-2 gap-2">
|
||||
<h3>{{ $t("renameModules.subTitle") }}</h3>
|
||||
<ModuleTemplateDialog />
|
||||
</div>
|
||||
<div class="w-full lg:w-8 flex flex-column">
|
||||
<div class="card flex align-items-center justify-content-center my-2">
|
||||
<DataTable
|
||||
:value="tableData"
|
||||
edit-mode="cell"
|
||||
table-class="editable-cells-table"
|
||||
responsive-layout="scroll"
|
||||
:size="mobilePage ? 'small' : 'large'"
|
||||
class="w-full"
|
||||
>
|
||||
<template #header>
|
||||
<div
|
||||
class="flex align-items-center justify-content-end flex-wrap gap-2 px-2"
|
||||
>
|
||||
{{ $t("renameModules.enableAllNotifications") }}
|
||||
<InputSwitch
|
||||
:model-value="
|
||||
tableData.reduce(
|
||||
(acc, curr) => acc && curr.Module.reminder,
|
||||
true,
|
||||
)
|
||||
"
|
||||
@update:model-value="
|
||||
tableData.forEach(
|
||||
(module) => (module.Module.reminder = $event),
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<Column
|
||||
v-for="(item, index) in columns"
|
||||
:key="index"
|
||||
:field="item.field"
|
||||
:header="item.header"
|
||||
:class="item.field === 'Reminder' ? 'text-center' : ''"
|
||||
>
|
||||
<!-- Text Body -->
|
||||
<template #body="{ data, field }">
|
||||
<template v-if="field === 'Module'">
|
||||
{{
|
||||
onlyWhitespace(data[field].userDefinedName)
|
||||
? data[field].name
|
||||
: data[field].userDefinedName
|
||||
}}
|
||||
</template>
|
||||
<template v-else-if="field === 'Reminder'">
|
||||
<div class="flex align-items-start">
|
||||
<Button
|
||||
icon="pi pi-bell"
|
||||
:severity="data.Module.reminder ? 'warning' : 'secondary'"
|
||||
rounded
|
||||
outlined
|
||||
class="small-button"
|
||||
@click="data.Module.reminder = !data.Module.reminder"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ data[field] }}
|
||||
</template>
|
||||
</template>
|
||||
<!-- Editor Body -->
|
||||
<template #editor="{ data, field }">
|
||||
<template v-if="field === 'Module'">
|
||||
<InputText
|
||||
v-model="data[field].userDefinedName"
|
||||
class="w-full"
|
||||
autofocus
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="field === 'Reminder'">
|
||||
<div class="flex align-items-start">
|
||||
<Button
|
||||
icon="pi pi-bell"
|
||||
:severity="data.Module.reminder ? 'warning' : 'secondary'"
|
||||
rounded
|
||||
outlined
|
||||
class="small-button"
|
||||
@click="data.Module.reminder = !data.Module.reminder"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div>{{ data[field] }}</div>
|
||||
</template>
|
||||
</template>
|
||||
</Column>
|
||||
</DataTable>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
:disabled="store.isEmpty() || requestIsPending"
|
||||
class="col-12 md:col-4 mb-3 align-self-end"
|
||||
:icon="requestIsPending ? 'pi pi-spin pi-spinner' : 'pi pi-save'"
|
||||
:label="$t('renameModules.nextStep')"
|
||||
@click="finalStep()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -18,12 +18,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import moduleStore from "../../store/moduleStore";
|
||||
import router from "../../router";
|
||||
import moduleStore from "@/store/moduleStore";
|
||||
import router from "@/router";
|
||||
|
||||
const store = moduleStore();
|
||||
const AdditionalModuleTable = defineAsyncComponent(
|
||||
() => import("../../components/AdditionalModuleTable.vue"),
|
||||
() => import("@/components/AdditionalModuleTable.vue"),
|
||||
);
|
||||
|
||||
async function nextStep() {
|
||||
@@ -18,14 +18,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Ref, ref } from "vue";
|
||||
import { Module } from "../model/module";
|
||||
import moduleStore from "../store/moduleStore";
|
||||
import { getCalender } from "../api/loadCalendar";
|
||||
import router from "../router";
|
||||
import tokenStore from "../store/tokenStore";
|
||||
import { Module } from "@/model/module";
|
||||
import moduleStore from "@/store/moduleStore";
|
||||
import { getCalender } from "@/api/loadCalendar";
|
||||
import router from "@/router";
|
||||
import tokenStore from "@/store/tokenStore";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import DynamicPage from "./DynamicPage.vue";
|
||||
import DynamicPage from "@/view/DynamicPage.vue";
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
const toast = useToast();
|
||||
@@ -19,12 +19,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
<script lang="ts" setup>
|
||||
import { computed, inject, Ref, ref } from "vue";
|
||||
import { Module } from "@/model/module.ts";
|
||||
import moduleStore from "../../store/moduleStore";
|
||||
import moduleStore from "@/store/moduleStore";
|
||||
import { fetchAllModules } from "@/api/fetchCourse.ts";
|
||||
import { deleteIndividualFeed, saveIndividualFeed } from "@/api/createFeed.ts";
|
||||
import tokenStore from "../../store/tokenStore";
|
||||
import tokenStore from "@/store/tokenStore";
|
||||
import router from "@/router";
|
||||
import ModuleTemplateDialog from "../../components/ModuleTemplateDialog.vue";
|
||||
import ModuleTemplateDialog from "@/components/ModuleTemplateDialog.vue";
|
||||
import { onlyWhitespace } from "@/helpers/strings.ts";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
@@ -18,9 +18,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Ref, computed, ref, watch } from "vue";
|
||||
import { fetchRoom } from "../api/fetchRoom.ts";
|
||||
import DynamicPage from "./DynamicPage.vue";
|
||||
import RoomOccupation from "../components/RoomOccupation.vue";
|
||||
import { fetchRoom } from "@/api/fetchRoom.ts";
|
||||
import DynamicPage from "@/view/DynamicPage.vue";
|
||||
import RoomOccupation from "@/components/RoomOccupation.vue";
|
||||
import { computedAsync } from "@vueuse/core";
|
||||
import router from "@/router";
|
||||
|
||||
Reference in New Issue
Block a user