mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
Tracker unassigned (#2024)
This commit is contained in:
parent
e80d8c17df
commit
9d42556551
@ -6,7 +6,7 @@
|
||||
import EmployeePreviewPopup from './EmployeePreviewPopup.svelte'
|
||||
import { WithLookup } from '@anticrm/core'
|
||||
|
||||
export let value: WithLookup<Employee>
|
||||
export let value: WithLookup<Employee> | null | undefined
|
||||
export let shouldShowAvatar: boolean = true
|
||||
export let shouldShowName: boolean = true
|
||||
export let onEmployeeEdit: ((event: MouseEvent) => void) | undefined = undefined
|
||||
@ -14,13 +14,15 @@
|
||||
let container: HTMLElement
|
||||
|
||||
const onEdit = () => {
|
||||
showPopup(
|
||||
EmployeePreviewPopup,
|
||||
{
|
||||
employeeId: value._id
|
||||
},
|
||||
container
|
||||
)
|
||||
if (value) {
|
||||
showPopup(
|
||||
EmployeePreviewPopup,
|
||||
{
|
||||
employeeId: value._id
|
||||
},
|
||||
container
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
$: handlePersonEdit = onEmployeeEdit ?? onEdit
|
||||
@ -28,9 +30,15 @@
|
||||
|
||||
<div bind:this={container} class="flex-row-center clear-mins">
|
||||
<div class="over-underline" class:pr-2={shouldShowName}>
|
||||
<PersonPresenter {value} onEdit={handlePersonEdit} {shouldShowAvatar} {shouldShowName} />
|
||||
<PersonPresenter
|
||||
{value}
|
||||
onEdit={handlePersonEdit}
|
||||
{shouldShowAvatar}
|
||||
{shouldShowName}
|
||||
shouldShowPlaceholder={true}
|
||||
/>
|
||||
</div>
|
||||
{#if value.$lookup?.statuses?.length}
|
||||
{#if value?.$lookup?.statuses?.length}
|
||||
<div class="status content-color">
|
||||
<EmployeeStatusPresenter employee={value} />
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@
|
||||
import { getPanelURI, Label, LabelAndProps, tooltip } from '@anticrm/ui'
|
||||
import view from '@anticrm/view'
|
||||
|
||||
export let value: Person | undefined
|
||||
export let value: Person | undefined | null
|
||||
export let inline: boolean = false
|
||||
export let isInteractive = true
|
||||
export let shouldShowAvatar: boolean = true
|
||||
@ -34,7 +34,7 @@
|
||||
$: element = getElement(value, onEdit, shouldShowPlaceholder, isInteractive)
|
||||
|
||||
const getElement = (
|
||||
person: Person | undefined,
|
||||
person: Person | undefined | null,
|
||||
onEdit: Function | undefined,
|
||||
shouldShowEmpty: boolean,
|
||||
isInteractive: boolean
|
||||
|
@ -17,7 +17,7 @@
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import PersonContent from './PersonContent.svelte'
|
||||
|
||||
export let value: Person
|
||||
export let value: Person | null | undefined
|
||||
export let inline = false
|
||||
export let isInteractive = true
|
||||
export let shouldShowAvatar = true
|
||||
@ -34,7 +34,7 @@
|
||||
showTooltip={tooltipLabels
|
||||
? {
|
||||
label: value ? tooltipLabels.personLabel : tooltipLabels.placeholderLabel,
|
||||
props: { value: formatName(value?.name) }
|
||||
props: value ? { value: formatName(value.name) } : {}
|
||||
}
|
||||
: undefined}
|
||||
{value}
|
||||
|
@ -23,7 +23,7 @@
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import tracker from '../../plugin'
|
||||
|
||||
export let value: Employee | null
|
||||
export let value: Employee | null | undefined
|
||||
export let issueId: Ref<Issue>
|
||||
export let defaultClass: Ref<Class<Doc>> | undefined = undefined
|
||||
export let currentSpace: Ref<Team> | undefined = undefined
|
||||
|
@ -159,11 +159,15 @@
|
||||
{object.title}
|
||||
</span>
|
||||
</div>
|
||||
{#if issue.$lookup?.assignee}
|
||||
<div class="abs-rt-content">
|
||||
<AssigneePresenter value={issue.$lookup.assignee} issueId={issue._id} {currentSpace} isEditable={true} />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="abs-rt-content">
|
||||
<AssigneePresenter
|
||||
value={issue.$lookup?.assignee}
|
||||
defaultClass={contact.class.Employee}
|
||||
issueId={issue._id}
|
||||
{currentSpace}
|
||||
isEditable={true}
|
||||
/>
|
||||
</div>
|
||||
<div class="buttons-group xsmall-gap mt-10px">
|
||||
<PriorityEditor
|
||||
value={issue}
|
||||
|
Loading…
Reference in New Issue
Block a user