fix:#3 linted formatted

This commit is contained in:
Elmar Kresse
2024-07-24 10:54:20 +02:00
parent 60f8b06f84
commit c15dbfeebb
21 changed files with 4190 additions and 1123 deletions

View File

@@ -71,7 +71,6 @@ const toggle = (info: EventClickArg) => {
}
};
const selectedToken = computed(() => {
return props.token;
});
@@ -79,7 +78,7 @@ const selectedToken = computed(() => {
const mobilePage = inject("mobilePage") as Ref<boolean>;
const date: Ref<Date> = ref(new Date());
const { data: calendar} = useQuery({
const { data: calendar } = useQuery({
queryKey: ["userCalendar", selectedToken],
queryFn: () => fetchICalendarEvents(selectedToken.value),
select: (data) => {
@@ -89,7 +88,7 @@ const { data: calendar} = useQuery({
refetchOnWindowFocus: "always",
refetchOnReconnect: "always",
networkMode: "offlineFirst",
enabled: () => tokenStore().token !== ""
enabled: () => tokenStore().token !== "",
});
const queryClient = useQueryClient();
@@ -97,13 +96,13 @@ const queryClient = useQueryClient();
const invalidateAndRefetchCalendar = () => {
console.debug("invalidateAndRefetchCalendar", selectedToken);
const queryKey = ["userCalendar", selectedToken];
queryClient.invalidateQueries({queryKey: queryKey}).then(() => {
queryClient.refetchQueries({queryKey: queryKey});
queryClient.invalidateQueries({ queryKey: queryKey }).then(() => {
queryClient.refetchQueries({ queryKey: queryKey });
});
};
defineExpose({
invalidateAndRefetchCalendar
invalidateAndRefetchCalendar,
});
const events = computed(() => {

View File

@@ -29,7 +29,6 @@ const emit = defineEmits(["dark-mode-toggled"]);
const store = settingsStore;
const isDark = computed(() => store().isDark);
</script>
<template>

View File

@@ -20,10 +20,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import { computed, ComputedRef, ref } from "vue";
import settingsStore from "../store/settingsStore.ts";
const pageOptions: ComputedRef<(string | {
label: string;
value: string;
})[]> = computed(() => [...settingsStore().getDefaultPageOptions()]);
const pageOptions: ComputedRef<
(
| string
| {
label: string;
value: string;
}
)[]
> = computed(() => [...settingsStore().getDefaultPageOptions()]);
const selectedPage = ref(settingsStore().defaultPage);

View File

@@ -21,8 +21,6 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });
const items = computed(() => [
{
label: t("calendar"),
@@ -133,7 +131,15 @@ const items = computed(() => [
<div class="flex align-items-stretch justify-content-center">
<!-- Settings Button with Gear Icon -->
<router-link v-slot="{ navigate }" :to="`/settings`" custom>
<Button icon="pi pi-cog" severity="secondary" rounded text size="large" aria-label="Settings" @click="navigate" />
<Button
icon="pi pi-cog"
severity="secondary"
rounded
text
size="large"
aria-label="Settings"
@click="navigate"
/>
</router-link>
</div>
</template>

View File

@@ -92,9 +92,8 @@ function transformData(data: RoomOccupancyList) {
}
const { data: occupancy } = useQuery({
queryKey: ["roomOccupancy"],//, selectedRoom, currentDateFrom, currentDateTo],
queryFn: () =>
fetchRoomOccupancy(),
queryKey: ["roomOccupancy"], //, selectedRoom, currentDateFrom, currentDateTo],
queryFn: () => fetchRoomOccupancy(),
staleTime: 12 * 3600000, // 12 hours
});
@@ -192,9 +191,7 @@ const calendarOptions: ComputedRef<CalendarOptions> = computed(() => ({
color: event.event.free
? "var(--htwk-gruen-500)"
: "var(--htwk-grau-60-500)",
textColor: event.event.free
? "var(--green-50)"
: "white",
textColor: event.event.free ? "var(--green-50)" : "white",
title: event.event.stub
? t("roomFinderPage.stub")
: event.event.free