fix ссылок на авторов в комментариях
This commit is contained in:
parent
165e2de72f
commit
ba1f48c942
@ -375,7 +375,7 @@
|
||||
const authorName = commentData.author?.full_name || 'Сотрудник';
|
||||
const authorId = commentData.author?.id;
|
||||
const authorLink = authorId
|
||||
? `/employees/employee/${authorId}/`
|
||||
? `/employees/${authorId}/`
|
||||
: '#';
|
||||
const commentDate = formatDate(commentData.created_at);
|
||||
|
||||
|
||||
@ -321,7 +321,7 @@
|
||||
const authorId = getAuthorId(comment.author);
|
||||
|
||||
if (authorId) {
|
||||
html += `<a href="/employees/employee/${authorId}/" class="comment-author">${escapeHtml(authorName)}</a>`;
|
||||
html += `<a href="/employees/${authorId}/" class="comment-author">${escapeHtml(authorName)}</a>`;
|
||||
} else {
|
||||
html += `<span class="comment-author">${escapeHtml(authorName)}</span>`;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@
|
||||
const authorId = comment.author?.id;
|
||||
|
||||
if (authorId) {
|
||||
html += `<a href="/employees/employee/${authorId}/" class="comment-author">${authorName}</a>`;
|
||||
html += `<a href="/employees/${authorId}/" class="comment-author">${authorName}</a>`;
|
||||
} else {
|
||||
html += `<span class="comment-author">${authorName}</span>`;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ export function initRequestCommentsHandler(options) {
|
||||
(comment.author.full_name || comment.author.display_name || comment.author.username)) || '—';
|
||||
const authorId = comment.author?.id;
|
||||
const authorLink = authorId
|
||||
? `/employees/employee/${authorId}/`
|
||||
? `/employees/${authorId}/`
|
||||
: '#';
|
||||
const commentDate = esc(comment.created_at || '');
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ from notifications.services import NotificationService
|
||||
def main():
|
||||
"""Создать тестовое уведомление"""
|
||||
# Получаем первого пользователя
|
||||
user = Employee.objects.first()
|
||||
user = Employee.objects.filter(id=1).first()
|
||||
|
||||
if not user:
|
||||
print("❌ Нет пользователей в системе!")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user