diff --git a/admin/src/components/UserQuery.vue b/admin/src/components/UserQuery.vue index 2a31a8dea..449b4bdc9 100644 --- a/admin/src/components/UserQuery.vue +++ b/admin/src/components/UserQuery.vue @@ -5,7 +5,7 @@ type="text" class="test-input-criteria" v-model="currentValue" - :placeholder="$t('user_search')" + :placeholder="placeholderText" > @@ -20,12 +20,18 @@ export default { name: 'UserQuery', props: { value: { type: String, default: '' }, + placeholder: { type: String, default: '' }, }, data() { return { currentValue: this.value, } }, + computed: { + placeholderText() { + return this.placeholder || this.$t('user_search') + }, + }, watch: { currentValue() { if (this.value !== this.currentValue) { diff --git a/admin/src/graphql/adminListContributions.js b/admin/src/graphql/adminListContributions.js index 6a9a69b17..9d814b95d 100644 --- a/admin/src/graphql/adminListContributions.js +++ b/admin/src/graphql/adminListContributions.js @@ -8,6 +8,7 @@ export const adminListContributions = gql` $statusFilter: [ContributionStatus!] $userId: Int $query: String + $noHashtag: Boolean ) { adminListContributions( currentPage: $currentPage @@ -16,6 +17,7 @@ export const adminListContributions = gql` statusFilter: $statusFilter userId: $userId query: $query + noHashtag: $noHashtag ) { contributionCount contributionList { diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index d4209ce83..3a4f23b18 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -89,6 +89,7 @@ "submit": "Senden" }, "GDD": "GDD", + "hashtag_symbol": "#", "help": { "help": "Hilfe", "transactionlist": { @@ -124,6 +125,10 @@ "user_search": "Nutzersuche" }, "not_open_creations": "Keine offenen Schöpfungen", + "no_filter": "Keine Filterung", + "no_filter_tooltip": "Es wird nicht nach Hashtags gefiltert", + "no_hashtag": "Ohne Hashtag", + "no_hashtag_tooltip": "Zeigt nur Schöpfungen ohne Hashtag im Kommentar an", "open": "offen", "open_creations": "Offene Schöpfungen", "overlay": { @@ -216,6 +221,7 @@ "tabTitle": "Nutzer-Rolle" }, "user_deleted": "Nutzer ist gelöscht.", + "user_memo_search": "Nutzer-Kommentar-Suche", "user_recovered": "Nutzer ist wiederhergestellt.", "user_search": "Nutzer-Suche" } diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 35aacfa69..5a3c78a0f 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -89,6 +89,7 @@ "submit": "Send" }, "GDD": "GDD", + "hashtag_symbol": "#", "help": { "help": "Help", "transactionlist": { @@ -124,6 +125,10 @@ "user_search": "User search" }, "not_open_creations": "No open creations", + "no_filter": "No Filter", + "no_filter_tooltip": "It is not filtered by hashtags", + "no_hashtag": "No Hashtag", + "no_hashtag_tooltip": "Displays only contributions without hashtag in comment", "open": "open", "open_creations": "Open creations", "overlay": { @@ -216,6 +221,7 @@ "tabTitle": "User Role" }, "user_deleted": "User is deleted.", + "user_memo_search": "User and Memo search", "user_recovered": "User is recovered.", "user_search": "User search" } diff --git a/admin/src/pages/CreationConfirm.spec.js b/admin/src/pages/CreationConfirm.spec.js index 44ba4a1c4..36e2479aa 100644 --- a/admin/src/pages/CreationConfirm.spec.js +++ b/admin/src/pages/CreationConfirm.spec.js @@ -339,6 +339,7 @@ describe('CreationConfirm', () => { it('refetches contributions with proper filter', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', @@ -355,6 +356,7 @@ describe('CreationConfirm', () => { it('refetches contributions with proper filter', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', @@ -372,6 +374,7 @@ describe('CreationConfirm', () => { it('refetches contributions with proper filter', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', @@ -389,6 +392,7 @@ describe('CreationConfirm', () => { it('refetches contributions with proper filter', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', @@ -406,6 +410,7 @@ describe('CreationConfirm', () => { it('refetches contributions with proper filter', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', @@ -427,6 +432,7 @@ describe('CreationConfirm', () => { it('calls the API again', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 2, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', @@ -443,6 +449,7 @@ describe('CreationConfirm', () => { it('refetches contributions with proper filter and current page = 1', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', @@ -465,6 +472,7 @@ describe('CreationConfirm', () => { it('calls the API with query', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: 'query', @@ -480,6 +488,7 @@ describe('CreationConfirm', () => { it('calls the API with empty query', () => { expect(adminListContributionsMock).toBeCalledWith({ currentPage: 1, + noHashtag: null, order: 'DESC', pageSize: 25, query: '', diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 34458e0aa..7d52c4ce2 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -1,7 +1,13 @@