diff --git a/admin/src/components/Tables/SearchUserTable.spec.js b/admin/src/components/Tables/SearchUserTable.spec.js
new file mode 100644
index 000000000..9e1ce5e52
--- /dev/null
+++ b/admin/src/components/Tables/SearchUserTable.spec.js
@@ -0,0 +1,129 @@
+import { mount } from '@vue/test-utils'
+import SearchUserTable from './SearchUserTable.vue'
+
+const date = new Date()
+
+const localVue = global.localVue
+
+const apolloMutateMock = jest.fn().mockResolvedValue({})
+const apolloQueryMock = jest.fn().mockResolvedValue({})
+
+const propsData = {
+ items: [
+ {
+ userId: 1,
+ firstName: 'Bibi',
+ lastName: 'Bloxberg',
+ email: 'bibi@bloxberg.de',
+ creation: [200, 400, 600],
+ emailChecked: true,
+ },
+ {
+ userId: 2,
+ firstName: 'Benjamin',
+ lastName: 'Blümchen',
+ email: 'benjamin@bluemchen.de',
+ creation: [1000, 1000, 1000],
+ emailChecked: true,
+ },
+ {
+ userId: 3,
+ firstName: 'Peter',
+ lastName: 'Lustig',
+ email: 'peter@lustig.de',
+ creation: [0, 0, 0],
+ emailChecked: true,
+ },
+ {
+ userId: 4,
+ firstName: 'New',
+ lastName: 'User',
+ email: 'new@user.ch',
+ creation: [1000, 1000, 1000],
+ emailChecked: false,
+ },
+ ],
+ fields: [
+ { key: 'email', label: 'e_mail' },
+ { key: 'firstName', label: 'firstname' },
+ { key: 'lastName', label: 'lastname' },
+ {
+ key: 'creation',
+ label: 'creationLabel',
+ formatter: (value, key, item) => {
+ return value.join(' | ')
+ },
+ },
+ { key: 'status', label: 'status' },
+ ],
+}
+
+const mocks = {
+ $t: jest.fn((t) => t),
+ $d: jest.fn((d) => d),
+ $apollo: {
+ mutate: apolloMutateMock,
+ query: apolloQueryMock,
+ },
+ $store: {
+ state: {
+ moderator: {
+ id: 0,
+ name: 'test moderator',
+ },
+ },
+ },
+ $toasted: {
+ error: jest.fn(),
+ success: jest.fn(),
+ },
+}
+
+describe('SearchUserTable', () => {
+ let wrapper
+
+ const Wrapper = () => {
+ return mount(SearchUserTable, { localVue, mocks, propsData })
+ }
+
+ describe('mount', () => {
+ beforeEach(() => {
+ wrapper = Wrapper()
+ })
+
+ it('has a table with four rows', () => {
+ expect(wrapper.findAll('tbody > tr')).toHaveLength(4)
+ })
+
+ describe('show row details', () => {
+ beforeEach(async () => {
+ await wrapper.findAll('tbody > tr').at(1).trigger('click')
+ })
+
+ describe('deleted at', () => {
+ beforeEach(async () => {
+ await wrapper.find('div.deleted-user-formular').vm.$emit('updateDeletedAt', {
+ userId: 1,
+ deletedAt: date,
+ })
+ })
+
+ it('emits updateDeletedAt', () => {
+ expect(wrapper.emitted('updateDeletedAt')).toEqual([[1, date]])
+ })
+ })
+
+ describe('updateUserData', () => {
+ beforeEach(async () => {
+ await wrapper
+ .find('div.component-creation-formular')
+ .vm.$emit('update-user-data', propsData.items[1], [250, 500, 750])
+ })
+
+ it('updates the item', () => {
+ expect(wrapper.vm.items[1].creation).toEqual([250, 500, 750])
+ })
+ })
+ })
+ })
+})
diff --git a/admin/src/components/Tables/SearchUserTable.vue b/admin/src/components/Tables/SearchUserTable.vue
index df7cacf9a..c71f79aa3 100644
--- a/admin/src/components/Tables/SearchUserTable.vue
+++ b/admin/src/components/Tables/SearchUserTable.vue
@@ -1,100 +1,97 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{ $t('userIsDeleted') }}
+
+
+
+
-
+
-
diff --git a/frontend/src/assets/scss/gradido.scss b/frontend/src/assets/scss/gradido.scss
index e29538807..9bc3231c4 100644
--- a/frontend/src/assets/scss/gradido.scss
+++ b/frontend/src/assets/scss/gradido.scss
@@ -3,15 +3,13 @@
@import "~bootstrap/scss/functions";
-
@import "custom/variables";
// @import "~bootstrap/scss/variables"; wird am
// ende der custom/variables angehangen
-
-// Bootstrap (4.5.3) mixins
-
-@import "~bootstrap/scss/mixins";
+// Bootstrap (4.5.3) mixins
+@import "~bootstrap/scss/mixins";
+
// Bootstrap (4.5.3) components
@import "~bootstrap/scss/alert";
@@ -20,11 +18,18 @@
@import "~bootstrap/scss/button-group";
@import "~bootstrap/scss/buttons";
@import "~bootstrap/scss/card";
+@import "~bootstrap/scss/carousel";
+@import "~bootstrap/scss/close";
+@import "~bootstrap/scss/code";
@import "~bootstrap/scss/custom-forms";
+@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/forms";
+@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/grid";
@import "~bootstrap/scss/input-group";
@import "~bootstrap/scss/list-group";
+@import "~bootstrap/scss/mixins";
+@import "~bootstrap/scss/modal";
@import "~bootstrap/scss/nav";
@import "~bootstrap/scss/navbar";
@import "~bootstrap/scss/pagination";
@@ -38,7 +43,99 @@
@import "~bootstrap/scss/type";
@import "~bootstrap/scss/utilities";
@import "~bootstrap/scss/variables";
-
+@import "~bootstrap/scss/bootstrap-grid";
+@import "~bootstrap/scss/bootstrap-reboot";
+@import "~bootstrap/scss/bootstrap";
// Bootstrap-vue (2.21.1) scss
-@import '~bootstrap-vue/src/index.scss';
\ No newline at end of file
+@import '~bootstrap-vue/src/index.scss';
+
+
+.alert-success {
+ color: #155724;
+ background-color: #d4edda;
+ border-color: #c3e6cb;
+}
+.alert-danger {
+ color: #721c24;
+ background-color: #f8d7da;
+ border-color: #f5c6cb;
+}
+
+
+.b-toast-danger .toast .toast-header {
+ color: #721c24;
+ background-color: rgba(248,215,218,.85);
+ border-bottom-color: rgba(245,198,203,.85);
+}
+.b-toast-danger .toast .toast-body{
+ background-color: rgba(252,237,238,.85);
+ border-color: rgba(245,198,203,.85);
+ color: #721c24;
+}
+
+.b-toast-success .toast .toast-header {
+ color: #155724;
+ background-color: rgba(212,237,218,.58);
+ border-bottom-color: rgba(195,230,203,.85);
+}
+.b-toast-success .toast .toast-body{
+ color: #155724;
+ background-color: rgba(212,237,218,.85);
+ border-bottom-color: rgba(195,230,203,.85);
+}
+
+
+ .btn-primary pim {
+ background-color: #5a7b02;
+ border-color: #5e72e4;
+ }
+ a,
+ .copyright {
+ color: #5a7b02;
+ }
+ .font1_2em {
+ font-size: 1.2em;
+ }
+ .font2em {
+ font-size: 1.5em;
+ }
+ .gradido-global-color-text {
+ color: #3d443b;
+ }
+ .gradido-global-color-accent {
+ color: #047006;
+ }
+ .gradido-global-color-6e0a9c9e {
+ color: #000;
+ }
+ .gradido-global-color-2d0fb154 {
+ color: #047006;
+ }
+ .gradido-global-color-16efe88c {
+ color: #7ebc55;
+ }
+ .gradido-global-color-1939326 {
+ color: #f6fff6;
+ }
+ .gradido-global-color-9d79fc1 {
+ color: #047006;
+ }
+ .gradido-global-color-6347f4d {
+ color: #5a7b02;
+ }
+ .gradido-global-color-4fbc19a {
+ color: #014034;
+ }
+ .gradido-global-color-d341874 {
+ color: #b6d939;
+ }
+ .gradido-global-color-619d338 {
+ color: #8ebfb1;
+ }
+ .gradido-global-color-44819a9 {
+ color: #026873;
+ }
+ .gradido-global-color-gray {
+ color: #858383;
+ }
\ No newline at end of file
diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue
index 0daa45a18..9da5e4b2c 100644
--- a/frontend/src/components/DecayInformation.vue
+++ b/frontend/src/components/DecayInformation.vue
@@ -4,7 +4,7 @@
{{ decay ? ' − ' + $n(decay.balance, 'decimal') : '' }}
-
+
@@ -56,17 +56,22 @@
{{ $t('decay.decay') }}
- − {{ $n(decay.balance, 'decimal') }}
+ - {{ $n(decay.balance, 'decimal') }}
+
+ {{ $n(decay.balance + gddbalance, 'decimal') }} GDD -
+ {{ $n(decay.balance, 'decimal') }} GDD =
+ {{ $n(gddbalance, 'decimal') }} GDD
+
-
+
{{ $t('decay.calculation_total') }}
-
+
{{ $t('decay.sent') }}
{{ $t('decay.received') }}
@@ -77,7 +82,7 @@
-
+
{{ $t('decay.decay') }}
@@ -86,7 +91,7 @@
-
+
{{ $t('decay.total') }}
@@ -109,6 +114,7 @@
export default {
name: 'DecayInformation',
props: {
+ gddbalance: { type: Number },
balance: { type: Number },
type: { type: String, default: '' },
decay: {
diff --git a/frontend/src/components/Transaction.spec.js b/frontend/src/components/Transaction.spec.js
index aaad023e0..ac80fefc8 100644
--- a/frontend/src/components/Transaction.spec.js
+++ b/frontend/src/components/Transaction.spec.js
@@ -31,8 +31,13 @@ describe('Transaction', () => {
expect(wrapper.find('div.gdt-transaction-list-item').exists()).toBeTruthy()
})
- it('has a collapse button', () => {
- expect(wrapper.find('button[type="button"].btn-secondary').text()).toBe('i')
+ it('has a collapse icon bi-caret-down-square', () => {
+ expect(wrapper.find('div.gdt-transaction-list-item').findAll('svg').at(1).classes()).toEqual([
+ 'bi-caret-down-square',
+ 'b-icon',
+ 'bi',
+ 'text-muted',
+ ])
})
describe('no valid GDT entry type', () => {
diff --git a/frontend/src/components/Transaction.vue b/frontend/src/components/Transaction.vue
index 1dcfee13a..649b81b4d 100644
--- a/frontend/src/components/Transaction.vue
+++ b/frontend/src/components/Transaction.vue
@@ -9,9 +9,10 @@
-
- i
-
+
@@ -85,6 +86,16 @@ export default {
gdt: { type: Number },
id: { type: Number },
},
+ data() {
+ return {
+ collapseStatus: [],
+ }
+ },
+ methods: {
+ getCollapseState(id) {
+ return this.collapseStatus.includes('gdt-collapse-' + id)
+ },
+ },
computed: {
collapseId() {
return 'gdt-collapse-' + String(this.id)
@@ -130,5 +141,14 @@ export default {
}
},
},
+ mounted() {
+ this.$root.$on('bv::collapse::state', (collapseId, isJustShown) => {
+ if (isJustShown) {
+ this.collapseStatus.push(collapseId)
+ } else {
+ this.collapseStatus = this.collapseStatus.filter((id) => id !== collapseId)
+ }
+ })
+ },
}
diff --git a/frontend/src/graphql/queries.js b/frontend/src/graphql/queries.js
index ff211fc07..70d0ea5a4 100644
--- a/frontend/src/graphql/queries.js
+++ b/frontend/src/graphql/queries.js
@@ -78,6 +78,7 @@ export const transactionsQuery = gql`
decayDuration
decayStartBlock
}
+ firstTransaction
}
}
}
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index 5e2ad7246..3bfad63e8 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -21,6 +21,7 @@
"switch-to-this-community": "zu dieser Gemeinschaft wechseln"
},
"decay": {
+ "befor_startblock_transaction": "Diese Transaktion beinhaltet keine Vergänglichkeit.",
"calculation_decay": "Berechnung der Vergänglichkeit",
"calculation_total": "Berechnung der Gesamtsumme",
"created": "Geschöpft",
@@ -29,6 +30,7 @@
"decayStart": " - Startblock für Vergänglichkeit am: ",
"decay_introduced": "Die Vergänglichkeit wurde eingeführt am ",
"decay_since_last_transaction": "Vergänglichkeit seit der letzten Transaktion",
+ "first_transaction": "Die erste Transaktion beinhaltet keine Vergänglichkeit.",
"hours": "Stunden",
"last_transaction": "Letzte Transaktion",
"minutes": "Minuten",
@@ -215,6 +217,7 @@
"gdt-text": "GradidoTransform Transaktionen",
"more": "mehr",
"nullTransactions": "Du hast noch keine Transaktionen auf deinem Konto.",
+ "receiverDeleted": "Das Empfängerkonto wurde gelöscht",
"receiverNotFound": "Empfänger nicht gefunden",
"show_all": "Alle {count} Transaktionen ansehen"
},
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index 75c70b258..b06030947 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -21,6 +21,7 @@
"switch-to-this-community": "Switch to this community"
},
"decay": {
+ "befor_startblock_transaction": "This transaction does not include decay.",
"calculation_decay": "Calculation of Decay",
"calculation_total": "Calculation of the total Amount",
"created": "Created",
@@ -29,6 +30,7 @@
"decayStart": " - Starting block for decay at: ",
"decay_introduced": "Decay was introduced on",
"decay_since_last_transaction": "Decay since the last transaction",
+ "first_transaction": "The first transaction does not include decay.",
"hours": "Hours",
"last_transaction": "Last transaction:",
"minutes": "Minutes",
@@ -215,6 +217,7 @@
"gdt-text": "GradidoTransform Transactions",
"more": "more",
"nullTransactions": "You don't have any transactions on your account yet.",
+ "receiverDeleted": "The recipient account was deleted",
"receiverNotFound": "Recipient not found",
"show_all": "View all {count} transactions."
},
diff --git a/frontend/src/mixins/toaster.js b/frontend/src/mixins/toaster.js
index 704eaf1a7..4464a2cc9 100644
--- a/frontend/src/mixins/toaster.js
+++ b/frontend/src/mixins/toaster.js
@@ -16,7 +16,7 @@ export const toasters = {
message = message.replace(/^GraphQL error: /, '')
this.$bvToast.toast(message, {
autoHideDelay: 5000,
- appendToast: false,
+ appendToast: true,
solid: true,
toaster: 'b-toaster-top-right',
headerClass: 'gdd-toaster-title',
diff --git a/frontend/src/views/Pages/AccountOverview.vue b/frontend/src/views/Pages/AccountOverview.vue
index b62481806..c0ba55155 100644
--- a/frontend/src/views/Pages/AccountOverview.vue
+++ b/frontend/src/views/Pages/AccountOverview.vue
@@ -15,6 +15,7 @@
{
decay: { balance: '1.5' },
},
{
- balance: '1.07',
+ balance: 1.07,
type: 'decay',
},
],
@@ -135,12 +135,31 @@ describe('GddTransactionList', () => {
transaction = wrapper.findAll('div.gdd-transaction-list-item').at(0)
})
+ it('has a bi-caret-down-square icon', () => {
+ expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ 'bi-caret-down-square',
+ 'b-icon',
+ 'bi',
+ 'text-muted',
+ ])
+ })
+
+ // it('transaction is clicked', async () => {
+ // await transaction.trigger('click')
+ // expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ // 'bi-caret-up-square',
+ // 'b-icon',
+ // 'bi',
+ // 'text-muted',
+ // ])
+ // })
+
it('has a bi-arrow-left-circle icon', () => {
- expect(transaction.find('svg').classes()).toContain('bi-arrow-left-circle')
+ expect(transaction.findAll('svg').at(1).classes()).toContain('bi-arrow-left-circle')
})
it('has text-danger color', () => {
- expect(transaction.find('svg').classes()).toContain('text-danger')
+ expect(transaction.findAll('svg').at(1).classes()).toContain('text-danger')
})
it('has a minus operator', () => {
@@ -186,12 +205,33 @@ describe('GddTransactionList', () => {
transaction = wrapper.findAll('div.gdd-transaction-list-item').at(1)
})
+ it('has a bi-caret-down-square icon', () => {
+ expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ 'bi-caret-down-square',
+ 'b-icon',
+ 'bi',
+ 'text-muted',
+ ])
+ })
+
+ // it('transaction is clicked', async () => {
+ // await transaction.trigger('click')
+ // expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ // 'bi-caret-up-square',
+ // 'b-icon',
+ // 'bi',
+ // 'text-muted',
+ // ])
+ // })
+
it('has a bi-gift icon', () => {
- expect(transaction.find('svg').classes()).toContain('bi-gift')
+ expect(transaction.findAll('svg').at(1).classes()).toContain('bi-gift')
})
it('has gradido-global-color-accent color', () => {
- expect(transaction.find('svg').classes()).toContain('gradido-global-color-accent')
+ expect(transaction.findAll('svg').at(1).classes()).toContain(
+ 'gradido-global-color-accent',
+ )
})
it('has a plus operator', () => {
@@ -225,12 +265,33 @@ describe('GddTransactionList', () => {
transaction = wrapper.findAll('div.gdd-transaction-list-item').at(2)
})
+ it('has a bi-caret-down-square icon', () => {
+ expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ 'bi-caret-down-square',
+ 'b-icon',
+ 'bi',
+ 'text-muted',
+ ])
+ })
+
+ // it('transaction is clicked', async () => {
+ // await transaction.trigger('click')
+ // expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ // 'bi-caret-up-square',
+ // 'b-icon',
+ // 'bi',
+ // 'text-muted',
+ // ])
+ // })
+
it('has a bi-arrow-right-circle icon', () => {
- expect(transaction.find('svg').classes()).toContain('bi-arrow-right-circle')
+ expect(transaction.findAll('svg').at(1).classes()).toContain('bi-arrow-right-circle')
})
it('has gradido-global-color-accent color', () => {
- expect(transaction.find('svg').classes()).toContain('gradido-global-color-accent')
+ expect(transaction.findAll('svg').at(1).classes()).toContain(
+ 'gradido-global-color-accent',
+ )
})
it('has a plus operator', () => {
@@ -276,12 +337,31 @@ describe('GddTransactionList', () => {
transaction = wrapper.findAll('div.gdd-transaction-list-item').at(3)
})
+ it('has a bi-caret-down-square icon', () => {
+ expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ 'bi-caret-down-square',
+ 'b-icon',
+ 'bi',
+ 'text-muted',
+ ])
+ })
+
+ // it('transaction is clicked', async () => {
+ // await transaction.trigger('click')
+ // expect(transaction.findAll('svg').at(0).classes()).toEqual([
+ // 'bi-caret-up-square',
+ // 'b-icon',
+ // 'bi',
+ // 'text-muted',
+ // ])
+ // })
+
it('has a bi-droplet-half icon', () => {
- expect(transaction.find('svg').classes()).toContain('bi-droplet-half')
+ expect(transaction.findAll('svg').at(1).classes()).toContain('bi-droplet-half')
})
it('has gradido-global-color-gray color', () => {
- expect(transaction.find('svg').classes()).toContain('gradido-global-color-gray')
+ expect(transaction.findAll('svg').at(1).classes()).toContain('gradido-global-color-gray')
})
it('has a minus operator', () => {
diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue
index 4e2df58d1..db24e90ba 100644
--- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue
+++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue
@@ -2,35 +2,44 @@
-
+
{{ $t('error.no-transactionlist') }}
-
+
{{ $t('error.empty-transactionlist') }}
-
-
- i
-
+
+
-
@@ -112,9 +121,13 @@
-
-
-
+
+
+
+
+ {{ $t('decay.first_transaction') }}
+
+
+
+ {{ $t('decay.befor_startblock_transaction') }}
+
+
+
+
@@ -161,9 +198,11 @@ export default {
data() {
return {
currentPage: 1,
+ collapseStatus: [],
}
},
props: {
+ gddbalance: { type: Number },
transactions: { default: () => [] },
pageSize: { type: Number, default: 25 },
timestamp: { type: Number, default: 0 },
@@ -191,6 +230,18 @@ export default {
throwError(msg) {
throw new Error(msg)
},
+ getCollapseState(transactionId) {
+ return this.collapseStatus.includes('decay-' + transactionId)
+ },
+ },
+ mounted() {
+ this.$root.$on('bv::collapse::state', (collapseId, isJustShown) => {
+ if (isJustShown) {
+ this.collapseStatus.push(collapseId)
+ } else {
+ this.collapseStatus = this.collapseStatus.filter((id) => id !== collapseId)
+ }
+ })
},
watch: {
currentPage() {
diff --git a/frontend/src/views/Pages/Register.vue b/frontend/src/views/Pages/Register.vue
index 8d95c8197..03012cf34 100755
--- a/frontend/src/views/Pages/Register.vue
+++ b/frontend/src/views/Pages/Register.vue
@@ -108,7 +108,7 @@
v-if="showError"
show
dismissible
- variant="warning"
+ variant="danger"
@dismissed="closeAlert"
>
diff --git a/frontend/src/views/Pages/SendOverview/GddSend/TransactionResult.vue b/frontend/src/views/Pages/SendOverview/GddSend/TransactionResult.vue
index d447fa771..6489574c9 100644
--- a/frontend/src/views/Pages/SendOverview/GddSend/TransactionResult.vue
+++ b/frontend/src/views/Pages/SendOverview/GddSend/TransactionResult.vue
@@ -13,6 +13,12 @@
{{ $t('transaction.receiverNotFound') }}
+
+ {{ $t('transaction.receiverDeleted') }}
+
({{ errorResult }})
diff --git a/frontend/src/views/Pages/UserProfileTransactionList.vue b/frontend/src/views/Pages/UserProfileTransactionList.vue
index 383e908b6..494819f05 100644
--- a/frontend/src/views/Pages/UserProfileTransactionList.vue
+++ b/frontend/src/views/Pages/UserProfileTransactionList.vue
@@ -5,6 +5,7 @@
{{ $t('transaction.gdd-text') }}