Fixed Texttemplates and Title Import from Copy
This commit is contained in:
@@ -8,13 +8,17 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
||||
const emit = defineEmits(["updateNeeded","returnData"])
|
||||
|
||||
const documentTypeToUse = ref("invoices")
|
||||
const documentTypeToUse = ref(props.type)
|
||||
const optionsToImport = ref({
|
||||
taxType: true,
|
||||
customer: true,
|
||||
@@ -29,11 +33,10 @@ const optionsToImport = ref({
|
||||
contactPerson: true,
|
||||
plant: true,
|
||||
project:true,
|
||||
title: true,
|
||||
description: true,
|
||||
startText: true,
|
||||
startText: false,
|
||||
rows: true,
|
||||
endText: true,
|
||||
endText: false,
|
||||
})
|
||||
|
||||
const mappings = ref({
|
||||
@@ -50,7 +53,6 @@ const mappings = ref({
|
||||
contactPerson: "Ansprechpartner Mitarbeiter",
|
||||
plant: "Objekt",
|
||||
project: "Projekt",
|
||||
title: "Titel",
|
||||
description: "Beschreibung",
|
||||
startText: "Einleitung",
|
||||
rows: "Positionen",
|
||||
@@ -84,9 +86,10 @@ const startImport = () => {
|
||||
</USelectMenu>
|
||||
</UFormGroup>
|
||||
<UCheckbox
|
||||
v-for="key in Object.keys(optionsToImport)"
|
||||
v-for="key in Object.keys(optionsToImport).filter(i => documentTypeToUse !== props.type ? !['startText','endText'].includes(i) : true)"
|
||||
v-model="optionsToImport[key]"
|
||||
:label="mappings[key]"/>
|
||||
:label="mappings[key]"
|
||||
/>
|
||||
|
||||
|
||||
<template #footer>
|
||||
|
||||
Reference in New Issue
Block a user