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