Changed DayJS Namespace
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user