Merge frontend user model

This commit is contained in:
Michael Shamoon
2022-11-13 21:31:46 -08:00
parent 9744376f80
commit 279263fadf
6 changed files with 16 additions and 23 deletions

View File

@@ -92,8 +92,8 @@ export class DocumentCommentsComponent extends ComponentWithPermissions {
displayName(comment: PaperlessDocumentComment): string {
if (!comment.user) return ''
let nameComponents = []
if (comment.user.firstname) nameComponents.unshift(comment.user.firstname)
if (comment.user.lastname) nameComponents.unshift(comment.user.lastname)
if (comment.user.first_name) nameComponents.unshift(comment.user.first_name)
if (comment.user.last_name) nameComponents.unshift(comment.user.last_name)
if (comment.user.username) {
if (nameComponents.length > 0)
nameComponents.push(`(${comment.user.username})`)