diff --git a/plugins/contact-resources/src/components/PersonPresenter.svelte b/plugins/contact-resources/src/components/PersonPresenter.svelte index 663c0ce83a..c63b412304 100644 --- a/plugins/contact-resources/src/components/PersonPresenter.svelte +++ b/plugins/contact-resources/src/components/PersonPresenter.svelte @@ -51,7 +51,9 @@ ? tooltipLabels.personLabel ? tooltipLabels.personLabel : getEmbeddedLabel(getName(value)) - : undefined + : tooltipLabels.placeholderLabel + ? tooltipLabels.placeholderLabel + : undefined const props = tooltipLabels.props ? tooltipLabels.props : value ? { value: getName(value) } : undefined return { component, diff --git a/plugins/recruit-resources/src/components/KanbanCard.svelte b/plugins/recruit-resources/src/components/KanbanCard.svelte index 49a1d349bf..eca5233b7b 100644 --- a/plugins/recruit-resources/src/components/KanbanCard.svelte +++ b/plugins/recruit-resources/src/components/KanbanCard.svelte @@ -20,8 +20,7 @@ import { Hierarchy, WithLookup } from '@hcengineering/core' import notification from '@hcengineering/notification' import { getClient } from '@hcengineering/presentation' - import type { Applicant, Candidate } from '@hcengineering/recruit' - import recruit from '@hcengineering/recruit' + import recruit, { Applicant, Candidate } from '@hcengineering/recruit' import { AssigneePresenter, StateRefPresenter } from '@hcengineering/task-resources' import tracker from '@hcengineering/tracker' import { Component, DueDatePresenter, showPanel } from '@hcengineering/ui' @@ -34,6 +33,8 @@ export let groupByKey: string const client = getClient() + const hierarchy = client.getHierarchy() + const assigneeAttribute = hierarchy.getAttribute(recruit.class.Applicant, 'assignee') function showCandidate () { showPanel(view.component.EditDoc, object._id, Hierarchy.mixinOrClass(object), 'content') @@ -118,6 +119,7 @@ issueId={object._id} defaultClass={contact.class.Employee} currentSpace={object.space} + placeholderLabel={assigneeAttribute.label} /> </div> {#if groupByKey !== 'state'} diff --git a/plugins/task-resources/src/components/AssigneePresenter.svelte b/plugins/task-resources/src/components/AssigneePresenter.svelte index 2dca2da088..9db5c0a691 100644 --- a/plugins/task-resources/src/components/AssigneePresenter.svelte +++ b/plugins/task-resources/src/components/AssigneePresenter.svelte @@ -13,7 +13,7 @@ // limitations under the License. --> <script lang="ts"> - import contact, { Employee } from '@hcengineering/contact' + import contact, { Employee, getName } from '@hcengineering/contact' import { Class, Doc, Ref, Space } from '@hcengineering/core' import { Task } from '@hcengineering/task' import { getClient } from '@hcengineering/presentation' @@ -31,6 +31,7 @@ export let isEditable: boolean = true export let shouldShowLabel: boolean = false export let defaultName: IntlString | undefined = undefined + export let placeholderLabel: IntlString | undefined = undefined const client = getClient() @@ -106,7 +107,10 @@ shouldShowPlaceholder={true} shouldShowName={shouldShowLabel} onEmployeeEdit={handleAssigneeEditorOpened} - tooltipLabels={{ personLabel: task.string.TaskAssignee, placeholderLabel: task.string.TaskUnAssign }} + tooltipLabels={{ + personLabel: value ? getName(value) : undefined, + placeholderLabel: placeholderLabel ?? presenter.label + }} /> <!-- TODO: Change assignee --> {/if}