changes after renamings

This commit is contained in:
clauspeterhuebner 2025-04-25 20:00:27 +02:00
parent e386a79e48
commit 80ebf93a4f
3 changed files with 24 additions and 24 deletions

View File

@ -400,7 +400,7 @@ export class TransactionLinkResolver {
@Arg('gradidoId') gradidoId: string, @Arg('gradidoId') gradidoId: string,
@Arg('senderCommunityUuid') senderCommunityUuid: string, @Arg('senderCommunityUuid') senderCommunityUuid: string,
@Arg('senderCommunityName') senderCommunityName: string, @Arg('senderCommunityName') senderCommunityName: string,
@Arg('receiverCommunityUuid') receiverCommunityUuid: string, @Arg('recipientCommunityUuid') recipientCommunityUuid: string,
@Arg('code') code: string, @Arg('code') code: string,
@Arg('amount') amount: string, @Arg('amount') amount: string,
@Arg('memo') memo: string, @Arg('memo') memo: string,
@ -412,7 +412,7 @@ export class TransactionLinkResolver {
gradidoId, gradidoId,
senderCommunityUuid, senderCommunityUuid,
senderCommunityName, senderCommunityName,
receiverCommunityUuid, recipientCommunityUuid,
code, code,
amount, amount,
memo, memo,

View File

@ -21,12 +21,12 @@
<BCol v-if="!isDisbursementLink" class="fw-bold"> <BCol v-if="!isDisbursementLink" class="fw-bold">
<community-switch <community-switch
:disabled="isDisbursementLink" :disabled="isDisbursementLink"
:model-value="currentReceiverCommunity" :model-value="currentRecipientCommunity"
@update:model-value="setReceiverCommunity" @update:model-value="setRecipientCommunity"
/> />
</BCol> </BCol>
<BCol v-else> <BCol v-else>
{{ currentReceiverCommunity.name }} {{ currentRecipientCommunity.name }}
</BCol> </BCol>
<BCol v-if="isForeignCommunitySelected" sm="12" md="6" class="mt-4 mt-lg-0"> <BCol v-if="isForeignCommunitySelected" sm="12" md="6" class="mt-4 mt-lg-0">
<p>{{ $t('gdd_per_link.switchCommunity') }}</p> <p>{{ $t('gdd_per_link.switchCommunity') }}</p>
@ -57,16 +57,16 @@ const props = defineProps({
redeemCode: { type: String, required: true }, redeemCode: { type: String, required: true },
isContributionLink: { type: Boolean, default: false }, isContributionLink: { type: Boolean, default: false },
isDisbursementLink: { type: Boolean, default: false }, isDisbursementLink: { type: Boolean, default: false },
receiverCommunity: { recipientCommunity: {
type: Object, type: Object,
required: false, required: false,
}, },
}) })
const senderCommunity = computed(() => extractHomeCommunityFromLinkData(props.linkData)) const senderCommunity = computed(() => extractHomeCommunityFromLinkData(props.linkData))
const currentReceiverCommunity = computed( const currentRecipientCommunity = computed(
() => () =>
props.receiverCommunity || { props.recipientCommunity || {
uuid: senderCommunity.value.uuid, uuid: senderCommunity.value.uuid,
name: senderCommunity.value.name, name: senderCommunity.value.name,
url: senderCommunity.value.url, url: senderCommunity.value.url,
@ -74,19 +74,19 @@ const currentReceiverCommunity = computed(
}, },
) )
const emit = defineEmits(['update:receiverCommunity']) const emit = defineEmits(['update:recipientCommunity'])
const isForeignCommunitySelected = computed(() => { const isForeignCommunitySelected = computed(() => {
console.log( console.log(
'RedeemCommunitySelection.isForeignCommunitySelected...receiverCommunity=', 'RedeemCommunitySelection.isForeignCommunitySelected...recipientCommunity=',
currentReceiverCommunity.value, currentRecipientCommunity.value,
) )
return currentReceiverCommunity.value.foreign return currentRecipientCommunity.value.foreign
}) })
function setReceiverCommunity(community) { function setRecipientCommunity(community) {
console.log('RedeemCommunitySelection.setReceiverCommunity...community=', community) console.log('RedeemCommunitySelection.setRecipientCommunity...community=', community)
emit('update:receiverCommunity', { emit('update:recipientCommunity', {
uuid: community.uuid, uuid: community.uuid,
name: community.name, name: community.name,
url: community.url, url: community.url,
@ -129,10 +129,10 @@ async function onSwitch(event) {
console.log('RedeemCommunitySelection.onSwitch... props=', props) console.log('RedeemCommunitySelection.onSwitch... props=', props)
if (isForeignCommunitySelected.value) { if (isForeignCommunitySelected.value) {
console.log('RedeemCommunitySelection.onSwitch vor createRedeemJwt params:', { console.log('RedeemCommunitySelection.onSwitch vor createRedeemJwt params:', {
gradidoID: props.linkData.senderUser?.gradidoID, gradidoId: props.linkData.senderUser?.gradidoID,
senderCommunityUuid: senderCommunity.value.uuid, senderCommunityUuid: senderCommunity.value.uuid,
senderCommunityName: senderCommunity.value.name, senderCommunityName: senderCommunity.value.name,
receiverCommunityUuid: currentReceiverCommunity.value.uuid, recipientCommunityUuid: currentRecipientCommunity.value.uuid,
code: props.redeemCode, code: props.redeemCode,
amount: props.linkData.amount, amount: props.linkData.amount,
memo: props.linkData.memo, memo: props.linkData.memo,
@ -142,10 +142,10 @@ async function onSwitch(event) {
}) })
try { try {
const { data } = await createRedeemJwt({ const { data } = await createRedeemJwt({
gradidoID: props.linkData.senderUser?.gradidoID, gradidoId: props.linkData.senderUser?.gradidoID,
senderCommunityUuid: senderCommunity.value.uuid, senderCommunityUuid: senderCommunity.value.uuid,
senderCommunityName: senderCommunity.value.name, senderCommunityName: senderCommunity.value.name,
receiverCommunityUuid: currentReceiverCommunity.value.uuid, recipientCommunityUuid: currentRecipientCommunity.value.uuid,
code: props.redeemCode, code: props.redeemCode,
amount: props.linkData.amount, amount: props.linkData.amount,
memo: props.linkData.memo, memo: props.linkData.memo,
@ -157,7 +157,7 @@ async function onSwitch(event) {
if (!data?.createRedeemJwt) { if (!data?.createRedeemJwt) {
throw new Error('Failed to get redeem token') throw new Error('Failed to get redeem token')
} }
const targetUrl = currentReceiverCommunity.value.url.replace(/\/api\/?$/, '') const targetUrl = currentRecipientCommunity.value.url.replace(/\/api\/?$/, '')
window.location.href = targetUrl + '/redeem/' + data.createRedeemJwt window.location.href = targetUrl + '/redeem/' + data.createRedeemJwt
} catch (error) { } catch (error) {
console.error('RedeemCommunitySelection.onSwitch error:', error) console.error('RedeemCommunitySelection.onSwitch error:', error)

View File

@ -201,10 +201,10 @@ export const logout = gql`
export const createRedeemJwtMutation = gql` export const createRedeemJwtMutation = gql`
mutation ( mutation (
$gradidoID: String! $gradidoId: String!
$senderCommunityUuid: String! $senderCommunityUuid: String!
$senderCommunityName: String! $senderCommunityName: String!
$receiverCommunityUuid: String! $recipientCommunityUuid: String!
$code: String! $code: String!
$amount: String! $amount: String!
$memo: String! $memo: String!
@ -213,10 +213,10 @@ export const createRedeemJwtMutation = gql`
$validUntil: String $validUntil: String
) { ) {
createRedeemJwt( createRedeemJwt(
gradidoID: $gradidoID gradidoId: $gradidoId
senderCommunityUuid: $senderCommunityUuid senderCommunityUuid: $senderCommunityUuid
senderCommunityName: $senderCommunityName senderCommunityName: $senderCommunityName
receiverCommunityUuid: $receiverCommunityUuid recipientCommunityUuid: $recipientCommunityUuid
code: $code code: $code
amount: $amount amount: $amount
memo: $memo memo: $memo