mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
Fix inbox people selection (#3322)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
467c7736e6
commit
92f465392d
@ -24,11 +24,11 @@
|
||||
import NotificationView from './NotificationView.svelte'
|
||||
|
||||
export let filter: 'all' | 'read' | 'unread' = 'all'
|
||||
export let _id: Ref<Doc> | undefined
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const query = createQuery()
|
||||
|
||||
let _id: Ref<Doc> | undefined
|
||||
let docs: DocUpdates[] = []
|
||||
let filtered: DocUpdates[] = []
|
||||
let loading = true
|
||||
@ -60,7 +60,7 @@
|
||||
filtered = docs.filter((p) => p.txes.length > 0)
|
||||
}
|
||||
listProvider.update(filtered)
|
||||
if (loading || _id === undefined) {
|
||||
if (_id === undefined) {
|
||||
changeSelected(selected)
|
||||
} else {
|
||||
const index = filtered.findIndex((p) => p.attachedTo === _id)
|
||||
|
@ -37,12 +37,12 @@
|
||||
$: tabs = [
|
||||
{
|
||||
label: notification.string.Activity,
|
||||
props: { filter },
|
||||
props: { filter, _id },
|
||||
component: Activity
|
||||
},
|
||||
{
|
||||
label: notification.string.People,
|
||||
props: { filter },
|
||||
props: { filter, _id },
|
||||
component: People
|
||||
}
|
||||
]
|
||||
|
@ -25,10 +25,10 @@
|
||||
import PeopleNotificationView from './PeopleNotificationsView.svelte'
|
||||
|
||||
export let filter: 'all' | 'read' | 'unread' = 'all'
|
||||
export let _id: Ref<Doc> | undefined
|
||||
|
||||
const query = createQuery()
|
||||
|
||||
let _id: Ref<Doc> | undefined
|
||||
let docs: DocUpdates[] = []
|
||||
let map: Map<Ref<Account>, DocUpdates[]> = new Map()
|
||||
let accounts: EmployeeAccount[] = []
|
||||
@ -90,7 +90,7 @@
|
||||
accounts = Array.from(map.keys())
|
||||
.map((p) => $employeeAccountByIdStore.get(p as Ref<EmployeeAccount>))
|
||||
.filter((p) => p !== undefined) as EmployeeAccount[]
|
||||
if (loading || _id === undefined) {
|
||||
if (_id === undefined) {
|
||||
changeSelected(selected)
|
||||
} else {
|
||||
const index = filtered.findIndex((p) => p.attachedTo === _id)
|
||||
|
Loading…
Reference in New Issue
Block a user