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