[TSK-1087] Fix kanban card assignee (#3066)

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
Ruslan Bayandinov 2023-04-25 20:12:43 +04:00 committed by GitHub
parent ef987eef56
commit 34565c5890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -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,

View File

@ -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'}

View File

@ -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}