mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Merge frontend user model
This commit is contained in:
@@ -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})`)
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
import { User } from './user'
|
||||
import { PaperlessUser } from './paperless-user'
|
||||
|
||||
export interface PaperlessDocumentComment extends ObjectWithId {
|
||||
created?: Date
|
||||
comment?: string
|
||||
user?: User
|
||||
user?: PaperlessUser
|
||||
}
|
||||
|
@@ -1,7 +0,0 @@
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
|
||||
export interface User extends ObjectWithId {
|
||||
username: string
|
||||
firstname: string
|
||||
lastname: string
|
||||
}
|
Reference in New Issue
Block a user