From e9879caecc2e5c91679e58b2c8e161325be51918 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Thu, 6 Mar 2025 15:07:15 +0100 Subject: [PATCH 01/10] change column name, add symbol for opening all contribution details, add details --- admin/src/components/CollapseIcon.vue | 17 ++++++++ .../ContributionMessagesList.vue | 36 ++++++++-------- .../components/Tables/OpenCreationsTable.vue | 41 ++++++++++--------- admin/src/locales/de.json | 4 +- admin/src/locales/en.json | 4 +- admin/src/pages/CreationConfirm.vue | 10 ++--- 6 files changed, 67 insertions(+), 45 deletions(-) create mode 100644 admin/src/components/CollapseIcon.vue diff --git a/admin/src/components/CollapseIcon.vue b/admin/src/components/CollapseIcon.vue new file mode 100644 index 000000000..240aed498 --- /dev/null +++ b/admin/src/components/CollapseIcon.vue @@ -0,0 +1,17 @@ + + diff --git a/admin/src/components/ContributionMessages/ContributionMessagesList.vue b/admin/src/components/ContributionMessages/ContributionMessagesList.vue index 14b640066..a465fe5a8 100644 --- a/admin/src/components/ContributionMessages/ContributionMessagesList.vue +++ b/admin/src/components/ContributionMessages/ContributionMessagesList.vue @@ -1,17 +1,27 @@ + + diff --git a/admin/src/graphql/adminListContributions.js b/admin/src/graphql/adminListContributions.js index aa6c0c713..b5eca3477 100644 --- a/admin/src/graphql/adminListContributions.js +++ b/admin/src/graphql/adminListContributions.js @@ -26,6 +26,7 @@ export const adminListContributions = gql` id firstName lastName + email amount memo createdAt diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index b2d72cb91..9e5f3bc0e 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -36,7 +36,7 @@ }, "contributionMessagesForm": { "resubmissionDateInPast": "Wiedervorlage Datum befindet sich in der Vergangenheit!", - "userDetailsRegisteredAt": "{firstName} {lastName} <{email}> hat sich am {createdAt} registriert." + "hasRegisteredAt": "hat sich am {createdAt} registriert." }, "contributions": { "all": "Alle", @@ -143,7 +143,7 @@ "plus": "+" }, "message": { - "request": "Die Anfrage wurde gesendet." + "request": "Die Eingabe wurde gespeichert." }, "moderator": { "history": "Die Daten wurden geändert. Dies sind die alten Daten.", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 0eee027a3..7d71e8bf0 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -36,7 +36,7 @@ }, "contributionMessagesForm": { "resubmissionDateInPast": "Resubmission date is in the past!", - "userDetailsRegisteredAt": "{firstName} {lastName} <{email}> registered on {createdAt}." + "hasRegisteredAt": "registered on {createdAt}." }, "contributions": { "all": "All", @@ -74,8 +74,8 @@ "deleted_user": "All deleted user", "deny": "Reject", "description": "Description", - "e_mail": "E-mail", "details": "Details", + "e_mail": "E-mail", "edit": "edit", "enabled": "enabled", "error": "Error", @@ -143,7 +143,7 @@ "plus": "+" }, "message": { - "request": "Request has been sent." + "request": "The entry has been saved." }, "moderator": { "history": "The data has been changed. This is the old data.", diff --git a/backend/src/graphql/model/Contribution.ts b/backend/src/graphql/model/Contribution.ts index a0e7e4366..87240a47e 100644 --- a/backend/src/graphql/model/Contribution.ts +++ b/backend/src/graphql/model/Contribution.ts @@ -7,8 +7,9 @@ import { ObjectType, Field, Int } from 'type-graphql' export class Contribution { constructor(contribution: dbContribution, user?: User | null) { this.id = contribution.id - this.firstName = user ? user.firstName : null - this.lastName = user ? user.lastName : null + this.firstName = user?.firstName ?? null + this.lastName = user?.lastName ?? null + this.email = user?.emailContact?.email ?? null this.amount = contribution.amount this.memo = contribution.memo this.createdAt = contribution.createdAt @@ -37,6 +38,9 @@ export class Contribution { @Field(() => String, { nullable: true }) lastName: string | null + @Field(() => String, { nullable: true }) + email: string | null + @Field(() => Decimal) amount: Decimal diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index c1ee2d490..64bdd993e 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -51,8 +51,8 @@ "contribution": { "activity": "Tätigkeit", "alert": { - "answerQuestion": "Bitte beantworte diese Rückfrage.", - "answerQuestionToast": "Du hast eine Rückfrage auf einen Beitrag. Bitte antworte auf diese.", + "answerQuestion": "Zu diesem Beitrag liegt eine neue Nachricht vor.", + "answerQuestionToast": "Du hast neue Nachrichten.", "communityNoteList": "Hier findest du alle eingereichten und bestätigten Beiträge von allen Mitgliedern aus dieser Gemeinschaft.", "confirm": "bestätigt", "deleted": "gelöscht", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index ed23c4d27..a40034dff 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -51,8 +51,8 @@ "contribution": { "activity": "Activity", "alert": { - "answerQuestion": "Please answer the question.", - "answerQuestionToast": "You have a question about a post. Please reply to it.", + "answerQuestion": "There is a new message for this article.", + "answerQuestionToast": "You have new messages.", "communityNoteList": "Here you will find all submitted and confirmed contributions from all members of this community.", "confirm": "confirmed", "deleted": "deleted", From bd0c332612b51fd1495da7f61c1fc2361d246631 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Sat, 8 Mar 2025 09:13:24 +0100 Subject: [PATCH 03/10] modificate contribution detail layout --- .../ContributionMessagesList.vue | 22 ++++++++++++------- admin/src/graphql/adminListContributions.js | 1 + admin/src/locales/de.json | 5 +++++ admin/src/locales/en.json | 5 +++++ admin/src/pages/UserSearch.vue | 11 +++++++++- backend/src/graphql/model/Contribution.ts | 4 ++++ 6 files changed, 39 insertions(+), 9 deletions(-) diff --git a/admin/src/components/ContributionMessages/ContributionMessagesList.vue b/admin/src/components/ContributionMessages/ContributionMessagesList.vue index e62dae7f0..8e1d5fcb7 100644 --- a/admin/src/components/ContributionMessages/ContributionMessagesList.vue +++ b/admin/src/components/ContributionMessages/ContributionMessagesList.vue @@ -2,15 +2,17 @@
- - {{ contribution.firstName }} {{ contribution.lastName }} <{{ contribution.email }}> - + + {{ contribution.firstName }} {{ contribution.lastName }} +   - {{ - $t('contributionMessagesForm.hasRegisteredAt', { - createdAt: new Date(contribution.createdAt).toLocaleString(), - }) - }} + {{ contribution.email }} +   + {{ contribution.username }} +   Humhub-Profil + + + {{ $t('registered') }}: {{ new Date(contribution.createdAt).toLocaleString() }} @@ -42,6 +44,7 @@ import { useQuery } from '@vue/apollo-composable' import { adminListContributionMessages } from '../../graphql/adminListContributionMessages.js' import { useAppToast } from '@/composables/useToast' +import { BListGroupItem } from 'bootstrap-vue-next' const props = defineProps({ contribution: { @@ -63,6 +66,9 @@ const { toastError } = useAppToast() const mailtoLink = computed(() => { return `mailto:${props.contribution.email}` }) +const searchLink = computed(() => { + return `/user?search=${props.contribution.email}` +}) const messages = ref([]) diff --git a/admin/src/graphql/adminListContributions.js b/admin/src/graphql/adminListContributions.js index b5eca3477..4329fef05 100644 --- a/admin/src/graphql/adminListContributions.js +++ b/admin/src/graphql/adminListContributions.js @@ -27,6 +27,7 @@ export const adminListContributions = gql` firstName lastName email + username amount memo createdAt diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 9e5f3bc0e..0ceb46d8f 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -119,6 +119,10 @@ "describe": "Teilt Koordinaten im Format 'Breitengrad, Längengrad' automatisch auf. Fügen sie hier einfach z.B. ihre Koordinaten von Google Maps, zum Beispiel: 49.28187664243721, 9.740672183943639, ein." } }, + "goTo": { + "userSearch": "Zur Nutzersuche gehen", + "humhubProfile": "Zum Humhub Profil gehen" + }, "help": { "help": "Hilfe", "transactionlist": { @@ -226,6 +230,7 @@ }, "redeemed": "eingelöst", "removeNotSelf": "Als Admin/Moderator kannst du dich nicht selber löschen.", + "registered": "Registriert", "reset": "Zurücksetzen", "save": "Speichern", "statistic": { diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 7d71e8bf0..ef626311a 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -119,6 +119,10 @@ "describe": "Automatically splits coordinates in the format 'latitude, longitude'. Simply enter your coordinates from Google Maps here, for example: 49.28187664243721, 9.740672183943639." } }, + "goTo": { + "userSearch": "Go to user search", + "humhubProfile": "Go to Humhub profile" + }, "help": { "help": "Help", "transactionlist": { @@ -226,6 +230,7 @@ }, "redeemed": "redeemed", "removeNotSelf": "As an admin/moderator, you cannot delete yourself.", + "registered": "Registered", "reset": "Reset", "save": "Save", "statistic": { diff --git a/admin/src/pages/UserSearch.vue b/admin/src/pages/UserSearch.vue index 72fa15934..78bfc7e90 100644 --- a/admin/src/pages/UserSearch.vue +++ b/admin/src/pages/UserSearch.vue @@ -43,8 +43,9 @@
diff --git a/admin/src/components/Tables/OpenCreationsTable.vue b/admin/src/components/Tables/OpenCreationsTable.vue index 56ff980f0..824c9e141 100644 --- a/admin/src/components/Tables/OpenCreationsTable.vue +++ b/admin/src/components/Tables/OpenCreationsTable.vue @@ -126,6 +126,7 @@ @update-status="updateStatus" @reload-contribution="reloadContribution" @update-contributions="updateContributions" + @search-for-email="$emit('search-for-email', $event)" /> @@ -173,7 +174,13 @@ export default { required: false, }, }, - emits: ['update-contributions', 'reload-contribution', 'update-status', 'show-overlay'], + emits: [ + 'update-contributions', + 'reload-contribution', + 'update-status', + 'show-overlay', + 'search-for-email', + ], data() { return { slotIndex: 0, diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index bce6fc229..a5c4d2e37 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -99,6 +99,9 @@ "verified": "Verifiziert", "verifiedAt": "Verifiziert am" }, + "filter": { + "byEmail": "Nach E-Mail filtern" + }, "firstname": "Vorname", "footer": { "app_version": "App version {version}", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 52555f12b..b3f500564 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -99,6 +99,9 @@ "verified": "Verified", "verifiedAt": "Verified at" }, + "filter": { + "byEmail": "Filter by email" + }, "firstname": "Firstname", "footer": { "app_version": "App version {version}", diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 7095d93c6..d9497df7a 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -58,6 +58,7 @@ @update-status="updateStatus" @reload-contribution="reloadContribution" @update-contributions="refetch" + @search-for-email="query = $event" /> Date: Mon, 10 Mar 2025 12:49:33 +0100 Subject: [PATCH 06/10] fix lint --- .../components/ContributionMessages/ContributionMessagesList.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/src/components/ContributionMessages/ContributionMessagesList.vue b/admin/src/components/ContributionMessages/ContributionMessagesList.vue index 7f365298f..9b6285a21 100644 --- a/admin/src/components/ContributionMessages/ContributionMessagesList.vue +++ b/admin/src/components/ContributionMessages/ContributionMessagesList.vue @@ -119,6 +119,7 @@ const searchForEmail = () => { .temp-message { margin-top: 50px; } + .cursor-pointer { cursor: pointer; } From 758e3703492c702beb79e6b1b6686d70d708d680 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 10 Mar 2025 14:52:25 +0100 Subject: [PATCH 07/10] use bootstrap pointer css class --- .../ContributionMessages/ContributionMessagesList.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/admin/src/components/ContributionMessages/ContributionMessagesList.vue b/admin/src/components/ContributionMessages/ContributionMessagesList.vue index 9b6285a21..69c9bebfe 100644 --- a/admin/src/components/ContributionMessages/ContributionMessagesList.vue +++ b/admin/src/components/ContributionMessages/ContributionMessagesList.vue @@ -7,7 +7,7 @@   {{ contribution.email }} - + {{ $t('filter.byEmail') }} @@ -119,8 +119,4 @@ const searchForEmail = () => { .temp-message { margin-top: 50px; } - -.cursor-pointer { - cursor: pointer; -} From c9816e3b74ad6a51f99835a8409f2dba0cf50a52 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 12 Mar 2025 15:47:45 +0100 Subject: [PATCH 08/10] add all neccessary for showing humhub profile link in admin --- admin/.env.dist | 3 ++- admin/.env.template | 3 +++ .../ContributionMessagesList.vue | 27 +++++++++++++++++-- admin/src/config/index.js | 5 ++++ admin/src/config/schema.js | 9 +++++++ admin/src/graphql/adminListContributions.js | 1 + admin/vite.config.js | 3 ++- backend/src/config/schema.ts | 7 ++--- backend/src/graphql/model/Contribution.ts | 11 ++++++++ config/src/commonSchema.ts | 5 ++++ 10 files changed, 65 insertions(+), 9 deletions(-) diff --git a/admin/.env.dist b/admin/.env.dist index c3d62bfd2..62c2b0ffd 100644 --- a/admin/.env.dist +++ b/admin/.env.dist @@ -3,4 +3,5 @@ GRAPHQL_PATH=/graphql WALLET_URL=http://localhost WALLET_AUTH_PATH=/authenticate?token= WALLET_LOGIN_PATH=/login -DEBUG_DISABLE_AUTH=false \ No newline at end of file +DEBUG_DISABLE_AUTH=false +HUMHUB_ACTIVE=false \ No newline at end of file diff --git a/admin/.env.template b/admin/.env.template index 11e849271..354a684a3 100644 --- a/admin/.env.template +++ b/admin/.env.template @@ -6,3 +6,6 @@ WALLET_AUTH_PATH=$WALLET_AUTH_PATH WALLET_LOGIN_PATH=$WALLET_LOGIN_PATH GRAPHQL_PATH=$GRAPHQL_PATH DEBUG_DISABLE_AUTH=false + +HUMHUB_ACTIVE=$HUMHUB_ACTIVE +HUMHUB_API_URL=$HUMHUB_API_URL \ No newline at end of file diff --git a/admin/src/components/ContributionMessages/ContributionMessagesList.vue b/admin/src/components/ContributionMessages/ContributionMessagesList.vue index 9b6285a21..dc27b1597 100644 --- a/admin/src/components/ContributionMessages/ContributionMessagesList.vue +++ b/admin/src/components/ContributionMessages/ContributionMessagesList.vue @@ -13,7 +13,20 @@   {{ contribution.username }} -   Humhub-Profil +   + + + + + + {{ $t('goTo.humhubProfile') }} + + {{ $t('registered') }}: {{ new Date(contribution.createdAt).toLocaleString() }} @@ -45,10 +58,10 @@