mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-16 09:38:51 +02:00
fix:#69 format, lint, tiny info buttons
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {inject} from "vue";
|
||||
import {Module} from "../model/module.ts";
|
||||
import {Event} from "../model/event.ts";
|
||||
import { inject } from "vue";
|
||||
import { Module } from "../model/module.ts";
|
||||
import { Event } from "../model/event.ts";
|
||||
import moment from "moment-timezone";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
@ -14,10 +14,10 @@ function formatTimestamp(timestampString: string): string {
|
||||
const timestamp = moment(timestampString);
|
||||
|
||||
// Die Zeitzone auf "Europe/Berlin" setzen
|
||||
const berlinTime = timestamp.tz('Europe/Berlin');
|
||||
const berlinTime = timestamp.tz("Europe/Berlin");
|
||||
|
||||
// Das gewünschte Format für die Ausgabe festlegen
|
||||
return berlinTime.format('DD.MM.YYYY HH:mm');
|
||||
return berlinTime.format("DD.MM.YYYY HH:mm");
|
||||
}
|
||||
|
||||
function sortModuleEventsByStart(events: Event[]) {
|
||||
@ -43,8 +43,14 @@ function sortModuleEventsByStart(events: Event[]) {
|
||||
<tr>
|
||||
<td>
|
||||
<div class="card">
|
||||
<DataTable :value="sortModuleEventsByStart(module.events)" table-style="min-width: 50rem">
|
||||
<Column field="day" :header="$t('moduleInformation.day')"></Column>
|
||||
<DataTable
|
||||
:value="sortModuleEventsByStart(module.events)"
|
||||
table-style="min-width: 50rem"
|
||||
>
|
||||
<Column
|
||||
field="day"
|
||||
:header="$t('moduleInformation.day')"
|
||||
></Column>
|
||||
<Column field="start" :header="$t('moduleInformation.start')">
|
||||
<template #body="slotProps">
|
||||
{{ formatTimestamp(slotProps.data.start) }}
|
||||
@ -52,12 +58,21 @@ function sortModuleEventsByStart(events: Event[]) {
|
||||
</Column>
|
||||
<Column field="end" :header="$t('moduleInformation.end')">
|
||||
<template #body="slotProps">
|
||||
{{formatTimestamp( slotProps.data.end) }}
|
||||
{{ formatTimestamp(slotProps.data.end) }}
|
||||
</template>
|
||||
</Column>
|
||||
<Column field="rooms" :header="$t('moduleInformation.room')"></Column>
|
||||
<Column field="eventType" :header="$t('moduleInformation.type')"></Column>
|
||||
<Column field="week" :header="$t('moduleInformation.week')"></Column>
|
||||
<Column
|
||||
field="rooms"
|
||||
:header="$t('moduleInformation.room')"
|
||||
></Column>
|
||||
<Column
|
||||
field="eventType"
|
||||
:header="$t('moduleInformation.type')"
|
||||
></Column>
|
||||
<Column
|
||||
field="week"
|
||||
:header="$t('moduleInformation.week')"
|
||||
></Column>
|
||||
</DataTable>
|
||||
</div>
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user