mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge master into this branch.
This commit is contained in:
commit
18ff51aacf
@ -49,10 +49,10 @@ import CONFIG from '@/config'
|
|||||||
import {
|
import {
|
||||||
getUserCreation,
|
getUserCreation,
|
||||||
getUserCreations,
|
getUserCreations,
|
||||||
isContributionValid,
|
validateContribution,
|
||||||
isStartEndDateValid,
|
isStartEndDateValid,
|
||||||
updateCreations,
|
updateCreations,
|
||||||
} from './util/isContributionValid'
|
} from './util/creations'
|
||||||
import {
|
import {
|
||||||
CONTRIBUTIONLINK_MEMO_MAX_CHARS,
|
CONTRIBUTIONLINK_MEMO_MAX_CHARS,
|
||||||
CONTRIBUTIONLINK_MEMO_MIN_CHARS,
|
CONTRIBUTIONLINK_MEMO_MIN_CHARS,
|
||||||
@ -252,7 +252,7 @@ export class AdminResolver {
|
|||||||
const creations = await getUserCreation(user.id)
|
const creations = await getUserCreation(user.id)
|
||||||
logger.trace('creations', creations)
|
logger.trace('creations', creations)
|
||||||
const creationDateObj = new Date(creationDate)
|
const creationDateObj = new Date(creationDate)
|
||||||
isContributionValid(creations, amount, creationDateObj)
|
validateContribution(creations, amount, creationDateObj)
|
||||||
const contribution = Contribution.create()
|
const contribution = Contribution.create()
|
||||||
contribution.userId = user.id
|
contribution.userId = user.id
|
||||||
contribution.amount = amount
|
contribution.amount = amount
|
||||||
@ -328,7 +328,7 @@ export class AdminResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// all possible cases not to be true are thrown in this function
|
// all possible cases not to be true are thrown in this function
|
||||||
isContributionValid(creations, amount, creationDateObj)
|
validateContribution(creations, amount, creationDateObj)
|
||||||
contributionToUpdate.amount = amount
|
contributionToUpdate.amount = amount
|
||||||
contributionToUpdate.memo = memo
|
contributionToUpdate.memo = memo
|
||||||
contributionToUpdate.contributionDate = new Date(creationDate)
|
contributionToUpdate.contributionDate = new Date(creationDate)
|
||||||
@ -405,7 +405,7 @@ export class AdminResolver {
|
|||||||
if (user.deletedAt) throw new Error('This user was deleted. Cannot confirm a contribution.')
|
if (user.deletedAt) throw new Error('This user was deleted. Cannot confirm a contribution.')
|
||||||
|
|
||||||
const creations = await getUserCreation(contribution.userId, false)
|
const creations = await getUserCreation(contribution.userId, false)
|
||||||
isContributionValid(creations, contribution.amount, contribution.contributionDate)
|
validateContribution(creations, contribution.amount, contribution.contributionDate)
|
||||||
|
|
||||||
const receivedCallDate = new Date()
|
const receivedCallDate = new Date()
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { Order } from '../enum/Order'
|
|||||||
import { Contribution } from '../model/Contribution'
|
import { Contribution } from '../model/Contribution'
|
||||||
import { UnconfirmedContribution } from '../model/UnconfirmedContribution'
|
import { UnconfirmedContribution } from '../model/UnconfirmedContribution'
|
||||||
import { User } from '../model/User'
|
import { User } from '../model/User'
|
||||||
import { isContributionValid, getUserCreation, updateCreations } from './util/isContributionValid'
|
import { validateContribution, getUserCreation, updateCreations } from './util/creations'
|
||||||
|
|
||||||
@Resolver()
|
@Resolver()
|
||||||
export class ContributionResolver {
|
export class ContributionResolver {
|
||||||
@ -24,7 +24,7 @@ export class ContributionResolver {
|
|||||||
const creations = await getUserCreation(user.id)
|
const creations = await getUserCreation(user.id)
|
||||||
logger.trace('creations', creations)
|
logger.trace('creations', creations)
|
||||||
const creationDateObj = new Date(creationDate)
|
const creationDateObj = new Date(creationDate)
|
||||||
isContributionValid(creations, amount, creationDateObj)
|
validateContribution(creations, amount, creationDateObj)
|
||||||
|
|
||||||
const contribution = dbContribution.create()
|
const contribution = dbContribution.create()
|
||||||
contribution.userId = user.id
|
contribution.userId = user.id
|
||||||
@ -103,7 +103,7 @@ export class ContributionResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// all possible cases not to be true are thrown in this function
|
// all possible cases not to be true are thrown in this function
|
||||||
isContributionValid(creations, amount, creationDateObj)
|
validateContribution(creations, amount, creationDateObj)
|
||||||
contributionToUpdate.amount = amount
|
contributionToUpdate.amount = amount
|
||||||
contributionToUpdate.memo = memo
|
contributionToUpdate.memo = memo
|
||||||
contributionToUpdate.contributionDate = new Date(creationDate)
|
contributionToUpdate.contributionDate = new Date(creationDate)
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import { executeTransaction } from './TransactionResolver'
|
|||||||
import { Order } from '@enum/Order'
|
import { Order } from '@enum/Order'
|
||||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||||
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||||
import { getUserCreation, isContributionValid } from './util/isContributionValid'
|
import { getUserCreation, validateContribution } from './util/creations'
|
||||||
import { Decay } from '@model/Decay'
|
import { Decay } from '@model/Decay'
|
||||||
import Decimal from 'decimal.js-light'
|
import Decimal from 'decimal.js-light'
|
||||||
import { TransactionTypeId } from '@enum/TransactionTypeId'
|
import { TransactionTypeId } from '@enum/TransactionTypeId'
|
||||||
@ -223,7 +223,7 @@ export class TransactionLinkResolver {
|
|||||||
|
|
||||||
const creations = await getUserCreation(user.id, false)
|
const creations = await getUserCreation(user.id, false)
|
||||||
logger.info('open creations', creations)
|
logger.info('open creations', creations)
|
||||||
isContributionValid(creations, contributionLink.amount, now)
|
validateContribution(creations, contributionLink.amount, now)
|
||||||
const contribution = new DbContribution()
|
const contribution = new DbContribution()
|
||||||
contribution.userId = user.id
|
contribution.userId = user.id
|
||||||
contribution.createdAt = now
|
contribution.createdAt = now
|
||||||
|
|||||||
@ -10,7 +10,7 @@ interface CreationMap {
|
|||||||
creations: Decimal[]
|
creations: Decimal[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isContributionValid = (
|
export const validateContribution = (
|
||||||
creations: Decimal[],
|
creations: Decimal[],
|
||||||
amount: Decimal,
|
amount: Decimal,
|
||||||
creationDate: Date,
|
creationDate: Date,
|
||||||
@ -46,7 +46,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.authNavbar > .nav-link {
|
.authNavbar > .nav-link {
|
||||||
color: #383838 !important;
|
color: #0e79bc !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-toggler {
|
.navbar-toggler {
|
||||||
@ -54,7 +54,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.authNavbar > .router-link-exact-active {
|
.authNavbar > .router-link-exact-active {
|
||||||
color: #0e79bc !important;
|
color: #383838 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.navbar-toggler > span.navbar-toggler-icon {
|
button.navbar-toggler > span.navbar-toggler-icon {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
@click.prevent="saveLocale(lang.code)"
|
@click.prevent="saveLocale(lang.code)"
|
||||||
:key="lang.code"
|
:key="lang.code"
|
||||||
class="pointer pr-2"
|
class="pointer pr-2"
|
||||||
:class="$store.state.language === lang.code ? 'c-blau' : 'c-grey'"
|
:class="$store.state.language === lang.code ? 'c-grey' : 'c-blau'"
|
||||||
>
|
>
|
||||||
<span class="locales">{{ lang.name }}</span>
|
<span class="locales">{{ lang.name }}</span>
|
||||||
<span class="ml-3">{{ locales.length - 1 > index ? $t('math.pipe') : '' }}</span>
|
<span class="ml-3">{{ locales.length - 1 > index ? $t('math.pipe') : '' }}</span>
|
||||||
|
|||||||
@ -30,8 +30,8 @@
|
|||||||
</b-row>
|
</b-row>
|
||||||
<b-row class="mt-0 mt-md-5 pl-2 pl-md-0 pl-lg-0">
|
<b-row class="mt-0 mt-md-5 pl-2 pl-md-0 pl-lg-0">
|
||||||
<b-col lg="9" md="9" sm="12">
|
<b-col lg="9" md="9" sm="12">
|
||||||
<div class="h1 mb--2">{{ $t('welcome') }}</div>
|
<div class="mb--2">{{ $t('welcome') }}</div>
|
||||||
<div class="h1 mb-0">{{ $t('WelcomeBy', { name: communityName }) }}</div>
|
<div class="h1 mb-0">{{ communityName }}</div>
|
||||||
<div class="mb-0">{{ $t('1000thanks') }}</div>
|
<div class="mb-0">{{ $t('1000thanks') }}</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="3" class="text-right d-none d-sm-none d-md-inline">
|
<b-col cols="3" class="text-right d-none d-sm-none d-md-inline">
|
||||||
|
|||||||
@ -284,6 +284,5 @@
|
|||||||
"send_you": "sendet dir"
|
"send_you": "sendet dir"
|
||||||
},
|
},
|
||||||
"via_link": "über einen Link",
|
"via_link": "über einen Link",
|
||||||
"welcome": "Willkommen",
|
"welcome": "Willkommen in der Gemeinschaft"
|
||||||
"WelcomeBy": "bei {name}"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -284,6 +284,5 @@
|
|||||||
"send_you": "wants to send you"
|
"send_you": "wants to send you"
|
||||||
},
|
},
|
||||||
"via_link": "via Link",
|
"via_link": "via Link",
|
||||||
"welcome": "Welcome",
|
"welcome": "Welcome to the community"
|
||||||
"WelcomeBy": "by {name}"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user