diff --git a/spaces/components/DocumentDisplay.vue b/spaces/components/DocumentDisplay.vue
index cf8107a..9cb36a1 100644
--- a/spaces/components/DocumentDisplay.vue
+++ b/spaces/components/DocumentDisplay.vue
@@ -117,7 +117,6 @@ const archiveDocument = () => {
DATEV
- {{documentData}}
diff --git a/spaces/composables/useNumberRange.js b/spaces/composables/useNumberRange.js
index 592df85..e2f3e9d 100644
--- a/spaces/composables/useNumberRange.js
+++ b/spaces/composables/useNumberRange.js
@@ -15,7 +15,7 @@ export const useNumberRange = (resourceType) => {
let nextNumber = numberRange.nextNumber
const {data,error} = await supabase
- .from("numberRanges")
+ .from("numberranges")
.update({nextNumber: nextNumber + 1})
.eq('id',numberRange.id)
diff --git a/spaces/composables/usePDFGenerator.js b/spaces/composables/usePDFGenerator.js
index 82dde1b..a3b5b1e 100644
--- a/spaces/composables/usePDFGenerator.js
+++ b/spaces/composables/usePDFGenerator.js
@@ -328,7 +328,7 @@ export const useCreatePdf = async (invoiceData) => {
opacity: 1,
maxWidth: 240
})
- pages[pageCounter - 1].drawText("Projekt:", {
+ /*pages[pageCounter - 1].drawText("Projekt:", {
...getCoordinatesForPDFLib(126,90, page1),
size:10,
color:rgb(0,0,0),
@@ -339,13 +339,13 @@ export const useCreatePdf = async (invoiceData) => {
pages[pageCounter - 1].drawText(invoiceData.info.project, {
y: getCoordinatesForPDFLib(126,90, page1).y,
- x: getCoordinatesForPDFLib(126,90,page1).x + 340 - font.widthOfTextAtSize(invoiceData.info.project,10),
+ x: getCoordinatesForPDFLib(126,90,page1).x + 50 /!*+ 210 - font.widthOfTextAtSize(invoiceData.info.project,10)*!/,
size:10,
color:rgb(0,0,0),
lineHeight:10,
opacity: 1,
- maxWidth: 100
- })
+ maxWidth: 150
+ })*/
/*page1.drawLine({
start: getCoordinatesForPDFLib(125,90,page1),
@@ -366,12 +366,12 @@ export const useCreatePdf = async (invoiceData) => {
})*/
pages[pageCounter - 1].drawText(invoiceData.title, {
- ...getCoordinatesForPDFLib(20,102, page1),
- size:15,
+ ...getCoordinatesForPDFLib(20,100, page1),
+ size:13,
color:rgb(0,0,0),
lineHeight:15,
opacity: 1,
- maxWidth: 240
+ maxWidth: 500
})
/*page1.drawLine({
@@ -384,11 +384,11 @@ export const useCreatePdf = async (invoiceData) => {
pages[pageCounter - 1].drawText(invoiceData.description, {
...getCoordinatesForPDFLib(20,112, page1),
- size:15,
+ size:13,
color:rgb(0,0,0),
lineHeight:15,
opacity: 1,
- maxWidth: 240
+ maxWidth: 500
})
pages[pageCounter - 1].drawText(invoiceData.startText,{
@@ -674,7 +674,8 @@ export const useCreatePdf = async (invoiceData) => {
//Footer
- rowHeight += 25
+ console.log(rowHeight)
+ //rowHeight += 25
pages[pageCounter - 1].drawRectangle({
...getCoordinatesForPDFLib(20,rowHeight, page1),
width: 180 * 2.83,
diff --git a/spaces/pages/contacts/[mode]/[[id]].vue b/spaces/pages/contacts/[mode]/[[id]].vue
index c1b7e5d..ef91e9e 100644
--- a/spaces/pages/contacts/[mode]/[[id]].vue
+++ b/spaces/pages/contacts/[mode]/[[id]].vue
@@ -160,7 +160,7 @@ setupPage()
v-model="itemInfo.customer"
option-attribute="name"
value-attribute="id"
- :options="customers"
+ :options="dataStore.customers"
searchable
:search-attributes="['name']"
>
@@ -176,7 +176,7 @@ setupPage()
v-model="itemInfo.vendor"
option-attribute="name"
value-attribute="id"
- :options="vendors"
+ :options="dataStore.vendors"
searchable
:search-attributes="['name']"
>
@@ -227,13 +227,13 @@ setupPage()
Speichern
Erstellen
diff --git a/spaces/pages/contracts/[mode]/[[id]].vue b/spaces/pages/contracts/[mode]/[[id]].vue
index ac19807..790a590 100644
--- a/spaces/pages/contracts/[mode]/[[id]].vue
+++ b/spaces/pages/contracts/[mode]/[[id]].vue
@@ -80,6 +80,17 @@ setupPage()
Beschreibung:
{{currentContract.description}}
+
+
+
+
+
+
{{currentContract}}
@@ -92,14 +103,6 @@ setupPage()
>
Bearbeiten
-
- Archivieren
-
-
diff --git a/spaces/pages/createDocument/edit/[[id]].vue b/spaces/pages/createDocument/edit/[[id]].vue
index fa35b5c..4761b1f 100644
--- a/spaces/pages/createDocument/edit/[[id]].vue
+++ b/spaces/pages/createDocument/edit/[[id]].vue
@@ -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)
}
diff --git a/spaces/pages/createDocument/show/[id].vue b/spaces/pages/createDocument/show/[id].vue
index 402173d..5fab408 100644
--- a/spaces/pages/createDocument/show/[id].vue
+++ b/spaces/pages/createDocument/show/[id].vue
@@ -2,6 +2,7 @@
const dataStore = useDataStore()
const route = useRoute()
+const router = useRouter()
const itemInfo = ref({})
@@ -16,8 +17,21 @@ setupPage()
+
+
+ Bearbeiten
+
+
+
{{itemInfo}}
+
+
+