mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
[TSK-1087] Fix kanban card assignee (#3066)
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
parent
ef987eef56
commit
34565c5890
@ -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,
|
||||
|
@ -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'}
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user