mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
linting
This commit is contained in:
parent
ef6a39f5f5
commit
c62532c89a
@ -44,6 +44,7 @@ import { LogError } from '@/server/LogError'
|
||||
import { backendLogger as logger } from '@/server/logger'
|
||||
import { calculateDecay } from '@/util/decay'
|
||||
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
|
||||
import { fullName } from '@/util/utilities'
|
||||
|
||||
import { MEMO_MAX_CHARS, MEMO_MIN_CHARS } from './const/const'
|
||||
import {
|
||||
@ -55,7 +56,6 @@ import {
|
||||
} from './util/creations'
|
||||
import { findContributions } from './util/findContributions'
|
||||
import { getLastTransaction } from './util/getLastTransaction'
|
||||
import { fullName } from '@/util/utilities'
|
||||
|
||||
@Resolver()
|
||||
export class ContributionResolver {
|
||||
|
||||
@ -34,13 +34,13 @@ import { LogError } from '@/server/LogError'
|
||||
import { backendLogger as logger } from '@/server/logger'
|
||||
import { calculateDecay } from '@/util/decay'
|
||||
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
|
||||
import { fullName } from '@/util/utilities'
|
||||
import { calculateBalance } from '@/util/validate'
|
||||
|
||||
import { executeTransaction } from './TransactionResolver'
|
||||
import { getUserCreation, validateContribution } from './util/creations'
|
||||
import { getLastTransaction } from './util/getLastTransaction'
|
||||
import { transactionLinkList } from './util/transactionLinkList'
|
||||
import { fullName } from '@/util/utilities'
|
||||
|
||||
// TODO: do not export, test it inside the resolver
|
||||
export const transactionLinkCode = (date: Date): string => {
|
||||
|
||||
@ -29,6 +29,7 @@ import { LogError } from '@/server/LogError'
|
||||
import { backendLogger as logger } from '@/server/logger'
|
||||
import { communityUser } from '@/util/communityUser'
|
||||
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
|
||||
import { fullName } from '@/util/utilities'
|
||||
import { calculateBalance } from '@/util/validate'
|
||||
import { virtualLinkTransaction, virtualDecayTransaction } from '@/util/virtualTransactions'
|
||||
|
||||
@ -37,7 +38,6 @@ import { MEMO_MAX_CHARS, MEMO_MIN_CHARS } from './const/const'
|
||||
import { findUserByIdentifier } from './util/findUserByIdentifier'
|
||||
import { getLastTransaction } from './util/getLastTransaction'
|
||||
import { getTransactionList } from './util/getTransactionList'
|
||||
import { fullName } from '@/util/utilities'
|
||||
|
||||
export const executeTransaction = async (
|
||||
amount: Decimal,
|
||||
|
||||
@ -16,12 +16,12 @@ export const decimalSeparatorByLanguage = (a: Decimal, language: string): string
|
||||
}
|
||||
|
||||
export const fullName = (firstName: string, lastName: string): string => {
|
||||
return [firstName, lastName].filter(Boolean).join(' ')
|
||||
return [firstName, lastName].filter(Boolean).join(' ')
|
||||
}
|
||||
|
||||
export const userName = (f?: string, l?: string): string | null => {
|
||||
let name: string | null
|
||||
if(f && l) {
|
||||
if (f && l) {
|
||||
name = f + ' ' + l
|
||||
} else if (f && !l) {
|
||||
name = f
|
||||
@ -30,6 +30,6 @@ export const userName = (f?: string, l?: string): string | null => {
|
||||
} else {
|
||||
name = null
|
||||
}
|
||||
|
||||
|
||||
return name
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,4 +144,8 @@ export class Transaction extends BaseEntity {
|
||||
@OneToOne(() => Contribution, (contribution) => contribution.transaction)
|
||||
@JoinColumn({ name: 'id', referencedColumnName: 'transactionId' })
|
||||
contribution?: Contribution | null
|
||||
|
||||
@OneToOne(() => Transaction)
|
||||
@JoinColumn({ name: 'previous' })
|
||||
previousTransaction?: Transaction | null
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user