mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-18 16:31:57 +03:00
fix: improve reactions tooltip (#7470)
Some checks failed
CI / build (push) Has been cancelled
CI / uitest (push) Has been cancelled
CI / uitest-pg (push) Has been cancelled
CI / uitest-qms (push) Has been cancelled
CI / svelte-check (push) Has been cancelled
CI / formatting (push) Has been cancelled
CI / test (push) Has been cancelled
CI / docker-build (push) Has been cancelled
CI / dist-build (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
CI / uitest (push) Has been cancelled
CI / uitest-pg (push) Has been cancelled
CI / uitest-qms (push) Has been cancelled
CI / svelte-check (push) Has been cancelled
CI / formatting (push) Has been cancelled
CI / test (push) Has been cancelled
CI / docker-build (push) Has been cancelled
CI / dist-build (push) Has been cancelled
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
a122f866e8
commit
9994ffedc2
@ -1,24 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { Person, PersonAccount, getName } from '@hcengineering/contact'
|
||||
import { personAccountByIdStore, personByIdStore } from '@hcengineering/contact-resources'
|
||||
import { Account, IdMap, Ref } from '@hcengineering/core'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import core, { Account, Ref } from '@hcengineering/core'
|
||||
import { ObjectPresenter } from '@hcengineering/view-resources'
|
||||
|
||||
export let reactionAccounts: Ref<Account>[]
|
||||
|
||||
const client = getClient()
|
||||
function getAccName (acc: Ref<Account>, accounts: IdMap<PersonAccount>, employees: IdMap<Person>): string {
|
||||
const account = accounts.get(acc as Ref<PersonAccount>)
|
||||
if (account !== undefined) {
|
||||
const emp = employees.get(account.person)
|
||||
return emp ? getName(client.getHierarchy(), emp) : ''
|
||||
}
|
||||
return ''
|
||||
}
|
||||
</script>
|
||||
|
||||
{#each reactionAccounts as acc}
|
||||
<div>
|
||||
{getAccName(acc, $personAccountByIdStore, $personByIdStore)}
|
||||
</div>
|
||||
{/each}
|
||||
<div class="m-2 flex-col flex-gap-2">
|
||||
{#each reactionAccounts as acc}
|
||||
<ObjectPresenter objectId={acc} _class={core.class.Account} disabled />
|
||||
{/each}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user