From 9460e7a406762acd91b97c8e8e2ebf69b5aeebb9 Mon Sep 17 00:00:00 2001 From: mrsadman99 <60566490+mrsadman99@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:03:34 +0700 Subject: [PATCH] Support disabled employee presenter (#2758) * Support disabled employee presenter Signed-off-by: Anton Brechka * Added DocNavLink Signed-off-by: Anton Brechka * Remove unused condition Signed-off-by: Anton Brechka --------- Signed-off-by: Anton Brechka --- .../EmployeeAccountPresenter.svelte | 42 +++++++------------ .../EmployeeAccountRefPresenter.svelte | 3 +- 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/plugins/contact-resources/src/components/EmployeeAccountPresenter.svelte b/plugins/contact-resources/src/components/EmployeeAccountPresenter.svelte index 4cd2a58da4..8407f7b8aa 100644 --- a/plugins/contact-resources/src/components/EmployeeAccountPresenter.svelte +++ b/plugins/contact-resources/src/components/EmployeeAccountPresenter.svelte @@ -20,9 +20,11 @@ import { Avatar } from '@hcengineering/presentation' import { showPopup, tooltip } from '@hcengineering/ui' import { EditDoc } from '@hcengineering/view-resources' + import DocNavLink from '@hcengineering/view-resources/src/components/DocNavLink.svelte' import { employeeByIdStore } from '../utils' export let value: Account + export let disabled = false $: employee = $employeeByIdStore.get((value as EmployeeAccount).employee) @@ -35,34 +37,22 @@ {#if value} -
- {#if employee} - -
{getName(employee)}
- {:else} -
{value.email}
- {/if} -
+ + + {#if employee} + + {getName(employee)} + {:else} + {value.email} + {/if} + + {/if} diff --git a/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte b/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte index 98df310cb1..2531afdbf7 100644 --- a/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte +++ b/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte @@ -21,6 +21,7 @@ import EmployeeAccountPresenter from './EmployeeAccountPresenter.svelte' export let value: Ref + export let disabled = false let account: EmployeeAccount | undefined @@ -30,5 +31,5 @@ {#if account} - + {/if}