mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 16:56:07 +00:00
Honest created (#2830)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
63a526f573
commit
9c56815002
@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { EmployeeAccount } from '@hcengineering/contact'
|
import type { EmployeeAccount } from '@hcengineering/contact'
|
||||||
import core, { DocumentQuery, getCurrentAccount, Ref, TxCollectionCUD } from '@hcengineering/core'
|
import { DocumentQuery, getCurrentAccount, Ref } from '@hcengineering/core'
|
||||||
import notification from '@hcengineering/notification'
|
import notification from '@hcengineering/notification'
|
||||||
import type { IntlString } from '@hcengineering/platform'
|
import type { IntlString } from '@hcengineering/platform'
|
||||||
import { createQuery } from '@hcengineering/presentation'
|
import { createQuery } from '@hcengineering/presentation'
|
||||||
@ -31,24 +31,9 @@
|
|||||||
]
|
]
|
||||||
const currentUser = getCurrentAccount() as EmployeeAccount
|
const currentUser = getCurrentAccount() as EmployeeAccount
|
||||||
const assigned = { assignee: currentUser.employee }
|
const assigned = { assignee: currentUser.employee }
|
||||||
let created = { _id: { $in: [] as Ref<Issue>[] } }
|
const created = { createdBy: currentUser._id }
|
||||||
let subscribed = { _id: { $in: [] as Ref<Issue>[] } }
|
let subscribed = { _id: { $in: [] as Ref<Issue>[] } }
|
||||||
|
|
||||||
const createdQuery = createQuery()
|
|
||||||
$: createdQuery.query<TxCollectionCUD<Issue, Issue>>(
|
|
||||||
core.class.TxCollectionCUD,
|
|
||||||
{
|
|
||||||
modifiedBy: currentUser._id,
|
|
||||||
objectClass: tracker.class.Issue,
|
|
||||||
collection: 'subIssues',
|
|
||||||
'tx._class': core.class.TxCreateDoc
|
|
||||||
},
|
|
||||||
(result) => {
|
|
||||||
created = { ...created, _id: { $in: result.map(({ tx: { objectId } }) => objectId) } }
|
|
||||||
},
|
|
||||||
{ sort: { _id: 1 } }
|
|
||||||
)
|
|
||||||
|
|
||||||
const subscribedQuery = createQuery()
|
const subscribedQuery = createQuery()
|
||||||
$: subscribedQuery.query(
|
$: subscribedQuery.query(
|
||||||
notification.class.LastView,
|
notification.class.LastView,
|
||||||
|
Loading…
Reference in New Issue
Block a user