🐛 Fix timetable card in admin settings
- Now displays timetable class and ID again
This commit is contained in:
@ -1,9 +1,16 @@
|
||||
<script setup>
|
||||
import ExpandSection from "@/components/settings/expand-section.vue";
|
||||
import KeyCard from "@/components/settings/key-card.vue";
|
||||
import TimetableCard from "@/components/settings/timetable-card.vue";
|
||||
import RadioCard from "@/components/settings/radio-card.vue";
|
||||
import { baseUrl } from "@/store";
|
||||
import { PlusIcon, SaveIcon, XIcon, RefreshCwIcon } from "lucide-vue-next";
|
||||
import {
|
||||
PlusIcon,
|
||||
SaveIcon,
|
||||
XIcon,
|
||||
RefreshCwIcon,
|
||||
Edit2Icon,
|
||||
TrashIcon,
|
||||
} from "lucide-vue-next";
|
||||
import { ref } from "vue";
|
||||
|
||||
function confirm(message) {
|
||||
@ -146,24 +153,33 @@ updateData();
|
||||
<span>Cancel edit</span>
|
||||
</div>
|
||||
</div>
|
||||
<TimetableCard
|
||||
<RadioCard
|
||||
v-for="timetable in timetables"
|
||||
:key="timetable"
|
||||
:timetable="timetable"
|
||||
:editable="true"
|
||||
:title="timetable.title"
|
||||
:subtitle="`${$t('settings.source')}: ${timetable.source}, Class: ${
|
||||
timetable.class
|
||||
}, ID: ${timetable.id}`"
|
||||
:selected="timetable.id == timetableEditId"
|
||||
:admin="true"
|
||||
@delete="deleteObject('timetable', timetable.id)"
|
||||
@edit="
|
||||
() => {
|
||||
timetableEditId = timetable.id;
|
||||
timetableName = timetable.title;
|
||||
timetableClass = timetable.class;
|
||||
timetableSource = timetable.source;
|
||||
timetableTrusted = timetable.trusted;
|
||||
}
|
||||
"
|
||||
/>
|
||||
>
|
||||
<Edit2Icon
|
||||
@click="
|
||||
() => {
|
||||
timetableEditId = timetable.id;
|
||||
timetableName = timetable.title;
|
||||
timetableClass = timetable.class;
|
||||
timetableSource = timetable.source;
|
||||
timetableTrusted = timetable.trusted;
|
||||
}
|
||||
"
|
||||
/>
|
||||
<TrashIcon
|
||||
@click="
|
||||
if (confirm('Delete this timetable?'))
|
||||
deleteObject('timetable', timetable.id);
|
||||
"
|
||||
/>
|
||||
</RadioCard>
|
||||
</div>
|
||||
</ExpandSection>
|
||||
<ExpandSection title="Keys">
|
||||
|
Reference in New Issue
Block a user