remove who/moderator column, add comment if contribution was created by moderator

This commit is contained in:
einhornimmond 2025-12-19 09:30:33 +01:00
parent 0e111023f6
commit 62e6bfe414
5 changed files with 21 additions and 17 deletions

View File

@ -236,7 +236,13 @@ export default {
}
},
isAddCommentToMemo(item) {
return item.updatedBy > 0 || item.confirmedBy > 0 || item.deletedBy > 0 || item.deniedBy > 0
return (
item.updatedBy > 0 ||
item.confirmedBy > 0 ||
item.deletedBy > 0 ||
item.deniedBy > 0 ||
item.moderatorId > 0
)
},
getMemoComment(item) {
let comment = ''
@ -250,10 +256,17 @@ export default {
if (item.updatedBy > 0) {
if (comment.length) {
comment += ' '
comment += ' | '
}
comment += this.$t('moderator.memo-modified', { name: item.updatedByUserName })
}
if (item.moderatorId > 0) {
if (comment.length) {
comment += ' | '
}
comment += this.$t('contribution.createdBy', { name: item.moderatorUserName })
}
return comment
},
addClipboardListener() {

View File

@ -18,6 +18,7 @@
"close": "Schließen",
"contribution": {
"confirmedBy": "Bestätigt von {name}.",
"createdBy": "Erstellt von {name}.",
"deletedBy": "Gelöscht von {name}.",
"deniedBy": "Abgelehnt von {name}."
},
@ -179,8 +180,7 @@
"notice": "Notiz",
"notice-tooltip": "Die Notiz ist nur für Moderatoren sichtbar",
"request": "Diese Nachricht ist nur für die Moderatoren sichtbar!",
"show-submission-form": "warten auf Erinnerung?",
"who": "Wer?"
"show-submission-form": "warten auf Erinnerung?"
},
"name": "Name",
"navbar": {

View File

@ -18,8 +18,9 @@
"close": "Close",
"contribution": {
"confirmedBy": "Confirmed by {name}.",
"createdBy": "Created by {name}.",
"deletedBy": "Deleted by {name}.",
"deniedBy": "Denied by {name}."
"deniedBy": "Rejected by {name}."
},
"contributionLink": {
"amount": "Amount",
@ -179,8 +180,7 @@
"notice": "Note",
"notice-tooltip": "The note is only visible to moderators",
"request": "This message is only visible to the moderators!",
"show-submission-form": "wait for reminder?",
"who": "Who?"
"show-submission-form": "wait for reminder?"
},
"name": "Name",
"navbar": {

View File

@ -178,7 +178,6 @@ const fields = computed(
baseFields.amount,
baseFields.memo,
baseFields.contributionDate,
{ key: 'moderatorUserName', label: t('moderator.who'), class: 'no-select' },
{ key: 'editCreation', label: t('details') },
{ key: 'confirm', label: t('save') },
],
@ -191,7 +190,6 @@ const fields = computed(
baseFields.contributionDate,
baseFields.createdAt,
baseFields.confirmedAt,
baseFields.confirmedByUserName,
{ key: 'chatCreation', label: t('details') },
],
// denied contributions
@ -207,7 +205,6 @@ const fields = computed(
label: t('contributions.denied'),
formatter: formatDateOrDash,
},
{ key: 'deniedByUserName', label: t('moderator.who') },
{ key: 'chatCreation', label: t('details') },
],
// deleted contributions
@ -223,7 +220,6 @@ const fields = computed(
label: t('contributions.deleted'),
formatter: formatDateOrDash,
},
{ key: 'deletedByUserName', label: t('moderator.who') },
{ key: 'chatCreation', label: t('details') },
],
// all contributions
@ -236,7 +232,6 @@ const fields = computed(
baseFields.contributionDate,
baseFields.createdAt,
baseFields.confirmedAt,
baseFields.confirmedByUserName,
{ key: 'chatCreation', label: t('details') },
],
][tabIndex.value],

View File

@ -89,11 +89,7 @@ export async function findUserNamesByIds(userIds: number[]): Promise<Map<number,
})
return new Map(
users.map((user) => {
let name = `${user.firstName} ${user.lastName}`
if (user.alias && user.alias.length > 2) {
name = user.alias
}
return [user.id, name]
return [user.id, `${user.firstName} ${user.lastName}`]
}),
)
}