TSK-852 List perform individual requests (#2765)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-03-17 23:05:22 +07:00
committed by GitHub
parent 892e7b1dbc
commit f0bbd4d443
25 changed files with 405 additions and 467 deletions
@@ -13,8 +13,8 @@
// limitations under the License.
-->
<script lang="ts">
import contact, { Employee, EmployeeAccount } from '@hcengineering/contact'
import { EmployeePresenter } from '@hcengineering/contact-resources'
import contact, { EmployeeAccount } from '@hcengineering/contact'
import { employeeByIdStore, EmployeePresenter } from '@hcengineering/contact-resources'
import core, { ClassifierKind, Doc, Mixin, Ref, WithLookup } from '@hcengineering/core'
import { AttributeBarEditor, createQuery, getClient, KeyedAttribute } from '@hcengineering/presentation'
@@ -78,10 +78,9 @@
$: updateKeys(['title', 'description', 'priority', 'status', 'number', 'assignee', 'component', 'dueDate', 'sprint'])
const employeeAccountQuery = createQuery()
const employeeQuery = createQuery()
let account: EmployeeAccount | undefined
let employee: Employee | undefined
$: employee = account && $employeeByIdStore.get(account.employee)
$: employeeAccountQuery.query(
contact.class.EmployeeAccount,
@@ -91,16 +90,6 @@
},
{ limit: 1 }
)
$: account &&
employeeQuery.query(
contact.class.Employee,
{ _id: account.employee },
(res) => {
;[employee] = res
},
{ limit: 1 }
)
</script>
<div class="content">