mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-11 12:57:59 +00: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'
|
import NotificationView from './NotificationView.svelte'
|
||||||
|
|
||||||
export let filter: 'all' | 'read' | 'unread' = 'all'
|
export let filter: 'all' | 'read' | 'unread' = 'all'
|
||||||
|
export let _id: Ref<Doc> | undefined
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
const query = createQuery()
|
const query = createQuery()
|
||||||
|
|
||||||
let _id: Ref<Doc> | undefined
|
|
||||||
let docs: DocUpdates[] = []
|
let docs: DocUpdates[] = []
|
||||||
let filtered: DocUpdates[] = []
|
let filtered: DocUpdates[] = []
|
||||||
let loading = true
|
let loading = true
|
||||||
@ -60,7 +60,7 @@
|
|||||||
filtered = docs.filter((p) => p.txes.length > 0)
|
filtered = docs.filter((p) => p.txes.length > 0)
|
||||||
}
|
}
|
||||||
listProvider.update(filtered)
|
listProvider.update(filtered)
|
||||||
if (loading || _id === undefined) {
|
if (_id === undefined) {
|
||||||
changeSelected(selected)
|
changeSelected(selected)
|
||||||
} else {
|
} else {
|
||||||
const index = filtered.findIndex((p) => p.attachedTo === _id)
|
const index = filtered.findIndex((p) => p.attachedTo === _id)
|
||||||
|
@ -37,12 +37,12 @@
|
|||||||
$: tabs = [
|
$: tabs = [
|
||||||
{
|
{
|
||||||
label: notification.string.Activity,
|
label: notification.string.Activity,
|
||||||
props: { filter },
|
props: { filter, _id },
|
||||||
component: Activity
|
component: Activity
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: notification.string.People,
|
label: notification.string.People,
|
||||||
props: { filter },
|
props: { filter, _id },
|
||||||
component: People
|
component: People
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
import PeopleNotificationView from './PeopleNotificationsView.svelte'
|
import PeopleNotificationView from './PeopleNotificationsView.svelte'
|
||||||
|
|
||||||
export let filter: 'all' | 'read' | 'unread' = 'all'
|
export let filter: 'all' | 'read' | 'unread' = 'all'
|
||||||
|
export let _id: Ref<Doc> | undefined
|
||||||
|
|
||||||
const query = createQuery()
|
const query = createQuery()
|
||||||
|
|
||||||
let _id: Ref<Doc> | undefined
|
|
||||||
let docs: DocUpdates[] = []
|
let docs: DocUpdates[] = []
|
||||||
let map: Map<Ref<Account>, DocUpdates[]> = new Map()
|
let map: Map<Ref<Account>, DocUpdates[]> = new Map()
|
||||||
let accounts: EmployeeAccount[] = []
|
let accounts: EmployeeAccount[] = []
|
||||||
@ -90,7 +90,7 @@
|
|||||||
accounts = Array.from(map.keys())
|
accounts = Array.from(map.keys())
|
||||||
.map((p) => $employeeAccountByIdStore.get(p as Ref<EmployeeAccount>))
|
.map((p) => $employeeAccountByIdStore.get(p as Ref<EmployeeAccount>))
|
||||||
.filter((p) => p !== undefined) as EmployeeAccount[]
|
.filter((p) => p !== undefined) as EmployeeAccount[]
|
||||||
if (loading || _id === undefined) {
|
if (_id === undefined) {
|
||||||
changeSelected(selected)
|
changeSelected(selected)
|
||||||
} else {
|
} else {
|
||||||
const index = filtered.findIndex((p) => p.attachedTo === _id)
|
const index = filtered.findIndex((p) => p.attachedTo === _id)
|
||||||
|
Loading…
Reference in New Issue
Block a user