diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index 96d333d..c0048bf 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -46,17 +46,7 @@ const itemInfo = ref({ contactEMail: null, }) -const tabItems = computed(() => { - return [ - { - label: "Editor" - }, - { - label: "Vorschau", - disabled: !itemInfo.value.customer || !itemInfo.value.letterhead - } - ] -}) + const letterheads = ref([]) @@ -284,6 +274,18 @@ const findDocumentErrors = computed(() => { return errors }) +const tabItems = computed(() => { + return [ + { + label: "Editor" + }, + { + label: "Vorschau", + disabled: findDocumentErrors.value.filter(i => i.type === 'breaking').length > 0 + } + ] +}) + const documentTotal = computed(() => { let totalNet = 0 let total19 = 0