mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into 2249-bug-disable-change-of-month-on-update-contribution
This commit is contained in:
commit
1e965c6db0
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -528,7 +528,7 @@ jobs:
|
|||||||
report_name: Coverage Backend
|
report_name: Coverage Backend
|
||||||
type: lcov
|
type: lcov
|
||||||
result_path: ./backend/coverage/lcov.info
|
result_path: ./backend/coverage/lcov.info
|
||||||
min_coverage: 68
|
min_coverage: 74
|
||||||
token: ${{ github.token }}
|
token: ${{ github.token }}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|||||||
@ -5,6 +5,7 @@ const localVue = global.localVue
|
|||||||
|
|
||||||
const mocks = {
|
const mocks = {
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t) => t),
|
||||||
|
$d: jest.fn((d) => d),
|
||||||
}
|
}
|
||||||
|
|
||||||
const propsData = {
|
const propsData = {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ContributionLinkForm from './ContributionLinkForm.vue'
|
import ContributionLinkForm from './ContributionLinkForm.vue'
|
||||||
import { toastErrorSpy } from '../../test/testSetup'
|
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
||||||
|
import { createContributionLink } from '@/graphql/createContributionLink.js'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
@ -72,48 +73,70 @@ describe('ContributionLinkForm', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// describe('successfull submit', () => {
|
describe('successfull submit', () => {
|
||||||
// beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
// mockAPIcall.mockResolvedValue({
|
apolloMutateMock.mockResolvedValue({
|
||||||
// data: {
|
data: {
|
||||||
// createContributionLink: {
|
createContributionLink: {
|
||||||
// link: 'https://localhost/redeem/CL-1a2345678',
|
link: 'https://localhost/redeem/CL-1a2345678',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// })
|
})
|
||||||
// await wrapper.find('input.test-validFrom').setValue('2022-6-18')
|
await wrapper
|
||||||
// await wrapper.find('input.test-validTo').setValue('2022-7-18')
|
.findAllComponents({ name: 'BFormDatepicker' })
|
||||||
// await wrapper.find('input.test-name').setValue('test name')
|
.at(0)
|
||||||
// await wrapper.find('input.test-memo').setValue('test memo')
|
.vm.$emit('input', '2022-6-18')
|
||||||
// await wrapper.find('input.test-amount').setValue('100')
|
await wrapper
|
||||||
// await wrapper.find('form').trigger('submit')
|
.findAllComponents({ name: 'BFormDatepicker' })
|
||||||
// })
|
.at(1)
|
||||||
|
.vm.$emit('input', '2022-7-18')
|
||||||
|
await wrapper.find('input.test-name').setValue('test name')
|
||||||
|
await wrapper.find('textarea.test-memo').setValue('test memo')
|
||||||
|
await wrapper.find('input.test-amount').setValue('100')
|
||||||
|
await wrapper.find('form').trigger('submit')
|
||||||
|
})
|
||||||
|
|
||||||
// it('calls the API', () => {
|
it('calls the API', () => {
|
||||||
// expect(mockAPIcall).toHaveBeenCalledWith(
|
expect(apolloMutateMock).toHaveBeenCalledWith({
|
||||||
// expect.objectContaining({
|
mutation: createContributionLink,
|
||||||
// variables: {
|
variables: {
|
||||||
// link: 'https://localhost/redeem/CL-1a2345678',
|
validFrom: '2022-6-18',
|
||||||
// },
|
validTo: '2022-7-18',
|
||||||
// }),
|
name: 'test name',
|
||||||
// )
|
amount: '100',
|
||||||
// })
|
memo: 'test memo',
|
||||||
|
cycle: 'ONCE',
|
||||||
|
maxPerCycle: 1,
|
||||||
|
maxAmountPerMonth: '0',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// it('displays the new username', () => {
|
it('toasts a succes message', () => {
|
||||||
// expect(wrapper.find('div.display-username').text()).toEqual('@username')
|
expect(toastSuccessSpy).toBeCalledWith('https://localhost/redeem/CL-1a2345678')
|
||||||
// })
|
})
|
||||||
// })
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('send createContributionLink with error', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
apolloMutateMock.mockRejectedValue({ message: 'OUCH!' })
|
|
||||||
wrapper = Wrapper()
|
|
||||||
wrapper.vm.onSubmit()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('toasts an error message', () => {
|
describe('send createContributionLink with error', () => {
|
||||||
expect(toastErrorSpy).toBeCalledWith('contributionLink.noStartDate')
|
beforeEach(async () => {
|
||||||
|
apolloMutateMock.mockRejectedValue({ message: 'OUCH!' })
|
||||||
|
await wrapper
|
||||||
|
.findAllComponents({ name: 'BFormDatepicker' })
|
||||||
|
.at(0)
|
||||||
|
.vm.$emit('input', '2022-6-18')
|
||||||
|
await wrapper
|
||||||
|
.findAllComponents({ name: 'BFormDatepicker' })
|
||||||
|
.at(1)
|
||||||
|
.vm.$emit('input', '2022-7-18')
|
||||||
|
await wrapper.find('input.test-name').setValue('test name')
|
||||||
|
await wrapper.find('textarea.test-memo').setValue('test memo')
|
||||||
|
await wrapper.find('input.test-amount').setValue('100')
|
||||||
|
await wrapper.find('form').trigger('submit')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('toasts an error message', () => {
|
||||||
|
expect(toastErrorSpy).toBeCalledWith('OUCH!')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contribution-link-form">
|
<div class="contribution-link-form">
|
||||||
<div v-if="updateData" class="text-light bg-info p-3">
|
|
||||||
{{ updateData }}
|
|
||||||
</div>
|
|
||||||
<b-form class="m-5" @submit.prevent="onSubmit" ref="contributionLinkForm">
|
<b-form class="m-5" @submit.prevent="onSubmit" ref="contributionLinkForm">
|
||||||
<!-- Date -->
|
<!-- Date -->
|
||||||
<b-row>
|
<b-row>
|
||||||
@ -68,34 +65,32 @@
|
|||||||
class="test-amount"
|
class="test-amount"
|
||||||
></b-form-input>
|
></b-form-input>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-collapse id="collapse-2">
|
<b-row class="mb-4">
|
||||||
<b-jumbotron>
|
<b-col>
|
||||||
<b-row class="mb-4">
|
<!-- Cycle -->
|
||||||
<b-col>
|
<label for="cycle">{{ $t('contributionLink.cycle') }}</label>
|
||||||
<!-- Cycle -->
|
<b-form-select
|
||||||
<label for="cycle">{{ $t('contributionLink.cycle') }}</label>
|
v-model="form.cycle"
|
||||||
<b-form-select
|
:options="cycle"
|
||||||
v-model="form.cycle"
|
class="mb-3"
|
||||||
:options="cycle"
|
size="lg"
|
||||||
:disabled="disabled"
|
></b-form-select>
|
||||||
class="mb-3"
|
</b-col>
|
||||||
size="lg"
|
<b-col>
|
||||||
></b-form-select>
|
<!-- maxPerCycle -->
|
||||||
</b-col>
|
<label for="maxPerCycle">{{ $t('contributionLink.maxPerCycle') }}</label>
|
||||||
<b-col>
|
<b-form-select
|
||||||
<!-- maxPerCycle -->
|
v-model="form.maxPerCycle"
|
||||||
<label for="maxPerCycle">{{ $t('contributionLink.maxPerCycle') }}</label>
|
:options="maxPerCycle"
|
||||||
<b-form-select
|
:disabled="disabled"
|
||||||
v-model="form.maxPerCycle"
|
class="mb-3"
|
||||||
:options="maxPerCycle"
|
size="lg"
|
||||||
:disabled="disabled"
|
></b-form-select>
|
||||||
class="mb-3"
|
</b-col>
|
||||||
size="lg"
|
</b-row>
|
||||||
></b-form-select>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
|
|
||||||
<!-- Max amount -->
|
<!-- Max amount -->
|
||||||
|
<!--
|
||||||
<b-form-group :label="$t('contributionLink.maximumAmount')">
|
<b-form-group :label="$t('contributionLink.maximumAmount')">
|
||||||
<b-form-input
|
<b-form-input
|
||||||
v-model="form.maxAmountPerMonth"
|
v-model="form.maxAmountPerMonth"
|
||||||
@ -105,8 +100,7 @@
|
|||||||
placeholder="0"
|
placeholder="0"
|
||||||
></b-form-input>
|
></b-form-input>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-jumbotron>
|
-->
|
||||||
</b-collapse>
|
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
<b-button type="submit" variant="primary">{{ $t('contributionLink.create') }}</b-button>
|
<b-button type="submit" variant="primary">{{ $t('contributionLink.create') }}</b-button>
|
||||||
<b-button type="reset" variant="danger" @click.prevent="onReset">
|
<b-button type="reset" variant="danger" @click.prevent="onReset">
|
||||||
@ -143,18 +137,18 @@ export default {
|
|||||||
min: new Date(),
|
min: new Date(),
|
||||||
cycle: [
|
cycle: [
|
||||||
{ value: 'ONCE', text: this.$t('contributionLink.options.cycle.once') },
|
{ value: 'ONCE', text: this.$t('contributionLink.options.cycle.once') },
|
||||||
{ value: 'hourly', text: this.$t('contributionLink.options.cycle.hourly') },
|
// { value: 'hourly', text: this.$t('contributionLink.options.cycle.hourly') },
|
||||||
{ value: 'daily', text: this.$t('contributionLink.options.cycle.daily') },
|
{ value: 'DAILY', text: this.$t('contributionLink.options.cycle.daily') },
|
||||||
{ value: 'weekly', text: this.$t('contributionLink.options.cycle.weekly') },
|
// { value: 'weekly', text: this.$t('contributionLink.options.cycle.weekly') },
|
||||||
{ value: 'monthly', text: this.$t('contributionLink.options.cycle.monthly') },
|
// { value: 'monthly', text: this.$t('contributionLink.options.cycle.monthly') },
|
||||||
{ value: 'yearly', text: this.$t('contributionLink.options.cycle.yearly') },
|
// { value: 'yearly', text: this.$t('contributionLink.options.cycle.yearly') },
|
||||||
],
|
],
|
||||||
maxPerCycle: [
|
maxPerCycle: [
|
||||||
{ value: '1', text: '1 x' },
|
{ value: '1', text: '1 x' },
|
||||||
{ value: '2', text: '2 x' },
|
// { value: '2', text: '2 x' },
|
||||||
{ value: '3', text: '3 x' },
|
// { value: '3', text: '3 x' },
|
||||||
{ value: '4', text: '4 x' },
|
// { value: '4', text: '4 x' },
|
||||||
{ value: '5', text: '5 x' },
|
// { value: '5', text: '5 x' },
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -195,12 +189,8 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
updateData() {
|
|
||||||
return this.contributionLinkData
|
|
||||||
},
|
|
||||||
disabled() {
|
disabled() {
|
||||||
if (this.form.cycle === 'ONCE') return true
|
return true
|
||||||
return false
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ const mockAPIcall = jest.fn()
|
|||||||
|
|
||||||
const mocks = {
|
const mocks = {
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t) => t),
|
||||||
|
$d: jest.fn((d) => d),
|
||||||
$apollo: {
|
$apollo: {
|
||||||
mutate: mockAPIcall,
|
mutate: mockAPIcall,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -64,8 +64,28 @@ export default {
|
|||||||
'amount',
|
'amount',
|
||||||
{ key: 'cycle', label: this.$t('contributionLink.cycle') },
|
{ key: 'cycle', label: this.$t('contributionLink.cycle') },
|
||||||
{ key: 'maxPerCycle', label: this.$t('contributionLink.maxPerCycle') },
|
{ key: 'maxPerCycle', label: this.$t('contributionLink.maxPerCycle') },
|
||||||
{ key: 'validFrom', label: this.$t('contributionLink.validFrom') },
|
{
|
||||||
{ key: 'validTo', label: this.$t('contributionLink.validTo') },
|
key: 'validFrom',
|
||||||
|
label: this.$t('contributionLink.validFrom'),
|
||||||
|
formatter: (value, key, item) => {
|
||||||
|
if (value) {
|
||||||
|
return this.$d(new Date(value))
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'validTo',
|
||||||
|
label: this.$t('contributionLink.validTo'),
|
||||||
|
formatter: (value, key, item) => {
|
||||||
|
if (value) {
|
||||||
|
return this.$d(new Date(value))
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
'delete',
|
'delete',
|
||||||
'edit',
|
'edit',
|
||||||
'show',
|
'show',
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
"cycle": "Zyklus",
|
"cycle": "Zyklus",
|
||||||
"deleted": "Automatische Schöpfung gelöscht!",
|
"deleted": "Automatische Schöpfung gelöscht!",
|
||||||
"deleteNow": "Automatische Creations '{name}' wirklich löschen?",
|
"deleteNow": "Automatische Creations '{name}' wirklich löschen?",
|
||||||
"maximumAmount": "maximaler Betrag",
|
|
||||||
"maxPerCycle": "Wiederholungen",
|
"maxPerCycle": "Wiederholungen",
|
||||||
"memo": "Nachricht",
|
"memo": "Nachricht",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
@ -21,11 +20,7 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"cycle": {
|
"cycle": {
|
||||||
"daily": "täglich",
|
"daily": "täglich",
|
||||||
"hourly": "stündlich",
|
"once": "einmalig"
|
||||||
"monthly": "monatlich",
|
|
||||||
"once": "einmalig",
|
|
||||||
"weekly": "wöchentlich",
|
|
||||||
"yearly": "jährlich"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validFrom": "Startdatum",
|
"validFrom": "Startdatum",
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
"cycle": "Cycle",
|
"cycle": "Cycle",
|
||||||
"deleted": "Automatic creation deleted!",
|
"deleted": "Automatic creation deleted!",
|
||||||
"deleteNow": "Do you really delete automatic creations '{name}'?",
|
"deleteNow": "Do you really delete automatic creations '{name}'?",
|
||||||
"maximumAmount": "Maximum amount",
|
|
||||||
"maxPerCycle": "Repetition",
|
"maxPerCycle": "Repetition",
|
||||||
"memo": "Memo",
|
"memo": "Memo",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
@ -21,11 +20,7 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"cycle": {
|
"cycle": {
|
||||||
"daily": "daily",
|
"daily": "daily",
|
||||||
"hourly": "hourly",
|
"once": "once"
|
||||||
"monthly": "monthly",
|
|
||||||
"once": "once",
|
|
||||||
"weekly": "weekly",
|
|
||||||
"yearly": "yearly"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validFrom": "Start-date",
|
"validFrom": "Start-date",
|
||||||
|
|||||||
@ -78,6 +78,7 @@ const storeCommitMock = jest.fn()
|
|||||||
const mocks = {
|
const mocks = {
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t) => t),
|
||||||
$n: jest.fn((n) => n),
|
$n: jest.fn((n) => n),
|
||||||
|
$d: jest.fn((d) => d),
|
||||||
$apollo: {
|
$apollo: {
|
||||||
query: apolloQueryMock,
|
query: apolloQueryMock,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -5,6 +5,7 @@ module.exports = {
|
|||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'],
|
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'],
|
||||||
setupFiles: ['<rootDir>/test/testSetup.ts'],
|
setupFiles: ['<rootDir>/test/testSetup.ts'],
|
||||||
|
setupFilesAfterEnv: ['<rootDir>/test/extensions.ts'],
|
||||||
modulePathIgnorePatterns: ['<rootDir>/build/'],
|
modulePathIgnorePatterns: ['<rootDir>/build/'],
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
'@/(.*)': '<rootDir>/src/$1',
|
'@/(.*)': '<rootDir>/src/$1',
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
import { registerEnumType } from 'type-graphql'
|
import { registerEnumType } from 'type-graphql'
|
||||||
|
|
||||||
|
// lowercase values are not implemented yet
|
||||||
export enum ContributionCycleType {
|
export enum ContributionCycleType {
|
||||||
ONCE = 'once',
|
ONCE = 'ONCE',
|
||||||
HOUR = 'hour',
|
HOUR = 'hour',
|
||||||
TWO_HOURS = 'two_hours',
|
TWO_HOURS = 'two_hours',
|
||||||
FOUR_HOURS = 'four_hours',
|
FOUR_HOURS = 'four_hours',
|
||||||
EIGHT_HOURS = 'eight_hours',
|
EIGHT_HOURS = 'eight_hours',
|
||||||
HALF_DAY = 'half_day',
|
HALF_DAY = 'half_day',
|
||||||
DAY = 'day',
|
DAILY = 'DAILY',
|
||||||
TWO_DAYS = 'two_days',
|
TWO_DAYS = 'two_days',
|
||||||
THREE_DAYS = 'three_days',
|
THREE_DAYS = 'three_days',
|
||||||
FOUR_DAYS = 'four_days',
|
FOUR_DAYS = 'four_days',
|
||||||
|
|||||||
@ -1202,7 +1202,8 @@ describe('AdminResolver', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('creation update is not valid', () => {
|
describe('creation update is not valid', () => {
|
||||||
it('throws an error', async () => {
|
// as this test has not clearly defined that date, it is a false positive
|
||||||
|
it.skip('throws an error', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: adminUpdateContribution,
|
mutation: adminUpdateContribution,
|
||||||
@ -1227,7 +1228,8 @@ describe('AdminResolver', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('creation update is successful changing month', () => {
|
describe('creation update is successful changing month', () => {
|
||||||
it('returns update creation object', async () => {
|
// skipped as changing the month is currently disable
|
||||||
|
it.skip('returns update creation object', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: adminUpdateContribution,
|
mutation: adminUpdateContribution,
|
||||||
@ -1255,7 +1257,8 @@ describe('AdminResolver', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('creation update is successful without changing month', () => {
|
describe('creation update is successful without changing month', () => {
|
||||||
it('returns update creation object', async () => {
|
// actually this mutation IS changing the month
|
||||||
|
it.skip('returns update creation object', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: adminUpdateContribution,
|
mutation: adminUpdateContribution,
|
||||||
@ -1299,10 +1302,10 @@ describe('AdminResolver', () => {
|
|||||||
lastName: 'Lustig',
|
lastName: 'Lustig',
|
||||||
email: 'peter@lustig.de',
|
email: 'peter@lustig.de',
|
||||||
date: expect.any(String),
|
date: expect.any(String),
|
||||||
memo: 'Das war leider zu Viel!',
|
memo: 'Herzlich Willkommen bei Gradido!',
|
||||||
amount: '200',
|
amount: '400',
|
||||||
moderator: admin.id,
|
moderator: admin.id,
|
||||||
creation: ['1000', '1000', '300'],
|
creation: ['1000', '600', '500'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
@ -1313,7 +1316,7 @@ describe('AdminResolver', () => {
|
|||||||
memo: 'Grundeinkommen',
|
memo: 'Grundeinkommen',
|
||||||
amount: '500',
|
amount: '500',
|
||||||
moderator: admin.id,
|
moderator: admin.id,
|
||||||
creation: ['1000', '1000', '300'],
|
creation: ['1000', '600', '500'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
@ -1792,13 +1795,14 @@ describe('AdminResolver', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('Contribution Links', () => {
|
describe('Contribution Links', () => {
|
||||||
|
const now = new Date()
|
||||||
const variables = {
|
const variables = {
|
||||||
amount: new Decimal(200),
|
amount: new Decimal(200),
|
||||||
name: 'Dokumenta 2022',
|
name: 'Dokumenta 2022',
|
||||||
memo: 'Danke für deine Teilnahme an der Dokumenta 2022',
|
memo: 'Danke für deine Teilnahme an der Dokumenta 2022',
|
||||||
cycle: 'once',
|
cycle: 'once',
|
||||||
validFrom: new Date(2022, 5, 18).toISOString(),
|
validFrom: new Date(2022, 5, 18).toISOString(),
|
||||||
validTo: new Date(2022, 7, 14).toISOString(),
|
validTo: new Date(now.getFullYear() + 1, 7, 14).toISOString(),
|
||||||
maxAmountPerMonth: new Decimal(200),
|
maxAmountPerMonth: new Decimal(200),
|
||||||
maxPerCycle: 1,
|
maxPerCycle: 1,
|
||||||
}
|
}
|
||||||
@ -1980,7 +1984,7 @@ describe('AdminResolver', () => {
|
|||||||
name: 'Dokumenta 2022',
|
name: 'Dokumenta 2022',
|
||||||
memo: 'Danke für deine Teilnahme an der Dokumenta 2022',
|
memo: 'Danke für deine Teilnahme an der Dokumenta 2022',
|
||||||
validFrom: new Date('2022-06-18T00:00:00.000Z'),
|
validFrom: new Date('2022-06-18T00:00:00.000Z'),
|
||||||
validTo: new Date('2022-08-14T00:00:00.000Z'),
|
validTo: expect.any(Date),
|
||||||
cycle: 'once',
|
cycle: 'once',
|
||||||
maxPerCycle: 1,
|
maxPerCycle: 1,
|
||||||
totalMaxCountOfContribution: null,
|
totalMaxCountOfContribution: null,
|
||||||
@ -1990,8 +1994,8 @@ describe('AdminResolver', () => {
|
|||||||
deletedAt: null,
|
deletedAt: null,
|
||||||
code: expect.stringMatching(/^[0-9a-f]{24,24}$/),
|
code: expect.stringMatching(/^[0-9a-f]{24,24}$/),
|
||||||
linkEnabled: true,
|
linkEnabled: true,
|
||||||
// amount: '200',
|
amount: expect.decimalEqual(200),
|
||||||
// maxAmountPerMonth: '200',
|
maxAmountPerMonth: expect.decimalEqual(200),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -2280,7 +2284,7 @@ describe('AdminResolver', () => {
|
|||||||
id: linkId,
|
id: linkId,
|
||||||
name: 'Dokumenta 2023',
|
name: 'Dokumenta 2023',
|
||||||
memo: 'Danke für deine Teilnahme an der Dokumenta 2023',
|
memo: 'Danke für deine Teilnahme an der Dokumenta 2023',
|
||||||
// amount: '400',
|
amount: expect.decimalEqual(400),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -339,6 +339,9 @@ export class AdminResolver {
|
|||||||
let creations = await getUserCreation(user.id)
|
let creations = await getUserCreation(user.id)
|
||||||
if (contributionToUpdate.contributionDate.getMonth() === creationDateObj.getMonth()) {
|
if (contributionToUpdate.contributionDate.getMonth() === creationDateObj.getMonth()) {
|
||||||
creations = updateCreations(creations, contributionToUpdate)
|
creations = updateCreations(creations, contributionToUpdate)
|
||||||
|
} else {
|
||||||
|
logger.error('Currently the month of the contribution cannot change.')
|
||||||
|
throw new Error('Currently the month of the contribution cannot change.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// all possible cases not to be true are thrown in this function
|
// all possible cases not to be true are thrown in this function
|
||||||
@ -675,6 +678,7 @@ export class AdminResolver {
|
|||||||
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
|
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
|
||||||
): Promise<ContributionLinkList> {
|
): Promise<ContributionLinkList> {
|
||||||
const [links, count] = await DbContributionLink.findAndCount({
|
const [links, count] = await DbContributionLink.findAndCount({
|
||||||
|
where: [{ validTo: MoreThan(new Date()) }, { validTo: IsNull() }],
|
||||||
order: { createdAt: order },
|
order: { createdAt: order },
|
||||||
skip: (currentPage - 1) * pageSize,
|
skip: (currentPage - 1) * pageSize,
|
||||||
take: pageSize,
|
take: pageSize,
|
||||||
|
|||||||
@ -490,9 +490,7 @@ describe('ContributionResolver', () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [
|
errors: [new GraphQLError('Currently the month of the contribution cannot change.')],
|
||||||
new GraphQLError('No information for available creations for the given date'),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -164,6 +164,9 @@ export class ContributionResolver {
|
|||||||
let creations = await getUserCreation(user.id)
|
let creations = await getUserCreation(user.id)
|
||||||
if (contributionToUpdate.contributionDate.getMonth() === creationDateObj.getMonth()) {
|
if (contributionToUpdate.contributionDate.getMonth() === creationDateObj.getMonth()) {
|
||||||
creations = updateCreations(creations, contributionToUpdate)
|
creations = updateCreations(creations, contributionToUpdate)
|
||||||
|
} else {
|
||||||
|
logger.error('Currently the month of the contribution cannot change.')
|
||||||
|
throw new Error('Currently the month of the contribution cannot change.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// all possible cases not to be true are thrown in this function
|
// all possible cases not to be true are thrown in this function
|
||||||
|
|||||||
@ -1,4 +1,118 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
|
|
||||||
import { transactionLinkCode } from './TransactionLinkResolver'
|
import { transactionLinkCode } from './TransactionLinkResolver'
|
||||||
|
import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
|
||||||
|
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||||
|
import { cleanDB, testEnvironment } from '@test/helpers'
|
||||||
|
import { userFactory } from '@/seeds/factory/user'
|
||||||
|
import { login, createContributionLink, redeemTransactionLink } from '@/seeds/graphql/mutations'
|
||||||
|
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||||
|
import Decimal from 'decimal.js-light'
|
||||||
|
import { GraphQLError } from 'graphql'
|
||||||
|
|
||||||
|
let mutate: any, con: any
|
||||||
|
let testEnv: any
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
testEnv = await testEnvironment()
|
||||||
|
mutate = testEnv.mutate
|
||||||
|
con = testEnv.con
|
||||||
|
await cleanDB()
|
||||||
|
await userFactory(testEnv, bibiBloxberg)
|
||||||
|
await userFactory(testEnv, peterLustig)
|
||||||
|
})
|
||||||
|
|
||||||
|
afterAll(async () => {
|
||||||
|
await cleanDB()
|
||||||
|
await con.close()
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('TransactionLinkResolver', () => {
|
||||||
|
describe('redeem daily Contribution Link', () => {
|
||||||
|
const now = new Date()
|
||||||
|
let contributionLink: DbContributionLink | undefined
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
await mutate({
|
||||||
|
mutation: login,
|
||||||
|
variables: { email: 'peter@lustig.de', password: 'Aa12345_' },
|
||||||
|
})
|
||||||
|
await mutate({
|
||||||
|
mutation: createContributionLink,
|
||||||
|
variables: {
|
||||||
|
amount: new Decimal(5),
|
||||||
|
name: 'Daily Contribution Link',
|
||||||
|
memo: 'Thank you for contribute daily to the community',
|
||||||
|
cycle: 'DAILY',
|
||||||
|
validFrom: new Date(now.getFullYear(), 0, 1).toISOString(),
|
||||||
|
validTo: new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999).toISOString(),
|
||||||
|
maxAmountPerMonth: new Decimal(200),
|
||||||
|
maxPerCycle: 1,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('has a daily contribution link in the database', async () => {
|
||||||
|
const cls = await DbContributionLink.find()
|
||||||
|
expect(cls).toHaveLength(1)
|
||||||
|
contributionLink = cls[0]
|
||||||
|
expect(contributionLink).toEqual(
|
||||||
|
expect.objectContaining({
|
||||||
|
id: expect.any(Number),
|
||||||
|
name: 'Daily Contribution Link',
|
||||||
|
memo: 'Thank you for contribute daily to the community',
|
||||||
|
validFrom: new Date(now.getFullYear(), 0, 1),
|
||||||
|
validTo: new Date(now.getFullYear(), 11, 31, 23, 59, 59, 0),
|
||||||
|
cycle: 'DAILY',
|
||||||
|
maxPerCycle: 1,
|
||||||
|
totalMaxCountOfContribution: null,
|
||||||
|
maxAccountBalance: null,
|
||||||
|
minGapHours: null,
|
||||||
|
createdAt: expect.any(Date),
|
||||||
|
deletedAt: null,
|
||||||
|
code: expect.stringMatching(/^[0-9a-f]{24,24}$/),
|
||||||
|
linkEnabled: true,
|
||||||
|
// amount: '200',
|
||||||
|
// maxAmountPerMonth: '200',
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('allows the user to redeem the contribution link', async () => {
|
||||||
|
await expect(
|
||||||
|
mutate({
|
||||||
|
mutation: redeemTransactionLink,
|
||||||
|
variables: {
|
||||||
|
code: 'CL-' + (contributionLink ? contributionLink.code : ''),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).resolves.toMatchObject({
|
||||||
|
data: {
|
||||||
|
redeemTransactionLink: true,
|
||||||
|
},
|
||||||
|
errors: undefined,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not allow the user to redeem the contribution link a second time on the same day', async () => {
|
||||||
|
await expect(
|
||||||
|
mutate({
|
||||||
|
mutation: redeemTransactionLink,
|
||||||
|
variables: {
|
||||||
|
code: 'CL-' + (contributionLink ? contributionLink.code : ''),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).resolves.toMatchObject({
|
||||||
|
errors: [
|
||||||
|
new GraphQLError(
|
||||||
|
'Creation from contribution link was not successful. Error: Contribution link already redeemed today',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('transactionLinkCode', () => {
|
describe('transactionLinkCode', () => {
|
||||||
const date = new Date()
|
const date = new Date()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { backendLogger as logger } from '@/server/logger'
|
import { backendLogger as logger } from '@/server/logger'
|
||||||
import { Context, getUser } from '@/server/context'
|
import { Context, getUser } from '@/server/context'
|
||||||
import { getConnection } from '@dbTools/typeorm'
|
import { getConnection, Between } from '@dbTools/typeorm'
|
||||||
import {
|
import {
|
||||||
Resolver,
|
Resolver,
|
||||||
Args,
|
Args,
|
||||||
@ -34,6 +34,7 @@ import { getUserCreation, validateContribution } from './util/creations'
|
|||||||
import { Decay } from '@model/Decay'
|
import { Decay } from '@model/Decay'
|
||||||
import Decimal from 'decimal.js-light'
|
import Decimal from 'decimal.js-light'
|
||||||
import { TransactionTypeId } from '@enum/TransactionTypeId'
|
import { TransactionTypeId } from '@enum/TransactionTypeId'
|
||||||
|
import { ContributionCycleType } from '@enum/ContributionCycleType'
|
||||||
|
|
||||||
const QueryLinkResult = createUnionType({
|
const QueryLinkResult = createUnionType({
|
||||||
name: 'QueryLinkResult', // the name of the GraphQL union
|
name: 'QueryLinkResult', // the name of the GraphQL union
|
||||||
@ -204,23 +205,55 @@ export class TransactionLinkResolver {
|
|||||||
throw new Error('Contribution link is depricated')
|
throw new Error('Contribution link is depricated')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (contributionLink.cycle !== 'ONCE') {
|
let alreadyRedeemed: DbContribution | undefined
|
||||||
logger.error('contribution link has unknown cycle', contributionLink.cycle)
|
switch (contributionLink.cycle) {
|
||||||
throw new Error('Contribution link has unknown cycle')
|
case ContributionCycleType.ONCE: {
|
||||||
}
|
alreadyRedeemed = await queryRunner.manager
|
||||||
// Test ONCE rule
|
.createQueryBuilder()
|
||||||
const alreadyRedeemed = await queryRunner.manager
|
.select('contribution')
|
||||||
.createQueryBuilder()
|
.from(DbContribution, 'contribution')
|
||||||
.select('contribution')
|
.where('contribution.contributionLinkId = :linkId AND contribution.userId = :id', {
|
||||||
.from(DbContribution, 'contribution')
|
linkId: contributionLink.id,
|
||||||
.where('contribution.contributionLinkId = :linkId AND contribution.userId = :id', {
|
id: user.id,
|
||||||
linkId: contributionLink.id,
|
})
|
||||||
id: user.id,
|
.getOne()
|
||||||
})
|
if (alreadyRedeemed) {
|
||||||
.getOne()
|
logger.error(
|
||||||
if (alreadyRedeemed) {
|
'contribution link with rule ONCE already redeemed by user with id',
|
||||||
logger.error('contribution link with rule ONCE already redeemed by user with id', user.id)
|
user.id,
|
||||||
throw new Error('Contribution link already redeemed')
|
)
|
||||||
|
throw new Error('Contribution link already redeemed')
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
case ContributionCycleType.DAILY: {
|
||||||
|
const start = new Date()
|
||||||
|
start.setHours(0, 0, 0, 0)
|
||||||
|
const end = new Date()
|
||||||
|
end.setHours(23, 59, 59, 999)
|
||||||
|
alreadyRedeemed = await queryRunner.manager
|
||||||
|
.createQueryBuilder()
|
||||||
|
.select('contribution')
|
||||||
|
.from(DbContribution, 'contribution')
|
||||||
|
.where('contribution.contributionLinkId = :linkId AND contribution.userId = :id', {
|
||||||
|
linkId: contributionLink.id,
|
||||||
|
id: user.id,
|
||||||
|
contributionDate: Between(start, end),
|
||||||
|
})
|
||||||
|
.getOne()
|
||||||
|
if (alreadyRedeemed) {
|
||||||
|
logger.error(
|
||||||
|
'contribution link with rule DAILY already redeemed by user with id',
|
||||||
|
user.id,
|
||||||
|
)
|
||||||
|
throw new Error('Contribution link already redeemed today')
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
logger.error('contribution link has unknown cycle', contributionLink.cycle)
|
||||||
|
throw new Error('Contribution link has unknown cycle')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const creations = await getUserCreation(user.id, false)
|
const creations = await getUserCreation(user.id, false)
|
||||||
|
|||||||
@ -360,7 +360,7 @@ describe('UserResolver', () => {
|
|||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await userFactory(testEnv, peterLustig)
|
await userFactory(testEnv, peterLustig)
|
||||||
await userFactory(testEnv, bobBaumeister)
|
await userFactory(testEnv, bobBaumeister)
|
||||||
await query({ query: login, variables: bobData })
|
await mutate({ mutation: login, variables: bobData })
|
||||||
|
|
||||||
// create contribution as user bob
|
// create contribution as user bob
|
||||||
contribution = await mutate({
|
contribution = await mutate({
|
||||||
@ -369,7 +369,7 @@ describe('UserResolver', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// login as admin
|
// login as admin
|
||||||
await query({ query: login, variables: peterData })
|
await mutate({ mutation: login, variables: peterData })
|
||||||
|
|
||||||
// confirm the contribution
|
// confirm the contribution
|
||||||
contribution = await mutate({
|
contribution = await mutate({
|
||||||
@ -378,7 +378,7 @@ describe('UserResolver', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// login as user bob
|
// login as user bob
|
||||||
bob = await query({ query: login, variables: bobData })
|
bob = await mutate({ mutation: login, variables: bobData })
|
||||||
|
|
||||||
// create transaction link
|
// create transaction link
|
||||||
await transactionLinkFactory(testEnv, {
|
await transactionLinkFactory(testEnv, {
|
||||||
|
|||||||
@ -290,6 +290,12 @@ export const adminCreateContributionMessage = gql`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
export const redeemTransactionLink = gql`
|
||||||
|
mutation ($code: String!) {
|
||||||
|
redeemTransactionLink(code: $code)
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
export const login = gql`
|
export const login = gql`
|
||||||
mutation ($email: String!, $password: String!, $publisherId: Int) {
|
mutation ($email: String!, $password: String!, $publisherId: Int) {
|
||||||
login(email: $email, password: $password, publisherId: $publisherId) {
|
login(email: $email, password: $password, publisherId: $publisherId) {
|
||||||
|
|||||||
33
backend/test/extensions.ts
Normal file
33
backend/test/extensions.ts
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||||
|
|
||||||
|
import Decimal from 'decimal.js-light'
|
||||||
|
|
||||||
|
expect.extend({
|
||||||
|
decimalEqual(received, value) {
|
||||||
|
const pass = new Decimal(value).equals(received.toString())
|
||||||
|
if (pass) {
|
||||||
|
return {
|
||||||
|
message: () => `expected ${received} to not equal ${value}`,
|
||||||
|
pass: true,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
message: () => `expected ${received} to equal ${value}`,
|
||||||
|
pass: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
interface CustomMatchers<R = unknown> {
|
||||||
|
decimalEqual(value: number): R
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||||
|
namespace jest {
|
||||||
|
interface Expect extends CustomMatchers {}
|
||||||
|
interface Matchers<R> extends CustomMatchers<R> {}
|
||||||
|
interface InverseAsymmetricMatchers extends CustomMatchers {}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1668,9 +1668,9 @@ camelcase@^6.2.0:
|
|||||||
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
|
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
|
||||||
|
|
||||||
caniuse-lite@^1.0.30001264:
|
caniuse-lite@^1.0.30001264:
|
||||||
version "1.0.30001325"
|
version "1.0.30001418"
|
||||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001325.tgz"
|
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz"
|
||||||
integrity sha512-sB1bZHjseSjDtijV1Hb7PB2Zd58Kyx+n/9EotvZ4Qcz2K3d0lWB8dB4nb8wN/TsOGFq3UuAm0zQZNQ4SoR7TrQ==
|
integrity sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==
|
||||||
|
|
||||||
chalk@^2.0.0:
|
chalk@^2.0.0:
|
||||||
version "2.4.2"
|
version "2.4.2"
|
||||||
|
|||||||
@ -24,7 +24,8 @@
|
|||||||
"moderator": "Moderator",
|
"moderator": "Moderator",
|
||||||
"moderators": "Moderatoren",
|
"moderators": "Moderatoren",
|
||||||
"myContributions": "Meine Beiträge zum Gemeinwohl",
|
"myContributions": "Meine Beiträge zum Gemeinwohl",
|
||||||
"openContributionLinks": "öffentliche Beitrags-Linkliste",
|
"noOpenContributionLinkText": "Zur Zeit gibt es keine automatischen Schöpfungen.",
|
||||||
|
"openContributionLinks": "Öffentliche Beitrags-Linkliste",
|
||||||
"openContributionLinkText": "Folgende {count} automatische Schöpfungen werden zur Zeit durch die Gemeinschaft „{name}“ bereitgestellt.",
|
"openContributionLinkText": "Folgende {count} automatische Schöpfungen werden zur Zeit durch die Gemeinschaft „{name}“ bereitgestellt.",
|
||||||
"other-communities": "Weitere Gemeinschaften",
|
"other-communities": "Weitere Gemeinschaften",
|
||||||
"submitContribution": "Beitrag einreichen",
|
"submitContribution": "Beitrag einreichen",
|
||||||
|
|||||||
@ -24,7 +24,8 @@
|
|||||||
"moderator": "Moderator",
|
"moderator": "Moderator",
|
||||||
"moderators": "Moderators",
|
"moderators": "Moderators",
|
||||||
"myContributions": "My contributions to the common good",
|
"myContributions": "My contributions to the common good",
|
||||||
"openContributionLinks": "open Contribution links list",
|
"noOpenContributionLinkText": "Currently there are no automatic creations.",
|
||||||
|
"openContributionLinks": "Open contribution-link list",
|
||||||
"openContributionLinkText": "The following {count} automatic creations are currently provided by the \"{name}\" community.",
|
"openContributionLinkText": "The following {count} automatic creations are currently provided by the \"{name}\" community.",
|
||||||
"other-communities": "Other communities",
|
"other-communities": "Other communities",
|
||||||
"submitContribution": "Submit contribution",
|
"submitContribution": "Submit contribution",
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<b-container>
|
<b-container>
|
||||||
<div class="h3">{{ $t('community.openContributionLinks') }}</div>
|
<div class="h3">{{ $t('community.openContributionLinks') }}</div>
|
||||||
<small>
|
<small v-if="count > 0">
|
||||||
{{
|
{{
|
||||||
$t('community.openContributionLinkText', {
|
$t('community.openContributionLinkText', {
|
||||||
name: CONFIG.COMMUNITY_NAME,
|
name: CONFIG.COMMUNITY_NAME,
|
||||||
@ -22,6 +22,9 @@
|
|||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</small>
|
</small>
|
||||||
|
<small v-else>
|
||||||
|
{{ $t('community.noOpenContributionLinkText') }}
|
||||||
|
</small>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="item in itemsContributionLinks" v-bind:key="item.id">
|
<li v-for="item in itemsContributionLinks" v-bind:key="item.id">
|
||||||
<div>{{ item.name }}</div>
|
<div>{{ item.name }}</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user