From 34565c58904439d79bba2beedf6928120dc23b48 Mon Sep 17 00:00:00 2001 From: Ruslan Bayandinov <45530296+wazsone@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:12:43 +0400 Subject: [PATCH] [TSK-1087] Fix kanban card assignee (#3066) Signed-off-by: Ruslan Bayandinov --- .../src/components/PersonPresenter.svelte | 4 +++- .../recruit-resources/src/components/KanbanCard.svelte | 6 ++++-- .../src/components/AssigneePresenter.svelte | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) 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} /> {#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. -->