mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch '2689-test-email-send-deny-deleted-contribution' of https://github.com/gradido/gradido into 2689-test-email-send-deny-deleted-contribution
This commit is contained in:
commit
9fc1e45ed0
10
.github/workflows/test_dht-node.yml
vendored
10
.github/workflows/test_dht-node.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: gradido test_dht-node CI
|
name: Gradido DHT Node Test CI
|
||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ jobs:
|
|||||||
# JOB: DOCKER BUILD TEST #####################################################
|
# JOB: DOCKER BUILD TEST #####################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
build:
|
build:
|
||||||
name: Docker Build Test
|
name: Docker Build Test - DHT Node
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -28,7 +28,7 @@ jobs:
|
|||||||
# JOB: LINT ##################################################################
|
# JOB: LINT ##################################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint - DHT Node
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
@ -50,7 +50,7 @@ jobs:
|
|||||||
# JOB: UNIT TEST #############################################################
|
# JOB: UNIT TEST #############################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
unit_test:
|
unit_test:
|
||||||
name: Unit tests
|
name: Unit Tests - DHT Node
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
@ -90,7 +90,7 @@ jobs:
|
|||||||
- name: Coverage check
|
- name: Coverage check
|
||||||
uses: webcraftmedia/coverage-check-action@master
|
uses: webcraftmedia/coverage-check-action@master
|
||||||
with:
|
with:
|
||||||
report_name: Coverage dht-node
|
report_name: Coverage DHT Node
|
||||||
type: lcov
|
type: lcov
|
||||||
#result_path: ./dht-node/coverage/lcov.info
|
#result_path: ./dht-node/coverage/lcov.info
|
||||||
result_path: ./coverage/lcov.info
|
result_path: ./coverage/lcov.info
|
||||||
|
|||||||
10
.github/workflows/test_federation.yml
vendored
10
.github/workflows/test_federation.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: gradido test_federation CI
|
name: Gradido Federation Test CI
|
||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ jobs:
|
|||||||
# JOB: DOCKER BUILD TEST #####################################################
|
# JOB: DOCKER BUILD TEST #####################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
build:
|
build:
|
||||||
name: Docker Build Test
|
name: Docker Build Test - Federation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -28,7 +28,7 @@ jobs:
|
|||||||
# JOB: LINT ##################################################################
|
# JOB: LINT ##################################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint - Federation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
@ -50,7 +50,7 @@ jobs:
|
|||||||
# JOB: UNIT TEST #############################################################
|
# JOB: UNIT TEST #############################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
unit_test:
|
unit_test:
|
||||||
name: Unit tests
|
name: Unit Tests - Federation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
@ -90,7 +90,7 @@ jobs:
|
|||||||
- name: Coverage check
|
- name: Coverage check
|
||||||
uses: webcraftmedia/coverage-check-action@master
|
uses: webcraftmedia/coverage-check-action@master
|
||||||
with:
|
with:
|
||||||
report_name: Coverage federation
|
report_name: Coverage Federation
|
||||||
type: lcov
|
type: lcov
|
||||||
#result_path: ./federation/coverage/lcov.info
|
#result_path: ./federation/coverage/lcov.info
|
||||||
result_path: ./coverage/lcov.info
|
result_path: ./coverage/lcov.info
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import defaultLayout from '@/layouts/defaultLayout.vue'
|
import defaultLayout from '@/layouts/defaultLayout'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'app',
|
name: 'app',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ChangeUserRoleFormular from './ChangeUserRoleFormular.vue'
|
import ChangeUserRoleFormular from './ChangeUserRoleFormular'
|
||||||
import { setUserRole } from '../graphql/setUserRole'
|
import { setUserRole } from '../graphql/setUserRole'
|
||||||
import { toastSuccessSpy, toastErrorSpy } from '../../test/testSetup'
|
import { toastSuccessSpy, toastErrorSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ConfirmRegisterMailFormular from './ConfirmRegisterMailFormular.vue'
|
import ConfirmRegisterMailFormular from './ConfirmRegisterMailFormular'
|
||||||
|
|
||||||
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionLink from './ContributionLink.vue'
|
import ContributionLink from './ContributionLink'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -43,8 +43,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ContributionLinkForm from '../ContributionLink/ContributionLinkForm.vue'
|
import ContributionLinkForm from '../ContributionLink/ContributionLinkForm'
|
||||||
import ContributionLinkList from '../ContributionLink/ContributionLinkList.vue'
|
import ContributionLinkList from '../ContributionLink/ContributionLinkList'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionLink',
|
name: 'ContributionLink',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionLinkForm from './ContributionLinkForm.vue'
|
import ContributionLinkForm from './ContributionLinkForm'
|
||||||
import { toastErrorSpy, toastSuccessSpy } from '../../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../../test/testSetup'
|
||||||
import { createContributionLink } from '@/graphql/createContributionLink.js'
|
import { createContributionLink } from '@/graphql/createContributionLink.js'
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionLinkList from './ContributionLinkList.vue'
|
import ContributionLinkList from './ContributionLinkList'
|
||||||
import { toastSuccessSpy, toastErrorSpy } from '../../../test/testSetup'
|
import { toastSuccessSpy, toastErrorSpy } from '../../../test/testSetup'
|
||||||
// import { deleteContributionLink } from '../graphql/deleteContributionLink'
|
// import { deleteContributionLink } from '../graphql/deleteContributionLink'
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { deleteContributionLink } from '@/graphql/deleteContributionLink.js'
|
import { deleteContributionLink } from '@/graphql/deleteContributionLink.js'
|
||||||
import FigureQrCode from '../FigureQrCode.vue'
|
import FigureQrCode from '../FigureQrCode'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionLinkList',
|
name: 'ContributionLinkList',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionMessagesFormular from './ContributionMessagesFormular.vue'
|
import ContributionMessagesFormular from './ContributionMessagesFormular'
|
||||||
import { toastErrorSpy, toastSuccessSpy } from '../../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../../test/testSetup'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionMessagesList from './ContributionMessagesList.vue'
|
import ContributionMessagesList from './ContributionMessagesList'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ContributionMessagesListItem from './slots/ContributionMessagesListItem.vue'
|
import ContributionMessagesListItem from './slots/ContributionMessagesListItem'
|
||||||
import ContributionMessagesFormular from '../ContributionMessages/ContributionMessagesFormular.vue'
|
import ContributionMessagesFormular from '../ContributionMessages/ContributionMessagesFormular'
|
||||||
import { listContributionMessages } from '../../graphql/listContributionMessages.js'
|
import { listContributionMessages } from '../../graphql/listContributionMessages.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionMessagesListItem from './ContributionMessagesListItem.vue'
|
import ContributionMessagesListItem from './ContributionMessagesListItem'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ParseMessage from '@/components/ContributionMessages/ParseMessage.vue'
|
import ParseMessage from '@/components/ContributionMessages/ParseMessage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionMessagesListItem',
|
name: 'ContributionMessagesListItem',
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import CreationFormular from './CreationFormular.vue'
|
import CreationFormular from './CreationFormular'
|
||||||
import { adminCreateContribution } from '../graphql/adminCreateContribution'
|
import { adminCreateContribution } from '../graphql/adminCreateContribution'
|
||||||
import { adminCreateContributions } from '../graphql/adminCreateContributions'
|
|
||||||
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
@ -328,122 +327,6 @@ describe('CreationFormular', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('mass creation with success', () => {
|
|
||||||
beforeEach(async () => {
|
|
||||||
jest.clearAllMocks()
|
|
||||||
apolloMutateMock.mockResolvedValue({
|
|
||||||
data: {
|
|
||||||
adminCreateContributions: {
|
|
||||||
success: true,
|
|
||||||
successfulContribution: ['bob@baumeister.de', 'bibi@bloxberg.de'],
|
|
||||||
failedContribution: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
await wrapper.setProps({
|
|
||||||
type: 'massCreation',
|
|
||||||
creation: [200, 400, 600],
|
|
||||||
items: [{ email: 'bob@baumeister.de' }, { email: 'bibi@bloxberg.de' }],
|
|
||||||
})
|
|
||||||
await wrapper.findAll('input[type="radio"]').at(1).setChecked()
|
|
||||||
await wrapper.find('textarea').setValue('Test mass create coins')
|
|
||||||
await wrapper.find('input[type="number"]').setValue(200)
|
|
||||||
await wrapper.find('.test-submit').trigger('click')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('calls the API', () => {
|
|
||||||
expect(apolloMutateMock).toBeCalledWith(
|
|
||||||
expect.objectContaining({
|
|
||||||
mutation: adminCreateContributions,
|
|
||||||
variables: {
|
|
||||||
pendingCreations: [
|
|
||||||
{
|
|
||||||
email: 'bob@baumeister.de',
|
|
||||||
creationDate: getCreationDate(1),
|
|
||||||
amount: 200,
|
|
||||||
memo: 'Test mass create coins',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
email: 'bibi@bloxberg.de',
|
|
||||||
creationDate: getCreationDate(1),
|
|
||||||
amount: 200,
|
|
||||||
memo: 'Test mass create coins',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('updates open creations in store', () => {
|
|
||||||
expect(stateCommitMock).toBeCalledWith('openCreationsPlus', 2)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('emits remove-all-bookmark', () => {
|
|
||||||
expect(wrapper.emitted('remove-all-bookmark')).toBeTruthy()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('mass creation with success but all failed', () => {
|
|
||||||
beforeEach(async () => {
|
|
||||||
jest.clearAllMocks()
|
|
||||||
apolloMutateMock.mockResolvedValue({
|
|
||||||
data: {
|
|
||||||
adminCreateContributions: {
|
|
||||||
success: true,
|
|
||||||
successfulContribution: [],
|
|
||||||
failedContribution: ['bob@baumeister.de', 'bibi@bloxberg.de'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
await wrapper.setProps({
|
|
||||||
type: 'massCreation',
|
|
||||||
creation: [200, 400, 600],
|
|
||||||
items: [{ email: 'bob@baumeister.de' }, { email: 'bibi@bloxberg.de' }],
|
|
||||||
})
|
|
||||||
await wrapper.findAll('input[type="radio"]').at(1).setChecked()
|
|
||||||
await wrapper.find('textarea').setValue('Test mass create coins')
|
|
||||||
await wrapper.find('input[type="number"]').setValue(200)
|
|
||||||
await wrapper.find('.test-submit').trigger('click')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('updates open creations in store', () => {
|
|
||||||
expect(stateCommitMock).toBeCalledWith('openCreationsPlus', 0)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('emits remove all bookmarks', () => {
|
|
||||||
expect(wrapper.emitted('remove-all-bookmark')).toBeTruthy()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('emits toast failed creations with two emails', () => {
|
|
||||||
expect(wrapper.emitted('toast-failed-creations')).toEqual([
|
|
||||||
[['bob@baumeister.de', 'bibi@bloxberg.de']],
|
|
||||||
])
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('mass creation with error', () => {
|
|
||||||
beforeEach(async () => {
|
|
||||||
jest.clearAllMocks()
|
|
||||||
apolloMutateMock.mockRejectedValue({
|
|
||||||
message: 'Oh no!',
|
|
||||||
})
|
|
||||||
await wrapper.setProps({
|
|
||||||
type: 'massCreation',
|
|
||||||
creation: [200, 400, 600],
|
|
||||||
items: [{ email: 'bob@baumeister.de' }, { email: 'bibi@bloxberg.de' }],
|
|
||||||
})
|
|
||||||
await wrapper.findAll('input[type="radio"]').at(1).setChecked()
|
|
||||||
await wrapper.find('textarea').setValue('Test mass create coins')
|
|
||||||
await wrapper.find('input[type="number"]').setValue(200)
|
|
||||||
await wrapper.find('.test-submit').trigger('click')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('toasts an error message', () => {
|
|
||||||
expect(toastErrorSpy).toBeCalledWith('Oh no!')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -86,16 +86,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { adminCreateContribution } from '../graphql/adminCreateContribution'
|
import { adminCreateContribution } from '../graphql/adminCreateContribution'
|
||||||
import { adminCreateContributions } from '../graphql/adminCreateContributions'
|
|
||||||
import { creationMonths } from '../mixins/creationMonths'
|
import { creationMonths } from '../mixins/creationMonths'
|
||||||
export default {
|
export default {
|
||||||
name: 'CreationFormular',
|
name: 'CreationFormular',
|
||||||
mixins: [creationMonths],
|
mixins: [creationMonths],
|
||||||
props: {
|
props: {
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
pagetype: {
|
pagetype: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@ -140,58 +135,19 @@ export default {
|
|||||||
updateRadioSelected(name) {
|
updateRadioSelected(name) {
|
||||||
// do we want to reset the memo everytime the month changes?
|
// do we want to reset the memo everytime the month changes?
|
||||||
this.text = this.$t('creation_form.creation_for') + ' ' + name.short + ' ' + name.year
|
this.text = this.$t('creation_form.creation_for') + ' ' + name.short + ' ' + name.year
|
||||||
if (this.type === 'singleCreation') {
|
|
||||||
this.rangeMin = 0
|
this.rangeMin = 0
|
||||||
this.rangeMax = name.creation
|
this.rangeMax = name.creation
|
||||||
}
|
|
||||||
},
|
},
|
||||||
submitCreation() {
|
submitCreation() {
|
||||||
let submitObj = []
|
|
||||||
if (this.type === 'massCreation') {
|
|
||||||
this.items.forEach((item) => {
|
|
||||||
submitObj.push({
|
|
||||||
email: item.email,
|
|
||||||
creationDate: this.selected.date,
|
|
||||||
amount: Number(this.value),
|
|
||||||
memo: this.text,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.mutate({
|
.mutate({
|
||||||
mutation: adminCreateContributions,
|
mutation: adminCreateContribution,
|
||||||
variables: {
|
variables: {
|
||||||
pendingCreations: submitObj,
|
|
||||||
},
|
|
||||||
fetchPolicy: 'no-cache',
|
|
||||||
})
|
|
||||||
.then((result) => {
|
|
||||||
const failedContributions = []
|
|
||||||
this.$store.commit(
|
|
||||||
'openCreationsPlus',
|
|
||||||
result.data.adminCreateContributions.successfulContribution.length,
|
|
||||||
)
|
|
||||||
if (result.data.adminCreateContributions.failedContribution.length > 0) {
|
|
||||||
result.data.adminCreateContributions.failedContribution.forEach((email) => {
|
|
||||||
failedContributions.push(email)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.$emit('remove-all-bookmark')
|
|
||||||
this.$emit('toast-failed-creations', failedContributions)
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
this.toastError(error.message)
|
|
||||||
})
|
|
||||||
} else if (this.type === 'singleCreation') {
|
|
||||||
submitObj = {
|
|
||||||
email: this.item.email,
|
email: this.item.email,
|
||||||
creationDate: this.selected.date,
|
creationDate: this.selected.date,
|
||||||
amount: Number(this.value),
|
amount: Number(this.value),
|
||||||
memo: this.text,
|
memo: this.text,
|
||||||
}
|
},
|
||||||
this.$apollo
|
|
||||||
.mutate({
|
|
||||||
mutation: adminCreateContribution,
|
|
||||||
variables: submitObj,
|
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.$emit('update-user-data', this.item, result.data.adminCreateContribution)
|
this.$emit('update-user-data', this.item, result.data.adminCreateContribution)
|
||||||
@ -211,7 +167,6 @@ export default {
|
|||||||
this.$refs.creationForm.reset()
|
this.$refs.creationForm.reset()
|
||||||
this.value = 0
|
this.value = 0
|
||||||
})
|
})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import CreationTransactionList from './CreationTransactionList.vue'
|
import CreationTransactionList from './CreationTransactionList'
|
||||||
import { toastErrorSpy } from '../../test/testSetup'
|
import { toastErrorSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import DeletedUserFormular from './DeletedUserFormular.vue'
|
import DeletedUserFormular from './DeletedUserFormular'
|
||||||
import { deleteUser } from '../graphql/deleteUser'
|
import { deleteUser } from '../graphql/deleteUser'
|
||||||
import { unDeleteUser } from '../graphql/unDeleteUser'
|
import { unDeleteUser } from '../graphql/unDeleteUser'
|
||||||
import { toastErrorSpy } from '../../test/testSetup'
|
import { toastErrorSpy } from '../../test/testSetup'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import EditCreationFormular from './EditCreationFormular.vue'
|
import EditCreationFormular from './EditCreationFormular'
|
||||||
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import FigureQrCode from './FigureQrCode.vue'
|
import FigureQrCode from './FigureQrCode'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import NavBar from './NavBar.vue'
|
import NavBar from './NavBar'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
@ -68,14 +68,11 @@ describe('NavBar', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('wallet', () => {
|
describe('wallet', () => {
|
||||||
const windowLocationMock = jest.fn()
|
|
||||||
const windowLocation = window.location
|
const windowLocation = window.location
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
delete window.location
|
delete window.location
|
||||||
window.location = {
|
window.location = ''
|
||||||
assign: windowLocationMock,
|
await wrapper.findAll('.nav-item').at(4).find('a').trigger('click')
|
||||||
}
|
|
||||||
await wrapper.findAll('.nav-item').at(5).find('a').trigger('click')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@ -83,8 +80,8 @@ describe('NavBar', () => {
|
|||||||
window.location = windowLocation
|
window.location = windowLocation
|
||||||
})
|
})
|
||||||
|
|
||||||
it.skip('changes window location to wallet', () => {
|
it('changes window location to wallet', () => {
|
||||||
expect(windowLocationMock()).toBe('valid-token')
|
expect(window.location).toBe('http://localhost/authenticate?token=valid-token')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('dispatches logout to store', () => {
|
it('dispatches logout to store', () => {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Overlay from './Overlay.vue'
|
import Overlay from './Overlay'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import OpenCreationsTable from './OpenCreationsTable.vue'
|
import OpenCreationsTable from './OpenCreationsTable'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -117,9 +117,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { toggleRowDetails } from '../../mixins/toggleRowDetails'
|
import { toggleRowDetails } from '../../mixins/toggleRowDetails'
|
||||||
import RowDetails from '../RowDetails.vue'
|
import RowDetails from '../RowDetails'
|
||||||
import EditCreationFormular from '../EditCreationFormular.vue'
|
import EditCreationFormular from '../EditCreationFormular'
|
||||||
import ContributionMessagesList from '../ContributionMessages/ContributionMessagesList.vue'
|
import ContributionMessagesList from '../ContributionMessages/ContributionMessagesList'
|
||||||
|
|
||||||
const iconMap = {
|
const iconMap = {
|
||||||
IN_PROGRESS: 'question-square',
|
IN_PROGRESS: 'question-square',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import SearchUserTable from './SearchUserTable.vue'
|
import SearchUserTable from './SearchUserTable'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,6 @@
|
|||||||
<b-tab :title="$t('creation')" active :disabled="row.item.deletedAt !== null">
|
<b-tab :title="$t('creation')" active :disabled="row.item.deletedAt !== null">
|
||||||
<creation-formular
|
<creation-formular
|
||||||
v-if="!row.item.deletedAt"
|
v-if="!row.item.deletedAt"
|
||||||
type="singleCreation"
|
|
||||||
pagetype="singleCreation"
|
pagetype="singleCreation"
|
||||||
:creation="row.item.creation"
|
:creation="row.item.creation"
|
||||||
:item="row.item"
|
:item="row.item"
|
||||||
@ -92,12 +91,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import CreationFormular from '../CreationFormular.vue'
|
import CreationFormular from '../CreationFormular'
|
||||||
import ConfirmRegisterMailFormular from '../ConfirmRegisterMailFormular.vue'
|
import ConfirmRegisterMailFormular from '../ConfirmRegisterMailFormular'
|
||||||
import CreationTransactionList from '../CreationTransactionList.vue'
|
import CreationTransactionList from '../CreationTransactionList'
|
||||||
import TransactionLinkList from '../TransactionLinkList.vue'
|
import TransactionLinkList from '../TransactionLinkList'
|
||||||
import ChangeUserRoleFormular from '../ChangeUserRoleFormular.vue'
|
import ChangeUserRoleFormular from '../ChangeUserRoleFormular'
|
||||||
import DeletedUserFormular from '../DeletedUserFormular.vue'
|
import DeletedUserFormular from '../DeletedUserFormular'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SearchUserTable',
|
name: 'SearchUserTable',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import StatisticTable from './StatisticTable.vue'
|
import StatisticTable from './StatisticTable'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import TransactionLinkList from './TransactionLinkList.vue'
|
import TransactionLinkList from './TransactionLinkList'
|
||||||
import { listTransactionLinksAdmin } from '../graphql/listTransactionLinksAdmin.js'
|
import { listTransactionLinksAdmin } from '../graphql/listTransactionLinksAdmin.js'
|
||||||
import { toastErrorSpy } from '../../test/testSetup'
|
import { toastErrorSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
@ -9,8 +9,8 @@ const apolloQueryMock = jest.fn()
|
|||||||
apolloQueryMock.mockResolvedValue({
|
apolloQueryMock.mockResolvedValue({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinksAdmin: {
|
listTransactionLinksAdmin: {
|
||||||
linkCount: 8,
|
count: 8,
|
||||||
linkList: [
|
links: [
|
||||||
{
|
{
|
||||||
amount: '19.99',
|
amount: '19.99',
|
||||||
code: '62ef8236ace7217fbd066c5a',
|
code: '62ef8236ace7217fbd066c5a',
|
||||||
|
|||||||
@ -42,8 +42,8 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.rows = result.data.listTransactionLinksAdmin.linkCount
|
this.rows = result.data.listTransactionLinksAdmin.count
|
||||||
this.items = result.data.listTransactionLinksAdmin.linkList
|
this.items = result.data.listTransactionLinksAdmin.links
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.toastError(error.message)
|
this.toastError(error.message)
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
import gql from 'graphql-tag'
|
|
||||||
|
|
||||||
export const adminCreateContributions = gql`
|
|
||||||
mutation ($pendingCreations: [AdminCreateContributionArgs!]!) {
|
|
||||||
adminCreateContributions(pendingCreations: $pendingCreations) {
|
|
||||||
success
|
|
||||||
successfulContribution
|
|
||||||
failedContribution
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
@ -8,8 +8,8 @@ export const listTransactionLinksAdmin = gql`
|
|||||||
userId: $userId
|
userId: $userId
|
||||||
filters: { withRedeemed: true, withExpired: true, withDeleted: true }
|
filters: { withRedeemed: true, withExpired: true, withDeleted: true }
|
||||||
) {
|
) {
|
||||||
linkCount
|
count
|
||||||
linkList {
|
links {
|
||||||
id
|
id
|
||||||
amount
|
amount
|
||||||
holdAvailableAmount
|
holdAvailableAmount
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar'
|
||||||
import ContentFooter from '@/components/ContentFooter.vue'
|
import ContentFooter from '@/components/ContentFooter'
|
||||||
export default {
|
export default {
|
||||||
name: 'defaultLayout',
|
name: 'defaultLayout',
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App'
|
||||||
|
|
||||||
// without this async calls are not working
|
// without this async calls are not working
|
||||||
import 'regenerator-runtime'
|
import 'regenerator-runtime'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import CommunityStatistic from './CommunityStatistic.vue'
|
import CommunityStatistic from './CommunityStatistic'
|
||||||
import { communityStatistics } from '@/graphql/communityStatistics.js'
|
import { communityStatistics } from '@/graphql/communityStatistics.js'
|
||||||
import { toastErrorSpy } from '../../test/testSetup'
|
import { toastErrorSpy } from '../../test/testSetup'
|
||||||
import VueApollo from 'vue-apollo'
|
import VueApollo from 'vue-apollo'
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { communityStatistics } from '@/graphql/communityStatistics.js'
|
import { communityStatistics } from '@/graphql/communityStatistics.js'
|
||||||
import StatisticTable from '../components/Tables/StatisticTable.vue'
|
import StatisticTable from '../components/Tables/StatisticTable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CommunityStatistic',
|
name: 'CommunityStatistic',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionLinks from './ContributionLinks.vue'
|
import ContributionLinks from './ContributionLinks'
|
||||||
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
||||||
import { toastErrorSpy } from '../../test/testSetup'
|
import { toastErrorSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
||||||
import ContributionLink from '../components/ContributionLink/ContributionLink.vue'
|
import ContributionLink from '../components/ContributionLink/ContributionLink'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionLinks',
|
name: 'ContributionLinks',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import CreationConfirm from './CreationConfirm.vue'
|
import CreationConfirm from './CreationConfirm'
|
||||||
import { adminDeleteContribution } from '../graphql/adminDeleteContribution'
|
import { adminDeleteContribution } from '../graphql/adminDeleteContribution'
|
||||||
import { denyContribution } from '../graphql/denyContribution'
|
import { denyContribution } from '../graphql/denyContribution'
|
||||||
import { listAllContributions } from '../graphql/listAllContributions'
|
import { listAllContributions } from '../graphql/listAllContributions'
|
||||||
|
|||||||
@ -71,8 +71,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Overlay from '../components/Overlay.vue'
|
import Overlay from '../components/Overlay'
|
||||||
import OpenCreationsTable from '../components/Tables/OpenCreationsTable.vue'
|
import OpenCreationsTable from '../components/Tables/OpenCreationsTable'
|
||||||
import { listAllContributions } from '../graphql/listAllContributions'
|
import { listAllContributions } from '../graphql/listAllContributions'
|
||||||
import { adminDeleteContribution } from '../graphql/adminDeleteContribution'
|
import { adminDeleteContribution } from '../graphql/adminDeleteContribution'
|
||||||
import { confirmContribution } from '../graphql/confirmContribution'
|
import { confirmContribution } from '../graphql/confirmContribution'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Overview from './Overview.vue'
|
import Overview from './Overview'
|
||||||
import { listAllContributions } from '../graphql/listAllContributions'
|
import { listAllContributions } from '../graphql/listAllContributions'
|
||||||
import VueApollo from 'vue-apollo'
|
import VueApollo from 'vue-apollo'
|
||||||
import { createMockClient } from 'mock-apollo-client'
|
import { createMockClient } from 'mock-apollo-client'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import UserSearch from './UserSearch.vue'
|
import UserSearch from './UserSearch'
|
||||||
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|||||||
@ -58,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import SearchUserTable from '../components/Tables/SearchUserTable.vue'
|
import SearchUserTable from '../components/Tables/SearchUserTable'
|
||||||
import { searchUsers } from '../graphql/searchUsers'
|
import { searchUsers } from '../graphql/searchUsers'
|
||||||
import { creationMonths } from '../mixins/creationMonths'
|
import { creationMonths } from '../mixins/creationMonths'
|
||||||
|
|
||||||
@ -72,7 +72,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
showArrays: false,
|
showArrays: false,
|
||||||
searchResult: [],
|
searchResult: [],
|
||||||
massCreation: [],
|
|
||||||
criteria: '',
|
criteria: '',
|
||||||
filters: {
|
filters: {
|
||||||
byActivated: null,
|
byActivated: null,
|
||||||
|
|||||||
@ -24,9 +24,6 @@ export const mutations = {
|
|||||||
moderator: (state, moderator) => {
|
moderator: (state, moderator) => {
|
||||||
state.moderator = moderator
|
state.moderator = moderator
|
||||||
},
|
},
|
||||||
setUserSelectedInMassCreation: (state, userSelectedInMassCreation) => {
|
|
||||||
state.userSelectedInMassCreation = userSelectedInMassCreation
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ const {
|
|||||||
resetOpenCreations,
|
resetOpenCreations,
|
||||||
setOpenCreations,
|
setOpenCreations,
|
||||||
moderator,
|
moderator,
|
||||||
setUserSelectedInMassCreation,
|
|
||||||
} = mutations
|
} = mutations
|
||||||
const { logout } = actions
|
const { logout } = actions
|
||||||
|
|
||||||
@ -65,14 +64,6 @@ describe('Vuex store', () => {
|
|||||||
expect(state.openCreations).toEqual(12)
|
expect(state.openCreations).toEqual(12)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('setUserSelectedInMassCreation', () => {
|
|
||||||
it('sets userSelectedInMassCreation to given value', () => {
|
|
||||||
const state = { userSelectedInMassCreation: [] }
|
|
||||||
setUserSelectedInMassCreation(state, [0, 1, 2])
|
|
||||||
expect(state.userSelectedInMassCreation).toEqual([0, 1, 2])
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('actions', () => {
|
describe('actions', () => {
|
||||||
|
|||||||
@ -42,7 +42,6 @@ export enum RIGHTS {
|
|||||||
DELETE_USER = 'DELETE_USER',
|
DELETE_USER = 'DELETE_USER',
|
||||||
UNDELETE_USER = 'UNDELETE_USER',
|
UNDELETE_USER = 'UNDELETE_USER',
|
||||||
ADMIN_CREATE_CONTRIBUTION = 'ADMIN_CREATE_CONTRIBUTION',
|
ADMIN_CREATE_CONTRIBUTION = 'ADMIN_CREATE_CONTRIBUTION',
|
||||||
ADMIN_CREATE_CONTRIBUTIONS = 'ADMIN_CREATE_CONTRIBUTIONS',
|
|
||||||
ADMIN_UPDATE_CONTRIBUTION = 'ADMIN_UPDATE_CONTRIBUTION',
|
ADMIN_UPDATE_CONTRIBUTION = 'ADMIN_UPDATE_CONTRIBUTION',
|
||||||
ADMIN_DELETE_CONTRIBUTION = 'ADMIN_DELETE_CONTRIBUTION',
|
ADMIN_DELETE_CONTRIBUTION = 'ADMIN_DELETE_CONTRIBUTION',
|
||||||
LIST_UNCONFIRMED_CONTRIBUTIONS = 'LIST_UNCONFIRMED_CONTRIBUTIONS',
|
LIST_UNCONFIRMED_CONTRIBUTIONS = 'LIST_UNCONFIRMED_CONTRIBUTIONS',
|
||||||
|
|||||||
@ -106,7 +106,7 @@ describe('sendEmailVariants', () => {
|
|||||||
'you have received a message from Bibi Bloxberg regarding your common good contribution “My contribution.”.',
|
'you have received a message from Bibi Bloxberg regarding your common good contribution “My contribution.”.',
|
||||||
)
|
)
|
||||||
expect(result.originalMessage.html).toContain(
|
expect(result.originalMessage.html).toContain(
|
||||||
'To view and reply to the message, go to the “Community” menu in your Gradido account and click on the “My contributions to the common good” tab!',
|
'To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab!',
|
||||||
)
|
)
|
||||||
expect(result.originalMessage.html).toContain(
|
expect(result.originalMessage.html).toContain(
|
||||||
`Link to your account: <a href="${CONFIG.EMAIL_LINK_OVERVIEW}">${CONFIG.EMAIL_LINK_OVERVIEW}</a>`,
|
`Link to your account: <a href="${CONFIG.EMAIL_LINK_OVERVIEW}">${CONFIG.EMAIL_LINK_OVERVIEW}</a>`,
|
||||||
@ -424,7 +424,7 @@ describe('sendEmailVariants', () => {
|
|||||||
'Your public good contribution “My contribution.” was rejected by Bibi Bloxberg.',
|
'Your public good contribution “My contribution.” was rejected by Bibi Bloxberg.',
|
||||||
)
|
)
|
||||||
expect(result.originalMessage.html).toContain(
|
expect(result.originalMessage.html).toContain(
|
||||||
'To see your common good contributions and related messages, go to the “Community” menu in your Gradido account and click on the “My contributions to the common good” tab!',
|
'To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab!',
|
||||||
)
|
)
|
||||||
expect(result.originalMessage.html).toContain(
|
expect(result.originalMessage.html).toContain(
|
||||||
`Link to your account: <a href="${CONFIG.EMAIL_LINK_OVERVIEW}">${CONFIG.EMAIL_LINK_OVERVIEW}</a>`,
|
`Link to your account: <a href="${CONFIG.EMAIL_LINK_OVERVIEW}">${CONFIG.EMAIL_LINK_OVERVIEW}</a>`,
|
||||||
@ -502,7 +502,7 @@ describe('sendEmailVariants', () => {
|
|||||||
'Your public good contribution “My contribution.” was deleted by Bibi Bloxberg.',
|
'Your public good contribution “My contribution.” was deleted by Bibi Bloxberg.',
|
||||||
)
|
)
|
||||||
expect(result.originalMessage.html).toContain(
|
expect(result.originalMessage.html).toContain(
|
||||||
'To see your common good contributions and related messages, go to the “Community” menu in your Gradido account and click on the “My contributions to the common good” tab!',
|
'To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab!',
|
||||||
)
|
)
|
||||||
expect(result.originalMessage.html).toContain(
|
expect(result.originalMessage.html).toContain(
|
||||||
`Link to your account: <a href="${CONFIG.EMAIL_LINK_OVERVIEW}">${CONFIG.EMAIL_LINK_OVERVIEW}</a>`,
|
`Link to your account: <a href="${CONFIG.EMAIL_LINK_OVERVIEW}">${CONFIG.EMAIL_LINK_OVERVIEW}</a>`,
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
import { ObjectType, Field } from 'type-graphql'
|
|
||||||
|
|
||||||
@ObjectType()
|
|
||||||
export class AdminCreateContributions {
|
|
||||||
constructor() {
|
|
||||||
this.success = false
|
|
||||||
this.successfulContribution = []
|
|
||||||
this.failedContribution = []
|
|
||||||
}
|
|
||||||
|
|
||||||
@Field(() => Boolean)
|
|
||||||
success: boolean
|
|
||||||
|
|
||||||
@Field(() => [String])
|
|
||||||
successfulContribution: string[]
|
|
||||||
|
|
||||||
@Field(() => [String])
|
|
||||||
failedContribution: string[]
|
|
||||||
}
|
|
||||||
@ -61,8 +61,8 @@ export class TransactionLink {
|
|||||||
@ObjectType()
|
@ObjectType()
|
||||||
export class TransactionLinkResult {
|
export class TransactionLinkResult {
|
||||||
@Field(() => Int)
|
@Field(() => Int)
|
||||||
linkCount: number
|
count: number
|
||||||
|
|
||||||
@Field(() => [TransactionLink])
|
@Field(() => [TransactionLink])
|
||||||
linkList: TransactionLink[]
|
links: TransactionLink[]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import {
|
|||||||
denyContribution,
|
denyContribution,
|
||||||
confirmContribution,
|
confirmContribution,
|
||||||
adminCreateContribution,
|
adminCreateContribution,
|
||||||
adminCreateContributions,
|
|
||||||
adminUpdateContribution,
|
adminUpdateContribution,
|
||||||
adminDeleteContribution,
|
adminDeleteContribution,
|
||||||
login,
|
login,
|
||||||
@ -1657,21 +1656,6 @@ describe('ContributionResolver', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('adminCreateContributions', () => {
|
|
||||||
it('returns an error', async () => {
|
|
||||||
await expect(
|
|
||||||
mutate({
|
|
||||||
mutation: adminCreateContributions,
|
|
||||||
variables: { pendingCreations: [variables] },
|
|
||||||
}),
|
|
||||||
).resolves.toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
errors: [new GraphQLError('401 Unauthorized')],
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('adminUpdateContribution', () => {
|
describe('adminUpdateContribution', () => {
|
||||||
it('returns an error', async () => {
|
it('returns an error', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
@ -1751,21 +1735,6 @@ describe('ContributionResolver', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('adminCreateContributions', () => {
|
|
||||||
it('returns an error', async () => {
|
|
||||||
await expect(
|
|
||||||
mutate({
|
|
||||||
mutation: adminCreateContributions,
|
|
||||||
variables: { pendingCreations: [variables] },
|
|
||||||
}),
|
|
||||||
).resolves.toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
errors: [new GraphQLError('401 Unauthorized')],
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('adminUpdateContribution', () => {
|
describe('adminUpdateContribution', () => {
|
||||||
it('returns an error', async () => {
|
it('returns an error', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
@ -2096,59 +2065,13 @@ describe('ContributionResolver', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('adminCreateContributions', () => {
|
describe('adminUpdateContribution', () => {
|
||||||
// at this point we have this data in DB:
|
// at this point we have this data in DB:
|
||||||
// bibi@bloxberg.de: [1000, 1000, 800]
|
// bibi@bloxberg.de: [1000, 1000, 800]
|
||||||
// peter@lustig.de: [1000, 600, 1000]
|
// peter@lustig.de: [1000, 600, 1000]
|
||||||
// stephen@hawking.uk: [1000, 1000, 1000] - deleted
|
// stephen@hawking.uk: [1000, 1000, 1000] - deleted
|
||||||
// garrick@ollivander.com: [1000, 1000, 1000] - not activated
|
// garrick@ollivander.com: [1000, 1000, 1000] - not activated
|
||||||
|
|
||||||
const massCreationVariables = [
|
|
||||||
'bibi@bloxberg.de',
|
|
||||||
'peter@lustig.de',
|
|
||||||
'stephen@hawking.uk',
|
|
||||||
'garrick@ollivander.com',
|
|
||||||
'bob@baumeister.de',
|
|
||||||
].map((email) => {
|
|
||||||
return {
|
|
||||||
email,
|
|
||||||
amount: new Decimal(500),
|
|
||||||
memo: 'Grundeinkommen',
|
|
||||||
creationDate: contributionDateFormatter(new Date()),
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
it('returns success, two successful creation and three failed creations', async () => {
|
|
||||||
await expect(
|
|
||||||
mutate({
|
|
||||||
mutation: adminCreateContributions,
|
|
||||||
variables: { pendingCreations: massCreationVariables },
|
|
||||||
}),
|
|
||||||
).resolves.toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
data: {
|
|
||||||
adminCreateContributions: {
|
|
||||||
success: true,
|
|
||||||
successfulContribution: ['bibi@bloxberg.de', 'peter@lustig.de'],
|
|
||||||
failedContribution: [
|
|
||||||
'stephen@hawking.uk',
|
|
||||||
'garrick@ollivander.com',
|
|
||||||
'bob@baumeister.de',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('adminUpdateContribution', () => {
|
|
||||||
// at this I expect to have this data in DB:
|
|
||||||
// bibi@bloxberg.de: [1000, 1000, 300]
|
|
||||||
// peter@lustig.de: [1000, 600, 500]
|
|
||||||
// stephen@hawking.uk: [1000, 1000, 1000] - deleted
|
|
||||||
// garrick@ollivander.com: [1000, 1000, 1000] - not activated
|
|
||||||
|
|
||||||
describe('user for creation to update does not exist', () => {
|
describe('user for creation to update does not exist', () => {
|
||||||
it('throws an error', async () => {
|
it('throws an error', async () => {
|
||||||
jest.clearAllMocks()
|
jest.clearAllMocks()
|
||||||
@ -2362,7 +2285,7 @@ describe('ContributionResolver', () => {
|
|||||||
date: expect.any(String),
|
date: expect.any(String),
|
||||||
memo: 'Das war leider zu Viel!',
|
memo: 'Das war leider zu Viel!',
|
||||||
amount: '200',
|
amount: '200',
|
||||||
creation: ['1000', '800', '500'],
|
creation: ['1000', '800', '1000'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@ -2786,15 +2709,15 @@ describe('ContributionResolver', () => {
|
|||||||
resetToken()
|
resetToken()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns 19 creations in total', async () => {
|
it('returns 17 creations in total', async () => {
|
||||||
const {
|
const {
|
||||||
data: { adminListAllContributions: contributionListObject },
|
data: { adminListAllContributions: contributionListObject },
|
||||||
}: { data: { adminListAllContributions: ContributionListResult } } = await query({
|
}: { data: { adminListAllContributions: ContributionListResult } } = await query({
|
||||||
query: adminListAllContributions,
|
query: adminListAllContributions,
|
||||||
})
|
})
|
||||||
expect(contributionListObject.contributionList).toHaveLength(19)
|
expect(contributionListObject.contributionList).toHaveLength(17)
|
||||||
expect(contributionListObject).toMatchObject({
|
expect(contributionListObject).toMatchObject({
|
||||||
contributionCount: 19,
|
contributionCount: 17,
|
||||||
contributionList: expect.arrayContaining([
|
contributionList: expect.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
amount: expect.decimalEqual(50),
|
amount: expect.decimalEqual(50),
|
||||||
@ -2859,24 +2782,6 @@ describe('ContributionResolver', () => {
|
|||||||
messagesCount: 0,
|
messagesCount: 0,
|
||||||
state: 'PENDING',
|
state: 'PENDING',
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
|
||||||
amount: expect.decimalEqual(500),
|
|
||||||
firstName: 'Bibi',
|
|
||||||
id: expect.any(Number),
|
|
||||||
lastName: 'Bloxberg',
|
|
||||||
memo: 'Grundeinkommen',
|
|
||||||
messagesCount: 0,
|
|
||||||
state: 'PENDING',
|
|
||||||
}),
|
|
||||||
expect.objectContaining({
|
|
||||||
amount: expect.decimalEqual(500),
|
|
||||||
firstName: 'Peter',
|
|
||||||
id: expect.any(Number),
|
|
||||||
lastName: 'Lustig',
|
|
||||||
memo: 'Grundeinkommen',
|
|
||||||
messagesCount: 0,
|
|
||||||
state: 'PENDING',
|
|
||||||
}),
|
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
amount: expect.decimalEqual(10),
|
amount: expect.decimalEqual(10),
|
||||||
firstName: 'Bibi',
|
firstName: 'Bibi',
|
||||||
@ -2971,21 +2876,21 @@ describe('ContributionResolver', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns five pending creations with page size set to 5', async () => {
|
it('returns two pending creations with page size set to 2', async () => {
|
||||||
const {
|
const {
|
||||||
data: { adminListAllContributions: contributionListObject },
|
data: { adminListAllContributions: contributionListObject },
|
||||||
}: { data: { adminListAllContributions: ContributionListResult } } = await query({
|
}: { data: { adminListAllContributions: ContributionListResult } } = await query({
|
||||||
query: adminListAllContributions,
|
query: adminListAllContributions,
|
||||||
variables: {
|
variables: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 5,
|
pageSize: 2,
|
||||||
order: Order.DESC,
|
order: Order.DESC,
|
||||||
statusFilter: ['PENDING'],
|
statusFilter: ['PENDING'],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
expect(contributionListObject.contributionList).toHaveLength(5)
|
expect(contributionListObject.contributionList).toHaveLength(2)
|
||||||
expect(contributionListObject).toMatchObject({
|
expect(contributionListObject).toMatchObject({
|
||||||
contributionCount: 6,
|
contributionCount: 4,
|
||||||
contributionList: expect.arrayContaining([
|
contributionList: expect.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
amount: '400',
|
amount: '400',
|
||||||
@ -3005,33 +2910,6 @@ describe('ContributionResolver', () => {
|
|||||||
messagesCount: 0,
|
messagesCount: 0,
|
||||||
state: 'PENDING',
|
state: 'PENDING',
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
|
||||||
amount: '500',
|
|
||||||
firstName: 'Bibi',
|
|
||||||
id: expect.any(Number),
|
|
||||||
lastName: 'Bloxberg',
|
|
||||||
memo: 'Grundeinkommen',
|
|
||||||
messagesCount: 0,
|
|
||||||
state: 'PENDING',
|
|
||||||
}),
|
|
||||||
expect.objectContaining({
|
|
||||||
amount: '500',
|
|
||||||
firstName: 'Peter',
|
|
||||||
id: expect.any(Number),
|
|
||||||
lastName: 'Lustig',
|
|
||||||
memo: 'Grundeinkommen',
|
|
||||||
messagesCount: 0,
|
|
||||||
state: 'PENDING',
|
|
||||||
}),
|
|
||||||
expect.objectContaining({
|
|
||||||
amount: '100',
|
|
||||||
firstName: 'Peter',
|
|
||||||
id: expect.any(Number),
|
|
||||||
lastName: 'Lustig',
|
|
||||||
memo: 'Test env contribution',
|
|
||||||
messagesCount: 0,
|
|
||||||
state: 'PENDING',
|
|
||||||
}),
|
|
||||||
expect.not.objectContaining({
|
expect.not.objectContaining({
|
||||||
state: 'DENIED',
|
state: 'DENIED',
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import { UserContact } from '@entity/UserContact'
|
|||||||
import { User as DbUser } from '@entity/User'
|
import { User as DbUser } from '@entity/User'
|
||||||
import { Transaction as DbTransaction } from '@entity/Transaction'
|
import { Transaction as DbTransaction } from '@entity/Transaction'
|
||||||
|
|
||||||
import { AdminCreateContributions } from '@model/AdminCreateContributions'
|
|
||||||
import { AdminUpdateContribution } from '@model/AdminUpdateContribution'
|
import { AdminUpdateContribution } from '@model/AdminUpdateContribution'
|
||||||
import { Contribution, ContributionListResult } from '@model/Contribution'
|
import { Contribution, ContributionListResult } from '@model/Contribution'
|
||||||
import { Decay } from '@model/Decay'
|
import { Decay } from '@model/Decay'
|
||||||
@ -318,33 +317,6 @@ export class ContributionResolver {
|
|||||||
return getUserCreation(emailContact.userId, clientTimezoneOffset)
|
return getUserCreation(emailContact.userId, clientTimezoneOffset)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authorized([RIGHTS.ADMIN_CREATE_CONTRIBUTIONS])
|
|
||||||
@Mutation(() => AdminCreateContributions)
|
|
||||||
async adminCreateContributions(
|
|
||||||
@Arg('pendingCreations', () => [AdminCreateContributionArgs])
|
|
||||||
contributions: AdminCreateContributionArgs[],
|
|
||||||
@Ctx() context: Context,
|
|
||||||
): Promise<AdminCreateContributions> {
|
|
||||||
let success = false
|
|
||||||
const successfulContribution: string[] = []
|
|
||||||
const failedContribution: string[] = []
|
|
||||||
for (const contribution of contributions) {
|
|
||||||
await this.adminCreateContribution(contribution, context)
|
|
||||||
.then(() => {
|
|
||||||
successfulContribution.push(contribution.email)
|
|
||||||
success = true
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
failedContribution.push(contribution.email)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
success,
|
|
||||||
successfulContribution,
|
|
||||||
failedContribution,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Authorized([RIGHTS.ADMIN_UPDATE_CONTRIBUTION])
|
@Authorized([RIGHTS.ADMIN_UPDATE_CONTRIBUTION])
|
||||||
@Mutation(() => AdminUpdateContribution)
|
@Mutation(() => AdminUpdateContribution)
|
||||||
async adminUpdateContribution(
|
async adminUpdateContribution(
|
||||||
|
|||||||
@ -600,6 +600,26 @@ describe('TransactionLinkResolver', () => {
|
|||||||
resetToken()
|
resetToken()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('', () => {
|
||||||
|
it('throws error when user does not exists', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
|
await expect(
|
||||||
|
mutate({
|
||||||
|
mutation: listTransactionLinksAdmin,
|
||||||
|
variables: {
|
||||||
|
userId: -1,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).resolves.toMatchObject({
|
||||||
|
errors: [new GraphQLError('Could not find requested User')],
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('logs the error thrown', () => {
|
||||||
|
expect(logger.error).toBeCalledWith('Could not find requested User', -1)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('without any filters', () => {
|
describe('without any filters', () => {
|
||||||
it('finds 6 open transaction links and no deleted or redeemed', async () => {
|
it('finds 6 open transaction links and no deleted or redeemed', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
@ -611,8 +631,8 @@ describe('TransactionLinkResolver', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinksAdmin: {
|
listTransactionLinksAdmin: {
|
||||||
linkCount: 6,
|
count: 6,
|
||||||
linkList: expect.not.arrayContaining([
|
links: expect.not.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
||||||
createdAt: expect.any(String),
|
createdAt: expect.any(String),
|
||||||
@ -647,8 +667,8 @@ describe('TransactionLinkResolver', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinksAdmin: {
|
listTransactionLinksAdmin: {
|
||||||
linkCount: 6,
|
count: 6,
|
||||||
linkList: expect.not.arrayContaining([
|
links: expect.not.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
||||||
createdAt: expect.any(String),
|
createdAt: expect.any(String),
|
||||||
@ -681,8 +701,8 @@ describe('TransactionLinkResolver', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinksAdmin: {
|
listTransactionLinksAdmin: {
|
||||||
linkCount: 7,
|
count: 7,
|
||||||
linkList: expect.arrayContaining([
|
links: expect.arrayContaining([
|
||||||
expect.not.objectContaining({
|
expect.not.objectContaining({
|
||||||
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
||||||
createdAt: expect.any(String),
|
createdAt: expect.any(String),
|
||||||
@ -715,8 +735,8 @@ describe('TransactionLinkResolver', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinksAdmin: {
|
listTransactionLinksAdmin: {
|
||||||
linkCount: 7,
|
count: 7,
|
||||||
linkList: expect.arrayContaining([
|
links: expect.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
||||||
createdAt: expect.any(String),
|
createdAt: expect.any(String),
|
||||||
@ -752,8 +772,8 @@ describe('TransactionLinkResolver', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinksAdmin: {
|
listTransactionLinksAdmin: {
|
||||||
linkCount: 6,
|
count: 6,
|
||||||
linkList: expect.arrayContaining([
|
links: expect.arrayContaining([
|
||||||
expect.not.objectContaining({
|
expect.not.objectContaining({
|
||||||
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(',
|
||||||
createdAt: expect.any(String),
|
createdAt: expect.any(String),
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { randomBytes } from 'crypto'
|
import { randomBytes } from 'crypto'
|
||||||
import Decimal from 'decimal.js-light'
|
import Decimal from 'decimal.js-light'
|
||||||
|
|
||||||
import { getConnection, MoreThan, FindOperator } from '@dbTools/typeorm'
|
import { getConnection } from '@dbTools/typeorm'
|
||||||
|
|
||||||
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
|
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
|
||||||
import { User as DbUser } from '@entity/User'
|
import { User as DbUser } from '@entity/User'
|
||||||
@ -13,7 +13,6 @@ import { User } from '@model/User'
|
|||||||
import { ContributionLink } from '@model/ContributionLink'
|
import { ContributionLink } from '@model/ContributionLink'
|
||||||
import { Decay } from '@model/Decay'
|
import { Decay } from '@model/Decay'
|
||||||
import { TransactionLink, TransactionLinkResult } from '@model/TransactionLink'
|
import { TransactionLink, TransactionLinkResult } from '@model/TransactionLink'
|
||||||
import { Order } from '@enum/Order'
|
|
||||||
import { ContributionType } from '@enum/ContributionType'
|
import { ContributionType } from '@enum/ContributionType'
|
||||||
import { ContributionStatus } from '@enum/ContributionStatus'
|
import { ContributionStatus } from '@enum/ContributionStatus'
|
||||||
import { TransactionTypeId } from '@enum/TransactionTypeId'
|
import { TransactionTypeId } from '@enum/TransactionTypeId'
|
||||||
@ -35,6 +34,7 @@ import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
|
|||||||
import LogError from '@/server/LogError'
|
import LogError from '@/server/LogError'
|
||||||
|
|
||||||
import { getLastTransaction } from './util/getLastTransaction'
|
import { getLastTransaction } from './util/getLastTransaction'
|
||||||
|
import transactionLinkList from './util/transactionLinkList'
|
||||||
|
|
||||||
// TODO: do not export, test it inside the resolver
|
// TODO: do not export, test it inside the resolver
|
||||||
export const transactionLinkCode = (date: Date): string => {
|
export const transactionLinkCode = (date: Date): string => {
|
||||||
@ -145,30 +145,6 @@ export class TransactionLinkResolver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Authorized([RIGHTS.LIST_TRANSACTION_LINKS])
|
|
||||||
@Query(() => [TransactionLink])
|
|
||||||
async listTransactionLinks(
|
|
||||||
@Args()
|
|
||||||
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
|
|
||||||
@Ctx() context: Context,
|
|
||||||
): Promise<TransactionLink[]> {
|
|
||||||
const user = getUser(context)
|
|
||||||
// const now = new Date()
|
|
||||||
const transactionLinks = await DbTransactionLink.find({
|
|
||||||
where: {
|
|
||||||
userId: user.id,
|
|
||||||
redeemedBy: null,
|
|
||||||
// validUntil: MoreThan(now),
|
|
||||||
},
|
|
||||||
order: {
|
|
||||||
createdAt: order,
|
|
||||||
},
|
|
||||||
skip: (currentPage - 1) * pageSize,
|
|
||||||
take: pageSize,
|
|
||||||
})
|
|
||||||
return transactionLinks.map((tl) => new TransactionLink(tl, new User(user)))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Authorized([RIGHTS.REDEEM_TRANSACTION_LINK])
|
@Authorized([RIGHTS.REDEEM_TRANSACTION_LINK])
|
||||||
@Mutation(() => Boolean)
|
@Mutation(() => Boolean)
|
||||||
async redeemTransactionLink(
|
async redeemTransactionLink(
|
||||||
@ -342,43 +318,38 @@ export class TransactionLinkResolver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Authorized([RIGHTS.LIST_TRANSACTION_LINKS])
|
||||||
|
@Query(() => TransactionLinkResult)
|
||||||
|
async listTransactionLinks(
|
||||||
|
@Args()
|
||||||
|
paginated: Paginated,
|
||||||
|
@Ctx() context: Context,
|
||||||
|
): Promise<TransactionLinkResult> {
|
||||||
|
return transactionLinkList(
|
||||||
|
paginated,
|
||||||
|
{
|
||||||
|
withDeleted: false,
|
||||||
|
withExpired: true,
|
||||||
|
withRedeemed: false,
|
||||||
|
},
|
||||||
|
getUser(context),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Authorized([RIGHTS.LIST_TRANSACTION_LINKS_ADMIN])
|
@Authorized([RIGHTS.LIST_TRANSACTION_LINKS_ADMIN])
|
||||||
@Query(() => TransactionLinkResult)
|
@Query(() => TransactionLinkResult)
|
||||||
async listTransactionLinksAdmin(
|
async listTransactionLinksAdmin(
|
||||||
@Args()
|
@Args()
|
||||||
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
|
paginated: Paginated,
|
||||||
@Arg('filters', () => TransactionLinkFilters, { nullable: true })
|
@Arg('filters', () => TransactionLinkFilters, { nullable: true })
|
||||||
filters: TransactionLinkFilters,
|
filters: TransactionLinkFilters | null,
|
||||||
@Arg('userId', () => Int)
|
@Arg('userId', () => Int)
|
||||||
userId: number,
|
userId: number,
|
||||||
): Promise<TransactionLinkResult> {
|
): Promise<TransactionLinkResult> {
|
||||||
const user = await DbUser.findOneOrFail({ id: userId })
|
const user = await DbUser.findOne({ id: userId })
|
||||||
const where: {
|
if (!user) {
|
||||||
userId: number
|
throw new LogError('Could not find requested User', userId)
|
||||||
redeemedBy?: number | null
|
|
||||||
validUntil?: FindOperator<Date> | null
|
|
||||||
} = {
|
|
||||||
userId,
|
|
||||||
redeemedBy: null,
|
|
||||||
validUntil: MoreThan(new Date()),
|
|
||||||
}
|
|
||||||
if (filters) {
|
|
||||||
if (filters.withRedeemed) delete where.redeemedBy
|
|
||||||
if (filters.withExpired) delete where.validUntil
|
|
||||||
}
|
|
||||||
const [transactionLinks, count] = await DbTransactionLink.findAndCount({
|
|
||||||
where,
|
|
||||||
withDeleted: filters ? filters.withDeleted : false,
|
|
||||||
order: {
|
|
||||||
createdAt: order,
|
|
||||||
},
|
|
||||||
skip: (currentPage - 1) * pageSize,
|
|
||||||
take: pageSize,
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
linkCount: count,
|
|
||||||
linkList: transactionLinks.map((tl) => new TransactionLink(tl, new User(user))),
|
|
||||||
}
|
}
|
||||||
|
return transactionLinkList(paginated, filters, user)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
38
backend/src/graphql/resolver/util/transactionLinkList.ts
Normal file
38
backend/src/graphql/resolver/util/transactionLinkList.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import { MoreThan } from '@dbTools/typeorm'
|
||||||
|
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
|
||||||
|
import { User as DbUser } from '@entity/User'
|
||||||
|
import { Order } from '@enum/Order'
|
||||||
|
import Paginated from '@arg/Paginated'
|
||||||
|
import TransactionLinkFilters from '@arg/TransactionLinkFilters'
|
||||||
|
import { TransactionLink, TransactionLinkResult } from '@model/TransactionLink'
|
||||||
|
import { User } from '@/graphql/model/User'
|
||||||
|
|
||||||
|
export default async function transactionLinkList(
|
||||||
|
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
|
||||||
|
filters: TransactionLinkFilters | null,
|
||||||
|
user: DbUser,
|
||||||
|
): Promise<TransactionLinkResult> {
|
||||||
|
const { withDeleted, withExpired, withRedeemed } = filters || {
|
||||||
|
withDeleted: false,
|
||||||
|
withExpired: false,
|
||||||
|
withRedeemed: false,
|
||||||
|
}
|
||||||
|
const [transactionLinks, count] = await DbTransactionLink.findAndCount({
|
||||||
|
where: {
|
||||||
|
userId: user.id,
|
||||||
|
...(!withRedeemed && { redeemedBy: null }),
|
||||||
|
...(!withExpired && { validUntil: MoreThan(new Date()) }),
|
||||||
|
},
|
||||||
|
withDeleted,
|
||||||
|
order: {
|
||||||
|
createdAt: order,
|
||||||
|
},
|
||||||
|
skip: (currentPage - 1) * pageSize,
|
||||||
|
take: pageSize,
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
count,
|
||||||
|
links: transactionLinks.map((tl) => new TransactionLink(tl, new User(user))),
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"addedContributionMessage": {
|
"addedContributionMessage": {
|
||||||
"commonGoodContributionMessage": "du hast zu deinem Gemeinwohl-Beitrag „{contributionMemo}“ eine Nachricht von {senderFirstName} {senderLastName} erhalten.",
|
"commonGoodContributionMessage": "du hast zu deinem Gemeinwohl-Beitrag „{contributionMemo}“ eine Nachricht von {senderFirstName} {senderLastName} erhalten.",
|
||||||
"subject": "Gradido: Nachricht zu deinem Gemeinwohl-Beitrag",
|
"subject": "Gradido: Nachricht zu deinem Gemeinwohl-Beitrag",
|
||||||
"toSeeAndAnswerMessage": "Um die Nachricht zu sehen und darauf zu antworten, gehe in deinem Gradido-Konto ins Menü „Gemeinschaft“ auf den Tab „Meine Beiträge zum Gemeinwohl“!"
|
"toSeeAndAnswerMessage": "Um die Nachricht zu sehen und darauf zu antworten, gehe in deinem Gradido-Konto ins Menü „Schöpfen“ auf den Tab „Meine Beiträge“!"
|
||||||
},
|
},
|
||||||
"contributionConfirmed": {
|
"contributionConfirmed": {
|
||||||
"commonGoodContributionConfirmed": "dein Gemeinwohl-Beitrag „{contributionMemo}“ wurde soeben von {senderFirstName} {senderLastName} bestätigt und in deinem Gradido-Konto gutgeschrieben.",
|
"commonGoodContributionConfirmed": "dein Gemeinwohl-Beitrag „{contributionMemo}“ wurde soeben von {senderFirstName} {senderLastName} bestätigt und in deinem Gradido-Konto gutgeschrieben.",
|
||||||
@ -26,12 +26,12 @@
|
|||||||
"contributionDeleted": {
|
"contributionDeleted": {
|
||||||
"commonGoodContributionDeleted": "dein Gemeinwohl-Beitrag „{contributionMemo}“ wurde von {senderFirstName} {senderLastName} gelöscht.",
|
"commonGoodContributionDeleted": "dein Gemeinwohl-Beitrag „{contributionMemo}“ wurde von {senderFirstName} {senderLastName} gelöscht.",
|
||||||
"subject": "Gradido: Dein Gemeinwohl-Beitrag wurde gelöscht",
|
"subject": "Gradido: Dein Gemeinwohl-Beitrag wurde gelöscht",
|
||||||
"toSeeContributionsAndMessages": "Um deine Gemeinwohl-Beiträge und dazugehörige Nachrichten zu sehen, gehe in deinem Gradido-Konto ins Menü „Gemeinschaft“ auf den Tab „Meine Beiträge zum Gemeinwohl“!"
|
"toSeeContributionsAndMessages": "Um deine Gemeinwohl-Beiträge und dazugehörige Nachrichten zu sehen, gehe in deinem Gradido-Konto ins Menü „Schöpfen“ auf den Tab „Meine Beiträge“!"
|
||||||
},
|
},
|
||||||
"contributionDenied": {
|
"contributionDenied": {
|
||||||
"commonGoodContributionDenied": "dein Gemeinwohl-Beitrag „{contributionMemo}“ wurde von {senderFirstName} {senderLastName} abgelehnt.",
|
"commonGoodContributionDenied": "dein Gemeinwohl-Beitrag „{contributionMemo}“ wurde von {senderFirstName} {senderLastName} abgelehnt.",
|
||||||
"subject": "Gradido: Dein Gemeinwohl-Beitrag wurde abgelehnt",
|
"subject": "Gradido: Dein Gemeinwohl-Beitrag wurde abgelehnt",
|
||||||
"toSeeContributionsAndMessages": "Um deine Gemeinwohl-Beiträge und dazugehörige Nachrichten zu sehen, gehe in deinem Gradido-Konto ins Menü „Gemeinschaft“ auf den Tab „Meine Beiträge zum Gemeinwohl“!"
|
"toSeeContributionsAndMessages": "Um deine Gemeinwohl-Beiträge und dazugehörige Nachrichten zu sehen, gehe in deinem Gradido-Konto ins Menü „Schöpfen“ auf den Tab „Meine Beiträge“!"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"amountGDD": "Betrag: {amountGDD} GDD",
|
"amountGDD": "Betrag: {amountGDD} GDD",
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
"addedContributionMessage": {
|
"addedContributionMessage": {
|
||||||
"commonGoodContributionMessage": "you have received a message from {senderFirstName} {senderLastName} regarding your common good contribution “{contributionMemo}”.",
|
"commonGoodContributionMessage": "you have received a message from {senderFirstName} {senderLastName} regarding your common good contribution “{contributionMemo}”.",
|
||||||
"subject": "Gradido: Message about your common good contribution",
|
"subject": "Gradido: Message about your common good contribution",
|
||||||
"toSeeAndAnswerMessage": "To view and reply to the message, go to the “Community” menu in your Gradido account and click on the “My contributions to the common good” tab!"
|
"toSeeAndAnswerMessage": "To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab!"
|
||||||
},
|
},
|
||||||
"contributionConfirmed": {
|
"contributionConfirmed": {
|
||||||
"commonGoodContributionConfirmed": "Your public good contribution “{contributionMemo}” has just been confirmed by {senderFirstName} {senderLastName} and credited to your Gradido account.",
|
"commonGoodContributionConfirmed": "Your public good contribution “{contributionMemo}” has just been confirmed by {senderFirstName} {senderLastName} and credited to your Gradido account.",
|
||||||
@ -26,12 +26,12 @@
|
|||||||
"contributionDeleted": {
|
"contributionDeleted": {
|
||||||
"commonGoodContributionDeleted": "Your public good contribution “{contributionMemo}” was deleted by {senderFirstName} {senderLastName}.",
|
"commonGoodContributionDeleted": "Your public good contribution “{contributionMemo}” was deleted by {senderFirstName} {senderLastName}.",
|
||||||
"subject": "Gradido: Your common good contribution was deleted",
|
"subject": "Gradido: Your common good contribution was deleted",
|
||||||
"toSeeContributionsAndMessages": "To see your common good contributions and related messages, go to the “Community” menu in your Gradido account and click on the “My contributions to the common good” tab!"
|
"toSeeContributionsAndMessages": "To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab!"
|
||||||
},
|
},
|
||||||
"contributionDenied": {
|
"contributionDenied": {
|
||||||
"commonGoodContributionDenied": "Your public good contribution “{contributionMemo}” was rejected by {senderFirstName} {senderLastName}.",
|
"commonGoodContributionDenied": "Your public good contribution “{contributionMemo}” was rejected by {senderFirstName} {senderLastName}.",
|
||||||
"subject": "Gradido: Your common good contribution was rejected",
|
"subject": "Gradido: Your common good contribution was rejected",
|
||||||
"toSeeContributionsAndMessages": "To see your common good contributions and related messages, go to the “Community” menu in your Gradido account and click on the “My contributions to the common good” tab!"
|
"toSeeContributionsAndMessages": "To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab!"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"amountGDD": "Amount: {amountGDD} GDD",
|
"amountGDD": "Amount: {amountGDD} GDD",
|
||||||
|
|||||||
@ -126,16 +126,6 @@ export const unDeleteUser = gql`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const adminCreateContributions = gql`
|
|
||||||
mutation ($pendingCreations: [AdminCreateContributionArgs!]!) {
|
|
||||||
adminCreateContributions(pendingCreations: $pendingCreations) {
|
|
||||||
success
|
|
||||||
successfulContribution
|
|
||||||
failedContribution
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
export const adminUpdateContribution = gql`
|
export const adminUpdateContribution = gql`
|
||||||
mutation ($id: Int!, $email: String!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
|
mutation ($id: Int!, $email: String!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
|
||||||
adminUpdateContribution(
|
adminUpdateContribution(
|
||||||
|
|||||||
@ -250,8 +250,8 @@ export const listTransactionLinksAdmin = gql`
|
|||||||
currentPage: $currentPage
|
currentPage: $currentPage
|
||||||
pageSize: $pageSize
|
pageSize: $pageSize
|
||||||
) {
|
) {
|
||||||
linkCount
|
count
|
||||||
linkList {
|
links {
|
||||||
id
|
id
|
||||||
amount
|
amount
|
||||||
holdAvailableAmount
|
holdAvailableAmount
|
||||||
|
|||||||
@ -57,10 +57,15 @@ EMAIL_CODE_REQUEST_TIME=10
|
|||||||
WEBHOOK_ELOPAGE_SECRET=secret
|
WEBHOOK_ELOPAGE_SECRET=secret
|
||||||
|
|
||||||
# Federation
|
# Federation
|
||||||
# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen
|
FEDERATION_DHT_CONFIG_VERSION=v2.2023-02-07
|
||||||
# on an hash created from this topic
|
# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen on an hash created from this topic
|
||||||
# FEDERATION_DHT_TOPIC=GRADIDO_HUB
|
# FEDERATION_DHT_TOPIC=GRADIDO_HUB
|
||||||
# FEDERATION_DHT_SEED=64ebcb0e3ad547848fef4197c6e2332f
|
# FEDERATION_DHT_SEED=64ebcb0e3ad547848fef4197c6e2332f
|
||||||
|
FEDERATION_COMMUNITY_URL=http://stage1.gradido.net
|
||||||
|
# the api port is the baseport, which will be added with the api-version, e.g. 1_0 = 5010
|
||||||
|
FEDERATION_COMMUNITY_API_PORT=5000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# database
|
# database
|
||||||
DATABASE_CONFIG_VERSION=v1.2022-03-18
|
DATABASE_CONFIG_VERSION=v1.2022-03-18
|
||||||
|
|||||||
@ -137,6 +137,9 @@ envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/frontend/.env
|
|||||||
# Configure admin
|
# Configure admin
|
||||||
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/admin/.env.template > $PROJECT_ROOT/admin/.env
|
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/admin/.env.template > $PROJECT_ROOT/admin/.env
|
||||||
|
|
||||||
|
# Configure dht-node
|
||||||
|
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/dht-node/.env.template > $PROJECT_ROOT/dht-node/.env
|
||||||
|
|
||||||
# create cronjob to delete yarn output in /tmp
|
# create cronjob to delete yarn output in /tmp
|
||||||
# crontab -e
|
# crontab -e
|
||||||
# hourly job: 0 * * * * find /tmp -name "yarn--*" -cmin +60 -exec rm -r {} \; > /dev/null
|
# hourly job: 0 * * * * find /tmp -name "yarn--*" -cmin +60 -exec rm -r {} \; > /dev/null
|
||||||
|
|||||||
@ -93,10 +93,12 @@ cp -f $PROJECT_ROOT/database/.env $PROJECT_ROOT/database/.env.bak
|
|||||||
cp -f $PROJECT_ROOT/backend/.env $PROJECT_ROOT/backend/.env.bak
|
cp -f $PROJECT_ROOT/backend/.env $PROJECT_ROOT/backend/.env.bak
|
||||||
cp -f $PROJECT_ROOT/frontend/.env $PROJECT_ROOT/frontend/.env.bak
|
cp -f $PROJECT_ROOT/frontend/.env $PROJECT_ROOT/frontend/.env.bak
|
||||||
cp -f $PROJECT_ROOT/admin/.env $PROJECT_ROOT/admin/.env.bak
|
cp -f $PROJECT_ROOT/admin/.env $PROJECT_ROOT/admin/.env.bak
|
||||||
|
cp -f $PROJECT_ROOT/dht-node/.env $PROJECT_ROOT/dht-node/.env.bak
|
||||||
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/database/.env.template > $PROJECT_ROOT/database/.env
|
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/database/.env.template > $PROJECT_ROOT/database/.env
|
||||||
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/backend/.env.template > $PROJECT_ROOT/backend/.env
|
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/backend/.env.template > $PROJECT_ROOT/backend/.env
|
||||||
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/frontend/.env.template > $PROJECT_ROOT/frontend/.env
|
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/frontend/.env.template > $PROJECT_ROOT/frontend/.env
|
||||||
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/admin/.env.template > $PROJECT_ROOT/admin/.env
|
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/admin/.env.template > $PROJECT_ROOT/admin/.env
|
||||||
|
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/dht-node/.env.template > $PROJECT_ROOT/dht-node/.env
|
||||||
|
|
||||||
# Install & build database
|
# Install & build database
|
||||||
echo 'Updating database' >> $UPDATE_HTML
|
echo 'Updating database' >> $UPDATE_HTML
|
||||||
@ -152,6 +154,25 @@ pm2 delete gradido-admin
|
|||||||
pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start" -l $GRADIDO_LOG_PATH/pm2.admin.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
|
pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start" -l $GRADIDO_LOG_PATH/pm2.admin.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
|
||||||
pm2 save
|
pm2 save
|
||||||
|
|
||||||
|
# Install & build dht-node
|
||||||
|
echo 'Updating dht-node' >> $UPDATE_HTML
|
||||||
|
cd $PROJECT_ROOT/dht-node
|
||||||
|
# TODO maybe handle this differently?
|
||||||
|
unset NODE_ENV
|
||||||
|
yarn install
|
||||||
|
yarn build
|
||||||
|
# TODO maybe handle this differently?
|
||||||
|
export NODE_ENV=production
|
||||||
|
pm2 delete gradido-dht-node
|
||||||
|
if [ ! -z $FEDERATION_DHT_TOPIC ]; then
|
||||||
|
pm2 start --name gradido-dht-node "yarn --cwd $PROJECT_ROOT/dht-node start" -l $GRADIDO_LOG_PATH/pm2.dht-node.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS'
|
||||||
|
else
|
||||||
|
echo "====================================================================="
|
||||||
|
echo "WARNING: FEDERATION_DHT_TOPIC not configured. DHT-Node not started..."
|
||||||
|
echo "====================================================================="
|
||||||
|
fi
|
||||||
|
pm2 save
|
||||||
|
|
||||||
# let nginx showing gradido
|
# let nginx showing gradido
|
||||||
echo 'Configuring nginx to serve gradido again' >> $UPDATE_HTML
|
echo 'Configuring nginx to serve gradido again' >> $UPDATE_HTML
|
||||||
ln -s /etc/nginx/sites-available/gradido.conf /etc/nginx/sites-enabled/
|
ln -s /etc/nginx/sites-available/gradido.conf /etc/nginx/sites-enabled/
|
||||||
|
|||||||
@ -11,9 +11,9 @@ TYPEORM_LOGGING_RELATIVE_PATH=typeorm.dht-node.log
|
|||||||
# LOG_LEVEL=info
|
# LOG_LEVEL=info
|
||||||
|
|
||||||
# Federation
|
# Federation
|
||||||
# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen
|
# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen on an hash created from this topic
|
||||||
# on an hash created from this topic
|
|
||||||
FEDERATION_DHT_TOPIC=GRADIDO_HUB
|
FEDERATION_DHT_TOPIC=GRADIDO_HUB
|
||||||
# FEDERATION_DHT_SEED=64ebcb0e3ad547848fef4197c6e2332f
|
# FEDERATION_DHT_SEED=64ebcb0e3ad547848fef4197c6e2332f
|
||||||
# FEDERATION_COMMUNITY_URL=http://localhost
|
FEDERATION_COMMUNITY_URL=http://localhost
|
||||||
# FEDERATION_COMMUNITY_API_PORT=5000
|
# the api port is the dht baseport, which will be added with the supported api-versions, e.g. 1_0 = 5010
|
||||||
|
FEDERATION_COMMUNITY_API_PORT=5000
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CONFIG_VERSION=$BACKEND_CONFIG_VERSION
|
CONFIG_VERSION=$FEDERATION_DHT_CONFIG_VERSION
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
"pattern": "yyyy-MM-dd",
|
"pattern": "yyyy-MM-dd",
|
||||||
"layout":
|
"layout":
|
||||||
{
|
{
|
||||||
"type": "pattern", "pattern": "%d{ISO8601} %c [%X{user}] [%f : %l] - %m"
|
"type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
|
||||||
},
|
},
|
||||||
"keepFileExt" : true,
|
"keepFileExt" : true,
|
||||||
"fileNameSep" : "_",
|
"fileNameSep" : "_",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"pattern": "yyyy-MM-dd",
|
"pattern": "yyyy-MM-dd",
|
||||||
"layout":
|
"layout":
|
||||||
{
|
{
|
||||||
"type": "pattern", "pattern": "%d{ISO8601} %c [%X{user}] [%f : %l] - %m"
|
"type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
|
||||||
},
|
},
|
||||||
"keepFileExt" : true,
|
"keepFileExt" : true,
|
||||||
"fileNameSep" : "_",
|
"fileNameSep" : "_",
|
||||||
|
|||||||
@ -31,8 +31,8 @@ export const startDHT = async (topic: string): Promise<void> => {
|
|||||||
logger.info(`keyPairDHT: publicKey=${keyPair.publicKey.toString('hex')}`)
|
logger.info(`keyPairDHT: publicKey=${keyPair.publicKey.toString('hex')}`)
|
||||||
logger.debug(`keyPairDHT: secretKey=${keyPair.secretKey.toString('hex')}`)
|
logger.debug(`keyPairDHT: secretKey=${keyPair.secretKey.toString('hex')}`)
|
||||||
|
|
||||||
const ownApiVersions = writeHomeCommunityEnries(keyPair.publicKey)
|
const ownApiVersions = await writeHomeCommunityEnries(keyPair.publicKey)
|
||||||
logger.debug(`ApiList: ${JSON.stringify(ownApiVersions)}`)
|
logger.info(`ApiList: ${JSON.stringify(ownApiVersions)}`)
|
||||||
|
|
||||||
const node = new DHT({ keyPair })
|
const node = new DHT({ keyPair })
|
||||||
|
|
||||||
|
|||||||
@ -123,10 +123,6 @@ Zusätzlich wird als Parameter ein *creationDate* vom User mitgeliefert, das dem
|
|||||||
|
|
||||||
nothing to do
|
nothing to do
|
||||||
|
|
||||||
#### + adminCreateContributions
|
|
||||||
|
|
||||||
Hier wird eine Liste von übergebenen Contributions über den internen Aufruf von *adminCreateContribution()* verarbeitet. Da dort eine Berücksichtigung des User-TimeOffsets notwendig ist, muss hier die UserTime entsprechen im Context weitergereicht werden.
|
|
||||||
|
|
||||||
#### - adminDeleteContribution
|
#### - adminDeleteContribution
|
||||||
|
|
||||||
nothing to do
|
nothing to do
|
||||||
|
|||||||
@ -8,8 +8,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DashboardLayout from '@/layouts/DashboardLayout.vue'
|
import DashboardLayout from '@/layouts/DashboardLayout'
|
||||||
import AuthLayout from '@/layouts/AuthLayout.vue'
|
import AuthLayout from '@/layouts/AuthLayout'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionMessagesFormular from './ContributionMessagesFormular.vue'
|
import ContributionMessagesFormular from './ContributionMessagesFormular'
|
||||||
import { toastErrorSpy, toastSuccessSpy } from '../../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../../test/testSetup'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionMessagesList from './ContributionMessagesList.vue'
|
import ContributionMessagesList from './ContributionMessagesList'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ContributionMessagesListItem from '@/components/ContributionMessages/ContributionMessagesListItem.vue'
|
import ContributionMessagesListItem from '@/components/ContributionMessages/ContributionMessagesListItem'
|
||||||
import ContributionMessagesFormular from '@/components/ContributionMessages/ContributionMessagesFormular.vue'
|
import ContributionMessagesFormular from '@/components/ContributionMessages/ContributionMessagesFormular'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionMessagesList',
|
name: 'ContributionMessagesList',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionMessagesList from './ContributionMessagesList.vue'
|
import ContributionMessagesList from './ContributionMessagesList'
|
||||||
import ContributionMessagesListItem from './ContributionMessagesListItem.vue'
|
import ContributionMessagesListItem from './ContributionMessagesListItem'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Avatar from 'vue-avatar'
|
import Avatar from 'vue-avatar'
|
||||||
import ParseMessage from '@/components/ContributionMessages/ParseMessage.vue'
|
import ParseMessage from '@/components/ContributionMessages/ParseMessage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionMessagesListItem',
|
name: 'ContributionMessagesListItem',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionForm from './ContributionForm.vue'
|
import ContributionForm from './ContributionForm'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -88,9 +88,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import InputHour from '@/components/Inputs/InputHour.vue'
|
import InputHour from '@/components/Inputs/InputHour'
|
||||||
import InputAmount from '@/components/Inputs/InputAmount.vue'
|
import InputAmount from '@/components/Inputs/InputAmount'
|
||||||
import InputTextarea from '@/components/Inputs/InputTextarea.vue'
|
import InputTextarea from '@/components/Inputs/InputTextarea'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionForm',
|
name: 'ContributionForm',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionList from './ContributionList.vue'
|
import ContributionList from './ContributionList'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ContributionListItem from '@/components/Contributions/ContributionListItem.vue'
|
import ContributionListItem from '@/components/Contributions/ContributionListItem'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionList',
|
name: 'ContributionList',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionListItem from './ContributionListItem.vue'
|
import ContributionListItem from './ContributionListItem'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Avatar from 'vue-avatar'
|
import Avatar from 'vue-avatar'
|
||||||
import CollapseIcon from '../TransactionRows/CollapseIcon'
|
import CollapseIcon from '../TransactionRows/CollapseIcon'
|
||||||
import ContributionMessagesList from '@/components/ContributionMessages/ContributionMessagesList.vue'
|
import ContributionMessagesList from '@/components/ContributionMessages/ContributionMessagesList'
|
||||||
import { listContributionMessages } from '../../graphql/queries.js'
|
import { listContributionMessages } from '../../graphql/queries.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import OpenCreationsAmount from './OpenCreationsAmount.vue'
|
import OpenCreationsAmount from './OpenCreationsAmount'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import TransactionLink from '@/components/TransactionLinks/TransactionLink.vue'
|
import TransactionLink from '@/components/TransactionLinks/TransactionLink'
|
||||||
export default {
|
export default {
|
||||||
name: 'CollapseLinksList',
|
name: 'CollapseLinksList',
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import DurationRow from '@/components/TransactionRows/DurationRow.vue'
|
import DurationRow from '@/components/TransactionRows/DurationRow'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DecayInformation-StartBlock',
|
name: 'DecayInformation-StartBlock',
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import DurationRow from '@/components/TransactionRows/DurationRow.vue'
|
import DurationRow from '@/components/TransactionRows/DurationRow'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DecayInformation-Long',
|
name: 'DecayInformation-Long',
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import TransactionForm from './TransactionForm.vue'
|
import TransactionForm from './TransactionForm'
|
||||||
import flushPromises from 'flush-promises'
|
import flushPromises from 'flush-promises'
|
||||||
import { SEND_TYPES } from '@/pages/Send.vue'
|
import { SEND_TYPES } from '@/pages/Send'
|
||||||
import DashboardLayout from '@/layouts/DashboardLayout.vue'
|
import DashboardLayout from '@/layouts/DashboardLayout'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -120,10 +120,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { SEND_TYPES } from '@/pages/Send.vue'
|
import { SEND_TYPES } from '@/pages/Send'
|
||||||
import InputEmail from '@/components/Inputs/InputEmail.vue'
|
import InputEmail from '@/components/Inputs/InputEmail'
|
||||||
import InputAmount from '@/components/Inputs/InputAmount.vue'
|
import InputAmount from '@/components/Inputs/InputAmount'
|
||||||
import InputTextarea from '@/components/Inputs/InputTextarea.vue'
|
import InputTextarea from '@/components/Inputs/InputTextarea'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TransactionForm',
|
name: 'TransactionForm',
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ClipboardCopy from '../ClipboardCopy.vue'
|
import ClipboardCopy from '../ClipboardCopy'
|
||||||
import FigureQrCode from '../QrCode/FigureQrCode.vue'
|
import FigureQrCode from '../QrCode/FigureQrCode'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TransactionResultLink',
|
name: 'TransactionResultLink',
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Transaction from '@/components/Transaction.vue'
|
import Transaction from '@/components/Transaction'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GdtTransactionList',
|
name: 'GdtTransactionList',
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import RedeemInformation from '@/components/LinkInformations/RedeemInformation.vue'
|
import RedeemInformation from '@/components/LinkInformations/RedeemInformation'
|
||||||
import { authLinks } from '@/mixins/authLinks'
|
import { authLinks } from '@/mixins/authLinks'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import RedeemInformation from '@/components/LinkInformations/RedeemInformation.vue'
|
import RedeemInformation from '@/components/LinkInformations/RedeemInformation'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RedeemSelfCreator',
|
name: 'RedeemSelfCreator',
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import RedeemInformation from '@/components/LinkInformations/RedeemInformation.vue'
|
import RedeemInformation from '@/components/LinkInformations/RedeemInformation'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RedeemValid',
|
name: 'RedeemValid',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import AuthNavbar from './Navbar.vue'
|
import AuthNavbar from './Navbar'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
localVue.use(VueRouter)
|
localVue.use(VueRouter)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Sidebar from './Sidebar.vue'
|
import Sidebar from './Sidebar'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Sidebar from '@/components/Menu/Sidebar.vue'
|
import Sidebar from '@/components/Menu/Sidebar'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MobileSidebar',
|
name: 'MobileSidebar',
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Avatar from 'vue-avatar'
|
import Avatar from 'vue-avatar'
|
||||||
import Name from '@/components/TransactionRows/Name.vue'
|
import Name from '@/components/TransactionRows/Name'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LastTransactions',
|
name: 'LastTransactions',
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import CollapseIcon from './TransactionRows/CollapseIcon'
|
import CollapseIcon from './TransactionRows/CollapseIcon'
|
||||||
import TransactionCollapse from './TransactionCollapse.vue'
|
import TransactionCollapse from './TransactionCollapse'
|
||||||
import { GdtEntryType } from '../graphql/enums'
|
import { GdtEntryType } from '../graphql/enums'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -75,7 +75,7 @@ import AmountAndNameRow from '../TransactionRows/AmountAndNameRow'
|
|||||||
import MemoRow from '../TransactionRows/MemoRow'
|
import MemoRow from '../TransactionRows/MemoRow'
|
||||||
import DateRow from '../TransactionRows/DateRow'
|
import DateRow from '../TransactionRows/DateRow'
|
||||||
import DecayRow from '../TransactionRows/DecayRow'
|
import DecayRow from '../TransactionRows/DecayRow'
|
||||||
import FigureQrCode from '@/components/QrCode/FigureQrCode.vue'
|
import FigureQrCode from '@/components/QrCode/FigureQrCode'
|
||||||
import { copyLinks } from '../../mixins/copyLinks'
|
import { copyLinks } from '../../mixins/copyLinks'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -47,7 +47,8 @@ describe('TransactionLinkSummary', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
apolloQueryMock.mockResolvedValue({
|
apolloQueryMock.mockResolvedValue({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinks: [
|
listTransactionLinks: {
|
||||||
|
links: [
|
||||||
{
|
{
|
||||||
amount: '75',
|
amount: '75',
|
||||||
link: 'http://localhost/redeem/ce28664b5308c17f931c0367',
|
link: 'http://localhost/redeem/ce28664b5308c17f931c0367',
|
||||||
@ -93,6 +94,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
wrapper = Wrapper()
|
wrapper = Wrapper()
|
||||||
@ -166,7 +168,8 @@ describe('TransactionLinkSummary', () => {
|
|||||||
jest.clearAllMocks()
|
jest.clearAllMocks()
|
||||||
apolloQueryMock.mockResolvedValue({
|
apolloQueryMock.mockResolvedValue({
|
||||||
data: {
|
data: {
|
||||||
listTransactionLinks: [
|
listTransactionLinks: {
|
||||||
|
links: [
|
||||||
{
|
{
|
||||||
amount: '76',
|
amount: '76',
|
||||||
link: 'http://localhost/redeem/ce28664b5308c17f931c0367',
|
link: 'http://localhost/redeem/ce28664b5308c17f931c0367',
|
||||||
@ -212,6 +215,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
await wrapper.setData({
|
await wrapper.setData({
|
||||||
currentPage: 2,
|
currentPage: 2,
|
||||||
|
|||||||
@ -90,7 +90,10 @@ export default {
|
|||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.transactionLinks = [...this.transactionLinks, ...result.data.listTransactionLinks]
|
this.transactionLinks = [
|
||||||
|
...this.transactionLinks,
|
||||||
|
...result.data.listTransactionLinks.links,
|
||||||
|
]
|
||||||
this.$emit('update-transactions')
|
this.$emit('update-transactions')
|
||||||
this.pending = false
|
this.pending = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
</b-card>
|
</b-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import LanguageSwitchSelect from '@/components/LanguageSwitchSelect.vue'
|
import LanguageSwitchSelect from '@/components/LanguageSwitchSelect'
|
||||||
import { updateUserInfos } from '@/graphql/mutations'
|
import { updateUserInfos } from '@/graphql/mutations'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -126,6 +126,7 @@ export const queryTransactionLink = gql`
|
|||||||
export const listTransactionLinks = gql`
|
export const listTransactionLinks = gql`
|
||||||
query($currentPage: Int = 1, $pageSize: Int = 5) {
|
query($currentPage: Int = 1, $pageSize: Int = 5) {
|
||||||
listTransactionLinks(currentPage: $currentPage, pageSize: $pageSize) {
|
listTransactionLinks(currentPage: $currentPage, pageSize: $pageSize) {
|
||||||
|
links {
|
||||||
id
|
id
|
||||||
amount
|
amount
|
||||||
holdAvailableAmount
|
holdAvailableAmount
|
||||||
@ -136,6 +137,7 @@ export const listTransactionLinks = gql`
|
|||||||
redeemedAt
|
redeemedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const listContributionLinks = gql`
|
export const listContributionLinks = gql`
|
||||||
|
|||||||
@ -81,11 +81,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AuthNavbar from '@/components/Auth/AuthNavbar.vue'
|
import AuthNavbar from '@/components/Auth/AuthNavbar'
|
||||||
import AuthNavbarSmall from '@/components/Auth/AuthNavbarSmall.vue'
|
import AuthNavbarSmall from '@/components/Auth/AuthNavbarSmall'
|
||||||
import AuthCarousel from '@/components/Auth/AuthCarousel.vue'
|
import AuthCarousel from '@/components/Auth/AuthCarousel'
|
||||||
import LanguageSwitch from '@/components/LanguageSwitch2'
|
import LanguageSwitch from '@/components/LanguageSwitch2'
|
||||||
import AuthFooter from '@/components/Auth/AuthFooter.vue'
|
import AuthFooter from '@/components/Auth/AuthFooter'
|
||||||
import CONFIG from '@/config'
|
import CONFIG from '@/config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user