Changed DayJS Namespace

This commit is contained in:
2024-01-05 18:17:50 +01:00
parent 61793838bb
commit 8822854040
10 changed files with 34 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
<script setup>
import dayjs from "dayjs";
import dayJS from "dayjs";
definePageMeta({
middleware: "auth"
@@ -123,8 +123,8 @@ setupPage()
</template>
<span>Mitarbeiter: {{dataStore.profiles.find(item => item.id === currentItem.user) ? dataStore.profiles.find(item => item.id === currentItem.user).fullName : ""}}<br></span>
<span>Start: {{dayjs(currentItem.start).format("DD.MM.YYYY")}}<br></span>
<span>Ende: {{dayjs(currentItem.end).format("DD.MM.YYYY")}}<br></span>
<span>Start: {{dayJS(currentItem.start).format("DD.MM.YYYY")}}<br></span>
<span>Ende: {{dayJS(currentItem.end).format("DD.MM.YYYY")}}<br></span>
Notizen:<br>
{{currentItem.note}}<br>
@@ -197,7 +197,7 @@ setupPage()
<UFormGroup label="Start:">
<UPopover :popper="{ placement: 'bottom-start' }">
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.start ? dayjs(itemInfo.start).format('DD.MM.YYYY') : 'Datum auswählen'" />
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.start ? dayJS(itemInfo.start).format('DD.MM.YYYY') : 'Datum auswählen'" />
<template #panel="{ close }">
<LazyDatePicker v-model="itemInfo.start" @close="close" />
@@ -207,7 +207,7 @@ setupPage()
<UFormGroup label="Ende:">
<UPopover :popper="{ placement: 'bottom-start' }">
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.end ? dayjs(itemInfo.end).format('DD.MM.YYYY') : 'Datum auswählen'" />
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.end ? dayJS(itemInfo.end).format('DD.MM.YYYY') : 'Datum auswählen'" />
<template #panel="{ close }">
<LazyDatePicker v-model="itemInfo.end" @close="close" />

View File

@@ -1,5 +1,5 @@
<script setup>
import * as dayjs from "dayjs";
import * as dayJS from "dayjs";
import VueDatePicker from '@vuepic/vue-datepicker'
import '@vuepic/vue-datepicker/dist/main.css'
@@ -150,7 +150,7 @@ const createTime = async () => {
}
const format = (date) => {
let dateFormat = dayjs(date).format("DD.MM.YY HH:mm")
let dateFormat = dayJS(date).format("DD.MM.YY HH:mm")
return `${dateFormat}`;
}
@@ -182,7 +182,7 @@ const format = (date) => {
<div v-if="runningTimeInfo.id" class="mt-3">
Start: {{dayjs(runningTimeInfo.start).format("DD.MM.YY HH:mm")}}
Start: {{dayJS(runningTimeInfo.start).format("DD.MM.YY HH:mm")}}
<UFormGroup
label="Notizen:"
@@ -343,13 +343,13 @@ const format = (date) => {
</template>
<template #start-data="{row}">
{{dayjs(row.start).format("DD.MM.YY HH:mm")}}
{{dayJS(row.start).format("DD.MM.YY HH:mm")}}
</template>
<template #end-data="{row}">
{{dayjs(row.end).format("DD.MM.YY HH:mm")}}
{{dayJS(row.end).format("DD.MM.YY HH:mm")}}
</template>
<template #duration-data="{row}">
{{`${String(dayjs(row.end).diff(row.start,'hour',true).toFixed(2)).replace(".",",")} h`}}
{{`${String(dayJS(row.end).diff(row.start,'hour',true).toFixed(2)).replace(".",",")} h`}}
</template>
<template #projectId-data="{row}">
{{dataStore.projects.find(project => project.id === row.projectId) ? dataStore.projects.find(project => project.id === row.projectId).name : ""}}