mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 20:27:43 +02:00
Fix activity query (#3234)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -65,10 +65,15 @@
|
||||
|
||||
let loading = false
|
||||
|
||||
function updateTxes (object: Doc): void {
|
||||
function updateTxes (
|
||||
objectId: Ref<Doc>,
|
||||
objectClass: Ref<Class<Doc>>,
|
||||
editableMap: Map<Ref<Class<Doc>>, boolean> | undefined
|
||||
): void {
|
||||
loading = true
|
||||
activityQuery.update(
|
||||
object,
|
||||
objectId,
|
||||
objectClass,
|
||||
(result) => {
|
||||
txes = filterCollectionTxes(result)
|
||||
|
||||
@@ -81,7 +86,7 @@
|
||||
)
|
||||
}
|
||||
|
||||
$: if (editableMap) updateTxes(object)
|
||||
$: updateTxes(object._id, object._class, editableMap)
|
||||
|
||||
let filtered: DisplayTx[] = []
|
||||
|
||||
@@ -116,7 +121,13 @@
|
||||
</div>
|
||||
{/if}
|
||||
</span>
|
||||
<ActivityFilter {txes} {object} on:update={(e) => (filtered = e.detail)} />
|
||||
<ActivityFilter
|
||||
{txes}
|
||||
{object}
|
||||
on:update={(e) => {
|
||||
filtered = e.detail
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div class="p-activity select-text" id={activity.string.Activity}>
|
||||
{#if filtered}
|
||||
|
||||
Reference in New Issue
Block a user