mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into fix-elopage-status
This commit is contained in:
commit
51a95132c4
@ -1,6 +1,5 @@
|
|||||||
import { ObjectType, Field } from 'type-graphql'
|
import { ObjectType, Field } from 'type-graphql'
|
||||||
import Decimal from 'decimal.js-light'
|
import Decimal from 'decimal.js-light'
|
||||||
import CONFIG from '@/config'
|
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
export class Balance {
|
export class Balance {
|
||||||
@ -11,7 +10,6 @@ export class Balance {
|
|||||||
balanceGDT: number | null
|
balanceGDT: number | null
|
||||||
count: number
|
count: number
|
||||||
linkCount: number
|
linkCount: number
|
||||||
decayStartBlock?: Date
|
|
||||||
lastBookedDate?: Date | null
|
lastBookedDate?: Date | null
|
||||||
}) {
|
}) {
|
||||||
this.balance = data.balance
|
this.balance = data.balance
|
||||||
@ -20,7 +18,6 @@ export class Balance {
|
|||||||
this.balanceGDT = data.balanceGDT || null
|
this.balanceGDT = data.balanceGDT || null
|
||||||
this.count = data.count
|
this.count = data.count
|
||||||
this.linkCount = data.linkCount
|
this.linkCount = data.linkCount
|
||||||
this.decayStartBlock = data.decayStartBlock || CONFIG.DECAY_START_TIME
|
|
||||||
this.lastBookedDate = data.lastBookedDate || null
|
this.lastBookedDate = data.lastBookedDate || null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,9 +43,6 @@ export class Balance {
|
|||||||
@Field(() => Number)
|
@Field(() => Number)
|
||||||
linkCount: number
|
linkCount: number
|
||||||
|
|
||||||
@Field(() => Date)
|
|
||||||
decayStartBlock: Date
|
|
||||||
|
|
||||||
// may be null as there may be no transaction
|
// may be null as there may be no transaction
|
||||||
@Field(() => Date, { nullable: true })
|
@Field(() => Date, { nullable: true })
|
||||||
lastBookedDate: Date | null
|
lastBookedDate: Date | null
|
||||||
|
|||||||
@ -59,7 +59,6 @@ export const transactionsQuery = gql`
|
|||||||
balanceGDT
|
balanceGDT
|
||||||
count
|
count
|
||||||
balance
|
balance
|
||||||
decayStartBlock
|
|
||||||
transactions {
|
transactions {
|
||||||
id
|
id
|
||||||
typeId
|
typeId
|
||||||
|
|||||||
@ -50,7 +50,6 @@ export default {
|
|||||||
name: 'DecayInformation-StartBlock',
|
name: 'DecayInformation-StartBlock',
|
||||||
props: {
|
props: {
|
||||||
balanceDate: { type: String },
|
balanceDate: { type: String },
|
||||||
decayStartBlock: { type: Date },
|
|
||||||
amount: {
|
amount: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
import DecayInformationLong from '../DecayInformations/DecayInformation-Long'
|
import DecayInformationLong from '../DecayInformations/DecayInformation-Long'
|
||||||
import DecayInformationBeforeStartblock from '../DecayInformations/DecayInformation-BeforeStartblock'
|
import DecayInformationBeforeStartblock from '../DecayInformations/DecayInformation-BeforeStartblock'
|
||||||
import DecayInformationDecayStartblock from '../DecayInformations/DecayInformation-DecayStartblock'
|
import DecayInformationDecayStartblock from '../DecayInformations/DecayInformation-DecayStartblock'
|
||||||
|
import CONFIG from '@/config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -34,14 +35,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
decayStartBlock: {
|
|
||||||
type: Date,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isStartBlock() {
|
isStartBlock() {
|
||||||
return new Date(this.decay.start).getTime() === this.decayStartBlock.getTime()
|
return new Date(this.decay.start).getTime() === CONFIG.DECAY_START_TIME.getTime()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,6 @@
|
|||||||
<transaction-send
|
<transaction-send
|
||||||
class="list-group-item"
|
class="list-group-item"
|
||||||
v-bind="transactions[index]"
|
v-bind="transactions[index]"
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
:previousBookedBalance="previousBookedBalance(index)"
|
:previousBookedBalance="previousBookedBalance(index)"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
/>
|
/>
|
||||||
@ -36,7 +35,6 @@
|
|||||||
<transaction-receive
|
<transaction-receive
|
||||||
class="list-group-item"
|
class="list-group-item"
|
||||||
v-bind="transactions[index]"
|
v-bind="transactions[index]"
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
:previousBookedBalance="previousBookedBalance(index)"
|
:previousBookedBalance="previousBookedBalance(index)"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
/>
|
/>
|
||||||
@ -46,7 +44,6 @@
|
|||||||
<transaction-creation
|
<transaction-creation
|
||||||
class="list-group-item"
|
class="list-group-item"
|
||||||
v-bind="transactions[index]"
|
v-bind="transactions[index]"
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
:previousBookedBalance="previousBookedBalance(index)"
|
:previousBookedBalance="previousBookedBalance(index)"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
/>
|
/>
|
||||||
@ -105,7 +102,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
decayStartBlock: { type: Date },
|
|
||||||
transactions: { default: () => [] },
|
transactions: { default: () => [] },
|
||||||
pageSize: { type: Number, default: 25 },
|
pageSize: { type: Number, default: 25 },
|
||||||
timestamp: { type: Number, default: 0 },
|
timestamp: { type: Number, default: 0 },
|
||||||
|
|||||||
@ -27,12 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-collapse :class="visible ? 'bg-secondary' : ''" class="pb-4 pt-5" v-model="visible">
|
<b-collapse :class="visible ? 'bg-secondary' : ''" class="pb-4 pt-5" v-model="visible">
|
||||||
<decay-information
|
<decay-information :typeId="typeId" :decay="decay" :amount="amount" />
|
||||||
:typeId="typeId"
|
|
||||||
:decay="decay"
|
|
||||||
:amount="amount"
|
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
/>
|
|
||||||
</b-collapse>
|
</b-collapse>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -82,10 +77,6 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
decayStartBlock: {
|
|
||||||
type: Date,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
previousBookedBalance: {
|
previousBookedBalance: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@ -33,12 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-collapse :class="visible ? 'bg-secondary' : ''" class="pb-4 pt-5" v-model="visible">
|
<b-collapse :class="visible ? 'bg-secondary' : ''" class="pb-4 pt-5" v-model="visible">
|
||||||
<decay-information
|
<decay-information :typeId="typeId" :decay="decay" :amount="amount" />
|
||||||
:typeId="typeId"
|
|
||||||
:decay="decay"
|
|
||||||
:amount="amount"
|
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
/>
|
|
||||||
</b-collapse>
|
</b-collapse>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -87,10 +82,6 @@ export default {
|
|||||||
typeId: {
|
typeId: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
decayStartBlock: {
|
|
||||||
type: Date,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
transactionLinkId: {
|
transactionLinkId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
|
|||||||
@ -33,12 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-collapse :class="visible ? 'bg-secondary' : ''" class="pb-4 pt-5" v-model="visible">
|
<b-collapse :class="visible ? 'bg-secondary' : ''" class="pb-4 pt-5" v-model="visible">
|
||||||
<decay-information
|
<decay-information :typeId="typeId" :decay="decay" :amount="amount" />
|
||||||
:typeId="typeId"
|
|
||||||
:decay="decay"
|
|
||||||
:amount="amount"
|
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
/>
|
|
||||||
</b-collapse>
|
</b-collapse>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -88,10 +83,6 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
decayStartBlock: {
|
|
||||||
type: Date,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
transactionLinkId: {
|
transactionLinkId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
const pkg = require('../../package')
|
const pkg = require('../../package')
|
||||||
|
|
||||||
const constants = {
|
const constants = {
|
||||||
|
DECAY_START_TIME: new Date('2021-05-13 17:46:31'), // GMT+0
|
||||||
CONFIG_VERSION: {
|
CONFIG_VERSION: {
|
||||||
DEFAULT: 'DEFAULT',
|
DEFAULT: 'DEFAULT',
|
||||||
EXPECTED: 'v1.2022-03-18',
|
EXPECTED: 'v1.2022-03-18',
|
||||||
|
|||||||
9
frontend/src/config/index.spec.js
Normal file
9
frontend/src/config/index.spec.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import CONFIG from './index'
|
||||||
|
|
||||||
|
describe('config/index', () => {
|
||||||
|
describe('decay start block', () => {
|
||||||
|
it('has the correct date set', () => {
|
||||||
|
expect(CONFIG.DECAY_START_TIME).toEqual(new Date('2021-05-13 17:46:31'))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@ -52,7 +52,6 @@ export const transactionsQuery = gql`
|
|||||||
balanceGDT
|
balanceGDT
|
||||||
count
|
count
|
||||||
linkCount
|
linkCount
|
||||||
decayStartBlock
|
|
||||||
lastBookedDate
|
lastBookedDate
|
||||||
}
|
}
|
||||||
transactions {
|
transactions {
|
||||||
|
|||||||
@ -26,7 +26,6 @@
|
|||||||
:transactionCount="transactionCount"
|
:transactionCount="transactionCount"
|
||||||
:transactionLinkCount="transactionLinkCount"
|
:transactionLinkCount="transactionLinkCount"
|
||||||
:pending="pending"
|
:pending="pending"
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
@update-transactions="updateTransactions"
|
@update-transactions="updateTransactions"
|
||||||
@set-tunneled-email="setTunneledEmail"
|
@set-tunneled-email="setTunneledEmail"
|
||||||
></router-view>
|
></router-view>
|
||||||
@ -63,7 +62,6 @@ export default {
|
|||||||
transactionLinkCount: 0,
|
transactionLinkCount: 0,
|
||||||
pending: true,
|
pending: true,
|
||||||
visible: false,
|
visible: false,
|
||||||
decayStartBlock: new Date(),
|
|
||||||
tunneledEmail: null,
|
tunneledEmail: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -110,7 +108,6 @@ export default {
|
|||||||
this.balance = Number(transactionList.balance.balance)
|
this.balance = Number(transactionList.balance.balance)
|
||||||
this.transactionCount = transactionList.balance.count
|
this.transactionCount = transactionList.balance.count
|
||||||
this.transactionLinkCount = transactionList.balance.linkCount
|
this.transactionLinkCount = transactionList.balance.linkCount
|
||||||
this.decayStartBlock = new Date(transactionList.balance.decayStartBlock)
|
|
||||||
this.pending = false
|
this.pending = false
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@ -18,7 +18,6 @@
|
|||||||
:transactions="transactions"
|
:transactions="transactions"
|
||||||
:pageSize="5"
|
:pageSize="5"
|
||||||
:timestamp="timestamp"
|
:timestamp="timestamp"
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
:transaction-count="transactionCount"
|
:transaction-count="transactionCount"
|
||||||
:transactionLinkCount="transactionLinkCount"
|
:transactionLinkCount="transactionLinkCount"
|
||||||
:pending="pending"
|
:pending="pending"
|
||||||
@ -49,7 +48,6 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
balance: { type: Number, default: 0 },
|
balance: { type: Number, default: 0 },
|
||||||
GdtBalance: { type: Number, default: 0 },
|
GdtBalance: { type: Number, default: 0 },
|
||||||
decayStartBlock: { type: Date },
|
|
||||||
transactions: {
|
transactions: {
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -10,7 +10,6 @@
|
|||||||
:transactionLinkCount="transactionLinkCount"
|
:transactionLinkCount="transactionLinkCount"
|
||||||
:transactions="transactions"
|
:transactions="transactions"
|
||||||
:show-pagination="true"
|
:show-pagination="true"
|
||||||
:decayStartBlock="decayStartBlock"
|
|
||||||
@update-transactions="updateTransactions"
|
@update-transactions="updateTransactions"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
/>
|
/>
|
||||||
@ -45,7 +44,6 @@ export default {
|
|||||||
},
|
},
|
||||||
transactionCount: { type: Number, default: 0 },
|
transactionCount: { type: Number, default: 0 },
|
||||||
transactionLinkCount: { type: Number, default: 0 },
|
transactionLinkCount: { type: Number, default: 0 },
|
||||||
decayStartBlock: { type: Date },
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user