UBERF-7944: Support for not_planed close for issues (#6396)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-08-27 14:10:50 +07:00
committed by GitHub
parent e231f89e0b
commit d7820206c0
6 changed files with 81 additions and 31 deletions
@@ -3,24 +3,17 @@
//
-->
<script lang="ts">
import { Ref, WithLookup, groupByArray } from '@hcengineering/core'
import {
GithubPullRequestReviewState,
GithubReview,
GithubReviewComment,
GithubReviewThread
} from '@hcengineering/github'
import { Ref, WithLookup } from '@hcengineering/core'
import { GithubPullRequestReviewState, GithubReview } from '@hcengineering/github'
import { ActivityMessageHeader, ActivityMessageTemplate } from '@hcengineering/activity-resources'
import { Person, PersonAccount } from '@hcengineering/contact'
import { personAccountByIdStore, personByIdStore } from '@hcengineering/contact-resources'
import { IntlString } from '@hcengineering/platform'
import { MessageViewer, createQuery } from '@hcengineering/presentation'
import { Component, PaletteColorIndexes, getPlatformColor, themeStore } from '@hcengineering/ui'
import diffview from '@hcengineering/diffview'
import github from '../../plugin'
import ReviewCommentPresenter from './ReviewCommentPresenter.svelte'
import { MessageViewer } from '@hcengineering/presentation'
import { isEmptyMarkup } from '@hcengineering/text'
import { PaletteColorIndexes, getPlatformColor, themeStore } from '@hcengineering/ui'
import github from '../../plugin'
export let value: WithLookup<GithubReview>
export let showNotify: boolean = false
@@ -68,7 +68,11 @@
)
}
async function changeResolution (): Promise<void> {
await getClient().update(value, { isResolved: !value.isResolved, resolvedBy: null })
if (value.isResolved) {
await getClient().update(value, { isResolved: false, resolvedBy: null })
} else {
await getClient().update(value, { isResolved: true, resolvedBy: getCurrentAccount()._id })
}
}
const toRefPersonAccount = (account: Ref<Account>): Ref<PersonAccount> => account as Ref<PersonAccount>