State templates minor fixes (#1736)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov
2022-05-13 13:31:41 +07:00
committed by GitHub
parent 3019d1e790
commit 5e7c320fb5
3 changed files with 44 additions and 21 deletions
+6
View File
@@ -257,6 +257,12 @@ export async function createKanban (
templateId?: Ref<KanbanTemplate>
): Promise<Ref<Kanban>> {
if (templateId === undefined) {
await client.createDoc(task.class.State, attachedTo, {
title: 'New State',
color: 9,
rank: [...genRanks(1)][0]
})
const ranks = [...genRanks(2)]
await Promise.all([
client.createDoc(task.class.WonState, attachedTo, {