Added E-Mail Sending
This commit is contained in:
@@ -9,16 +9,19 @@ defineShortcuts({
|
||||
},
|
||||
})
|
||||
|
||||
const supabase = useSupabaseClient()
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const itemInfo = ref({})
|
||||
const linkedDocument =ref({})
|
||||
|
||||
const setupPage = () => {
|
||||
const setupPage = async () => {
|
||||
if(route.params) {
|
||||
if(route.params.id) itemInfo.value = dataStore.getCreatedDocumentById(Number(route.params.id))
|
||||
if(route.params.id) itemInfo.value = await useSupabaseSelectSingle("createddocuments",route.params.id,"*")
|
||||
linkedDocument.value = (await supabase.from("documents").select("id").eq("createdDocument", route.params.id).single()).data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +50,17 @@ setupPage()
|
||||
>
|
||||
Übernehmen
|
||||
</UButton>
|
||||
<UButton
|
||||
@click="router.push(`/email/new?loadDocuments=[${linkedDocument.id}]`)"
|
||||
icon="i-heroicons-envelope"
|
||||
>
|
||||
E-Mail
|
||||
</UButton>
|
||||
</template>
|
||||
</UDashboardToolbar>
|
||||
|
||||
{{linkedDocument}}
|
||||
|
||||
<object
|
||||
:data="dataStore.documents.find(i => i.createdDocument === itemInfo.id) ? dataStore.documents.find(i => i.createdDocument === itemInfo.id).url : ''"
|
||||
class="h-full"
|
||||
|
||||
Reference in New Issue
Block a user