Some Fixes in Times
This commit is contained in:
@@ -80,8 +80,6 @@ const filteredRows = computed(() => {
|
||||
|
||||
const itemInfo = ref({
|
||||
user: "",
|
||||
start: new Date(),
|
||||
end: "",
|
||||
notes: null,
|
||||
project: null,
|
||||
type: null,
|
||||
@@ -177,8 +175,7 @@ const createTime = async () => {
|
||||
itemInfo.value = {}
|
||||
toast.add({title: "Zeit erfolgreich erstellt"})
|
||||
showConfigTimeModal.value = false
|
||||
await dataStore.fetchTimes()
|
||||
|
||||
setup()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +217,7 @@ const format = (date) => {
|
||||
return `${dateFormat}`;
|
||||
}
|
||||
|
||||
const getDuration = (time) => {
|
||||
/*const getDuration = (time) => {
|
||||
const dez = dayjs(time.end).diff(time.start,'hour',true).toFixed(2)
|
||||
const hours = Math.floor(dez)
|
||||
const minutes = Math.floor((dez - hours) * 60)
|
||||
@@ -230,7 +227,7 @@ const getDuration = (time) => {
|
||||
minutes: minutes,
|
||||
composed: `${hours}:${minutes}`
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
const setState = async (newState) => {
|
||||
itemInfo.value.state = newState
|
||||
@@ -271,7 +268,7 @@ const getSecondInfo = (item) => {
|
||||
</UButton>
|
||||
<UButton
|
||||
v-if="platform !== 'mobile'"
|
||||
@click="configTimeMode = 'create'; itemInfo = {start: new Date(), end: new Date(), user: user.id}; showConfigTimeModal = true"
|
||||
@click="configTimeMode = 'create'; itemInfo = {startDate: new Date(), endDate: new Date()}; showConfigTimeModal = true"
|
||||
>
|
||||
Erstellen
|
||||
</UButton>
|
||||
|
||||
Reference in New Issue
Block a user