Add basic handling for local timetables

This commit is contained in:
2023-06-18 14:45:12 +02:00
parent 48364d4c59
commit f19d43396c
3 changed files with 28 additions and 4 deletions

View File

@ -1,9 +1,20 @@
<script setup>
import TimetableCard from "@/components/settings/timetable-card.vue";
import { timetables, timetableId } from "@/store";
import { timetables, localTimetables, timetableId } from "@/store";
</script>
<template>
<h2>{{ $t("settings.heading.localTimetables") }}</h2>
<div class="list">
<TimetableCard
v-for="timetable in localTimetables"
:key="timetable.id"
:timetable="timetable"
:selected="timetableId == timetable.id"
:editable="true"
@click="timetableId = timetable.id"
/>
</div>
<h2>{{ $t("settings.heading.remoteTimetables") }}</h2>
<div class="list">
<TimetableCard
@ -11,7 +22,7 @@ import { timetables, timetableId } from "@/store";
:key="timetable.id"
:timetable="timetable"
:selected="timetableId == timetable.id"
:editable="true"
:editable="false"
@click="timetableId = timetable.id"
/>
</div>