From b0a9da74c4fa8d3bb349fa4593323bb537a2a10e Mon Sep 17 00:00:00 2001
From: clauspeterhuebner
Date: Thu, 24 Apr 2025 23:06:14 +0200
Subject: [PATCH] use shallow copy to set recepientUser after
login/registration
---
frontend/src/pages/TransactionLink.vue | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/frontend/src/pages/TransactionLink.vue b/frontend/src/pages/TransactionLink.vue
index 3cb1b2edb..7291b5fdc 100644
--- a/frontend/src/pages/TransactionLink.vue
+++ b/frontend/src/pages/TransactionLink.vue
@@ -234,19 +234,21 @@ function setDisbursementLinkInformation() {
)
if (queryTransactionLink) {
// recipientUser is only set if the user is logged in
+ // Make a shallow copy to break reactivity/read-only
+ const linkCopy = { ...queryTransactionLink }
+ // Now you can safely set recipientUser
if (store.state.gradidoID !== null) {
- console.log('TransactionLink.setDisbursementLinkInformation... setting recipientUser')
- queryTransactionLink.recipientUser = {
+ linkCopy.recipientUser = {
gradidoID: store.state.gradidoID,
firstName: store.state.firstName,
alias: store.state.alias,
}
- console.log(
- 'TransactionLink.setDisbursementLinkInformation... recipientUser=',
- queryTransactionLink.recipientUser,
- )
}
- linkData.value = queryTransactionLink
+ console.log(
+ 'TransactionLink.setDisbursementLinkInformation... recipientUser=',
+ queryTransactionLink.recipientUser,
+ )
+ linkData.value = linkCopy
console.log('TransactionLink.setDisbursementLinkInformation... linkData.value=', linkData.value)
}
}