2022-06-07 04:10:34 +00:00
|
|
|
<!--
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
// Copyright © 2021 Hardcore Engineering Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2022-09-21 08:08:25 +00:00
|
|
|
import contact, { Member } from '@hcengineering/contact'
|
|
|
|
import { getClient } from '@hcengineering/presentation'
|
2023-03-15 14:06:03 +00:00
|
|
|
import { DocNavLink } from '@hcengineering/view-resources'
|
2022-06-07 04:10:34 +00:00
|
|
|
import { ContactPresenter } from '..'
|
|
|
|
|
|
|
|
export let value: Member
|
2023-05-30 09:57:41 +00:00
|
|
|
export let disabled: boolean = false
|
2023-03-17 03:52:32 +00:00
|
|
|
export let inline: boolean = false
|
2023-05-31 06:41:21 +00:00
|
|
|
export let accent: boolean = false
|
2022-06-07 04:10:34 +00:00
|
|
|
|
2023-06-07 14:03:42 +00:00
|
|
|
const contactRef =
|
|
|
|
value?.contact !== undefined ? getClient().findOne(contact.class.Contact, { _id: value.contact }) : undefined
|
2022-06-07 04:10:34 +00:00
|
|
|
</script>
|
|
|
|
|
2023-05-31 06:41:21 +00:00
|
|
|
<DocNavLink object={value} {inline} {disabled} {accent} noUnderline={disabled}>
|
2022-06-07 04:10:34 +00:00
|
|
|
{#await contactRef then ct}
|
|
|
|
{#if ct}
|
2023-05-31 06:41:21 +00:00
|
|
|
<ContactPresenter disabled={true} value={ct} {inline} {accent} />
|
2022-06-07 04:10:34 +00:00
|
|
|
{/if}
|
|
|
|
{/await}
|
2023-03-15 14:06:03 +00:00
|
|
|
</DocNavLink>
|