mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge branch 'master' into 3186-feature-x-sendcoins-22-add-graphql-endpoints-for-revert-pending-tx
This commit is contained in:
commit
a590d5fbac
@ -2,7 +2,7 @@
|
||||
/* eslint-disable new-cap */
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
|
||||
import { getConnection, In } from '@dbTools/typeorm'
|
||||
import { getConnection, In, IsNull } from '@dbTools/typeorm'
|
||||
import { Transaction as dbTransaction } from '@entity/Transaction'
|
||||
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
|
||||
import { User as dbUser } from '@entity/User'
|
||||
@ -264,7 +264,28 @@ export class TransactionResolver {
|
||||
logger.debug(`transactions=${transactions}`)
|
||||
|
||||
// virtual transaction for pending transaction-links sum
|
||||
if (sumHoldAvailableAmount.greaterThan(0)) {
|
||||
if (sumHoldAvailableAmount.isZero()) {
|
||||
const linkCount = await dbTransactionLink.count({
|
||||
where: {
|
||||
userId: user.id,
|
||||
redeemedAt: IsNull(),
|
||||
},
|
||||
})
|
||||
if (linkCount > 0) {
|
||||
transactions.push(
|
||||
virtualLinkTransaction(
|
||||
lastTransaction.balance,
|
||||
new Decimal(0),
|
||||
new Decimal(0),
|
||||
new Decimal(0),
|
||||
now,
|
||||
now,
|
||||
self,
|
||||
(userTransactions.length && userTransactions[0].balance) || new Decimal(0),
|
||||
),
|
||||
)
|
||||
}
|
||||
} else if (sumHoldAvailableAmount.greaterThan(0)) {
|
||||
logger.debug(`sumHoldAvailableAmount > 0: transactions=${transactions}`)
|
||||
transactions.push(
|
||||
virtualLinkTransaction(
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<div class="mt-3 font-weight-bold">{{ $t('contributionText') }}</div>
|
||||
<div class="mb-3 text-break word-break">{{ memo }}</div>
|
||||
<div
|
||||
v-if="status === 'IN_PROGRESS'"
|
||||
v-if="status === 'IN_PROGRESS' && !allContribution"
|
||||
class="text-205 pointer hover-font-bold"
|
||||
@click="visible = !visible"
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user