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
|
||||
|
||||
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 {
|
||||
console.log(item.value)
|
||||
ret = await useEntities(type).update(item.value.id, item.value)//await dataStore.updateItem(type,item.value, oldItem.value)
|
||||
ret = await useEntities(type).update(item.value.id, item.value)
|
||||
emit('returnData', ret)
|
||||
}
|
||||
|
||||
emit('returnData', ret)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ const props = defineProps({
|
||||
const servicecategories = ref([])
|
||||
|
||||
const setup = async () => {
|
||||
servicecategories.value = await useSupabaseSelect("servicecategories")
|
||||
servicecategories.value = await useEntities("servicecategories").select()
|
||||
}
|
||||
|
||||
setup()
|
||||
|
||||
@@ -38,7 +38,7 @@ const itemInfo = ref({
|
||||
paymentDays: auth.activeTenantData.standardPaymentDays,
|
||||
payment_type: "transfer",
|
||||
customSurchargePercentage: 0,
|
||||
createdBy: auth.user.id,
|
||||
created_by: auth.user.id,
|
||||
title: null,
|
||||
description: null,
|
||||
startText: null,
|
||||
@@ -110,6 +110,7 @@ const setupPage = async () => {
|
||||
if (route.params.id) {
|
||||
console.log(route.params)
|
||||
itemInfo.value = await useEntities("createddocuments").selectSingle(route.params.id)
|
||||
await setContactPersonData()
|
||||
checkCompatibilityWithInputPrice()
|
||||
}
|
||||
|
||||
@@ -131,9 +132,6 @@ const setupPage = async () => {
|
||||
setDocumentTypeConfig(false)
|
||||
}
|
||||
|
||||
|
||||
setContactPersonData()
|
||||
|
||||
if (route.query.linkedDocuments) {
|
||||
|
||||
console.log(route.query.loadMode)
|
||||
@@ -487,12 +485,12 @@ const setCustomerData = async (customerId, loadOnlyAdress = false) => {
|
||||
|
||||
const setContactPersonData = async () => {
|
||||
//console.log(itemInfo.value.contactPerson) //TODO: BACKEND CHANGE Set Profile
|
||||
let profile = (await useNuxtApp().$api(`/api/user/${itemInfo.value.created_by}`, {
|
||||
let profile = (await useNuxtApp().$api(`/api/user/${itemInfo.value.created_by}`, {
|
||||
method: "GET"
|
||||
})).profile
|
||||
|
||||
itemInfo.value.contactPersonName = auth.profile.full_name
|
||||
itemInfo.value.contactTel = profile.mobileTel || profile.fixedTel || ""
|
||||
itemInfo.value.contactPersonName = profile.full_name
|
||||
itemInfo.value.contactTel = profile.mobile_tel || profile.fixed_tel || ""
|
||||
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.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.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({
|
||||
message: "Es ist keine Straße im Adressat angegeben",
|
||||
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.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 (itemInfo.value.deliveryDateEnd === null) errors.push({
|
||||
@@ -2008,7 +2008,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
||||
</UFormGroup>
|
||||
</InputGroup>
|
||||
<UFormGroup
|
||||
label="Ansprechpartner:"
|
||||
label="Ansprechpartner im Unternehmen:"
|
||||
>
|
||||
<USelectMenu
|
||||
:options="tenantUsers"
|
||||
|
||||
@@ -113,6 +113,9 @@
|
||||
<span v-if="row.serialConfig.active" class="text-primary">Ja</span>
|
||||
<span v-else class="text-rose-600">Nein</span>
|
||||
</template>
|
||||
<template #contract-data="{row}">
|
||||
<span v-if="row.contract">{{row.contract.contractNumber}} - {{row.contract.name}}</span>
|
||||
</template>
|
||||
</UTable>
|
||||
|
||||
</template>
|
||||
@@ -126,7 +129,7 @@ const items = ref([])
|
||||
const selectedItem = ref(0)
|
||||
|
||||
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("")
|
||||
@@ -172,6 +175,10 @@ const templateColumns = [
|
||||
key: 'partner',
|
||||
label: "Kunde"
|
||||
},
|
||||
{
|
||||
key: 'contract',
|
||||
label: "Vertrag"
|
||||
},
|
||||
{
|
||||
key: 'serialConfig.active',
|
||||
label: "Aktiv"
|
||||
|
||||
@@ -53,10 +53,10 @@ const setState = async (newState) => {
|
||||
|
||||
let item = itemInfo.value
|
||||
delete item.files
|
||||
item.vendor = item.vendor.id
|
||||
if(item.vendor.id) item.vendor = item.vendor.id
|
||||
item.state = newState
|
||||
|
||||
await dataStore.updateItem('incominginvoices',item)
|
||||
await useEntities('incominginvoices').update(route.params.id,item)
|
||||
|
||||
await router.push("/incomingInvoices")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user