Changed DayJS Namespace
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import * as dayJS from "dayjs"
|
||||
import dayjs from "dayjs"
|
||||
const props = defineProps({
|
||||
type: {
|
||||
required: true,
|
||||
@@ -123,7 +123,7 @@ const renderText = (text) => {
|
||||
<h3 v-if="item.user">{{dataStore.profiles.find(profile => profile.id === item.user) ? dataStore.profiles.find(profile => profile.id === item.user).fullName : ""}}</h3>
|
||||
<h3 v-else>Spaces Bot</h3>
|
||||
<span v-html="renderText(item.text)"/><br>
|
||||
<span class="text-gray-500">{{dayJS(item.created_at).format("DD:MM:YY HH:mm")}}</span>
|
||||
<span class="text-gray-500">{{dayjs(item.created_at).format("DD:MM:YY HH:mm")}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import * as dayJS from "dayjs";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
@@ -128,7 +128,7 @@ const statementColumns = [
|
||||
</span>
|
||||
</template>
|
||||
<template #date-data="{row}">
|
||||
{{dayJS(row.date).format("DD.MM.YY")}}
|
||||
{{dayjs(row.date).format("DD.MM.YY")}}
|
||||
</template>
|
||||
</UTable>
|
||||
</template>
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import * as dayJS from "dayjs";
|
||||
import 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 : ""}}
|
||||
|
||||
@@ -4,7 +4,7 @@ import resourceTimelinePlugin from '@fullcalendar/resource-timeline'
|
||||
import deLocale from '@fullcalendar/core/locales/de'
|
||||
import interactionPlugin from '@fullcalendar/interaction'
|
||||
import listPlugin from '@fullcalendar/list';
|
||||
import dayJS from "dayjs";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
|
||||
const viewport = useViewport()
|
||||
@@ -169,8 +169,8 @@ const calendarOptionsTimeline = reactive({
|
||||
{{selectedEvent.title}}
|
||||
</template>
|
||||
|
||||
Start: {{dayJS(selectedEvent.startStr).format("DD.MM.YYYY HH:mm")}}<br>
|
||||
Ende: {{dayJS(selectedEvent.endStr).format("DD.MM.YYYY HH:mm")}}
|
||||
Start: {{dayjs(selectedEvent.startStr).format("DD.MM.YYYY HH:mm")}}<br>
|
||||
Ende: {{dayjs(selectedEvent.endStr).format("DD.MM.YYYY HH:mm")}}
|
||||
|
||||
<DevOnly>
|
||||
<UDivider class="my-3"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import * as dayJS from "dayjs";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
@@ -206,7 +206,7 @@ const uploadFile = async () => {
|
||||
const projectHours = () => {
|
||||
let hours = 0
|
||||
dataStore.getTimesByProjectId(currentItem.value.id).forEach(item => {
|
||||
hours += Number(dayJS(item.end).diff(item.start,'hour',true).toFixed(2))
|
||||
hours += Number(dayjs(item.end).diff(item.start,'hour',true).toFixed(2))
|
||||
})
|
||||
|
||||
return hours
|
||||
@@ -409,13 +409,13 @@ setupPage()
|
||||
{{dataStore.profiles.find(profile => profile.id === row.user) ? dataStore.profiles.find(profile => profile.id === row.user).fullName : row.user }}
|
||||
</template>
|
||||
<template #duration-data="{row}">
|
||||
{{(row.start && row.end) ? `${String(dayJS(row.end).diff(row.start,'hour',true).toFixed(2)).replace(".",",")} h` : ""}}
|
||||
{{(row.start && row.end) ? `${String(dayjs(row.end).diff(row.start,'hour',true).toFixed(2)).replace(".",",")} h` : ""}}
|
||||
</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>
|
||||
|
||||
</UTable>
|
||||
|
||||
@@ -3,7 +3,7 @@ definePageMeta({
|
||||
middleware: "auth"
|
||||
})
|
||||
|
||||
import * as dayjs from 'dayjs'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const supabase = useSupabaseClient()
|
||||
const user = useSupabaseUser()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
||||
>
|
||||
<template #created_at-data="{row}">
|
||||
{{row.created_at ? dayJS(row.created_at).format("DD.MM.YY HH:mm") : ''}}
|
||||
{{row.created_at ? dayjs(row.created_at).format("DD.MM.YY HH:mm") : ''}}
|
||||
</template>
|
||||
<template #user-data="{row}">
|
||||
{{dataStore.profiles.find(i => i.id === row.user) ? dataStore.profiles.find(i => i.id === row.user).fullName : ""}}
|
||||
@@ -39,7 +39,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as dayJS from "dayjs";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<InputGroup class="mt-3" gap="2">
|
||||
<UFormGroup label="Rechnungsdatum:" required>
|
||||
<UPopover :popper="{ placement: 'bottom-start' }">
|
||||
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.date ? dayJS(itemInfo.date).format('DD.MM.YYYY') : 'Datum auswählen'" />
|
||||
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.date ? dayjs(itemInfo.date).format('DD.MM.YYYY') : 'Datum auswählen'" />
|
||||
|
||||
<template #panel="{ close }">
|
||||
<LazyDatePicker v-model="itemInfo.date" @close="close" />
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<UFormGroup label="Fälligkeitsdatum:" required>
|
||||
<UPopover :popper="{ placement: 'bottom-start' }">
|
||||
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.dueDate ? dayJS(itemInfo.dueDate).format('DD.MM.YYYY') : 'Datum auswählen'" />
|
||||
<UButton icon="i-heroicons-calendar-days-20-solid" :label="itemInfo.dueDate ? dayjs(itemInfo.dueDate).format('DD.MM.YYYY') : 'Datum auswählen'" />
|
||||
|
||||
<template #panel="{ close }">
|
||||
<LazyDatePicker v-model="itemInfo.dueDate" @close="close" />
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
<script setup>
|
||||
import InputGroup from "~/components/InputGroup.vue";
|
||||
import * as dayJS from "dayjs";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const supabase = useSupabaseClient()
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
{{dataStore.vendors.find(vendor => vendor.id === row.vendor) ? dataStore.vendors.find(vendor => vendor.id === row.vendor).name : ''}}
|
||||
</template>
|
||||
<template #date-data="{row}">
|
||||
<span v-if="row.date">{{row.date ? dayJS(row.date).format("DD.MM.YY") : ''}}</span>
|
||||
<span v-if="row.date">{{row.date ? dayjs(row.date).format("DD.MM.YY") : ''}}</span>
|
||||
</template>
|
||||
<template #dueDate-data="{row}">
|
||||
{{row.dueDate ? dayJS(row.dueDate).format("DD.MM.YY") : ''}}
|
||||
{{row.dueDate ? dayjs(row.dueDate).format("DD.MM.YY") : ''}}
|
||||
</template>
|
||||
<template #amount-data="{row}">
|
||||
{{getRowAmount(row) === 0 ? '' : `${getRowAmount(row)} €`}}
|
||||
@@ -52,7 +52,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as dayJS from "dayjs";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {defineStore} from 'pinia'
|
||||
import * as dayJS from "dayjs"
|
||||
import dayjs from "dayjs"
|
||||
|
||||
//const supabase = createClient('https://uwppvcxflrcsibuzsbil.supabase.co','eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InV3cHB2Y3hmbHJjc2lidXpzYmlsIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDA5MzgxOTQsImV4cCI6MjAxNjUxNDE5NH0.CkxYSQH0uLfwx9GVUlO6AYMU2FMLAxGMrwEKvyPv7Oo')
|
||||
|
||||
@@ -337,8 +337,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
resourceId: absence.user,
|
||||
resourceType: "person",
|
||||
title: absence.reason,
|
||||
start: dayJS(absence.start).toDate(),
|
||||
end: dayJS(absence.end).add(1,'day').toDate(),
|
||||
start: dayjs(absence.start).toDate(),
|
||||
end: dayjs(absence.end).add(1,'day').toDate(),
|
||||
allDay: true
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user