Datei Upload und Download fix
Dieser Commit ist enthalten in:
committet von
Server Deploy
Ursprung
5b1f8b1cfe
Commit
671aaadc26
@ -335,6 +335,30 @@ class App {
|
||||
}
|
||||
});
|
||||
|
||||
// Notification navigation - open knowledge entry from inbox
|
||||
window.addEventListener('notification:open-knowledge', (e) => {
|
||||
const { entryId, categoryId } = e.detail;
|
||||
if (entryId && categoryId) {
|
||||
// Switch to knowledge view
|
||||
this.switchView('knowledge');
|
||||
// Select category and expand entry after view is loaded
|
||||
setTimeout(async () => {
|
||||
await knowledgeManager.selectCategory(categoryId);
|
||||
// Expand the specific entry
|
||||
knowledgeManager.expandedEntries.add(entryId);
|
||||
const entryElement = document.querySelector(`[data-entry-id="${entryId}"]`);
|
||||
if (entryElement) {
|
||||
entryElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
entryElement.classList.add('highlight');
|
||||
// Remove highlight after animation
|
||||
setTimeout(() => {
|
||||
entryElement.classList.remove('highlight');
|
||||
}, 2000);
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
});
|
||||
|
||||
// Online/Offline
|
||||
window.addEventListener('online', () => this.handleOnline());
|
||||
window.addEventListener('offline', () => this.handleOffline());
|
||||
|
||||
@ -167,7 +167,9 @@ class NotificationManager {
|
||||
<div class="notification-item ${notification.isRead ? '' : 'unread'} ${notification.isPersistent ? 'persistent' : ''}"
|
||||
data-id="${notification.id}"
|
||||
data-task-id="${notification.taskId || ''}"
|
||||
data-proposal-id="${notification.proposalId || ''}">
|
||||
data-proposal-id="${notification.proposalId || ''}"
|
||||
data-entry-id="${notification.entryId || ''}"
|
||||
data-category-id="${notification.categoryId || ''}">
|
||||
<div class="notification-type-icon ${iconClass}">
|
||||
${icon}
|
||||
</div>
|
||||
@ -209,6 +211,9 @@ class NotificationManager {
|
||||
if (type.startsWith('approval:')) {
|
||||
return 'approval';
|
||||
}
|
||||
if (type.startsWith('knowledge:')) {
|
||||
return 'knowledge';
|
||||
}
|
||||
return 'task';
|
||||
}
|
||||
|
||||
@ -246,6 +251,9 @@ class NotificationManager {
|
||||
if (type.startsWith('approval:rejected')) {
|
||||
return '<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2" fill="none"/><path d="M15 9l-6 6M9 9l6 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>';
|
||||
}
|
||||
if (type.startsWith('knowledge:')) {
|
||||
return '<svg viewBox="0 0 24 24"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" stroke="currentColor" stroke-width="2" fill="none" stroke-linejoin="round"/></svg>';
|
||||
}
|
||||
// Default
|
||||
return '<svg viewBox="0 0 24 24"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" stroke="currentColor" stroke-width="2" fill="none"/></svg>';
|
||||
}
|
||||
@ -428,6 +436,8 @@ class NotificationManager {
|
||||
handleItemClick(item) {
|
||||
const taskId = item.dataset.taskId;
|
||||
const proposalId = item.dataset.proposalId;
|
||||
const entryId = item.dataset.entryId;
|
||||
const categoryId = item.dataset.categoryId;
|
||||
|
||||
if (taskId) {
|
||||
// Zur Aufgabe navigieren
|
||||
@ -437,6 +447,13 @@ class NotificationManager {
|
||||
// Zum Genehmigung-Tab wechseln
|
||||
this.closeDropdown();
|
||||
window.dispatchEvent(new CustomEvent('notification:open-proposal', { detail: { proposalId: parseInt(proposalId) } }));
|
||||
} else if (entryId && categoryId) {
|
||||
// Zum Wissenseintrag navigieren
|
||||
this.closeDropdown();
|
||||
window.dispatchEvent(new CustomEvent('notification:open-knowledge', { detail: {
|
||||
entryId: parseInt(entryId),
|
||||
categoryId: parseInt(categoryId)
|
||||
}}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren