mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 08:20:39 +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,6 +51,8 @@
|
|||||||
? tooltipLabels.personLabel
|
? tooltipLabels.personLabel
|
||||||
? tooltipLabels.personLabel
|
? tooltipLabels.personLabel
|
||||||
: getEmbeddedLabel(getName(value))
|
: getEmbeddedLabel(getName(value))
|
||||||
|
: tooltipLabels.placeholderLabel
|
||||||
|
? tooltipLabels.placeholderLabel
|
||||||
: undefined
|
: undefined
|
||||||
const props = tooltipLabels.props ? tooltipLabels.props : value ? { value: getName(value) } : undefined
|
const props = tooltipLabels.props ? tooltipLabels.props : value ? { value: getName(value) } : undefined
|
||||||
return {
|
return {
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
import { Hierarchy, WithLookup } from '@hcengineering/core'
|
import { Hierarchy, WithLookup } from '@hcengineering/core'
|
||||||
import notification from '@hcengineering/notification'
|
import notification from '@hcengineering/notification'
|
||||||
import { getClient } from '@hcengineering/presentation'
|
import { getClient } from '@hcengineering/presentation'
|
||||||
import type { Applicant, Candidate } from '@hcengineering/recruit'
|
import recruit, { Applicant, Candidate } from '@hcengineering/recruit'
|
||||||
import recruit from '@hcengineering/recruit'
|
|
||||||
import { AssigneePresenter, StateRefPresenter } from '@hcengineering/task-resources'
|
import { AssigneePresenter, StateRefPresenter } from '@hcengineering/task-resources'
|
||||||
import tracker from '@hcengineering/tracker'
|
import tracker from '@hcengineering/tracker'
|
||||||
import { Component, DueDatePresenter, showPanel } from '@hcengineering/ui'
|
import { Component, DueDatePresenter, showPanel } from '@hcengineering/ui'
|
||||||
@ -34,6 +33,8 @@
|
|||||||
export let groupByKey: string
|
export let groupByKey: string
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
|
const hierarchy = client.getHierarchy()
|
||||||
|
const assigneeAttribute = hierarchy.getAttribute(recruit.class.Applicant, 'assignee')
|
||||||
|
|
||||||
function showCandidate () {
|
function showCandidate () {
|
||||||
showPanel(view.component.EditDoc, object._id, Hierarchy.mixinOrClass(object), 'content')
|
showPanel(view.component.EditDoc, object._id, Hierarchy.mixinOrClass(object), 'content')
|
||||||
@ -118,6 +119,7 @@
|
|||||||
issueId={object._id}
|
issueId={object._id}
|
||||||
defaultClass={contact.class.Employee}
|
defaultClass={contact.class.Employee}
|
||||||
currentSpace={object.space}
|
currentSpace={object.space}
|
||||||
|
placeholderLabel={assigneeAttribute.label}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{#if groupByKey !== 'state'}
|
{#if groupByKey !== 'state'}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<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 { Class, Doc, Ref, Space } from '@hcengineering/core'
|
||||||
import { Task } from '@hcengineering/task'
|
import { Task } from '@hcengineering/task'
|
||||||
import { getClient } from '@hcengineering/presentation'
|
import { getClient } from '@hcengineering/presentation'
|
||||||
@ -31,6 +31,7 @@
|
|||||||
export let isEditable: boolean = true
|
export let isEditable: boolean = true
|
||||||
export let shouldShowLabel: boolean = false
|
export let shouldShowLabel: boolean = false
|
||||||
export let defaultName: IntlString | undefined = undefined
|
export let defaultName: IntlString | undefined = undefined
|
||||||
|
export let placeholderLabel: IntlString | undefined = undefined
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
|
|
||||||
@ -106,7 +107,10 @@
|
|||||||
shouldShowPlaceholder={true}
|
shouldShowPlaceholder={true}
|
||||||
shouldShowName={shouldShowLabel}
|
shouldShowName={shouldShowLabel}
|
||||||
onEmployeeEdit={handleAssigneeEditorOpened}
|
onEmployeeEdit={handleAssigneeEditorOpened}
|
||||||
tooltipLabels={{ personLabel: task.string.TaskAssignee, placeholderLabel: task.string.TaskUnAssign }}
|
tooltipLabels={{
|
||||||
|
personLabel: value ? getName(value) : undefined,
|
||||||
|
placeholderLabel: placeholderLabel ?? presenter.label
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<!-- TODO: Change assignee -->
|
<!-- TODO: Change assignee -->
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user