fix some thinsg preventing contribution link to work, add debugging for frontend

This commit is contained in:
einhornimmond 2025-05-23 18:37:09 +02:00
parent 753b5b9d58
commit 289c9bc612
5 changed files with 30 additions and 8 deletions

15
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/frontend",
}
]
}

View File

@ -10,7 +10,7 @@
{{ '"' + linkData.senderCommunity.name + '.' + linkData.senderUser.firstName + '"' }}
{{ $t('transaction-link.send_you') }} {{ $filters.GDD(linkData.amount) }}
</h3>
<h3 v-if="!isRedeemJwtLink && linkData.amount !== ''">
<h3 v-if="!isRedeemJwtLink && !isContributionLink && linkData.amount !== ''">
{{ '"' + linkData.senderUser.firstName + '"' }}
{{ $t('transaction-link.send_you') }} {{ $filters.GDD(linkData.amount) }}
</h3>

View File

@ -25,7 +25,6 @@
<script setup>
import { useAuthLinks } from '@/composables/useAuthLinks'
const { login, register } = useAuthLinks()
defineProps({
linkData: { type: Object, required: true },

View File

@ -277,6 +277,10 @@ onResult(() => {
// console.log('TransactionLink.onResult... TransactionLink')
isTransactionLinkLoaded.value = true
setTransactionLinkInformation()
} else if (result.value?.queryTransactionLink?.__typename === 'ContributionLink') {
// console.log('TransactionLink.onResult... ContributionLink')
isTransactionLinkLoaded.value = true
setContributionLinkInformation()
} else if (result.value?.queryTransactionLink?.__typename === 'RedeemJwtLink') {
// console.log('TransactionLink.onResult... RedeemJwtLink')
isTransactionLinkLoaded.value = true
@ -317,11 +321,15 @@ function setTransactionLinkInformation() {
}
linkData.value = deepCopy.queryTransactionLink
// console.log('TransactionLink.setTransactionLinkInformation... linkData.value=', linkData.value)
if (linkData.value.__typename === 'ContributionLink' && store.state.token) {
// console.log('TransactionLink.setTransactionLinkInformation... typename === ContributionLink')
// explicit no await
mutationLink(linkData.value.amount)
}
}
}
function setContributionLinkInformation() {
linkData.value = result.value.queryTransactionLink
if (linkData.value.__typename === 'ContributionLink' && store.state.token) {
// console.log('TransactionLink.setTransactionLinkInformation... typename === ContributionLink')
// explicit no await
mutationLink(linkData.value.amount)
}
}

View File

@ -156,7 +156,7 @@ export default defineConfig(async ({ command }) => {
chunkSizeWarningLimit: 1600,
minify: 'esbuild',
cssMinify: 'lightningcss',
sourcemap: false,
sourcemap: CONFIG.DEBUG,
},
}
})