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) { 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) { getMemoComment(item) {
let comment = '' let comment = ''
@ -250,10 +256,17 @@ export default {
if (item.updatedBy > 0) { if (item.updatedBy > 0) {
if (comment.length) { if (comment.length) {
comment += ' ' comment += ' | '
} }
comment += this.$t('moderator.memo-modified', { name: item.updatedByUserName }) 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 return comment
}, },
addClipboardListener() { addClipboardListener() {

View File

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

View File

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

View File

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

View File

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