Merge branch 'beta' into 'main'
2025.19.3 See merge request fedeo/software!21
This commit is contained in:
@@ -219,13 +219,15 @@ const updateItem = async () => {
|
|||||||
let ret = null
|
let ret = null
|
||||||
|
|
||||||
if(props.inModal) {
|
if(props.inModal) {
|
||||||
ret = await dataStore.updateItem(type,item.value, oldItem.value,true)
|
ret = await useEntities(type).update(item.value.id, item.value, true)
|
||||||
|
emit('returnData', ret)
|
||||||
|
modal.close()
|
||||||
} else {
|
} else {
|
||||||
console.log(item.value)
|
ret = await useEntities(type).update(item.value.id, item.value)
|
||||||
ret = await useEntities(type).update(item.value.id, item.value)//await dataStore.updateItem(type,item.value, oldItem.value)
|
emit('returnData', ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
emit('returnData', ret)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const props = defineProps({
|
|||||||
const servicecategories = ref([])
|
const servicecategories = ref([])
|
||||||
|
|
||||||
const setup = async () => {
|
const setup = async () => {
|
||||||
servicecategories.value = await useSupabaseSelect("servicecategories")
|
servicecategories.value = await useEntities("servicecategories").select()
|
||||||
}
|
}
|
||||||
|
|
||||||
setup()
|
setup()
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const itemInfo = ref({
|
|||||||
paymentDays: auth.activeTenantData.standardPaymentDays,
|
paymentDays: auth.activeTenantData.standardPaymentDays,
|
||||||
payment_type: "transfer",
|
payment_type: "transfer",
|
||||||
customSurchargePercentage: 0,
|
customSurchargePercentage: 0,
|
||||||
createdBy: auth.user.id,
|
created_by: auth.user.id,
|
||||||
title: null,
|
title: null,
|
||||||
description: null,
|
description: null,
|
||||||
startText: null,
|
startText: null,
|
||||||
@@ -110,6 +110,7 @@ const setupPage = async () => {
|
|||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
console.log(route.params)
|
console.log(route.params)
|
||||||
itemInfo.value = await useEntities("createddocuments").selectSingle(route.params.id)
|
itemInfo.value = await useEntities("createddocuments").selectSingle(route.params.id)
|
||||||
|
await setContactPersonData()
|
||||||
checkCompatibilityWithInputPrice()
|
checkCompatibilityWithInputPrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,9 +132,6 @@ const setupPage = async () => {
|
|||||||
setDocumentTypeConfig(false)
|
setDocumentTypeConfig(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setContactPersonData()
|
|
||||||
|
|
||||||
if (route.query.linkedDocuments) {
|
if (route.query.linkedDocuments) {
|
||||||
|
|
||||||
console.log(route.query.loadMode)
|
console.log(route.query.loadMode)
|
||||||
@@ -491,8 +489,8 @@ const setContactPersonData = async () => {
|
|||||||
method: "GET"
|
method: "GET"
|
||||||
})).profile
|
})).profile
|
||||||
|
|
||||||
itemInfo.value.contactPersonName = auth.profile.full_name
|
itemInfo.value.contactPersonName = profile.full_name
|
||||||
itemInfo.value.contactTel = profile.mobileTel || profile.fixedTel || ""
|
itemInfo.value.contactTel = profile.mobile_tel || profile.fixed_tel || ""
|
||||||
itemInfo.value.contactEMail = profile.email
|
itemInfo.value.contactEMail = profile.email
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -633,7 +631,7 @@ const findDocumentErrors = computed(() => {
|
|||||||
if (itemInfo.value.customer === null) errors.push({message: "Es ist kein Kunde ausgewählt", type: "breaking"})
|
if (itemInfo.value.customer === null) errors.push({message: "Es ist kein Kunde ausgewählt", type: "breaking"})
|
||||||
if (itemInfo.value.contact === null) errors.push({message: "Es ist kein Kontakt ausgewählt", type: "info"})
|
if (itemInfo.value.contact === null) errors.push({message: "Es ist kein Kontakt ausgewählt", type: "info"})
|
||||||
if (itemInfo.value.letterhead === null) errors.push({message: "Es ist kein Briefpapier ausgewählt", type: "breaking"})
|
if (itemInfo.value.letterhead === null) errors.push({message: "Es ist kein Briefpapier ausgewählt", type: "breaking"})
|
||||||
if (itemInfo.value.created_by === null || !itemInfo.value.created_by) errors.push({message: "Es ist kein Ansprechpartner ausgewählt", type: "breaking"})
|
if (itemInfo.value.created_by === null || !itemInfo.value.created_by) errors.push({message: "Es ist kein Ansprechpartner im Unternehmen ausgewählt", type: "breaking"})
|
||||||
if (itemInfo.value.address.street === null) errors.push({
|
if (itemInfo.value.address.street === null) errors.push({
|
||||||
message: "Es ist keine Straße im Adressat angegeben",
|
message: "Es ist keine Straße im Adressat angegeben",
|
||||||
type: "breaking"
|
type: "breaking"
|
||||||
@@ -648,6 +646,8 @@ const findDocumentErrors = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (itemInfo.value.project === null) errors.push({message: "Es ist kein Projekt ausgewählt", type: "info"})
|
if (itemInfo.value.project === null) errors.push({message: "Es ist kein Projekt ausgewählt", type: "info"})
|
||||||
|
if (itemInfo.value.plant === null) errors.push({message: "Es ist kein Objekt ausgewählt", type: "info"})
|
||||||
|
if (itemInfo.value.contract === null) errors.push({message: "Es ist kein Vertrag ausgewählt", type: "info"})
|
||||||
|
|
||||||
if (['Lieferzeitraum', 'Leistungszeitraum'].includes(itemInfo.value.deliveryDateType) && itemInfo.value.type !== "serialInvoices") {
|
if (['Lieferzeitraum', 'Leistungszeitraum'].includes(itemInfo.value.deliveryDateType) && itemInfo.value.type !== "serialInvoices") {
|
||||||
if (itemInfo.value.deliveryDateEnd === null) errors.push({
|
if (itemInfo.value.deliveryDateEnd === null) errors.push({
|
||||||
@@ -2008,7 +2008,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<UFormGroup
|
<UFormGroup
|
||||||
label="Ansprechpartner:"
|
label="Ansprechpartner im Unternehmen:"
|
||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:options="tenantUsers"
|
:options="tenantUsers"
|
||||||
|
|||||||
@@ -113,6 +113,9 @@
|
|||||||
<span v-if="row.serialConfig.active" class="text-primary">Ja</span>
|
<span v-if="row.serialConfig.active" class="text-primary">Ja</span>
|
||||||
<span v-else class="text-rose-600">Nein</span>
|
<span v-else class="text-rose-600">Nein</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #contract-data="{row}">
|
||||||
|
<span v-if="row.contract">{{row.contract.contractNumber}} - {{row.contract.name}}</span>
|
||||||
|
</template>
|
||||||
</UTable>
|
</UTable>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -126,7 +129,7 @@ const items = ref([])
|
|||||||
const selectedItem = ref(0)
|
const selectedItem = ref(0)
|
||||||
|
|
||||||
const setupPage = async () => {
|
const setupPage = async () => {
|
||||||
items.value = await useEntities("createddocuments").select("*, customer(id,name)","documentDate",undefined,true)
|
items.value = await useEntities("createddocuments").select("*, customer(id,name), contract(id,name, contractNumber)","documentDate",undefined,true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchString = ref("")
|
const searchString = ref("")
|
||||||
@@ -172,6 +175,10 @@ const templateColumns = [
|
|||||||
key: 'partner',
|
key: 'partner',
|
||||||
label: "Kunde"
|
label: "Kunde"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'contract',
|
||||||
|
label: "Vertrag"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'serialConfig.active',
|
key: 'serialConfig.active',
|
||||||
label: "Aktiv"
|
label: "Aktiv"
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ const setState = async (newState) => {
|
|||||||
|
|
||||||
let item = itemInfo.value
|
let item = itemInfo.value
|
||||||
delete item.files
|
delete item.files
|
||||||
item.vendor = item.vendor.id
|
if(item.vendor.id) item.vendor = item.vendor.id
|
||||||
item.state = newState
|
item.state = newState
|
||||||
|
|
||||||
await dataStore.updateItem('incominginvoices',item)
|
await useEntities('incominginvoices').update(route.params.id,item)
|
||||||
|
|
||||||
await router.push("/incomingInvoices")
|
await router.push("/incomingInvoices")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user