mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-03 17:05:16 +03:00
UBER-205: more info to Kanban card (due date, assignee, Lead number) (#3251)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
3776137a52
commit
bc1db861c3
@ -41,6 +41,7 @@
|
|||||||
"@hcengineering/contact": "^0.6.16",
|
"@hcengineering/contact": "^0.6.16",
|
||||||
"@hcengineering/view": "^0.6.6",
|
"@hcengineering/view": "^0.6.6",
|
||||||
"@hcengineering/task": "^0.6.8",
|
"@hcengineering/task": "^0.6.8",
|
||||||
|
"@hcengineering/task-resources": "^0.6.0",
|
||||||
"@hcengineering/login": "^0.6.5",
|
"@hcengineering/login": "^0.6.5",
|
||||||
"@hcengineering/workbench": "^0.6.6",
|
"@hcengineering/workbench": "^0.6.6",
|
||||||
"@hcengineering/view-resources": "^0.6.0",
|
"@hcengineering/view-resources": "^0.6.0",
|
||||||
|
@ -16,16 +16,22 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { AttachmentsPresenter } from '@hcengineering/attachment-resources'
|
import { AttachmentsPresenter } from '@hcengineering/attachment-resources'
|
||||||
import { CommentsPresenter } from '@hcengineering/chunter-resources'
|
import { CommentsPresenter } from '@hcengineering/chunter-resources'
|
||||||
|
import contact from '@hcengineering/contact'
|
||||||
import { ContactPresenter } from '@hcengineering/contact-resources'
|
import { ContactPresenter } from '@hcengineering/contact-resources'
|
||||||
import type { WithLookup } from '@hcengineering/core'
|
import type { WithLookup } from '@hcengineering/core'
|
||||||
import type { Lead } from '@hcengineering/lead'
|
import type { Lead } from '@hcengineering/lead'
|
||||||
import { ActionIcon, Component, IconMoreH, showPanel, showPopup } from '@hcengineering/ui'
|
import { ActionIcon, Component, DueDatePresenter, IconMoreH, showPanel, showPopup } from '@hcengineering/ui'
|
||||||
import view from '@hcengineering/view'
|
import view from '@hcengineering/view'
|
||||||
import { ContextMenu } from '@hcengineering/view-resources'
|
import { ContextMenu } from '@hcengineering/view-resources'
|
||||||
import lead from '../plugin'
|
import lead from '../plugin'
|
||||||
import notification from '@hcengineering/notification'
|
import notification from '@hcengineering/notification'
|
||||||
|
import { getClient } from '@hcengineering/presentation'
|
||||||
|
import { AssigneePresenter } from '@hcengineering/task-resources'
|
||||||
|
import LeadPresenter from './LeadPresenter.svelte'
|
||||||
|
|
||||||
export let object: WithLookup<Lead>
|
export let object: WithLookup<Lead>
|
||||||
|
const client = getClient()
|
||||||
|
const assigneeAttribute = client.getHierarchy().getAttribute(lead.class.Lead, 'assignee')
|
||||||
|
|
||||||
function showMenu (ev?: Event): void {
|
function showMenu (ev?: Event): void {
|
||||||
showPopup(ContextMenu, { object }, (ev as MouseEvent).target as HTMLElement)
|
showPopup(ContextMenu, { object }, (ev as MouseEvent).target as HTMLElement)
|
||||||
@ -55,6 +61,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex-col">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
{#if object.$lookup?.attachedTo}
|
{#if object.$lookup?.attachedTo}
|
||||||
<ContactPresenter value={object.$lookup.attachedTo} />
|
<ContactPresenter value={object.$lookup.attachedTo} />
|
||||||
@ -72,4 +79,23 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex-row-reverse flex-between mt-2">
|
||||||
|
<AssigneePresenter
|
||||||
|
value={object.assignee}
|
||||||
|
issueId={object._id}
|
||||||
|
defaultClass={contact.class.Employee}
|
||||||
|
currentSpace={object.space}
|
||||||
|
placeholderLabel={assigneeAttribute.label}
|
||||||
|
/>
|
||||||
|
<DueDatePresenter
|
||||||
|
value={object.dueDate}
|
||||||
|
shouldRender={object.dueDate !== null && object.dueDate !== undefined}
|
||||||
|
shouldIgnoreOverdue={object.doneState !== null}
|
||||||
|
onChange={async (e) => {
|
||||||
|
await client.update(object, { dueDate: e })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<LeadPresenter value={object} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user