mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into fix-timezone-problems
This commit is contained in:
commit
6ae1ba79f7
36
CHANGELOG.md
36
CHANGELOG.md
@ -4,8 +4,44 @@ All notable changes to this project will be documented in this file. Dates are d
|
|||||||
|
|
||||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||||
|
|
||||||
|
#### [1.14.1](https://github.com/gradido/gradido/compare/1.14.0...1.14.1)
|
||||||
|
|
||||||
|
- fix(frontend): load contributionMessages is fixed [`#2390`](https://github.com/gradido/gradido/pull/2390)
|
||||||
|
|
||||||
|
#### [1.14.0](https://github.com/gradido/gradido/compare/1.13.3...1.14.0)
|
||||||
|
|
||||||
|
> 14 November 2022
|
||||||
|
|
||||||
|
- chore(release): version 1.14.0 [`#2389`](https://github.com/gradido/gradido/pull/2389)
|
||||||
|
- fix(frontend): close all open collapse by change tabs in community [`#2388`](https://github.com/gradido/gradido/pull/2388)
|
||||||
|
- fix(backend): corrected E-Mail texts [`#2386`](https://github.com/gradido/gradido/pull/2386)
|
||||||
|
- fix(frontend): better history messages [`#2381`](https://github.com/gradido/gradido/pull/2381)
|
||||||
|
- fix(frontend): mailto link [`#2383`](https://github.com/gradido/gradido/pull/2383)
|
||||||
|
- fix(admin): fix text in admin area to uppercase [`#2365`](https://github.com/gradido/gradido/pull/2365)
|
||||||
|
- feat(frontend): move the information about gradido being free to the auth layout [`#2349`](https://github.com/gradido/gradido/pull/2349)
|
||||||
|
- fix(admin): load error fixed for contribution link [`#2364`](https://github.com/gradido/gradido/pull/2364)
|
||||||
|
- fix(admin): edit contribution link does not take old values [`#2362`](https://github.com/gradido/gradido/pull/2362)
|
||||||
|
- fix(other): corrected dockerfile descriptions [`#2346`](https://github.com/gradido/gradido/pull/2346)
|
||||||
|
- feat(backend): 🍰 Send email for rejected contributions [`#2340`](https://github.com/gradido/gradido/pull/2340)
|
||||||
|
- feat(admin): edit automatic contribution link [`#2309`](https://github.com/gradido/gradido/pull/2309)
|
||||||
|
- refactor(backend): fix logger mocks [`#2308`](https://github.com/gradido/gradido/pull/2308)
|
||||||
|
- fix(admin): update contribution list after admin updates contribution [`#2330`](https://github.com/gradido/gradido/pull/2330)
|
||||||
|
- fix(frontend): inconsistent labeling on login register [`#2350`](https://github.com/gradido/gradido/pull/2350)
|
||||||
|
- feat(backend): setup hyperswarm [`#1874`](https://github.com/gradido/gradido/pull/1874)
|
||||||
|
- feat(other): lint pull request workflow [`#2338`](https://github.com/gradido/gradido/pull/2338)
|
||||||
|
- Feature: 🍰 add updated at to contributions [`#2237`](https://github.com/gradido/gradido/pull/2237)
|
||||||
|
- Refactor: GitHub test workflow - disable video recording and reduce wait time [`#2336`](https://github.com/gradido/gradido/pull/2336)
|
||||||
|
- 2274 feature concept manuel user registration for admins [`#2289`](https://github.com/gradido/gradido/pull/2289)
|
||||||
|
- 1574 concept to introduce gradidoID and change password encryption [`#2252`](https://github.com/gradido/gradido/pull/2252)
|
||||||
|
- contributionlink stage-2 and stage-3 of capturing and activation [`#2241`](https://github.com/gradido/gradido/pull/2241)
|
||||||
|
- Github workflow: update actions to the current API version using Node v 16 [`#2323`](https://github.com/gradido/gradido/pull/2323)
|
||||||
|
- feature: Fullstack tests in GitHub workflow [`#2319`](https://github.com/gradido/gradido/pull/2319)
|
||||||
|
|
||||||
#### [1.13.3](https://github.com/gradido/gradido/compare/1.13.2...1.13.3)
|
#### [1.13.3](https://github.com/gradido/gradido/compare/1.13.2...1.13.3)
|
||||||
|
|
||||||
|
> 1 November 2022
|
||||||
|
|
||||||
|
- release: Version 1.13.3 [`#2322`](https://github.com/gradido/gradido/pull/2322)
|
||||||
- 2294 contribution links on its own page [`#2312`](https://github.com/gradido/gradido/pull/2312)
|
- 2294 contribution links on its own page [`#2312`](https://github.com/gradido/gradido/pull/2312)
|
||||||
- fix: Change Orange Color [`#2302`](https://github.com/gradido/gradido/pull/2302)
|
- fix: Change Orange Color [`#2302`](https://github.com/gradido/gradido/pull/2302)
|
||||||
- fix: Release Statistic Query Runner [`#2320`](https://github.com/gradido/gradido/pull/2320)
|
- fix: Release Statistic Query Runner [`#2320`](https://github.com/gradido/gradido/pull/2320)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"description": "Administraion Interface for Gradido",
|
"description": "Administraion Interface for Gradido",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Moriz Wahl",
|
"author": "Moriz Wahl",
|
||||||
"version": "1.13.3",
|
"version": "1.14.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -1,7 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<span v-for="({ type, text }, index) in linkifiedMessage" :key="index">
|
<span v-for="({ type, text }, index) in parsedMessage" :key="index">
|
||||||
<b-link v-if="type === 'link'" :href="text" target="_blank">{{ text }}</b-link>
|
<b-link v-if="type === 'link'" :href="text" target="_blank">{{ text }}</b-link>
|
||||||
|
<span v-else-if="type === 'date'">
|
||||||
|
{{ $d(new Date(text), 'short') }}
|
||||||
|
<br />
|
||||||
|
</span>
|
||||||
|
<span v-else-if="type === 'amount'">
|
||||||
|
<br />
|
||||||
|
{{ `${$n(Number(text), 'decimal')} GDD` }}
|
||||||
|
</span>
|
||||||
<span v-else>{{ text }}</span>
|
<span v-else>{{ text }}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -12,17 +20,28 @@ const LINK_REGEX_PATTERN =
|
|||||||
/(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*))/i
|
/(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*))/i
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LinkifyMessage',
|
name: 'ParseMessage',
|
||||||
props: {
|
props: {
|
||||||
message: {
|
message: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
reuired: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
linkifiedMessage() {
|
parsedMessage() {
|
||||||
const linkified = []
|
|
||||||
let string = this.message
|
let string = this.message
|
||||||
|
const linkified = []
|
||||||
|
let amount
|
||||||
|
if (this.type === 'HISTORY') {
|
||||||
|
const split = string.split(/\n\s*---\n\s*/)
|
||||||
|
string = split[1]
|
||||||
|
linkified.push({ type: 'date', text: split[0].trim() })
|
||||||
|
amount = split[2].trim()
|
||||||
|
}
|
||||||
let match
|
let match
|
||||||
while ((match = string.match(LINK_REGEX_PATTERN))) {
|
while ((match = string.match(LINK_REGEX_PATTERN))) {
|
||||||
if (match.index > 0)
|
if (match.index > 0)
|
||||||
@ -31,6 +50,7 @@ export default {
|
|||||||
string = string.substring(match.index + match[0].length)
|
string = string.substring(match.index + match[0].length)
|
||||||
}
|
}
|
||||||
if (string.length > 0) linkified.push({ type: 'text', text: string })
|
if (string.length > 0) linkified.push({ type: 'text', text: string })
|
||||||
|
if (amount) linkified.push({ type: 'amount', text: amount })
|
||||||
return linkified
|
return linkified
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -3,12 +3,16 @@ import ContributionMessagesListItem from './ContributionMessagesListItem.vue'
|
|||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
const dateMock = jest.fn((d) => d)
|
||||||
|
const numberMock = jest.fn((n) => n)
|
||||||
|
|
||||||
describe('ContributionMessagesListItem', () => {
|
describe('ContributionMessagesListItem', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|
||||||
const mocks = {
|
const mocks = {
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t) => t),
|
||||||
$d: jest.fn((d) => d),
|
$d: dateMock,
|
||||||
|
$n: numberMock,
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('if message author has moderator role', () => {
|
describe('if message author has moderator role', () => {
|
||||||
@ -189,4 +193,64 @@ and here is the link to the repository: https://github.com/gradido/gradido`)
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('contribution message type HISTORY', () => {
|
||||||
|
const propsData = {
|
||||||
|
message: {
|
||||||
|
id: 111,
|
||||||
|
message: `Sun Nov 13 2022 13:05:48 GMT+0100 (Central European Standard Time)
|
||||||
|
---
|
||||||
|
This message also contains a link: https://gradido.net/de/
|
||||||
|
---
|
||||||
|
350.00`,
|
||||||
|
createdAt: '2022-08-29T12:23:27.000Z',
|
||||||
|
updatedAt: null,
|
||||||
|
type: 'HISTORY',
|
||||||
|
userFirstName: 'Peter',
|
||||||
|
userLastName: 'Lustig',
|
||||||
|
userId: 107,
|
||||||
|
__typename: 'ContributionMessage',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const itemWrapper = () => {
|
||||||
|
return mount(ContributionMessagesListItem, {
|
||||||
|
localVue,
|
||||||
|
mocks,
|
||||||
|
propsData,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let messageField
|
||||||
|
|
||||||
|
describe('render HISTORY message', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
jest.clearAllMocks()
|
||||||
|
wrapper = itemWrapper()
|
||||||
|
messageField = wrapper.find('div.is-not-moderator.text-left > div:nth-child(4)')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('renders the date', () => {
|
||||||
|
expect(dateMock).toBeCalledWith(
|
||||||
|
new Date('Sun Nov 13 2022 13:05:48 GMT+0100 (Central European Standard Time'),
|
||||||
|
'short',
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('renders the amount', () => {
|
||||||
|
expect(numberMock).toBeCalledWith(350, 'decimal')
|
||||||
|
expect(messageField.text()).toContain('350 GDD')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('contains the link as text', () => {
|
||||||
|
expect(messageField.text()).toContain(
|
||||||
|
'This message also contains a link: https://gradido.net/de/',
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('contains a link to the given address', () => {
|
||||||
|
expect(messageField.find('a').attributes('href')).toBe('https://gradido.net/de/')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -5,23 +5,23 @@
|
|||||||
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
||||||
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
||||||
<small class="ml-4 text-success">{{ $t('moderator') }}</small>
|
<small class="ml-4 text-success">{{ $t('moderator') }}</small>
|
||||||
<linkify-message :message="message.message"></linkify-message>
|
<parse-message v-bind="message"></parse-message>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="text-left is-not-moderator">
|
<div v-else class="text-left is-not-moderator">
|
||||||
<b-avatar variant="info"></b-avatar>
|
<b-avatar variant="info"></b-avatar>
|
||||||
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
||||||
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
||||||
<linkify-message :message="message.message"></linkify-message>
|
<parse-message v-bind="message"></parse-message>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import LinkifyMessage from '@/components/ContributionMessages/LinkifyMessage.vue'
|
import ParseMessage from '@/components/ContributionMessages/ParseMessage.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionMessagesListItem',
|
name: 'ContributionMessagesListItem',
|
||||||
components: {
|
components: {
|
||||||
LinkifyMessage,
|
ParseMessage,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
message: {
|
message: {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido-backend",
|
"name": "gradido-backend",
|
||||||
"version": "1.13.3",
|
"version": "1.14.1",
|
||||||
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
|
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": "https://github.com/gradido/gradido/backend",
|
"repository": "https://github.com/gradido/gradido/backend",
|
||||||
|
|||||||
@ -26,12 +26,12 @@ describe('sendAddedContributionMessageEmail', () => {
|
|||||||
it('calls sendEMail', () => {
|
it('calls sendEMail', () => {
|
||||||
expect(sendEMail).toBeCalledWith({
|
expect(sendEMail).toBeCalledWith({
|
||||||
to: `Bibi Bloxberg <bibi@bloxberg.de>`,
|
to: `Bibi Bloxberg <bibi@bloxberg.de>`,
|
||||||
subject: 'Rückfrage zu Deinem Gemeinwohl-Beitrag',
|
subject: 'Nachricht zu deinem Gemeinwohl-Beitrag',
|
||||||
text:
|
text:
|
||||||
expect.stringContaining('Hallo Bibi Bloxberg') &&
|
expect.stringContaining('Hallo Bibi Bloxberg') &&
|
||||||
expect.stringContaining('Peter Lustig') &&
|
expect.stringContaining('Peter Lustig') &&
|
||||||
expect.stringContaining(
|
expect.stringContaining(
|
||||||
'Du hast soeben zu deinem eingereichten Gradido Schöpfungsantrag "Vielen herzlichen Dank für den neuen Hexenbesen!" eine Rückfrage von Peter Lustig erhalten.',
|
'du hast zu deinem Gemeinwohl-Beitrag "Vielen herzlichen Dank für den neuen Hexenbesen!" eine Nachricht von Peter Lustig erhalten.',
|
||||||
) &&
|
) &&
|
||||||
expect.stringContaining('Was für ein Besen ist es geworden?') &&
|
expect.stringContaining('Was für ein Besen ist es geworden?') &&
|
||||||
expect.stringContaining('http://localhost/overview'),
|
expect.stringContaining('http://localhost/overview'),
|
||||||
|
|||||||
@ -26,11 +26,11 @@ describe('sendContributionConfirmedEmail', () => {
|
|||||||
it('calls sendEMail', () => {
|
it('calls sendEMail', () => {
|
||||||
expect(sendEMail).toBeCalledWith({
|
expect(sendEMail).toBeCalledWith({
|
||||||
to: 'Bibi Bloxberg <bibi@bloxberg.de>',
|
to: 'Bibi Bloxberg <bibi@bloxberg.de>',
|
||||||
subject: 'Schöpfung wurde bestätigt',
|
subject: 'Dein Gemeinwohl-Beitrag wurde bestätigt',
|
||||||
text:
|
text:
|
||||||
expect.stringContaining('Hallo Bibi Bloxberg') &&
|
expect.stringContaining('Hallo Bibi Bloxberg') &&
|
||||||
expect.stringContaining(
|
expect.stringContaining(
|
||||||
'Dein Gradido Schöpfungsantrag "Vielen herzlichen Dank für den neuen Hexenbesen!" wurde soeben bestätigt.',
|
'dein Gemeinwohl-Beitrag "Vielen herzlichen Dank für den neuen Hexenbesen!" wurde soeben von Peter Lustig bestätigt und in deinem Gradido-Konto gutgeschrieben.',
|
||||||
) &&
|
) &&
|
||||||
expect.stringContaining('Betrag: 200,00 GDD') &&
|
expect.stringContaining('Betrag: 200,00 GDD') &&
|
||||||
expect.stringContaining('Link zu deinem Konto: http://localhost/overview'),
|
expect.stringContaining('Link zu deinem Konto: http://localhost/overview'),
|
||||||
|
|||||||
@ -26,11 +26,11 @@ describe('sendContributionConfirmedEmail', () => {
|
|||||||
it('calls sendEMail', () => {
|
it('calls sendEMail', () => {
|
||||||
expect(sendEMail).toBeCalledWith({
|
expect(sendEMail).toBeCalledWith({
|
||||||
to: 'Bibi Bloxberg <bibi@bloxberg.de>',
|
to: 'Bibi Bloxberg <bibi@bloxberg.de>',
|
||||||
subject: 'Schöpfung wurde abgelehnt',
|
subject: 'Dein Gemeinwohl-Beitrag wurde abgelehnt',
|
||||||
text:
|
text:
|
||||||
expect.stringContaining('Hallo Bibi Bloxberg') &&
|
expect.stringContaining('Hallo Bibi Bloxberg') &&
|
||||||
expect.stringContaining(
|
expect.stringContaining(
|
||||||
'Dein Gradido Schöpfungsantrag "Vielen herzlichen Dank für den neuen Hexenbesen!" wurde soeben von Peter Lustig abgelehnt.',
|
'dein Gemeinwohl-Beitrag "Vielen herzlichen Dank für den neuen Hexenbesen!" wurde von Peter Lustig abgelehnt.',
|
||||||
) &&
|
) &&
|
||||||
expect.stringContaining('Link zu deinem Konto: http://localhost/overview'),
|
expect.stringContaining('Link zu deinem Konto: http://localhost/overview'),
|
||||||
})
|
})
|
||||||
|
|||||||
@ -26,7 +26,7 @@ describe('sendTransactionReceivedEmail', () => {
|
|||||||
it('calls sendEMail', () => {
|
it('calls sendEMail', () => {
|
||||||
expect(sendEMail).toBeCalledWith({
|
expect(sendEMail).toBeCalledWith({
|
||||||
to: `Peter Lustig <peter@lustig.de>`,
|
to: `Peter Lustig <peter@lustig.de>`,
|
||||||
subject: 'Gradido Überweisung',
|
subject: 'Du hast Gradidos erhalten',
|
||||||
text:
|
text:
|
||||||
expect.stringContaining('Hallo Peter Lustig') &&
|
expect.stringContaining('Hallo Peter Lustig') &&
|
||||||
expect.stringContaining('42,00 GDD') &&
|
expect.stringContaining('42,00 GDD') &&
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import Decimal from 'decimal.js-light'
|
|||||||
|
|
||||||
export const contributionConfirmed = {
|
export const contributionConfirmed = {
|
||||||
de: {
|
de: {
|
||||||
subject: 'Schöpfung wurde bestätigt',
|
subject: 'Dein Gemeinwohl-Beitrag wurde bestätigt',
|
||||||
text: (data: {
|
text: (data: {
|
||||||
senderFirstName: string
|
senderFirstName: string
|
||||||
senderLastName: string
|
senderLastName: string
|
||||||
@ -14,18 +14,17 @@ export const contributionConfirmed = {
|
|||||||
}): string =>
|
}): string =>
|
||||||
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
||||||
|
|
||||||
Dein eingereichter Gemeinwohl-Beitrag "${data.contributionMemo}" wurde soeben von ${
|
dein Gemeinwohl-Beitrag "${data.contributionMemo}" wurde soeben von ${data.senderFirstName} ${
|
||||||
data.senderFirstName
|
data.senderLastName
|
||||||
} ${data.senderLastName} bestätigt.
|
} bestätigt und in deinem Gradido-Konto gutgeschrieben.
|
||||||
|
|
||||||
Betrag: ${data.contributionAmount.toFixed(2).replace('.', ',')} GDD
|
Betrag: ${data.contributionAmount.toFixed(2).replace('.', ',')} GDD
|
||||||
|
|
||||||
|
Link zu deinem Konto: ${data.overviewURL}
|
||||||
|
|
||||||
Bitte antworte nicht auf diese E-Mail!
|
Bitte antworte nicht auf diese E-Mail!
|
||||||
|
|
||||||
Mit freundlichen Grüßen,
|
Liebe Grüße
|
||||||
dein Gradido-Team
|
dein Gradido-Team`,
|
||||||
|
|
||||||
|
|
||||||
Link zu deinem Konto: ${data.overviewURL}`,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
export const contributionMessageReceived = {
|
export const contributionMessageReceived = {
|
||||||
de: {
|
de: {
|
||||||
subject: 'Rückfrage zu Deinem Gemeinwohl-Beitrag',
|
subject: 'Nachricht zu deinem Gemeinwohl-Beitrag',
|
||||||
text: (data: {
|
text: (data: {
|
||||||
senderFirstName: string
|
senderFirstName: string
|
||||||
senderLastName: string
|
senderLastName: string
|
||||||
@ -14,15 +14,15 @@ export const contributionMessageReceived = {
|
|||||||
}): string =>
|
}): string =>
|
||||||
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
||||||
|
|
||||||
du hast soeben zu deinem eingereichten Gemeinwohl-Beitrag "${data.contributionMemo}" eine Rückfrage von ${data.senderFirstName} ${data.senderLastName} erhalten.
|
du hast zu deinem Gemeinwohl-Beitrag "${data.contributionMemo}" eine Nachricht von ${data.senderFirstName} ${data.senderLastName} erhalten.
|
||||||
|
|
||||||
Bitte beantworte die Rückfrage in deinem Gradido-Konto im Menü "Gemeinschaft" im Tab "Meine Beiträge zum Gemeinwohl"!
|
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"!
|
||||||
|
|
||||||
Link zu deinem Konto: ${data.overviewURL}
|
Link zu deinem Konto: ${data.overviewURL}
|
||||||
|
|
||||||
Bitte antworte nicht auf diese E-Mail!
|
Bitte antworte nicht auf diese E-Mail!
|
||||||
|
|
||||||
Mit freundlichen Grüßen,
|
Liebe Grüße
|
||||||
dein Gradido-Team`,
|
dein Gradido-Team`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import Decimal from 'decimal.js-light'
|
|||||||
|
|
||||||
export const contributionRejected = {
|
export const contributionRejected = {
|
||||||
de: {
|
de: {
|
||||||
subject: 'Schöpfung wurde abgelehnt',
|
subject: 'Dein Gemeinwohl-Beitrag wurde abgelehnt',
|
||||||
text: (data: {
|
text: (data: {
|
||||||
senderFirstName: string
|
senderFirstName: string
|
||||||
senderLastName: string
|
senderLastName: string
|
||||||
@ -14,14 +14,15 @@ export const contributionRejected = {
|
|||||||
}): string =>
|
}): string =>
|
||||||
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
||||||
|
|
||||||
Dein eingereichter Gemeinwohl-Beitrag "${data.contributionMemo}" wurde soeben von ${data.senderFirstName} ${data.senderLastName} abgelehnt.
|
dein Gemeinwohl-Beitrag "${data.contributionMemo}" wurde von ${data.senderFirstName} ${data.senderLastName} abgelehnt.
|
||||||
|
|
||||||
|
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"!
|
||||||
|
|
||||||
|
Link zu deinem Konto: ${data.overviewURL}
|
||||||
|
|
||||||
Bitte antworte nicht auf diese E-Mail!
|
Bitte antworte nicht auf diese E-Mail!
|
||||||
|
|
||||||
Mit freundlichen Grüßen,
|
Liebe Grüße
|
||||||
dein Gradido-Team
|
dein Gradido-Team`,
|
||||||
|
|
||||||
|
|
||||||
Link zu deinem Konto: ${data.overviewURL}`,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,20 +14,20 @@ export const transactionLinkRedeemed = {
|
|||||||
memo: string
|
memo: string
|
||||||
overviewURL: string
|
overviewURL: string
|
||||||
}): string =>
|
}): string =>
|
||||||
`Hallo ${data.recipientFirstName} ${data.recipientLastName}
|
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
||||||
|
|
||||||
${data.senderFirstName} ${data.senderLastName} (${
|
${data.senderFirstName} ${data.senderLastName} (${
|
||||||
data.senderEmail
|
data.senderEmail
|
||||||
}) hat soeben deinen Link eingelöst.
|
}) hat soeben deinen Link eingelöst.
|
||||||
|
|
||||||
Betrag: ${data.amount.toFixed(2).replace('.', ',')} GDD,
|
Betrag: ${data.amount.toFixed(2).replace('.', ',')} GDD,
|
||||||
Memo: ${data.memo}
|
Memo: ${data.memo}
|
||||||
|
|
||||||
Details zur Transaktion findest du in deinem Gradido-Konto: ${data.overviewURL}
|
Details zur Transaktion findest du in deinem Gradido-Konto: ${data.overviewURL}
|
||||||
|
|
||||||
Bitte antworte nicht auf diese E-Mail!
|
Bitte antworte nicht auf diese E-Mail!
|
||||||
|
|
||||||
Mit freundlichen Grüßen,
|
Liebe Grüße
|
||||||
dein Gradido-Team`,
|
dein Gradido-Team`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import Decimal from 'decimal.js-light'
|
|||||||
|
|
||||||
export const transactionReceived = {
|
export const transactionReceived = {
|
||||||
de: {
|
de: {
|
||||||
subject: 'Gradido Überweisung',
|
subject: 'Du hast Gradidos erhalten',
|
||||||
text: (data: {
|
text: (data: {
|
||||||
senderFirstName: string
|
senderFirstName: string
|
||||||
senderLastName: string
|
senderLastName: string
|
||||||
@ -13,9 +13,9 @@ export const transactionReceived = {
|
|||||||
amount: Decimal
|
amount: Decimal
|
||||||
overviewURL: string
|
overviewURL: string
|
||||||
}): string =>
|
}): string =>
|
||||||
`Hallo ${data.recipientFirstName} ${data.recipientLastName}
|
`Hallo ${data.recipientFirstName} ${data.recipientLastName},
|
||||||
|
|
||||||
Du hast soeben ${data.amount.toFixed(2).replace('.', ',')} GDD von ${data.senderFirstName} ${
|
du hast soeben ${data.amount.toFixed(2).replace('.', ',')} GDD von ${data.senderFirstName} ${
|
||||||
data.senderLastName
|
data.senderLastName
|
||||||
} (${data.senderEmail}) erhalten.
|
} (${data.senderEmail}) erhalten.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ Details zur Transaktion findest du in deinem Gradido-Konto: ${data.overviewURL}
|
|||||||
|
|
||||||
Bitte antworte nicht auf diese E-Mail!
|
Bitte antworte nicht auf diese E-Mail!
|
||||||
|
|
||||||
Mit freundlichen Grüßen,
|
Liebe Grüße
|
||||||
dein Gradido-Team`,
|
dein Gradido-Team`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido-database",
|
"name": "gradido-database",
|
||||||
"version": "1.13.3",
|
"version": "1.14.1",
|
||||||
"description": "Gradido Database Tool to execute database migrations",
|
"description": "Gradido Database Tool to execute database migrations",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": "https://github.com/gradido/gradido/database",
|
"repository": "https://github.com/gradido/gradido/database",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bootstrap-vue-gradido-wallet",
|
"name": "bootstrap-vue-gradido-wallet",
|
||||||
"version": "1.13.3",
|
"version": "1.14.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node run/server.js",
|
"start": "node run/server.js",
|
||||||
|
|||||||
@ -67,9 +67,9 @@ describe('ContributionMessagesFormular', () => {
|
|||||||
await wrapper.find('form').trigger('submit')
|
await wrapper.find('form').trigger('submit')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('emitted "get-list-contribution-messages" with data', async () => {
|
it('emitted "get-list-contribution-messages" with false', async () => {
|
||||||
expect(wrapper.emitted('get-list-contribution-messages')).toEqual(
|
expect(wrapper.emitted('get-list-contribution-messages')).toEqual(
|
||||||
expect.arrayContaining([expect.arrayContaining([42])]),
|
expect.arrayContaining([expect.arrayContaining([false])]),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.$emit('get-list-contribution-messages', this.contributionId)
|
this.$emit('get-list-contribution-messages', false)
|
||||||
this.$emit('update-state', this.contributionId)
|
this.$emit('update-state', this.contributionId)
|
||||||
this.form.text = ''
|
this.form.text = ''
|
||||||
this.toastSuccess(this.$t('message.reply'))
|
this.toastSuccess(this.$t('message.reply'))
|
||||||
|
|||||||
@ -40,16 +40,6 @@ describe('ContributionMessagesList', () => {
|
|||||||
expect(wrapper.findComponent({ name: 'ContributionMessagesFormular' }).exists()).toBe(true)
|
expect(wrapper.findComponent({ name: 'ContributionMessagesFormular' }).exists()).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('get List Contribution Messages', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
wrapper.vm.getListContributionMessages()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('emits getListContributionMessages', async () => {
|
|
||||||
expect(wrapper.vm.$emit('get-list-contribution-messages')).toBeTruthy()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('update State', () => {
|
describe('update State', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wrapper.vm.updateState()
|
wrapper.vm.updateState()
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<contribution-messages-formular
|
<contribution-messages-formular
|
||||||
v-if="['PENDING', 'IN_PROGRESS'].includes(state)"
|
v-if="['PENDING', 'IN_PROGRESS'].includes(state)"
|
||||||
:contributionId="contributionId"
|
:contributionId="contributionId"
|
||||||
@get-list-contribution-messages="getListContributionMessages"
|
v-on="$listeners"
|
||||||
@update-state="updateState"
|
@update-state="updateState"
|
||||||
/>
|
/>
|
||||||
</b-container>
|
</b-container>
|
||||||
@ -50,9 +50,6 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getListContributionMessages() {
|
|
||||||
this.$emit('get-list-contribution-messages', this.contributionId)
|
|
||||||
},
|
|
||||||
updateState(id) {
|
updateState(id) {
|
||||||
this.$emit('update-state', id)
|
this.$emit('update-state', id)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -5,9 +5,11 @@ import ContributionMessagesListItem from './ContributionMessagesListItem.vue'
|
|||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|
||||||
|
const dateMock = jest.fn((d) => d)
|
||||||
|
|
||||||
const mocks = {
|
const mocks = {
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t) => t),
|
||||||
$d: jest.fn((d) => d),
|
$d: dateMock,
|
||||||
$store: {
|
$store: {
|
||||||
state: {
|
state: {
|
||||||
firstName: 'Peter',
|
firstName: 'Peter',
|
||||||
@ -239,4 +241,63 @@ and here is the link to the repository: https://github.com/gradido/gradido`)
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('contribution message type HISTORY', () => {
|
||||||
|
const propsData = {
|
||||||
|
message: {
|
||||||
|
id: 111,
|
||||||
|
message: `Sun Nov 13 2022 13:05:48 GMT+0100 (Central European Standard Time)
|
||||||
|
---
|
||||||
|
This message also contains a link: https://gradido.net/de/
|
||||||
|
---
|
||||||
|
350.00`,
|
||||||
|
createdAt: '2022-08-29T12:23:27.000Z',
|
||||||
|
updatedAt: null,
|
||||||
|
type: 'HISTORY',
|
||||||
|
userFirstName: 'Peter',
|
||||||
|
userLastName: 'Lustig',
|
||||||
|
userId: 107,
|
||||||
|
__typename: 'ContributionMessage',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const itemWrapper = () => {
|
||||||
|
return mount(ContributionMessagesListItem, {
|
||||||
|
localVue,
|
||||||
|
mocks,
|
||||||
|
propsData,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let messageField
|
||||||
|
|
||||||
|
describe('render HISTORY message', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
jest.clearAllMocks()
|
||||||
|
wrapper = itemWrapper()
|
||||||
|
messageField = wrapper.find('div.is-not-moderator.text-right > div:nth-child(4)')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('renders the date', () => {
|
||||||
|
expect(dateMock).toBeCalledWith(
|
||||||
|
new Date('Sun Nov 13 2022 13:05:48 GMT+0100 (Central European Standard Time'),
|
||||||
|
'short',
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('renders the amount', () => {
|
||||||
|
expect(messageField.text()).toContain('350.00 GDD')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('contains the link as text', () => {
|
||||||
|
expect(messageField.text()).toContain(
|
||||||
|
'This message also contains a link: https://gradido.net/de/',
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('contains a link to the given address', () => {
|
||||||
|
expect(messageField.find('a').attributes('href')).toBe('https://gradido.net/de/')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -4,25 +4,25 @@
|
|||||||
<b-avatar variant="info"></b-avatar>
|
<b-avatar variant="info"></b-avatar>
|
||||||
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
||||||
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
||||||
<linkify-message :message="message.message"></linkify-message>
|
<parse-message v-bind="message"></parse-message>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="is-moderator text-left">
|
<div v-else class="is-moderator text-left">
|
||||||
<b-avatar square variant="warning"></b-avatar>
|
<b-avatar square variant="warning"></b-avatar>
|
||||||
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
<span class="ml-2 mr-2">{{ message.userFirstName }} {{ message.userLastName }}</span>
|
||||||
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
<span class="ml-2">{{ $d(new Date(message.createdAt), 'short') }}</span>
|
||||||
<small class="ml-4 text-success">{{ $t('community.moderator') }}</small>
|
<small class="ml-4 text-success">{{ $t('community.moderator') }}</small>
|
||||||
<linkify-message :message="message.message"></linkify-message>
|
<parse-message v-bind="message"></parse-message>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import LinkifyMessage from '@/components/ContributionMessages/LinkifyMessage.vue'
|
import ParseMessage from '@/components/ContributionMessages/ParseMessage.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ContributionMessagesListItem',
|
name: 'ContributionMessagesListItem',
|
||||||
components: {
|
components: {
|
||||||
LinkifyMessage,
|
ParseMessage,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
message: {
|
message: {
|
||||||
|
|||||||
@ -1,7 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<span v-for="({ type, text }, index) in linkifiedMessage" :key="index">
|
<span v-for="({ type, text }, index) in parsedMessage" :key="index">
|
||||||
<b-link v-if="type === 'link'" :href="text" target="_blank">{{ text }}</b-link>
|
<b-link v-if="type === 'link'" :href="text" target="_blank">{{ text }}</b-link>
|
||||||
|
<span v-else-if="type === 'date'">
|
||||||
|
{{ $d(new Date(text), 'short') }}
|
||||||
|
<br />
|
||||||
|
</span>
|
||||||
|
<span v-else-if="type === 'amount'">
|
||||||
|
<br />
|
||||||
|
{{ text | GDD }}
|
||||||
|
</span>
|
||||||
<span v-else>{{ text }}</span>
|
<span v-else>{{ text }}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -11,17 +19,28 @@
|
|||||||
const LINK_REGEX_PATTERN = /(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*))/i
|
const LINK_REGEX_PATTERN = /(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*))/i
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LinkifyMessage',
|
name: 'ParseMessage',
|
||||||
props: {
|
props: {
|
||||||
message: {
|
message: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
reuired: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
linkifiedMessage() {
|
parsedMessage() {
|
||||||
const linkified = []
|
|
||||||
let string = this.message
|
let string = this.message
|
||||||
|
const linkified = []
|
||||||
|
let amount
|
||||||
|
if (this.type === 'HISTORY') {
|
||||||
|
const split = string.split(/\n\s*---\n\s*/)
|
||||||
|
string = split[1]
|
||||||
|
linkified.push({ type: 'date', text: split[0].trim() })
|
||||||
|
amount = split[2].trim()
|
||||||
|
}
|
||||||
let match
|
let match
|
||||||
while ((match = string.match(LINK_REGEX_PATTERN))) {
|
while ((match = string.match(LINK_REGEX_PATTERN))) {
|
||||||
if (match.index > 0)
|
if (match.index > 0)
|
||||||
@ -30,6 +49,7 @@ export default {
|
|||||||
string = string.substring(match.index + match[0].length)
|
string = string.substring(match.index + match[0].length)
|
||||||
}
|
}
|
||||||
if (string.length > 0) linkified.push({ type: 'text', text: string })
|
if (string.length > 0) linkified.push({ type: 'text', text: string })
|
||||||
|
if (amount) linkified.push({ type: 'amount', text: amount })
|
||||||
return linkified
|
return linkified
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -3,6 +3,7 @@
|
|||||||
<div class="list-group" v-for="item in items" :key="item.id">
|
<div class="list-group" v-for="item in items" :key="item.id">
|
||||||
<contribution-list-item
|
<contribution-list-item
|
||||||
v-bind="item"
|
v-bind="item"
|
||||||
|
@closeAllOpenCollapse="$emit('closeAllOpenCollapse')"
|
||||||
:contributionId="item.id"
|
:contributionId="item.id"
|
||||||
:allContribution="allContribution"
|
:allContribution="allContribution"
|
||||||
@update-contribution-form="updateContributionForm"
|
@update-contribution-form="updateContributionForm"
|
||||||
|
|||||||
@ -9,6 +9,7 @@ describe('ContributionListItem', () => {
|
|||||||
const mocks = {
|
const mocks = {
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t) => t),
|
||||||
$d: jest.fn((d) => d),
|
$d: jest.fn((d) => d),
|
||||||
|
$apollo: { query: jest.fn().mockResolvedValue() },
|
||||||
}
|
}
|
||||||
|
|
||||||
const propsData = {
|
const propsData = {
|
||||||
@ -132,6 +133,27 @@ describe('ContributionListItem', () => {
|
|||||||
expect(wrapper.emitted('delete-contribution')).toBeFalsy()
|
expect(wrapper.emitted('delete-contribution')).toBeFalsy()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('updateState', () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
await wrapper.vm.updateState()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('emit update-state', () => {
|
||||||
|
expect(wrapper.vm.$emit('update-state')).toBeTruthy()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('getListContributionMessages', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
wrapper
|
||||||
|
.findComponent({ name: 'ContributionMessagesList' })
|
||||||
|
.vm.$emit('get-list-contribution-messages')
|
||||||
|
})
|
||||||
|
it('emits closeAllOpenCollapse', () => {
|
||||||
|
expect(wrapper.emitted('closeAllOpenCollapse')).toBeTruthy()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -32,12 +32,13 @@
|
|||||||
v-if="!['CONFIRMED', 'DELETED'].includes(state) && !allContribution"
|
v-if="!['CONFIRMED', 'DELETED'].includes(state) && !allContribution"
|
||||||
class="pointer ml-5"
|
class="pointer ml-5"
|
||||||
@click="
|
@click="
|
||||||
$emit('update-contribution-form', {
|
$emit('closeAllOpenCollapse'),
|
||||||
id: id,
|
$emit('update-contribution-form', {
|
||||||
contributionDate: contributionDate,
|
id: id,
|
||||||
memo: memo,
|
contributionDate: contributionDate,
|
||||||
amount: amount,
|
memo: memo,
|
||||||
})
|
amount: amount,
|
||||||
|
})
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<b-icon icon="pencil" class="h2"></b-icon>
|
<b-icon icon="pencil" class="h2"></b-icon>
|
||||||
@ -178,8 +179,10 @@ export default {
|
|||||||
if (value) this.$emit('delete-contribution', item)
|
if (value) this.$emit('delete-contribution', item)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getListContributionMessages() {
|
getListContributionMessages(closeCollapse = true) {
|
||||||
// console.log('getListContributionMessages', this.contributionId)
|
if (closeCollapse) {
|
||||||
|
this.$emit('closeAllOpenCollapse')
|
||||||
|
}
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.query({
|
.query({
|
||||||
query: listContributionMessages,
|
query: listContributionMessages,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="community-page">
|
<div class="community-page">
|
||||||
<div>
|
<div>
|
||||||
<b-tabs v-model="tabIndex" content-class="mt-3" align="center">
|
<b-tabs v-model="tabIndex" content-class="mt-3" align="center">
|
||||||
<b-tab :title="$t('community.submitContribution')">
|
<b-tab :title="$t('community.submitContribution')" @click="closeAllOpenCollapse">
|
||||||
<contribution-form
|
<contribution-form
|
||||||
@set-contribution="setContribution"
|
@set-contribution="setContribution"
|
||||||
@update-contribution="updateContribution"
|
@update-contribution="updateContribution"
|
||||||
@ -39,6 +39,7 @@
|
|||||||
</b-alert>
|
</b-alert>
|
||||||
</div>
|
</div>
|
||||||
<contribution-list
|
<contribution-list
|
||||||
|
@closeAllOpenCollapse="closeAllOpenCollapse"
|
||||||
:items="items"
|
:items="items"
|
||||||
@update-list-contributions="updateListContributions"
|
@update-list-contributions="updateListContributions"
|
||||||
@update-contribution-form="updateContributionForm"
|
@update-contribution-form="updateContributionForm"
|
||||||
@ -49,7 +50,7 @@
|
|||||||
:pageSize="pageSize"
|
:pageSize="pageSize"
|
||||||
/>
|
/>
|
||||||
</b-tab>
|
</b-tab>
|
||||||
<b-tab :title="$t('navigation.community')">
|
<b-tab :title="$t('navigation.community')" @click="closeAllOpenCollapse">
|
||||||
<b-alert show dismissible fade variant="secondary" class="text-dark">
|
<b-alert show dismissible fade variant="secondary" class="text-dark">
|
||||||
<h4 class="alert-heading">{{ $t('navigation.community') }}</h4>
|
<h4 class="alert-heading">{{ $t('navigation.community') }}</h4>
|
||||||
<p>
|
<p>
|
||||||
@ -112,6 +113,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
closeAllOpenCollapse() {
|
||||||
|
// console.log('Community closeAllOpenCollapse ')
|
||||||
|
// console.log('closeAllOpenCollapse', this.$el.querySelectorAll('.collapse.show'))
|
||||||
|
this.$el.querySelectorAll('.collapse.show').forEach((value) => {
|
||||||
|
this.$root.$emit('bv::toggle::collapse', value.id)
|
||||||
|
})
|
||||||
|
},
|
||||||
setContribution(data) {
|
setContribution(data) {
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.mutate({
|
.mutate({
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
</b-container>
|
</b-container>
|
||||||
<b-container>
|
<b-container>
|
||||||
<div class="h3">{{ $t('contact') }}</div>
|
<div class="h3">{{ $t('contact') }}</div>
|
||||||
<b-link href="mailto: abc@example.com">{{ supportMail }}</b-link>
|
<b-link :href="`mailto:${supportMail}`">{{ supportMail }}</b-link>
|
||||||
</b-container>
|
</b-container>
|
||||||
<!--
|
<!--
|
||||||
<hr />
|
<hr />
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido",
|
"name": "gradido",
|
||||||
"version": "1.13.3",
|
"version": "1.14.1",
|
||||||
"description": "Gradido",
|
"description": "Gradido",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "git@github.com:gradido/gradido.git",
|
"repository": "git@github.com:gradido/gradido.git",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user