Tidying and PDF Viewer Location

This commit is contained in:
2025-11-08 18:55:35 +01:00
parent d9f35602b2
commit e4ae514830

View File

@@ -1150,9 +1150,9 @@ const getDocumentData = async () => {
label: "Ansprechpartner", label: "Ansprechpartner",
content: contactPerson.full_name, content: contactPerson.full_name,
}, },
...contactPerson.fixedTel || contactPerson.mobileTel ? [{ ...itemInfo.value.contactTel || contactPerson.fixed_tel || contactPerson.mobile_tel ? [{
label: "Telefon", label: "Telefon",
content: contactPerson.fixedTel || contactPerson.mobileTel, content: itemInfo.value.contactTel || contactPerson.fixed_tel || contactPerson.mobile_tel,
}] : [], }] : [],
...contactPerson.email ? [{ ...contactPerson.email ? [{
label: "E-Mail", label: "E-Mail",
@@ -1225,7 +1225,7 @@ const generateDocument = async () => {
showDocument.value = false showDocument.value = false
const path = letterheads.value.find(i => i.id === itemInfo.value.letterhead).path const path = letterheads.value.find(i => i.id === itemInfo.value.letterhead).path
uri.value = await useFunctions().useCreatePDF(await getDocumentData(), path) uri.value = await useFunctions().useCreatePDF(await getDocumentData(), path, "createdDocument")
/*uri.value = await useNuxtApp().$api("/api/functions/createinvoicepdf",{ /*uri.value = await useNuxtApp().$api("/api/functions/createinvoicepdf",{
method: "POST", method: "POST",
body: { body: {
@@ -3108,24 +3108,11 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
</UFormGroup> </UFormGroup>
</div> </div>
<div v-else-if="item.label === 'Vorschau'"> <div v-else-if="item.label === 'Vorschau'">
<!-- <UButton
@click="generateDocument"
>
Show
</UButton>-->
<PDFViewer <PDFViewer
v-if="showDocument" v-if="showDocument"
:uri="uri" :uri="uri"
location="edit_create_document"
/> />
<!-- <object
:data="uri"
v-if="showDocument"
type="application/pdf"
class="w-full previewDocumentMobile"
/>-->
</div> </div>
</template> </template>
</UTabs> </UTabs>