mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 21:03:30 +00:00
UBERF-7794: Restore related issues control (#6244)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
576027f98b
commit
8667b7482d
@ -227,6 +227,12 @@ export function createModel (builder: Builder): void {
|
|||||||
'status',
|
'status',
|
||||||
'attachments',
|
'attachments',
|
||||||
'comments',
|
'comments',
|
||||||
|
{
|
||||||
|
key: '',
|
||||||
|
label: tracker.string.RelatedIssues,
|
||||||
|
presenter: tracker.component.RelatedIssueSelector,
|
||||||
|
displayProps: { key: 'related', suffix: true }
|
||||||
|
},
|
||||||
'modifiedOn',
|
'modifiedOn',
|
||||||
{
|
{
|
||||||
key: '$lookup.attachedTo.$lookup.channels',
|
key: '$lookup.attachedTo.$lookup.channels',
|
||||||
@ -294,6 +300,12 @@ export function createModel (builder: Builder): void {
|
|||||||
},
|
},
|
||||||
{ key: 'attachments', displayProps: { key: 'attachments', suffix: true } },
|
{ key: 'attachments', displayProps: { key: 'attachments', suffix: true } },
|
||||||
{ key: 'comments', displayProps: { key: 'comments', suffix: true } },
|
{ key: 'comments', displayProps: { key: 'comments', suffix: true } },
|
||||||
|
{
|
||||||
|
key: '',
|
||||||
|
label: tracker.string.RelatedIssues,
|
||||||
|
presenter: tracker.component.RelatedIssueSelector,
|
||||||
|
displayProps: { key: 'related', suffix: true }
|
||||||
|
},
|
||||||
{ key: '', displayProps: { grow: true } },
|
{ key: '', displayProps: { grow: true } },
|
||||||
{
|
{
|
||||||
key: '$lookup.attachedTo.$lookup.channels',
|
key: '$lookup.attachedTo.$lookup.channels',
|
||||||
@ -441,7 +453,7 @@ export function createModel (builder: Builder): void {
|
|||||||
groupDepth: 1
|
groupDepth: 1
|
||||||
},
|
},
|
||||||
options: lookupLeadOptions,
|
options: lookupLeadOptions,
|
||||||
config: ['attachedTo', 'attachments', 'comments', 'dueDate', 'assignee'],
|
config: ['attachedTo', 'status', 'attachments', 'comments', 'dueDate', 'assignee'],
|
||||||
configOptions: {
|
configOptions: {
|
||||||
strict: true
|
strict: true
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import calendar from '@hcengineering/model-calendar'
|
|||||||
import chunter from '@hcengineering/model-chunter'
|
import chunter from '@hcengineering/model-chunter'
|
||||||
import contact from '@hcengineering/model-contact'
|
import contact from '@hcengineering/model-contact'
|
||||||
import core from '@hcengineering/model-core'
|
import core from '@hcengineering/model-core'
|
||||||
|
import gmail from '@hcengineering/model-gmail'
|
||||||
import { generateClassNotificationTypes } from '@hcengineering/model-notification'
|
import { generateClassNotificationTypes } from '@hcengineering/model-notification'
|
||||||
import presentation from '@hcengineering/model-presentation'
|
import presentation from '@hcengineering/model-presentation'
|
||||||
import tags from '@hcengineering/model-tags'
|
import tags from '@hcengineering/model-tags'
|
||||||
@ -33,7 +34,6 @@ import { type IntlString } from '@hcengineering/platform'
|
|||||||
import { recruitId, type Applicant } from '@hcengineering/recruit'
|
import { recruitId, type Applicant } from '@hcengineering/recruit'
|
||||||
import setting from '@hcengineering/setting'
|
import setting from '@hcengineering/setting'
|
||||||
import { type KeyBinding, type ViewOptionModel, type ViewOptionsModel } from '@hcengineering/view'
|
import { type KeyBinding, type ViewOptionModel, type ViewOptionsModel } from '@hcengineering/view'
|
||||||
import gmail from '@hcengineering/model-gmail'
|
|
||||||
|
|
||||||
import recruit from './plugin'
|
import recruit from './plugin'
|
||||||
import { createReviewModel, reviewTableConfig, reviewTableOptions } from './review'
|
import { createReviewModel, reviewTableConfig, reviewTableOptions } from './review'
|
||||||
@ -475,6 +475,12 @@ export function createModel (builder: Builder): void {
|
|||||||
'status',
|
'status',
|
||||||
'attachments',
|
'attachments',
|
||||||
'comments',
|
'comments',
|
||||||
|
{
|
||||||
|
key: '',
|
||||||
|
label: tracker.string.RelatedIssues,
|
||||||
|
presenter: tracker.component.RelatedIssueSelector,
|
||||||
|
displayProps: { key: 'related', suffix: true }
|
||||||
|
},
|
||||||
'modifiedOn',
|
'modifiedOn',
|
||||||
'$lookup.space.company',
|
'$lookup.space.company',
|
||||||
{
|
{
|
||||||
@ -604,6 +610,12 @@ export function createModel (builder: Builder): void {
|
|||||||
},
|
},
|
||||||
{ key: 'attachments', displayProps: { key: 'attachments', suffix: true } },
|
{ key: 'attachments', displayProps: { key: 'attachments', suffix: true } },
|
||||||
{ key: 'comments', displayProps: { key: 'comments', suffix: true } },
|
{ key: 'comments', displayProps: { key: 'comments', suffix: true } },
|
||||||
|
{
|
||||||
|
key: '',
|
||||||
|
label: tracker.string.RelatedIssues,
|
||||||
|
presenter: tracker.component.RelatedIssueSelector,
|
||||||
|
displayProps: { key: 'related', suffix: true }
|
||||||
|
},
|
||||||
{ key: '', displayProps: { grow: true } },
|
{ key: '', displayProps: { grow: true } },
|
||||||
{
|
{
|
||||||
key: '$lookup.space.company',
|
key: '$lookup.space.company',
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
"@hcengineering/presentation": "^0.6.3",
|
"@hcengineering/presentation": "^0.6.3",
|
||||||
"@hcengineering/task": "^0.6.20",
|
"@hcengineering/task": "^0.6.20",
|
||||||
"@hcengineering/task-resources": "^0.6.0",
|
"@hcengineering/task-resources": "^0.6.0",
|
||||||
|
"@hcengineering/tracker": "^0.6.24",
|
||||||
"@hcengineering/text-editor-resources": "^0.6.0",
|
"@hcengineering/text-editor-resources": "^0.6.0",
|
||||||
"@hcengineering/ui": "^0.6.15",
|
"@hcengineering/ui": "^0.6.15",
|
||||||
"@hcengineering/view": "^0.6.13",
|
"@hcengineering/view": "^0.6.13",
|
||||||
|
@ -23,16 +23,18 @@
|
|||||||
import notification from '@hcengineering/notification'
|
import notification from '@hcengineering/notification'
|
||||||
import { getClient } from '@hcengineering/presentation'
|
import { getClient } from '@hcengineering/presentation'
|
||||||
import task from '@hcengineering/task'
|
import task from '@hcengineering/task'
|
||||||
import { AssigneePresenter } from '@hcengineering/task-resources'
|
import { AssigneePresenter, StateRefPresenter } from '@hcengineering/task-resources'
|
||||||
import { ActionIcon, Component, DueDatePresenter, IconMoreH } from '@hcengineering/ui'
|
import { ActionIcon, Component, DueDatePresenter, IconMoreH } from '@hcengineering/ui'
|
||||||
import { BuildModelKey } from '@hcengineering/view'
|
import { BuildModelKey } from '@hcengineering/view'
|
||||||
import { enabledConfig, openDoc, showMenu, statusStore } from '@hcengineering/view-resources'
|
import { enabledConfig, openDoc, showMenu, statusStore } from '@hcengineering/view-resources'
|
||||||
|
import tracker from '@hcengineering/tracker'
|
||||||
|
|
||||||
import lead from '../plugin'
|
import lead from '../plugin'
|
||||||
import LeadPresenter from './LeadPresenter.svelte'
|
import LeadPresenter from './LeadPresenter.svelte'
|
||||||
|
|
||||||
export let object: WithLookup<Lead>
|
export let object: WithLookup<Lead>
|
||||||
export let config: (string | BuildModelKey)[]
|
export let config: (string | BuildModelKey)[]
|
||||||
|
export let groupByKey: string
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
const assigneeAttribute = client.getHierarchy().getAttribute(lead.class.Lead, 'assignee')
|
const assigneeAttribute = client.getHierarchy().getAttribute(lead.class.Lead, 'assignee')
|
||||||
@ -69,8 +71,21 @@
|
|||||||
<ContactPresenter value={object.$lookup.attachedTo} avatarSize={'small'} />
|
<ContactPresenter value={object.$lookup.attachedTo} avatarSize={'small'} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-labels mb-2">
|
||||||
|
{#if groupByKey !== 'status' && enabledConfig(config, 'status')}
|
||||||
|
<StateRefPresenter
|
||||||
|
size={'small'}
|
||||||
|
kind={'link-bordered'}
|
||||||
|
space={object.space}
|
||||||
|
shrink={1}
|
||||||
|
value={object.status}
|
||||||
|
onChange={(status) => {
|
||||||
|
client.update(object, { status })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
<Component showLoading={false} is={tracker.component.RelatedIssueSelector} props={{ object, size: 'small' }} />
|
||||||
{#if enabledConfig(config, 'dueDate')}
|
{#if enabledConfig(config, 'dueDate')}
|
||||||
<div class="card-labels labels mb-2">
|
|
||||||
<DueDatePresenter
|
<DueDatePresenter
|
||||||
size={'small'}
|
size={'small'}
|
||||||
kind={'link-bordered'}
|
kind={'link-bordered'}
|
||||||
@ -82,8 +97,8 @@
|
|||||||
await client.update(object, { dueDate: e })
|
await client.update(object, { dueDate: e })
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex-row-center gap-3 reverse mr-4">
|
<div class="flex-row-center gap-3 reverse mr-4">
|
||||||
<LeadPresenter value={object} />
|
<LeadPresenter value={object} />
|
||||||
@ -105,3 +120,17 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.card-labels {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
|
&.labels {
|
||||||
|
overflow: hidden;
|
||||||
|
flex-shrink: 1;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- <Component showLoading={false} is={tracker.component.RelatedIssueSelector} props={{ object, size: 'small' }} /> -->
|
<Component showLoading={false} is={tracker.component.RelatedIssueSelector} props={{ object, size: 'small' }} />
|
||||||
{#if enabledConfig(config, 'dueDate')}
|
{#if enabledConfig(config, 'dueDate')}
|
||||||
<DueDatePresenter
|
<DueDatePresenter
|
||||||
size={'small'}
|
size={'small'}
|
||||||
|
Loading…
Reference in New Issue
Block a user