Changes
This commit is contained in:
@@ -40,17 +40,19 @@ const setupPage = async () => {
|
|||||||
|
|
||||||
|
|
||||||
if(route.query.loadDocuments) {
|
if(route.query.loadDocuments) {
|
||||||
//console.log(JSON.parse(route.query.loadDocuments))
|
console.log(JSON.parse(route.query.loadDocuments))
|
||||||
const {data,error} = useFiles().selectSomeDocuments(JSON.parse(route.query.loadDocuments))
|
const data = await useFiles().selectSomeDocuments(JSON.parse(route.query.loadDocuments))
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(error) console.log(error)
|
|
||||||
if(data) loadedDocuments.value = data
|
if(data) loadedDocuments.value = data
|
||||||
|
|
||||||
//console.log(loadedDocuments.value)
|
//console.log(loadedDocuments.value)
|
||||||
|
|
||||||
if(loadedDocuments.value.length > 0) {
|
if(loadedDocuments.value.length > 0) {
|
||||||
emailData.value.subject = loadedDocuments.value[0].createdDocument.title
|
emailData.value.subject = loadedDocuments.value[0].createddocument.title
|
||||||
emailData.value.to = loadedDocuments.value[0].createdDocument.contact ? loadedDocuments.value[0].createdDocument.contact.email : ""
|
emailData.value.to = loadedDocuments.value[0].createddocument.contact ? loadedDocuments.value[0].createddocument.contact.email : ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,7 +245,7 @@ const sendEmail = async () => {
|
|||||||
class="list-disc"
|
class="list-disc"
|
||||||
v-for="doc in loadedDocuments"
|
v-for="doc in loadedDocuments"
|
||||||
>
|
>
|
||||||
<span v-if="doc.createdDocument">Dokument - {{doc.createdDocument.documentNumber}}</span>
|
<span v-if="doc.createddocument">Dokument - {{doc.createddocument.documentNumber}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user