Merge branch 'master' into BerndHueckstaedt-patch-2

This commit is contained in:
Hannes Heine 2023-03-08 09:12:42 +01:00 committed by GitHub
commit fce74dfeb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 100 additions and 58 deletions

View File

@ -4,8 +4,56 @@ 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).
#### [1.19.0](https://github.com/gradido/gradido/compare/1.18.2...1.19.0)
- fix(frontend): change contribution design [`#2731`](https://github.com/gradido/gradido/pull/2731)
- refactor(frontend): commnity navbar- & unauthenticated b-gradido styles [`#2732`](https://github.com/gradido/gradido/pull/2732)
- fix(database): change downwards migration to delete entries with last_announced_at IS NULL [`#2767`](https://github.com/gradido/gradido/pull/2767)
- feat(admin): deleted contributions visible [`#2759`](https://github.com/gradido/gradido/pull/2759)
- feat(other): e2e test user story user registration [`#2753`](https://github.com/gradido/gradido/pull/2753)
- refactor(frontend): style and design changes to a contribution [`#2648`](https://github.com/gradido/gradido/pull/2648)
- test(backend): add tests that ``sendContributionDeleted`` and ``sendContributionDenied`` are called [`#2740`](https://github.com/gradido/gradido/pull/2740)
- fix(backend): set email tls true in test [`#2763`](https://github.com/gradido/gradido/pull/2763)
- refactor(frontend): add visible event an answer question [`#2750`](https://github.com/gradido/gradido/pull/2750)
- refactor(frontend): style sidebar, add icons [`#2737`](https://github.com/gradido/gradido/pull/2737)
- fix(backend): possible flaky test [`#2761`](https://github.com/gradido/gradido/pull/2761)
- fix(backend): emails adjust namings of menus to new design [`#2756`](https://github.com/gradido/gradido/pull/2756)
- ci(other): rename dht node and federation workflow jobs for better branch protection maintenance [`#2743`](https://github.com/gradido/gradido/pull/2743)
- refactor(backend): combine logic for `listTransactionLinks` & `listTransactionLinksAdmin` [`#2706`](https://github.com/gradido/gradido/pull/2706)
- refactor(backend): remove admin create contributions [`#2724`](https://github.com/gradido/gradido/pull/2724)
- refactor(frontend): remove .vue as imports [`#2725`](https://github.com/gradido/gradido/pull/2725)
- feat(federation): add dht-node to deployment scripts [`#2729`](https://github.com/gradido/gradido/pull/2729)
- fix(frontend): change fetchPolicy, add scripts.update [`#2718`](https://github.com/gradido/gradido/pull/2718)
- refactor(backend): list unconfirmed contribution to admin list all contribution [`#2666`](https://github.com/gradido/gradido/pull/2666)
- refactor(frontend): community routes [`#2721`](https://github.com/gradido/gradido/pull/2721)
- test(backend): authentication tests for TransactionLinkResolver [`#2705`](https://github.com/gradido/gradido/pull/2705)
- refactor(backend): use LogError on errors [`#2679`](https://github.com/gradido/gradido/pull/2679)
- refactor(backend): use LogError on encryptorUtils [`#2678`](https://github.com/gradido/gradido/pull/2678)
- refactor(backend): use LogError on creations [`#2677`](https://github.com/gradido/gradido/pull/2677)
- refactor(other): decrease docker build dependencies in test workflow [`#2719`](https://github.com/gradido/gradido/pull/2719)
- refactor(backend): unit test for the method denyContribution [`#2639`](https://github.com/gradido/gradido/pull/2639)
- refactor(frontend): logo inserted with better quality. [`#2646`](https://github.com/gradido/gradido/pull/2646)
- feat(federation): harmonize and sync modules and data of federation [`#2665`](https://github.com/gradido/gradido/pull/2665)
- feat(federation): add docker and github-workflow files [`#2680`](https://github.com/gradido/gradido/pull/2680)
- feat(other): e2e test user authentication reset password [`#2644`](https://github.com/gradido/gradido/pull/2644)
- refactor(admin): add tabs for all statusus on contributions [`#2623`](https://github.com/gradido/gradido/pull/2623)
- feat(federation): implement a graphql client to request getpublickey [`#2511`](https://github.com/gradido/gradido/pull/2511)
- refactor(frontend): style refactor mobil auth area [`#2643`](https://github.com/gradido/gradido/pull/2643)
- refactor(backend): use LogError on TransactionResolver [`#2676`](https://github.com/gradido/gradido/pull/2676)
- refactor(backend): event protocol rework [`#2691`](https://github.com/gradido/gradido/pull/2691)
- refactor(backend): use LogError on TransactionLinkResolver [`#2673`](https://github.com/gradido/gradido/pull/2673)
- fix(frontend): simple disabled function on submit send [`#2647`](https://github.com/gradido/gradido/pull/2647)
- refactor(frontend): missing message on old transactions [`#2660`](https://github.com/gradido/gradido/pull/2660)
- refactor(admin): remove overview and multi creation menu entry [`#2661`](https://github.com/gradido/gradido/pull/2661)
- feat(other): add locales check to backend and integrate it to test workflow [`#2693`](https://github.com/gradido/gradido/pull/2693)
- refactor(other): add linting rules like in backend modul [`#2695`](https://github.com/gradido/gradido/pull/2695)
- refactor(backend): use LogError on contributionResolver [`#2669`](https://github.com/gradido/gradido/pull/2669)
#### [1.18.2](https://github.com/gradido/gradido/compare/1.18.1...1.18.2)
> 10 February 2023
- chore(release): version 1.18.2 [`#2700`](https://github.com/gradido/gradido/pull/2700)
- fix(admin): deny contribution button to left [`#2699`](https://github.com/gradido/gradido/pull/2699)
#### [1.18.1](https://github.com/gradido/gradido/compare/1.18.0...1.18.1)

View File

@ -3,7 +3,7 @@
"description": "Administraion Interface for Gradido",
"main": "index.js",
"author": "Moriz Wahl",
"version": "1.18.2",
"version": "1.19.0",
"license": "Apache-2.0",
"private": false,
"scripts": {

View File

@ -1,6 +1,6 @@
{
"name": "gradido-backend",
"version": "1.18.2",
"version": "1.19.0",
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/backend",

View File

@ -995,7 +995,6 @@ describe('ContributionResolver', () => {
currentPage: 1,
pageSize: 25,
order: 'DESC',
filterConfirmed: false,
},
})
expect(errorObjects).toEqual([new GraphQLError('401 Unauthorized')])
@ -1014,7 +1013,7 @@ describe('ContributionResolver', () => {
resetToken()
})
describe('filter confirmed is false', () => {
describe('no status filter', () => {
it('returns creations', async () => {
const {
data: { listContributions: contributionListResult },
@ -1066,7 +1065,7 @@ describe('ContributionResolver', () => {
})
})
describe('filter confirmed is true', () => {
describe('with status filter [PENDING, IN_PROGRESS, DENIED, DELETED]', () => {
it('returns only unconfirmed creations', async () => {
const {
data: { listContributions: contributionListResult },
@ -1076,7 +1075,7 @@ describe('ContributionResolver', () => {
currentPage: 1,
pageSize: 25,
order: 'DESC',
filterConfirmed: true,
statusFilter: ['PENDING', 'IN_PROGRESS', 'DENIED', 'DELETED'],
},
})
expect(contributionListResult).toMatchObject({

View File

@ -1,6 +1,6 @@
import Decimal from 'decimal.js-light'
import { Arg, Args, Authorized, Ctx, Int, Mutation, Query, Resolver } from 'type-graphql'
import { FindOperator, IsNull, getConnection } from '@dbTools/typeorm'
import { IsNull, getConnection } from '@dbTools/typeorm'
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionMessage } from '@entity/ContributionMessage'
@ -127,35 +127,26 @@ export class ContributionResolver {
@Authorized([RIGHTS.LIST_CONTRIBUTIONS])
@Query(() => ContributionListResult)
async listContributions(
@Ctx() context: Context,
@Args()
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
@Arg('filterConfirmed', () => Boolean)
filterConfirmed: boolean | null,
@Ctx() context: Context,
@Arg('statusFilter', () => [ContributionStatus], { nullable: true })
statusFilter?: ContributionStatus[],
): Promise<ContributionListResult> {
const user = getUser(context)
const where: {
userId: number
confirmedBy?: FindOperator<number> | null
} = { userId: user.id }
if (filterConfirmed) where.confirmedBy = IsNull()
const [contributions, count] = await getConnection()
.createQueryBuilder()
.select('c')
.from(DbContribution, 'c')
.leftJoinAndSelect('c.messages', 'm')
.where(where)
.withDeleted()
.orderBy('c.createdAt', order)
.limit(pageSize)
.offset((currentPage - 1) * pageSize)
.getManyAndCount()
const [dbContributions, count] = await findContributions(
order,
currentPage,
pageSize,
true,
['messages'],
user.id,
statusFilter,
)
return new ContributionListResult(
count,
contributions.map((contribution) => new Contribution(contribution, user)),
dbContributions.map((contribution) => new Contribution(contribution, user)),
)
}
@ -172,6 +163,8 @@ export class ContributionResolver {
currentPage,
pageSize,
false,
['user'],
undefined,
statusFilter,
)
@ -398,6 +391,8 @@ export class ContributionResolver {
currentPage,
pageSize,
true,
['user'],
undefined,
statusFilter,
)

View File

@ -8,18 +8,21 @@ export const findContributions = async (
currentPage: number,
pageSize: number,
withDeleted: boolean,
relations: string[],
userId?: number,
statusFilter?: ContributionStatus[],
): Promise<[DbContribution[], number]> =>
DbContribution.findAndCount({
where: {
...(statusFilter && statusFilter.length && { contributionStatus: In(statusFilter) }),
...(userId && { userId }),
},
withDeleted: withDeleted,
order: {
createdAt: order,
id: order,
},
relations: ['user'],
relations,
skip: (currentPage - 1) * pageSize,
take: pageSize,
})

View File

@ -153,13 +153,13 @@ export const listContributions = gql`
$currentPage: Int = 1
$pageSize: Int = 5
$order: Order
$filterConfirmed: Boolean = false
$statusFilter: [ContributionStatus!]
) {
listContributions(
currentPage: $currentPage
pageSize: $pageSize
order: $order
filterConfirmed: $filterConfirmed
statusFilter: $statusFilter
) {
contributionCount
contributionList {

View File

@ -1,6 +1,6 @@
{
"name": "gradido-database",
"version": "1.18.2",
"version": "1.19.0",
"description": "Gradido Database Tool to execute database migrations",
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/database",

View File

@ -1,6 +1,6 @@
{
"name": "bootstrap-vue-gradido-wallet",
"version": "1.18.2",
"version": "1.19.0",
"private": true,
"scripts": {
"start": "node run/server.js",

View File

@ -74,7 +74,7 @@ describe('ContributionListItem', () => {
it('is warning at when state is IN_PROGRESS', async () => {
await wrapper.setProps({ state: 'IN_PROGRESS' })
expect(wrapper.vm.variant).toBe('f5')
expect(wrapper.vm.variant).toBe('205')
})
})

View File

@ -2,7 +2,7 @@
<div>
<div
class="contribution-list-item bg-white appBoxShadow gradido-border-radius pt-3 px-3"
:class="state === 'IN_PROGRESS' ? 'pulse border border-205' : ''"
:class="state === 'IN_PROGRESS' && !allContribution ? 'pulse border border-205' : ''"
>
<b-row>
<b-col cols="3" lg="2" md="2">
@ -25,11 +25,7 @@
</div>
<div class="mt-3 font-weight-bold">{{ $t('contributionText') }}</div>
<div class="mb-3 text-break word-break">{{ memo }}</div>
<div
v-if="state === 'IN_PROGRESS'"
class="text-205 pointer hover-font-bold"
@click="visible = !visible"
>
<div v-if="state === 'IN_PROGRESS' && !allContribution" class="text-205">
{{ $t('contribution.alert.answerQuestion') }}
</div>
</b-col>
@ -193,14 +189,14 @@ export default {
if (this.deletedAt) return 'trash'
if (this.deniedAt) return 'x-circle'
if (this.confirmedAt) return 'check'
if (this.state === 'IN_PROGRESS') return 'question-circle'
if (this.state === 'IN_PROGRESS') return 'question'
return 'bell-fill'
},
variant() {
if (this.deletedAt) return 'danger'
if (this.deniedAt) return 'warning'
if (this.confirmedAt) return 'success'
if (this.state === 'IN_PROGRESS') return 'f5'
if (this.state === 'IN_PROGRESS') return '205'
return 'primary'
},
date() {

View File

@ -165,13 +165,13 @@ export const listContributions = gql`
$currentPage: Int = 1
$pageSize: Int = 25
$order: Order = DESC
$filterConfirmed: Boolean = false
$statusFilter: [ContributionStatus!]
) {
listContributions(
currentPage: $currentPage
pageSize: $pageSize
order: $order
filterConfirmed: $filterConfirmed
statusFilter: $statusFilter
) {
contributionCount
contributionList {

View File

@ -50,7 +50,7 @@ describe('CommunityTemplate', () => {
expect(listItems.at(0).find('svg').attributes('aria-label')).toEqual('bell fill')
expect(listItems.at(0).text()).toBe('contribution.alert.pending')
expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question square')
expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question')
expect(listItems.at(1).text()).toBe('contribution.alert.in_progress')
expect(listItems.at(2).find('svg').attributes('aria-label')).toEqual('check')
@ -80,7 +80,7 @@ describe('CommunityTemplate', () => {
expect(listItems.at(0).find('svg').attributes('aria-label')).toEqual('bell fill')
expect(listItems.at(0).text()).toBe('contribution.alert.pending')
expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question square')
expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question')
expect(listItems.at(1).text()).toBe('contribution.alert.in_progress')
expect(listItems.at(2).find('svg').attributes('aria-label')).toEqual('check')

View File

@ -24,7 +24,7 @@
{{ $t('contribution.alert.pending') }}
</li>
<li>
<b-icon icon="question-square" variant="warning"></b-icon>
<b-icon icon="question" variant="205"></b-icon>
{{ $t('contribution.alert.in_progress') }}
</li>
<li>
@ -54,7 +54,7 @@
{{ $t('contribution.alert.pending') }}
</li>
<li>
<b-icon icon="question-square" variant="warning"></b-icon>
<b-icon icon="question" variant="205"></b-icon>
{{ $t('contribution.alert.in_progress') }}
</li>
<li>

View File

@ -27,9 +27,9 @@
"moderator": "Moderator",
"moderators": "Moderatoren",
"myContributions": "Meine Beiträge",
"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.",
"noOpenContributionLinkText": "Zur Zeit gibt es keine per Link erzeugte Schöpfungen.",
"openContributionLinks": "Per Link erzeugte Schöpfungen",
"openContributionLinkText": "Die Gemeinschaft „{name}“ unterstützt aktuell {count} per Link erzeugte Schöpfungen:",
"submitContribution": "Schreiben"
},
"communityInfo": "Gemeinschaft Information",

View File

@ -27,9 +27,9 @@
"moderator": "Moderator",
"moderators": "Moderators",
"myContributions": "My contributions",
"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.",
"noOpenContributionLinkText": "Currently there are no link-generated creations.",
"openContributionLinks": "Creations generated by link",
"openContributionLinkText": "The \"{name}\" community currently supports {count} link-generated creations:",
"submitContribution": "Contribute"
},
"communityInfo": "Community Information",

View File

@ -26,8 +26,9 @@
"moderator": "Moderador",
"moderators": "Moderadores",
"myContributions": "Mis contribuciones al bien común",
"openContributionLinks": "lista de enlaces de contribuciones públicas",
"openContributionLinkText": "La comunidad \"{name}\" proporciona actualmente las siguientes {count} creaciones automáticas.",
"noOpenContributionLinkText": "Actualmente no hay creaciones generadas por enlaces.",
"openContributionLinks": "Creaciones generadas por enlace",
"openContributionLinkText": "La comunidad \"{name}\" admite actualmente {count} creaciones generadas por enlaces:",
"other-communities": "Otras comunidades",
"statistic": "Estadísticas",
"submitContribution": "escribir",

View File

@ -1,6 +1,6 @@
{
"name": "gradido",
"version": "1.18.2",
"version": "1.19.0",
"description": "Gradido",
"main": "index.js",
"repository": "git@github.com:gradido/gradido.git",