Merge branch 'dev' into beta
This commit is contained in:
@@ -201,6 +201,7 @@ const resetContactRequest = () => {
|
|||||||
<InputGroup class="mt-3">
|
<InputGroup class="mt-3">
|
||||||
<UButton
|
<UButton
|
||||||
type="submit"
|
type="submit"
|
||||||
|
:disabled="!contactRequestData.title || !contactRequestData.message"
|
||||||
>
|
>
|
||||||
Senden
|
Senden
|
||||||
</UButton>
|
</UButton>
|
||||||
@@ -208,6 +209,7 @@ const resetContactRequest = () => {
|
|||||||
type="reset"
|
type="reset"
|
||||||
color="rose"
|
color="rose"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
:disabled="!contactRequestData.title && !contactRequestData.message"
|
||||||
>
|
>
|
||||||
Zurücksetzen
|
Zurücksetzen
|
||||||
</UButton>
|
</UButton>
|
||||||
|
|||||||
14
components/columnRenderings/phase.vue
Normal file
14
components/columnRenderings/phase.vue
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
row: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<span v-if="props.row.phases && props.row.phases.length > 0">{{props.row.phases.find(i => i.active).label}}</span>
|
||||||
|
</template>
|
||||||
@@ -6,18 +6,16 @@ let draftInvoicesSum = ref(0)
|
|||||||
let draftInvoicesCount = ref(0)
|
let draftInvoicesCount = ref(0)
|
||||||
let unallocatedStatements = ref(0)
|
let unallocatedStatements = ref(0)
|
||||||
const setupPage = async () => {
|
const setupPage = async () => {
|
||||||
let documents = (await useSupabaseSelect("createddocuments","*, statementallocations(*), customer(id,name)")).filter(i => i.type === "invoices" ||i.type === "advanceInvoices").filter(i => !i.archived)
|
let documents = (await useSupabaseSelect("createddocuments","*, statementallocations(*), customer(id,name)")).filter(i => i.type === "invoices" ||i.type === "advanceInvoices"||i.type === "cancellationInvoices").filter(i => !i.archived)
|
||||||
|
|
||||||
let draftDocuments = documents.filter(i => i.state === "Entwurf")
|
let draftDocuments = documents.filter(i => i.state === "Entwurf")
|
||||||
let finalizedDocuments = documents.filter(i => i.state === "Gebucht")
|
let finalizedDocuments = documents.filter(i => i.state === "Gebucht")
|
||||||
|
|
||||||
console.log(finalizedDocuments)
|
|
||||||
|
|
||||||
|
|
||||||
finalizedDocuments = finalizedDocuments.filter(i => i.statementallocations.reduce((n,{amount}) => n + amount, 0).toFixed(2) !== getDocumentSum(i).toFixed(2))
|
finalizedDocuments = finalizedDocuments.filter(i => i.statementallocations.reduce((n,{amount}) => n + amount, 0).toFixed(2) !== getDocumentSum(i).toFixed(2))
|
||||||
|
|
||||||
finalizedDocuments.forEach(i => {
|
finalizedDocuments.forEach(i => {
|
||||||
console.log(getDocumentSum(i))
|
|
||||||
unpaidInvoicesSum.value += getDocumentSum(i) - i.statementallocations.reduce((n,{amount}) => n + amount, 0)
|
unpaidInvoicesSum.value += getDocumentSum(i) - i.statementallocations.reduce((n,{amount}) => n + amount, 0)
|
||||||
})
|
})
|
||||||
unpaidInvoicesCount.value = finalizedDocuments.length
|
unpaidInvoicesCount.value = finalizedDocuments.length
|
||||||
|
|||||||
43
components/displayProjectsInPhases.vue
Normal file
43
components/displayProjectsInPhases.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<script setup>
|
||||||
|
|
||||||
|
const phasesCounter = ref({})
|
||||||
|
|
||||||
|
const setupPage = async () => {
|
||||||
|
const projects = await useSupabaseSelect("projects")
|
||||||
|
|
||||||
|
projects.forEach(project => {
|
||||||
|
if(project.phases && project.phases.length > 0){
|
||||||
|
let activePhase = project.phases.find(p => p.active)
|
||||||
|
|
||||||
|
if(phasesCounter.value[activePhase.label]) {
|
||||||
|
phasesCounter.value[activePhase.label] += 1
|
||||||
|
} else {
|
||||||
|
phasesCounter.value[activePhase.label] = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if(phasesCounter.value.none) {
|
||||||
|
phasesCounter.value.none += 1
|
||||||
|
} else {
|
||||||
|
phasesCounter.value.none = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setupPage()
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<table class="w-full">
|
||||||
|
<tr v-for="label in Object.keys(phasesCounter)">
|
||||||
|
<td>{{label}}</td>
|
||||||
|
<td>{{ phasesCounter[label] }} Stk</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -68,11 +68,50 @@ const openEmail = () => {
|
|||||||
:to="dataStore.documents.find(i => i.createdDocument === itemInfo.id) ? dataStore.documents.find(i => i.createdDocument === itemInfo.id).url : ''"
|
:to="dataStore.documents.find(i => i.createdDocument === itemInfo.id) ? dataStore.documents.find(i => i.createdDocument === itemInfo.id).url : ''"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>In neuen Tab anzeigen</UButton>-->
|
>In neuen Tab anzeigen</UButton>-->
|
||||||
<UButton
|
<UTooltip
|
||||||
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}`)"
|
text="Übernehmen in Angebot"
|
||||||
>
|
>
|
||||||
Übernehmen
|
<UButton
|
||||||
</UButton>
|
icon="i-heroicons-arrow-right-end-on-rectangle"
|
||||||
|
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&type=quotes`)"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
Angebot
|
||||||
|
</UButton>
|
||||||
|
</UTooltip>
|
||||||
|
<UTooltip
|
||||||
|
text="Übernehmen in Auftragsbestätigung"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
icon="i-heroicons-arrow-right-end-on-rectangle"
|
||||||
|
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&type=confirmationOrders`)"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
Auftragsbestätigung
|
||||||
|
</UButton>
|
||||||
|
</UTooltip>
|
||||||
|
<UTooltip
|
||||||
|
text="Übernehmen in Lieferschein"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
icon="i-heroicons-arrow-right-end-on-rectangle"
|
||||||
|
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&type=deliveryNotes`)"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
Lieferschein
|
||||||
|
</UButton>
|
||||||
|
</UTooltip>
|
||||||
|
<UTooltip
|
||||||
|
text="Übernehmen in Rechnung"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
icon="i-heroicons-arrow-right-end-on-rectangle"
|
||||||
|
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&type=invoices`)"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
Rechnung
|
||||||
|
</UButton>
|
||||||
|
</UTooltip>
|
||||||
<UButton
|
<UButton
|
||||||
@click="openEmail"
|
@click="openEmail"
|
||||||
icon="i-heroicons-envelope"
|
icon="i-heroicons-envelope"
|
||||||
@@ -83,17 +122,26 @@ const openEmail = () => {
|
|||||||
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&loadMode=storno`)"
|
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&loadMode=storno`)"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
color="rose"
|
color="rose"
|
||||||
|
v-if="itemInfo.type === 'invoices' || itemInfo.type === 'advanceInvoices'"
|
||||||
>
|
>
|
||||||
Stornieren
|
Stornieren
|
||||||
</UButton>
|
</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
v-if="itemInfo.project"
|
v-if="itemInfo.project"
|
||||||
@click="router.push(`/standardEntity/projects/show/${itemInfo.project}`)"
|
@click="router.push(`/standardEntity/projects/show/${itemInfo.project}`)"
|
||||||
icon="i-heroicons-arrow-right-end-on-rectangle"
|
icon="i-heroicons-link"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
>
|
>
|
||||||
Projekt
|
Projekt
|
||||||
</UButton>
|
</UButton>
|
||||||
|
<UButton
|
||||||
|
v-if="itemInfo.customer"
|
||||||
|
@click="router.push(`/standardEntity/customers/show/${itemInfo.customer}`)"
|
||||||
|
icon="i-heroicons-link"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
Kunde
|
||||||
|
</UButton>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</UDashboardToolbar>
|
</UDashboardToolbar>
|
||||||
|
|||||||
@@ -13,27 +13,33 @@
|
|||||||
</template>
|
</template>
|
||||||
</UDashboardNavbar>
|
</UDashboardNavbar>
|
||||||
|
|
||||||
<UDashboardPanelContent>
|
<UDashboardPanelContent class="flex flex-row">
|
||||||
<UDashboardCard
|
<UDashboardCard
|
||||||
class="mt-3"
|
class="w-1/3 h-fit mx-2 mt-3"
|
||||||
title="Anwesenheiten"
|
title="Anwesenheiten"
|
||||||
>
|
>
|
||||||
<display-present-profiles/>
|
<display-present-profiles/>
|
||||||
</UDashboardCard>
|
</UDashboardCard>
|
||||||
|
|
||||||
|
|
||||||
<UDashboardCard
|
<!-- <UDashboardCard
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
>
|
>
|
||||||
<display-income-and-expenditure/>
|
<display-income-and-expenditure/>
|
||||||
</UDashboardCard>
|
</UDashboardCard>-->
|
||||||
<UDashboardCard
|
<UDashboardCard
|
||||||
class="w-1/3 mt-3"
|
class="w-1/3 h-fit mx-2 mt-3"
|
||||||
>
|
>
|
||||||
<display-open-balances/>
|
<display-open-balances/>
|
||||||
</UDashboardCard>
|
</UDashboardCard>
|
||||||
<UDashboardCard
|
<UDashboardCard
|
||||||
class="w-1/3 mt-3"
|
class="w-1/3 h-fit mx-2 mt-3"
|
||||||
|
title="Projekte"
|
||||||
|
>
|
||||||
|
<display-projects-in-phases/>
|
||||||
|
</UDashboardCard>
|
||||||
|
<UDashboardCard
|
||||||
|
class="w-1/3 h-fit mx-2 mt-3"
|
||||||
>
|
>
|
||||||
<display-running-time/>
|
<display-running-time/>
|
||||||
</UDashboardCard>
|
</UDashboardCard>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import sellingPriceComposedTotal from "~/components/columnRenderings/sellingPric
|
|||||||
import startDate from "~/components/columnRenderings/startDate.vue"
|
import startDate from "~/components/columnRenderings/startDate.vue"
|
||||||
import endDate from "~/components/columnRenderings/endDate.vue"
|
import endDate from "~/components/columnRenderings/endDate.vue"
|
||||||
import serviceCategories from "~/components/columnRenderings/serviceCategories.vue"
|
import serviceCategories from "~/components/columnRenderings/serviceCategories.vue"
|
||||||
|
import phase from "~/components/columnRenderings/phase.vue"
|
||||||
|
|
||||||
import quantity from "~/components/helpRenderings/quantity.vue"
|
import quantity from "~/components/helpRenderings/quantity.vue"
|
||||||
import {useZipCheck} from "~/composables/useZipCheck.js";
|
import {useZipCheck} from "~/composables/useZipCheck.js";
|
||||||
@@ -736,7 +737,11 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
default: true,
|
default: true,
|
||||||
"filterFunction": function (row) {
|
"filterFunction": function (row) {
|
||||||
if(row.phases && row.phases.length > 0) {
|
if(row.phases && row.phases.length > 0) {
|
||||||
return row.phases.find(i => i.active).label !== "Abgeschlossen";
|
return row.phases.find(i => i.active).label !== "Abgeschlossen"
|
||||||
|
|
||||||
|
//return phase.label !== "Abgeschlossen";
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -772,7 +777,8 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
key: "phase",
|
key: "phase",
|
||||||
label: "Phase"
|
label: "Phase",
|
||||||
|
component: phase
|
||||||
},{
|
},{
|
||||||
key: "name",
|
key: "name",
|
||||||
label: "Name",
|
label: "Name",
|
||||||
|
|||||||
Reference in New Issue
Block a user