diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index bce8d07..3ade854 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -1087,7 +1087,7 @@ const closeDocument = async () => { } -const getTextTemplateByType = (type) => { +const getTextTemplateByType = (type, pos) => { let finalType = type @@ -1095,7 +1095,13 @@ const getTextTemplateByType = (type) => { finalType = "invoices" } - return texttemplates.value.filter(i => i.documentType === finalType) + if(pos) { + return texttemplates.value.filter(i => i.documentType === finalType && i.pos === pos) + } else { + return texttemplates.value.filter(i => i.documentType === finalType) + } + + } const setRowData = (row) => { @@ -1718,7 +1724,7 @@ const setRowData = (row) => { label="Vorlage auswählen" > { label="Vorlage auswählen" >