diff --git a/backend/.env.dist b/backend/.env.dist index 447608533..0a95eda6c 100644 --- a/backend/.env.dist +++ b/backend/.env.dist @@ -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 diff --git a/backend/.env.template b/backend/.env.template index 454b25d3c..66cac7a7c 100644 --- a/backend/.env.template +++ b/backend/.env.template @@ -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 \ No newline at end of file diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index 310ea37d1..461a70a00 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -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)) { diff --git a/deployment/bare_metal/.env.dist b/deployment/bare_metal/.env.dist index e46ee1d90..f2b0bcbb3 100644 --- a/deployment/bare_metal/.env.dist +++ b/deployment/bare_metal/.env.dist @@ -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" diff --git a/frontend/.env.template b/frontend/.env.template index 4e4a86d08..10c42daa9 100644 --- a/frontend/.env.template +++ b/frontend/.env.template @@ -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 \ No newline at end of file diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue index 6abacd2b8..d8ba13738 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue @@ -13,7 +13,7 @@
- {{ (Number(balance) - Number(decay)) | GDD }} + {{ previousBookedBalance | GDD }} {{ decay | GDD }} {{ $t('math.equal') }} {{ balance | GDD }}
@@ -33,6 +33,10 @@ export default { type: String, required: true, }, + previousBookedBalance: { + type: String, + required: true, + }, }, } diff --git a/frontend/src/components/GddTransactionList.spec.js b/frontend/src/components/GddTransactionList.spec.js index ba45d93d4..aeecf43cc 100644 --- a/frontend/src/components/GddTransactionList.spec.js +++ b/frontend/src/components/GddTransactionList.spec.js @@ -419,6 +419,7 @@ describe('GddTransactionList', () => { }, id: idx + 1, typeId: 'RECEIVE', + balance: '33.33', } }) diff --git a/frontend/src/components/GddTransactionList.vue b/frontend/src/components/GddTransactionList.vue index 2424907c5..37605711c 100644 --- a/frontend/src/components/GddTransactionList.vue +++ b/frontend/src/components/GddTransactionList.vue @@ -15,7 +15,11 @@
@@ -32,6 +37,7 @@ class="list-group-item" v-bind="transactions[index]" :decayStartBlock="decayStartBlock" + :previousBookedBalance="previousBookedBalance(index)" v-on="$listeners" /> @@ -41,6 +47,7 @@ class="list-group-item" v-bind="transactions[index]" :decayStartBlock="decayStartBlock" + :previousBookedBalance="previousBookedBalance(index)" v-on="$listeners" /> @@ -110,6 +117,10 @@ export default { }) window.scrollTo(0, 0) }, + previousBookedBalance(idx) { + if (this.transactions[idx + 1]) return this.transactions[idx + 1].balance + return '0' + }, }, watch: { currentPage() { diff --git a/frontend/src/components/Transactions/TransactionCreation.spec.js b/frontend/src/components/Transactions/TransactionCreation.spec.js index e1ea9e0b0..be0713ecf 100644 --- a/frontend/src/components/Transactions/TransactionCreation.spec.js +++ b/frontend/src/components/Transactions/TransactionCreation.spec.js @@ -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', () => { diff --git a/frontend/src/components/Transactions/TransactionCreation.vue b/frontend/src/components/Transactions/TransactionCreation.vue index f343a92ac..dce11307b 100644 --- a/frontend/src/components/Transactions/TransactionCreation.vue +++ b/frontend/src/components/Transactions/TransactionCreation.vue @@ -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 { diff --git a/frontend/src/components/Transactions/TransactionDecay.spec.js b/frontend/src/components/Transactions/TransactionDecay.spec.js index 232e7f85a..8c5236b6e 100644 --- a/frontend/src/components/Transactions/TransactionDecay.spec.js +++ b/frontend/src/components/Transactions/TransactionDecay.spec.js @@ -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', () => { diff --git a/frontend/src/components/Transactions/TransactionDecay.vue b/frontend/src/components/Transactions/TransactionDecay.vue index 2f235502a..372705a4c 100644 --- a/frontend/src/components/Transactions/TransactionDecay.vue +++ b/frontend/src/components/Transactions/TransactionDecay.vue @@ -21,7 +21,11 @@
- + @@ -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 { diff --git a/frontend/src/components/Transactions/TransactionReceive.spec.js b/frontend/src/components/Transactions/TransactionReceive.spec.js index f5b27cf47..46cb57e06 100644 --- a/frontend/src/components/Transactions/TransactionReceive.spec.js +++ b/frontend/src/components/Transactions/TransactionReceive.spec.js @@ -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', () => { diff --git a/frontend/src/components/Transactions/TransactionReceive.vue b/frontend/src/components/Transactions/TransactionReceive.vue index f83c84e53..32e40f71e 100644 --- a/frontend/src/components/Transactions/TransactionReceive.vue +++ b/frontend/src/components/Transactions/TransactionReceive.vue @@ -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 { diff --git a/frontend/src/components/Transactions/TransactionSend.spec.js b/frontend/src/components/Transactions/TransactionSend.spec.js index 632c0857a..410fcc733 100644 --- a/frontend/src/components/Transactions/TransactionSend.spec.js +++ b/frontend/src/components/Transactions/TransactionSend.spec.js @@ -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', () => { diff --git a/frontend/src/components/Transactions/TransactionSend.vue b/frontend/src/components/Transactions/TransactionSend.vue index 2f9ef54d2..a1ea3c88e 100644 --- a/frontend/src/components/Transactions/TransactionSend.vue +++ b/frontend/src/components/Transactions/TransactionSend.vue @@ -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 { diff --git a/frontend/src/filters/amount.js b/frontend/src/filters/amount.js index ded1cceb7..97340117d 100644 --- a/frontend/src/filters/amount.js +++ b/frontend/src/filters/amount.js @@ -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' }