Many Changes
This commit is contained in:
@@ -239,13 +239,13 @@ const setPosNumbers = () => {
|
||||
const saveDocument = async () => {
|
||||
let createData = {
|
||||
type: itemInfo.value.type,
|
||||
state: itemInfo.value.state || "Entwurf",
|
||||
customer: itemInfo.value.customer,
|
||||
contact: itemInfo.value.contact,
|
||||
address: itemInfo.value.address,
|
||||
project: itemInfo.value.project,
|
||||
documentNumber: itemInfo.value.documentNumber,
|
||||
documentDate: itemInfo.value.documentDate,
|
||||
state: "Entwurf",
|
||||
info: {
|
||||
|
||||
},
|
||||
@@ -277,6 +277,8 @@ const saveDocument = async () => {
|
||||
|
||||
const closeDocument = async () => {
|
||||
|
||||
itemInfo.value.state = "Gebucht"
|
||||
|
||||
await saveDocument()
|
||||
|
||||
await generateDocument()
|
||||
@@ -308,6 +310,9 @@ const closeDocument = async () => {
|
||||
await dataStore.uploadFiles(fileData, [file], true)
|
||||
|
||||
|
||||
|
||||
await router.push(`/createDocument/show/${itemInfo.value.id}`)
|
||||
|
||||
//console.log(uri)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const itemInfo = ref({})
|
||||
|
||||
@@ -16,8 +17,21 @@ setupPage()
|
||||
|
||||
<template>
|
||||
|
||||
<InputGroup>
|
||||
<UButton
|
||||
@click="router.push(`/createDocument/edit/${itemInfo.id}`)"
|
||||
>
|
||||
Bearbeiten
|
||||
</UButton>
|
||||
</InputGroup>
|
||||
|
||||
{{itemInfo}}
|
||||
|
||||
|
||||
<DocumentDisplay
|
||||
:document-data="dataStore.documents.find(i => i.createdDocument === itemInfo.id)"
|
||||
/>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user