Vacancy templates (#2351)

Signed-off-by: muhtimur <timur.mukhamedishin@xored.com>
This commit is contained in:
Timur Mukhamedishin
2022-11-09 17:24:02 +06:00
committed by GitHub
parent bd1079cb53
commit cdbead6584
43 changed files with 378 additions and 72 deletions
@@ -15,7 +15,7 @@
<script lang="ts">
import { AttachmentStyledBox } from '@hcengineering/attachment-resources'
import { Employee } from '@hcengineering/contact'
import { Data, generateId, Ref } from '@hcengineering/core'
import { Data, Doc, generateId, Ref } from '@hcengineering/core'
import { Card, getClient, KeyedAttribute, SpaceSelector } from '@hcengineering/presentation'
import tags, { TagElement } from '@hcengineering/tags'
import { IssuePriority, IssueTemplate, Project, Sprint, Team } from '@hcengineering/tracker'
@@ -35,6 +35,7 @@
export let assignee: Ref<Employee> | null = null
export let project: Ref<Project> | null = $activeProject ?? null
export let sprint: Ref<Sprint> | null = $activeSprint ?? null
export let relatedTo: Doc | undefined
let labels: TagElement[] = []
@@ -50,7 +51,8 @@
children: [],
labels: [],
comments: 0,
attachments: 0
attachments: 0,
relations: []
}
const dispatch = createEventDispatcher()
@@ -92,7 +94,8 @@
children: object.children,
comments: 0,
attachments: 0,
labels: labels.map((it) => it._id)
labels: labels.map((it) => it._id),
relations: relatedTo !== undefined ? [{ _id: relatedTo._id, _class: relatedTo._class }] : []
}
await client.createDoc(tracker.class.IssueTemplate, _space, value, objectId)