Changes
This commit is contained in:
@@ -91,6 +91,15 @@
|
||||
<p>Konto: {{selectedStatement.account}}</p>
|
||||
<p class="text-wrap">Beschreibung: <br>{{selectedStatement.text}}</p>
|
||||
</div>
|
||||
|
||||
<UFormGroup>
|
||||
<USelectMenu
|
||||
:options="dataStore.createddocuments"
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
|
||||
|
||||
</UCard>
|
||||
|
||||
</USlideover>
|
||||
|
||||
@@ -86,8 +86,8 @@ const onSubmit = async (data) => {
|
||||
<UCard class="max-w-sm w-full mx-auto mt-5">
|
||||
|
||||
<UColorModeImage
|
||||
light="/spaces_hell.svg"
|
||||
dark="/spaces.svg"
|
||||
light="/Logo.png"
|
||||
dark="/Logo_Dark.png"
|
||||
/>
|
||||
|
||||
<!-- <img
|
||||
|
||||
@@ -80,7 +80,7 @@ const mode = ref(route.params.mode || "show")
|
||||
const itemInfo = ref({
|
||||
name: "",
|
||||
customer: 0,
|
||||
users: [user.value.id]
|
||||
users: [dataStore.activeProfile.id]
|
||||
})
|
||||
const tags = dataStore.getDocumentTags
|
||||
|
||||
@@ -370,7 +370,9 @@ setupPage()
|
||||
</UTable>
|
||||
|
||||
<DocumentList :documents="dataStore.getDocumentsByProjectId(currentItem.id)"/>
|
||||
<!--
|
||||
{{dataStore.getDocumentsByProjectId(currentItem.id)}}
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
</template>
|
||||
<template #date-data="{row}">
|
||||
<span v-if="row.date">{{row.date ? dayjs(row.date).format("DD.MM.YY") : ''}}</span>
|
||||
<span v-if="row.documentDate">{{row.documentDate ? dayjs(row.documentDate).format("DD.MM.YY") : ''}}</span>
|
||||
</template>
|
||||
<template #dueDate-data="{row}">
|
||||
<span :class="dayjs(row.dueDate).diff(dayjs()) <= 0 ? ['text-rose-500'] : '' ">{{row.dueDate ? dayjs(row.dueDate).format("DD.MM.YY") : ''}}</span>
|
||||
@@ -108,6 +109,9 @@
|
||||
>
|
||||
{{getRowAmount(row) === 0 ? '' : `${String(getRowAmount(row).toFixed(2)).replace('.',',')} €`}}
|
||||
</div>
|
||||
<div v-else class="text-right">
|
||||
{{calculateDocSum(row.rows)}} €
|
||||
</div>
|
||||
</template>
|
||||
</UTable>
|
||||
|
||||
@@ -141,6 +145,11 @@ const templateColumns = [
|
||||
label: "Status.",
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: "amount",
|
||||
label: "Betrag",
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: 'partner',
|
||||
label: "Kunde / Lieferant",
|
||||
@@ -166,11 +175,6 @@ const templateColumns = [
|
||||
label: "Fällig:",
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: "amount",
|
||||
label: "Betrag",
|
||||
sortable: true
|
||||
},
|
||||
]
|
||||
const selectedColumns = ref(templateColumns)
|
||||
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
|
||||
@@ -233,6 +237,18 @@ const filteredRows = computed(() => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const calculateDocSum = (rows) => {
|
||||
let sum = 0
|
||||
|
||||
rows.forEach(row => {
|
||||
if(row.mode !== "pagebreak") {
|
||||
sum += row.price * row.quantity * ( row.taxPercent + 100)/100
|
||||
}
|
||||
})
|
||||
|
||||
return sum.toFixed(2)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -103,8 +103,8 @@ const configTimeMode = ref("create")
|
||||
const startTime = async () => {
|
||||
console.log("started")
|
||||
timeInfo.value = {
|
||||
profile: dataStore.getOwnProfile.id,
|
||||
start: dayjs().format("HH:mm:ssZ"),
|
||||
profile: dataStore.activeProfile.id,
|
||||
start: dayjs().format("HH:mm:ss"),
|
||||
date: dayjs().format("YYYY-MM-DD"),
|
||||
tenant: dataStore.currentTenant,
|
||||
state: "Im Web gestartet"
|
||||
@@ -120,7 +120,7 @@ const startTime = async () => {
|
||||
} else if(data) {
|
||||
//timeInfo.value = data[0]
|
||||
await dataStore.fetchWorkingTimes()
|
||||
runningTimeInfo.value = dataStore.times.find(time => time.profile === dataStore.getOwnProfile.id && !time.end)
|
||||
runningTimeInfo.value = dataStore.times.find(time => time.profile === dataStore.activeProfile.id && !time.end)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -250,30 +250,35 @@ const setState = async (newState) => {
|
||||
</USelectMenu>
|
||||
</template>
|
||||
</UDashboardToolbar>
|
||||
<UCard v-if="runningTimeInfo.id" class="m-3">
|
||||
<template #header>
|
||||
Gestartete Zeit:
|
||||
</template>
|
||||
<p>Start: {{dayjs(runningTimeInfo.start, "HH:mm:ssZ").format("HH:mm")}}</p>
|
||||
<p>Dauer: {{dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') > 59 ? `${Math.floor(dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') / 60)}:${dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') % 60} h` : dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') + ' min' }}</p>
|
||||
|
||||
<UFormGroup
|
||||
class="mt-2"
|
||||
label="Notizen:"
|
||||
<div class="mx-3">
|
||||
<UAlert
|
||||
v-if="runningTimeInfo.id"
|
||||
class="my-3"
|
||||
title="Laufende Zeit:"
|
||||
>
|
||||
<UTextarea
|
||||
v-model="runningTimeInfo.notes"
|
||||
/>
|
||||
</UFormGroup>
|
||||
<template #footer>
|
||||
<UButton
|
||||
@click="stopStartedTime"
|
||||
:disabled="!runningTimeInfo.id"
|
||||
>
|
||||
Stop
|
||||
</UButton>
|
||||
</template>
|
||||
</UCard>
|
||||
<template #description>
|
||||
<p>Start: {{dayjs(runningTimeInfo.start, "HH:mm:ss").format("HH:mm")}}</p>
|
||||
<p>Dauer: {{dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') > 59 ? `${Math.floor(dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') / 60)}:${dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') % 60} h` : dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') + ' min' }}</p>
|
||||
|
||||
<UFormGroup
|
||||
class="mt-2"
|
||||
label="Notizen:"
|
||||
>
|
||||
<UTextarea
|
||||
v-model="runningTimeInfo.notes"
|
||||
/>
|
||||
</UFormGroup>
|
||||
<UButton
|
||||
class="mt-3"
|
||||
@click="stopStartedTime"
|
||||
:disabled="!runningTimeInfo.id"
|
||||
>
|
||||
Stop
|
||||
</UButton>
|
||||
</template>
|
||||
</UAlert>
|
||||
</div>
|
||||
|
||||
|
||||
<UModal
|
||||
v-model="showConfigTimeModal"
|
||||
@@ -319,9 +324,6 @@ const setState = async (newState) => {
|
||||
/>
|
||||
</template>
|
||||
</UPopover>
|
||||
<UInput
|
||||
|
||||
/>
|
||||
</UFormGroup>
|
||||
<!-- <UFormGroup
|
||||
label="Start:"
|
||||
|
||||
Reference in New Issue
Block a user