Merge branch 'devCorrected' into 'beta'

Fix for Copying

See merge request fedeo/software!45
This commit is contained in:
2025-12-10 07:43:41 +00:00
2 changed files with 5 additions and 6 deletions

View File

@@ -134,11 +134,11 @@ export const useEntities = (
const selectSingle = async ( const selectSingle = async (
idToEq: string | number, idToEq: string | number,
select: string = "*", select: string = "*",
withInformation: boolean = false withInformation: boolean = true
) => { ) => {
if (!idToEq) return null if (!idToEq) return null
const res = await useNuxtApp().$api(withInformation ? `/api/resource/${relation}/${idToEq}` : `/api/resource/${relation}/${idToEq}`, { const res = await useNuxtApp().$api(withInformation ? `/api/resource/${relation}/${idToEq}` : `/api/resource/${relation}/${idToEq}/true`, {
method: "GET", method: "GET",
params: { select } params: { select }
}) })

View File

@@ -109,7 +109,7 @@ const setupPage = async () => {
if (route.params) { if (route.params) {
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,'',false)
await setContactPersonData() await setContactPersonData()
checkCompatibilityWithInputPrice() checkCompatibilityWithInputPrice()
} }
@@ -1597,7 +1597,6 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
<UTabs class="p-5" :items="tabItems" @change="onChangeTab" v-if="loaded" v-model="selectedTab"> <UTabs class="p-5" :items="tabItems" @change="onChangeTab" v-if="loaded" v-model="selectedTab">
<template #item="{item}"> <template #item="{item}">
<div v-if="item.label === 'Editor'"> <div v-if="item.label === 'Editor'">
<UAlert <UAlert
class="my-5" class="my-5"
title="Vorhandene Probleme und Informationen:" title="Vorhandene Probleme und Informationen:"
@@ -1809,7 +1808,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
> >
<template #description> <template #description>
Kundennr: {{ customers.find(i => i.id === itemInfo.customer).customerNumber }}<br> Kundennr: {{ customers.find(i => i.id === itemInfo.customer).customerNumber }}<br>
Typ: {{ customers.find(i => i.id === itemInfo.customer).is_company ? 'Firma' : 'Privat' }}<br> Typ: {{ customers.find(i => i.id === itemInfo.customer).isCompany ? 'Firma' : 'Privat' }}<br>
Notizen: <span class="truncate">{{ customers.find(i => i.id === itemInfo.customer).notes }}</span> Notizen: <span class="truncate">{{ customers.find(i => i.id === itemInfo.customer).notes }}</span>
</template> </template>
@@ -1818,7 +1817,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
</UFormGroup> </UFormGroup>
<UFormGroup <UFormGroup
label="Ansprechpartner:" label="Ansprechpartner:"
v-if="itemInfo.customer ? customers.find(i => i.id === itemInfo.customer).is_company : false " v-if="itemInfo.customer ? customers.find(i => i.id === itemInfo.customer).isCompany : false "
> >
<InputGroup> <InputGroup>
<USelectMenu <USelectMenu