mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into 503-Transaction-List-Pagination-Pages-clickable
This commit is contained in:
commit
2efae42638
75
CHANGELOG.md
75
CHANGELOG.md
@ -4,8 +4,83 @@ All notable changes to this project will be documented in this file. Dates are d
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
#### [1.7.0](https://github.com/gradido/gradido/compare/1.6.6...1.7.0)
|
||||
|
||||
- folder for new style images [`#1694`](https://github.com/gradido/gradido/pull/1694)
|
||||
- fix: No Email Exposed on Forgot Password [`#1696`](https://github.com/gradido/gradido/pull/1696)
|
||||
- fix: No Decay Calculation in Frontend [`#1692`](https://github.com/gradido/gradido/pull/1692)
|
||||
- fix: Wrong Balance on Decay Transaction [`#1691`](https://github.com/gradido/gradido/pull/1691)
|
||||
- fix: No Plus Before Zero Decay [`#1689`](https://github.com/gradido/gradido/pull/1689)
|
||||
- fix: Update Deployment env.dist [`#1688`](https://github.com/gradido/gradido/pull/1688)
|
||||
- 1684 when generating a link form does not reset [`#1687`](https://github.com/gradido/gradido/pull/1687)
|
||||
- Refactor: Multicreation - do not show unactivated emails [`#1679`](https://github.com/gradido/gradido/pull/1679)
|
||||
- feat: Show Link Duration in Emails [`#1663`](https://github.com/gradido/gradido/pull/1663)
|
||||
- refactor: Balance Resolver [`#1665`](https://github.com/gradido/gradido/pull/1665)
|
||||
- refactor: Set Email Optin Valid Time to 24 hours [`#1662`](https://github.com/gradido/gradido/pull/1662)
|
||||
- Fix: Fixes found on Stage1 [`#1683`](https://github.com/gradido/gradido/pull/1683)
|
||||
- 1555 admin see user generated link [`#1656`](https://github.com/gradido/gradido/pull/1656)
|
||||
- 1594 show transaction was created by link [`#1680`](https://github.com/gradido/gradido/pull/1680)
|
||||
- refactor: Memo Text Length to 255 Characters [`#1675`](https://github.com/gradido/gradido/pull/1675)
|
||||
- adminarea: fetchPolicy on searchUser deleted User [`#1678`](https://github.com/gradido/gradido/pull/1678)
|
||||
- 1223 community communication concept [`#1313`](https://github.com/gradido/gradido/pull/1313)
|
||||
- clear form.email if click send per link, tests if clicked [`#1660`](https://github.com/gradido/gradido/pull/1660)
|
||||
- feat: User in Transaction Clickable to Send Directly [`#1658`](https://github.com/gradido/gradido/pull/1658)
|
||||
- feat: Add Sender Email to Transaction Received Mail [`#1664`](https://github.com/gradido/gradido/pull/1664)
|
||||
- Feature: Enforce config versions [`#1627`](https://github.com/gradido/gradido/pull/1627)
|
||||
- 1559 frontend transport redeem link through register [`#1647`](https://github.com/gradido/gradido/pull/1647)
|
||||
- update-balance if link succesfully generated [`#1655`](https://github.com/gradido/gradido/pull/1655)
|
||||
- feat: Add Referrer ID to Users [`#1654`](https://github.com/gradido/gradido/pull/1654)
|
||||
- 1558 - show tranaction link information page [`#1625`](https://github.com/gradido/gradido/pull/1625)
|
||||
- refactor: No Float Ids [`#1624`](https://github.com/gradido/gradido/pull/1624)
|
||||
- Change the text if the account is not activated yet and changed the b… [`#1336`](https://github.com/gradido/gradido/pull/1336)
|
||||
- Refactor: Corrected name of transaction link summary [`#1628`](https://github.com/gradido/gradido/pull/1628)
|
||||
- fix: Query for Only Creations Transaction List [`#1623`](https://github.com/gradido/gradido/pull/1623)
|
||||
- Fix: build for development and production links external modules properly [`#1626`](https://github.com/gradido/gradido/pull/1626)
|
||||
- feat: Seed Transaction Links [`#1622`](https://github.com/gradido/gradido/pull/1622)
|
||||
- 1588 frontend expendable paginated link list [`#1620`](https://github.com/gradido/gradido/pull/1620)
|
||||
- feat: Seed Creation Transactions in Backend [`#1621`](https://github.com/gradido/gradido/pull/1621)
|
||||
- Feature: Eslint i18n validation [`#1618`](https://github.com/gradido/gradido/pull/1618)
|
||||
- refactor: Seed in Backend [`#1619`](https://github.com/gradido/gradido/pull/1619)
|
||||
- 1554 frontend transaction link summary [`#1613`](https://github.com/gradido/gradido/pull/1613)
|
||||
- Frontend generate link for send gdd [`#1579`](https://github.com/gradido/gradido/pull/1579)
|
||||
- feat: Test Logout in User Resolver [`#1617`](https://github.com/gradido/gradido/pull/1617)
|
||||
- Fix: Logrotate & Log Dates & Save Update Log & Correct tag Checkout [`#1612`](https://github.com/gradido/gradido/pull/1612)
|
||||
- refactor: No Reset DB in Backend Unit Tests [`#1616`](https://github.com/gradido/gradido/pull/1616)
|
||||
- Test: Require 53% backend coverage [`#1611`](https://github.com/gradido/gradido/pull/1611)
|
||||
- 1599 components for transactionlist types [`#1600`](https://github.com/gradido/gradido/pull/1600)
|
||||
- feat: Link Transaction to Transaction Link on Redeem [`#1610`](https://github.com/gradido/gradido/pull/1610)
|
||||
- feat: Redeem Transaction Link Mutation [`#1607`](https://github.com/gradido/gradido/pull/1607)
|
||||
- feat: List Transaction Links Query [`#1606`](https://github.com/gradido/gradido/pull/1606)
|
||||
- feat: Virtual Transaction for Transaction Links [`#1603`](https://github.com/gradido/gradido/pull/1603)
|
||||
- refactor: Transaction Link Query [`#1605`](https://github.com/gradido/gradido/pull/1605)
|
||||
- 1216 seo vorschau links [`#1426`](https://github.com/gradido/gradido/pull/1426)
|
||||
- Feature: Eslint style rules & Stylelint for SCSS [`#1598`](https://github.com/gradido/gradido/pull/1598)
|
||||
- refactor: Remove showEmail from Transaction Links [`#1602`](https://github.com/gradido/gradido/pull/1602)
|
||||
- feat: Delete Transaction Link Mutation [`#1597`](https://github.com/gradido/gradido/pull/1597)
|
||||
- Query-transaction-link [`#1586`](https://github.com/gradido/gradido/pull/1586)
|
||||
- feat: Create Transaction Link Mutation [`#1585`](https://github.com/gradido/gradido/pull/1585)
|
||||
- feat: Model Transaction Link [`#1584`](https://github.com/gradido/gradido/pull/1584)
|
||||
- feat: Test Login in User Resolver [`#1538`](https://github.com/gradido/gradido/pull/1538)
|
||||
- add style in App.vue, set class .pointer on transaction-list-item [`#1583`](https://github.com/gradido/gradido/pull/1583)
|
||||
- feat: Use Vue Filter to Display Gradido Amounts [`#1576`](https://github.com/gradido/gradido/pull/1576)
|
||||
- refactor: Resolve Relative Paths in Backend [`#1572`](https://github.com/gradido/gradido/pull/1572)
|
||||
- refactor: Frontend Directory Structure and Routes [`#1571`](https://github.com/gradido/gradido/pull/1571)
|
||||
- community name in creation transaction is displayed cleanly [`#1578`](https://github.com/gradido/gradido/pull/1578)
|
||||
- Planning: send new users gradido [`#1567`](https://github.com/gradido/gradido/pull/1567)
|
||||
- Refactor arithmetic merge [`#1548`](https://github.com/gradido/gradido/pull/1548)
|
||||
- Adminarea creation transactionlist show [`#1550`](https://github.com/gradido/gradido/pull/1550)
|
||||
- Fix: Validate password on UpdateUserInfos [`#1568`](https://github.com/gradido/gradido/pull/1568)
|
||||
- Fix: Allow sending to user without transactions [`#1549`](https://github.com/gradido/gradido/pull/1549)
|
||||
- Fix: Balance type [`#1569`](https://github.com/gradido/gradido/pull/1569)
|
||||
- Refactor: arithmetic and data types [`#1539`](https://github.com/gradido/gradido/pull/1539)
|
||||
- refactor: Bootstrap Vue Toast in Admin interface [`#1547`](https://github.com/gradido/gradido/pull/1547)
|
||||
- Refactor: Combine transaction tables and restructure transaction design [`#1531`](https://github.com/gradido/gradido/pull/1531)
|
||||
|
||||
#### [1.6.6](https://github.com/gradido/gradido/compare/1.6.5...1.6.6)
|
||||
|
||||
> 28 February 2022
|
||||
|
||||
- v1.6.6 [`#1541`](https://github.com/gradido/gradido/pull/1541)
|
||||
- Fix: Upper case email on register breaks account [`#1542`](https://github.com/gradido/gradido/pull/1542)
|
||||
- 1106 first transaction cannot be expanded [`#1432`](https://github.com/gradido/gradido/pull/1432)
|
||||
- added missing bootstrap scss. bootstrap/scss/bootstrap, plus more mis… [`#1540`](https://github.com/gradido/gradido/pull/1540)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"description": "Administraion Interface for Gradido",
|
||||
"main": "index.js",
|
||||
"author": "Moriz Wahl",
|
||||
"version": "1.6.6",
|
||||
"version": "1.7.0",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
|
||||
@ -41,7 +41,7 @@ EMAIL_PASSWORD=xxx
|
||||
EMAIL_SMTP_URL=gmail.com
|
||||
EMAIL_SMTP_PORT=587
|
||||
EMAIL_LINK_VERIFICATION=http://localhost/checkEmail/{optin}{code}
|
||||
EMAIL_LINK_SETPASSWORD=http://localhost/reset/{code}
|
||||
EMAIL_LINK_SETPASSWORD=http://localhost/reset/{optin}
|
||||
EMAIL_LINK_FORGOTPASSWORD=http://localhost/forgot-password
|
||||
EMAIL_CODE_VALID_TIME=1440
|
||||
EMAIL_CODE_REQUEST_TIME=10
|
||||
|
||||
@ -33,7 +33,6 @@ LOGIN_APP_SECRET=21ffbbc616fe
|
||||
LOGIN_SERVER_KEY=a51ef8ac7ef1abf162fb7a65261acd7a
|
||||
|
||||
# EMail
|
||||
RESEND_TIME=10
|
||||
EMAIL=$EMAIL
|
||||
EMAIL_USERNAME=$EMAIL_USERNAME
|
||||
EMAIL_SENDER=$EMAIL_SENDER
|
||||
@ -42,7 +41,8 @@ EMAIL_SMTP_URL=$EMAIL_SMTP_URL
|
||||
EMAIL_SMTP_PORT=587
|
||||
EMAIL_LINK_VERIFICATION=$EMAIL_LINK_VERIFICATION
|
||||
EMAIL_LINK_SETPASSWORD=$EMAIL_LINK_SETPASSWORD
|
||||
RESEND_TIME=10
|
||||
EMAIL_CODE_VALID_TIME=$EMAIL_CODE_VALID_TIME
|
||||
EMAIL_CODE_REQUEST_TIME=$EMAIL_CODE_REQUEST_TIME
|
||||
|
||||
# Webhook
|
||||
WEBHOOK_ELOPAGE_SECRET=$WEBHOOK_ELOPAGE_SECRET
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gradido-backend",
|
||||
"version": "1.6.6",
|
||||
"version": "1.7.0",
|
||||
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
|
||||
"main": "src/index.ts",
|
||||
"repository": "https://github.com/gradido/gradido/backend",
|
||||
|
||||
@ -199,7 +199,12 @@ export class TransactionResolver {
|
||||
// decay & link transactions
|
||||
if (currentPage === 1 && order === Order.DESC) {
|
||||
transactions.push(
|
||||
virtualDecayTransaction(lastTransaction.balance, lastTransaction.balanceDate, now, self),
|
||||
virtualDecayTransaction(
|
||||
lastTransaction.balance.minus(sumHoldAvailableAmount.toString()),
|
||||
lastTransaction.balanceDate,
|
||||
now,
|
||||
self,
|
||||
),
|
||||
)
|
||||
// virtual transaction for pending transaction-links sum
|
||||
if (sumHoldAvailableAmount.greaterThan(0)) {
|
||||
|
||||
@ -391,10 +391,11 @@ export class UserResolver {
|
||||
}
|
||||
|
||||
@Authorized([RIGHTS.SEND_RESET_PASSWORD_EMAIL])
|
||||
@Query(() => Boolean)
|
||||
async sendResetPasswordEmail(@Arg('email') email: string): Promise<boolean> {
|
||||
@Mutation(() => Boolean)
|
||||
async forgotPassword(@Arg('email') email: string): Promise<boolean> {
|
||||
email = email.trim().toLowerCase()
|
||||
const user = await DbUser.findOneOrFail({ email })
|
||||
const user = await DbUser.findOne({ email })
|
||||
if (!user) return true
|
||||
|
||||
// can be both types: REGISTER and RESET_PASSWORD
|
||||
let optInCode = await LoginEmailOptIn.findOne({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gradido-database",
|
||||
"version": "1.6.6",
|
||||
"version": "1.7.0",
|
||||
"description": "Gradido Database Tool to execute database migrations",
|
||||
"main": "src/index.ts",
|
||||
"repository": "https://github.com/gradido/gradido/database",
|
||||
|
||||
@ -25,8 +25,11 @@ EMAIL_USERNAME=peter@lustig.de
|
||||
EMAIL_SENDER=peter@lustig.de
|
||||
EMAIL_PASSWORD=1234
|
||||
EMAIL_SMTP_URL=smtp.lustig.de
|
||||
EMAIL_LINK_VERIFICATION=https://stage1.gradido.net/checkEmail/{code}
|
||||
EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset/{code}
|
||||
EMAIL_LINK_VERIFICATION=https://stage1.gradido.net/checkEmail/{optin}{code}
|
||||
EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset/{optin}
|
||||
EMAIL_LINK_FORGOTPASSWORD=https://stage1.gradido.net/forgot-password
|
||||
EMAIL_CODE_VALID_TIME=1440
|
||||
EMAIL_CODE_REQUEST_TIME=10
|
||||
|
||||
TYPEORM_LOGGING_RELATIVE_PATH=../deployment/bare_metal/log/typeorm.backend.log
|
||||
|
||||
@ -54,6 +57,8 @@ FRONTEND_CONFIG_VERSION=v1.2022-03-18
|
||||
GRAPHQL_URI=https://stage1.gradido.net/graphql
|
||||
ADMIN_AUTH_URL=https://stage1.gradido.net/admin/authenticate?token={token}
|
||||
|
||||
DEFAULT_PUBLISHER_ID=2896
|
||||
|
||||
META_URL=http://localhost
|
||||
META_TITLE_DE="Gradido – Dein Dankbarkeitskonto"
|
||||
META_TITLE_EN="Gradido - Your gratitude account"
|
||||
|
||||
BIN
docu/Style/Images/Blaetter.png
Normal file
BIN
docu/Style/Images/Blaetter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
@ -9,5 +9,5 @@ META_KEYWORDS_DE=$META_KEYWORDS_DE
|
||||
META_KEYWORDS_EN=$META_KEYWORDS_EN
|
||||
META_AUTHOR=$META_AUTHOR
|
||||
GRAPHQL_URI=$GRAPHQL_URI
|
||||
DEFAULT_PUBLISHER_ID=2896
|
||||
DEFAULT_PUBLISHER_ID=$DEFAULT_PUBLISHER_ID
|
||||
ADMIN_AUTH_URL=$ADMIN_AUTH_URL
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bootstrap-vue-gradido-wallet",
|
||||
"version": "1.6.6",
|
||||
"version": "1.7.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node run/server.js",
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</b-col>
|
||||
<b-col cols="6">
|
||||
<div>
|
||||
{{ (Number(balance) - Number(decay)) | GDD }}
|
||||
{{ previousBookedBalance | GDD }}
|
||||
{{ decay | GDD }} {{ $t('math.equal') }}
|
||||
<b>{{ balance | GDD }}</b>
|
||||
</div>
|
||||
@ -33,6 +33,10 @@ export default {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
previousBookedBalance: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -405,14 +405,22 @@ describe('GddTransactionList', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe.only('pagination buttons', () => {
|
||||
it('shows the pagination buttons if transactionCount > pageSize', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
transactionCount: 42,
|
||||
})
|
||||
})
|
||||
expect(wrapper.find('div.pagination').exists()).toBe(true)
|
||||
describe('pagination buttons', () => {
|
||||
const transactions = Array.from({ length: 42 }, (_, idx) => {
|
||||
return {
|
||||
amount: '3.14',
|
||||
balanceDate: '2021-04-29T17:26:40+00:00',
|
||||
decay: {},
|
||||
memo: 'Kreiszahl PI',
|
||||
linkedUser: {
|
||||
firstName: 'Bibi',
|
||||
lastName: 'Bloxberg',
|
||||
__typename: 'User',
|
||||
},
|
||||
id: idx + 1,
|
||||
typeId: 'RECEIVE',
|
||||
balance: '33.33',
|
||||
}
|
||||
})
|
||||
|
||||
it('shows no pagination buttons if transactionCount < pageSize', () => {
|
||||
|
||||
@ -15,7 +15,11 @@
|
||||
<div v-for="({ id, typeId }, index) in transactions" :key="id">
|
||||
<transaction-list-item :typeId="typeId" class="pointer">
|
||||
<template #DECAY>
|
||||
<transaction-decay class="list-group-item" v-bind="transactions[index]" />
|
||||
<transaction-decay
|
||||
class="list-group-item"
|
||||
v-bind="transactions[index]"
|
||||
:previousBookedBalance="previousBookedBalance(index)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #SEND>
|
||||
@ -23,6 +27,7 @@
|
||||
class="list-group-item"
|
||||
v-bind="transactions[index]"
|
||||
:decayStartBlock="decayStartBlock"
|
||||
:previousBookedBalance="previousBookedBalance(index)"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
</template>
|
||||
@ -32,6 +37,7 @@
|
||||
class="list-group-item"
|
||||
v-bind="transactions[index]"
|
||||
:decayStartBlock="decayStartBlock"
|
||||
:previousBookedBalance="previousBookedBalance(index)"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
</template>
|
||||
@ -41,6 +47,7 @@
|
||||
class="list-group-item"
|
||||
v-bind="transactions[index]"
|
||||
:decayStartBlock="decayStartBlock"
|
||||
:previousBookedBalance="previousBookedBalance(index)"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
</template>
|
||||
@ -113,6 +120,10 @@ export default {
|
||||
})
|
||||
window.scrollTo(0, 0)
|
||||
},
|
||||
previousBookedBalance(idx) {
|
||||
if (this.transactions[idx + 1]) return this.transactions[idx + 1].balance
|
||||
return '0'
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentPage() {
|
||||
|
||||
@ -31,6 +31,7 @@ const propsData = {
|
||||
memo: 'sadasd asdasdasdasdadadd da dad aad',
|
||||
typeId: 'DECAY',
|
||||
decayStartBlock: new Date('2021-05-13T17:46:31.000Z'),
|
||||
previousBookedBalance: '43.56',
|
||||
}
|
||||
|
||||
describe('TransactionCreation', () => {
|
||||
|
||||
@ -47,7 +47,7 @@ import DecayRow from '../TransactionRows/DecayRow'
|
||||
import DecayInformation from '../DecayInformations/DecayInformation'
|
||||
|
||||
export default {
|
||||
name: 'slot-creation',
|
||||
name: 'TransactionCreation',
|
||||
components: {
|
||||
CollapseIcon,
|
||||
TypeIcon,
|
||||
@ -86,6 +86,10 @@ export default {
|
||||
type: Date,
|
||||
required: true,
|
||||
},
|
||||
previousBookedBalance: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -31,6 +31,7 @@ const propsData = {
|
||||
memo: 'sadasd asdasdasdasdadadd da dad aad',
|
||||
typeId: 'DECAY',
|
||||
decayStartBlock: new Date('2021-05-13T17:46:31.000Z'),
|
||||
previousBookedBalance: '43.56',
|
||||
}
|
||||
|
||||
describe('TransactionDecay', () => {
|
||||
|
||||
@ -21,7 +21,11 @@
|
||||
</div>
|
||||
|
||||
<b-collapse class="pb-4 pt-5" v-model="visible">
|
||||
<decay-information-decay :balance="balance" :decay="decay.decay" />
|
||||
<decay-information-decay
|
||||
:balance="balance"
|
||||
:decay="decay.decay"
|
||||
:previousBookedBalance="previousBookedBalance"
|
||||
/>
|
||||
</b-collapse>
|
||||
</div>
|
||||
</div>
|
||||
@ -33,7 +37,7 @@ import AmountAndNameRow from '../TransactionRows/AmountAndNameRow'
|
||||
import DecayInformationDecay from '../DecayInformations/DecayInformation-Decay'
|
||||
|
||||
export default {
|
||||
name: 'slot-decay',
|
||||
name: 'TransactionDecay',
|
||||
components: {
|
||||
CollapseIcon,
|
||||
TypeIcon,
|
||||
@ -53,6 +57,10 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
previousBookedBalance: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -31,6 +31,7 @@ const propsData = {
|
||||
memo: 'sadasd asdasdasdasdadadd da dad aad',
|
||||
typeId: 'RECEIVE',
|
||||
decayStartBlock: new Date('2021-05-13T17:46:31.000Z'),
|
||||
previousBookedBalance: '43.56',
|
||||
}
|
||||
|
||||
describe('TransactionReceive', () => {
|
||||
|
||||
@ -53,7 +53,7 @@ import DecayRow from '../TransactionRows/DecayRow'
|
||||
import DecayInformation from '../DecayInformations/DecayInformation'
|
||||
|
||||
export default {
|
||||
name: 'slot-receive',
|
||||
name: 'TransactionReceive',
|
||||
components: {
|
||||
CollapseIcon,
|
||||
TypeIcon,
|
||||
@ -95,6 +95,10 @@ export default {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
previousBookedBalance: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -31,6 +31,7 @@ const propsData = {
|
||||
memo: 'sadasd asdasdasdasdadadd da dad aad',
|
||||
typeId: 'SEND',
|
||||
decayStartBlock: new Date('2021-05-13T17:46:31.000Z'),
|
||||
previousBookedBalance: '43.56',
|
||||
}
|
||||
|
||||
describe('TransactionSend', () => {
|
||||
|
||||
@ -53,7 +53,7 @@ import DecayRow from '../TransactionRows/DecayRow'
|
||||
import DecayInformation from '../DecayInformations/DecayInformation'
|
||||
|
||||
export default {
|
||||
name: 'slot-send',
|
||||
name: 'TransactionSend',
|
||||
components: {
|
||||
CollapseIcon,
|
||||
TypeIcon,
|
||||
@ -96,6 +96,10 @@ export default {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
previousBookedBalance: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -13,6 +13,6 @@ const amount = (value) => {
|
||||
const GDD = (value) => {
|
||||
value = amount(value)
|
||||
if (value === '') return ''
|
||||
if (!value.match(/^− /)) value = '+ ' + value
|
||||
if (!value.match(/^− /) && !value.match(/^0[.,]00$/)) value = '+ ' + value
|
||||
return value + ' GDD'
|
||||
}
|
||||
|
||||
@ -18,6 +18,12 @@ export const setPassword = gql`
|
||||
}
|
||||
`
|
||||
|
||||
export const forgotPassword = gql`
|
||||
mutation($email: String!) {
|
||||
forgotPassword(email: $email)
|
||||
}
|
||||
`
|
||||
|
||||
export const updateUserInfos = gql`
|
||||
mutation(
|
||||
$firstName: String
|
||||
|
||||
@ -81,12 +81,6 @@ export const transactionsQuery = gql`
|
||||
}
|
||||
`
|
||||
|
||||
export const sendResetPasswordEmail = gql`
|
||||
query($email: String!) {
|
||||
sendResetPasswordEmail(email: $email)
|
||||
}
|
||||
`
|
||||
|
||||
export const listGDTEntriesQuery = gql`
|
||||
query($currentPage: Int!, $pageSize: Int!) {
|
||||
listGDTEntries(currentPage: $currentPage, pageSize: $pageSize) {
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
"delete": "Löschen",
|
||||
"em-dash": "—",
|
||||
"error": {
|
||||
"email-already-sent": "Wir haben dir bereits eine E-Mail vor weniger als 10 Minuten geschickt.",
|
||||
"empty-transactionlist": "Es gab einen Fehler mit der Übermittlung der Anzahl deiner Transaktionen.",
|
||||
"error": "Fehler!",
|
||||
"no-account": "Leider konnten wir keinen Account mit diesen Daten finden.",
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
"delete": "Delete",
|
||||
"em-dash": "—",
|
||||
"error": {
|
||||
"email-already-sent": "We already sent you an email less than 10 minutes ago.",
|
||||
"empty-transactionlist": "There was an error with the transmission of the number of your transactions.",
|
||||
"error": "Error!",
|
||||
"no-account": "Unfortunately we could not find an account to the given data!",
|
||||
|
||||
@ -2,6 +2,8 @@ import { mount, RouterLinkStub } from '@vue/test-utils'
|
||||
import flushPromises from 'flush-promises'
|
||||
import ForgotPassword from './ForgotPassword'
|
||||
|
||||
import { toastErrorSpy } from '@test/testSetup'
|
||||
|
||||
const mockAPIcall = jest.fn()
|
||||
|
||||
const localVue = global.localVue
|
||||
@ -21,7 +23,7 @@ const createMockObject = (comingFrom) => {
|
||||
push: mockRouterPush,
|
||||
},
|
||||
$apollo: {
|
||||
query: mockAPIcall,
|
||||
mutate: mockAPIcall,
|
||||
},
|
||||
$route: {
|
||||
params: {
|
||||
@ -116,6 +118,10 @@ describe('ForgotPassword', () => {
|
||||
await flushPromises()
|
||||
})
|
||||
|
||||
it('toasts a standard error message', () => {
|
||||
expect(toastErrorSpy).toBeCalledWith('error.email-already-sent')
|
||||
})
|
||||
|
||||
it('pushes to "/thx/forgotPassword"', () => {
|
||||
expect(mockAPIcall).toBeCalledWith(
|
||||
expect.objectContaining({
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { sendResetPasswordEmail } from '@/graphql/queries'
|
||||
import { forgotPassword } from '@/graphql/mutations'
|
||||
import InputEmail from '@/components/Inputs/InputEmail'
|
||||
|
||||
export default {
|
||||
@ -59,8 +59,8 @@ export default {
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: sendResetPasswordEmail,
|
||||
.mutate({
|
||||
mutation: forgotPassword,
|
||||
variables: {
|
||||
email: this.form.email,
|
||||
},
|
||||
@ -69,6 +69,7 @@ export default {
|
||||
this.$router.push('/thx/forgotPassword')
|
||||
})
|
||||
.catch(() => {
|
||||
this.toastError(this.$t('error.email-already-sent'))
|
||||
this.$router.push('/thx/forgotPassword')
|
||||
})
|
||||
},
|
||||
|
||||
@ -148,6 +148,7 @@ export default {
|
||||
.then((result) => {
|
||||
this.$emit('set-tunneled-email', null)
|
||||
this.code = result.data.createTransactionLink.code
|
||||
this.transactionData = { ...EMPTY_TRANSACTION_DATA }
|
||||
this.currentTransactionStep = TRANSACTION_STEPS.transactionResultLink
|
||||
this.updateTransactions({})
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gradido",
|
||||
"version": "1.6.6",
|
||||
"version": "1.7.0",
|
||||
"description": "Gradido",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:gradido/gradido.git",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user