mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
UBER-388 The orange dot doesn't go away (#3367)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
488ffeeed7
commit
537c872049
@ -21,7 +21,6 @@
|
|||||||
import { AnyComponent, Component, Tabs } from '@hcengineering/ui'
|
import { AnyComponent, Component, Tabs } from '@hcengineering/ui'
|
||||||
import view from '@hcengineering/view'
|
import view from '@hcengineering/view'
|
||||||
import notification from '../plugin'
|
import notification from '../plugin'
|
||||||
import { NotificationClientImpl } from '../utils'
|
|
||||||
import Activity from './Activity.svelte'
|
import Activity from './Activity.svelte'
|
||||||
import EmployeeInbox from './EmployeeInbox.svelte'
|
import EmployeeInbox from './EmployeeInbox.svelte'
|
||||||
import Filter from './Filter.svelte'
|
import Filter from './Filter.svelte'
|
||||||
@ -32,7 +31,6 @@
|
|||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
const hierarchy = client.getHierarchy()
|
const hierarchy = client.getHierarchy()
|
||||||
const notificationClient = NotificationClientImpl.getClient()
|
|
||||||
|
|
||||||
$: tabs = [
|
$: tabs = [
|
||||||
{
|
{
|
||||||
@ -59,14 +57,17 @@
|
|||||||
_class = undefined
|
_class = undefined
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (value.attachedTo !== _id && _id !== undefined) {
|
|
||||||
await notificationClient.read(_id)
|
|
||||||
}
|
|
||||||
const targetClass = hierarchy.getClass(value.attachedToClass)
|
const targetClass = hierarchy.getClass(value.attachedToClass)
|
||||||
const panelComponent = hierarchy.as(targetClass, view.mixin.ObjectPanel)
|
const panelComponent = hierarchy.as(targetClass, view.mixin.ObjectPanel)
|
||||||
component = panelComponent.component ?? view.component.EditDoc
|
component = panelComponent.component ?? view.component.EditDoc
|
||||||
_id = value.attachedTo
|
_id = value.attachedTo
|
||||||
_class = value.attachedToClass
|
_class = value.attachedToClass
|
||||||
|
await read(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function read (docUpdate: DocUpdates): Promise<void> {
|
||||||
|
docUpdate.txes.forEach((p) => (p.isNew = false))
|
||||||
|
await client.update(docUpdate, { txes: docUpdate.txes })
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDM (value: Ref<Doc>) {
|
function openDM (value: Ref<Doc>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user