UBER-1182: Fix github task types support (#4215)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-12-19 12:08:10 +06:00
committed by GitHub
parent 89706eb350
commit 5413031df0
11 changed files with 195 additions and 85 deletions
@@ -42,7 +42,7 @@
import tracker from '../../plugin'
import StatusSelector from '../issues/StatusSelector.svelte'
import ChangeIdentity from './ChangeIdentity.svelte'
import { typeStore } from '@hcengineering/task-resources'
import { typeStore, taskTypeStore } from '@hcengineering/task-resources'
export let project: Project | undefined = undefined
@@ -70,7 +70,7 @@
const dispatch = createEventDispatcher()
$: isNew = !project
$: isNew = project == null
async function handleSave (): Promise<void> {
if (isNew) {
@@ -239,12 +239,13 @@
<div class="antiGrid-row__header">
<Label label={task.string.ProjectType} />
</div>
<Component
is={task.component.ProjectTypeSelector}
disabled={!isNew}
props={{
descriptors: [tracker.descriptors.ProjectType],
type: typeId,
disabled: !isNew,
focusIndex: 4,
kind: 'regular',
size: 'large'
@@ -379,7 +380,15 @@
<div class="antiGrid-row__header">
<Label label={tracker.string.DefaultIssueStatus} />
</div>
<StatusSelector bind:value={defaultStatus} type={typeId} kind={'regular'} size={'large'} />
<StatusSelector
taskType={Array.from($taskTypeStore.values()).filter(
(it) => it.parent === typeId && it.ofClass === tracker.class.Issue
)[0]?._id}
bind:value={defaultStatus}
type={typeId}
kind={'regular'}
size={'large'}
/>
</div>
</div>
</Card>