2022-04-23 16:59:57 +00:00
|
|
|
<!--
|
|
|
|
// Copyright © 2022 Hardcore Engineering Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
-->
|
2022-04-08 18:05:49 +00:00
|
|
|
<script lang="ts">
|
2022-09-21 08:08:25 +00:00
|
|
|
import { DocumentQuery, Ref } from '@hcengineering/core'
|
|
|
|
import { createQuery } from '@hcengineering/presentation'
|
2023-03-17 06:17:53 +00:00
|
|
|
import { Issue, Project } from '@hcengineering/tracker'
|
2022-04-08 18:05:49 +00:00
|
|
|
import tracker from '../../plugin'
|
2022-06-15 18:04:37 +00:00
|
|
|
import IssuesView from './IssuesView.svelte'
|
2022-03-31 08:32:42 +00:00
|
|
|
|
2023-03-17 06:17:53 +00:00
|
|
|
export let currentSpace: Ref<Project>
|
2022-04-22 06:13:57 +00:00
|
|
|
|
2022-06-15 18:04:37 +00:00
|
|
|
const statusQuery = createQuery()
|
|
|
|
let query: DocumentQuery<Issue>
|
|
|
|
$: statusQuery.query(
|
|
|
|
tracker.class.IssueStatus,
|
2022-06-28 06:53:39 +00:00
|
|
|
{
|
|
|
|
category: { $in: [tracker.issueStatusCategory.Unstarted, tracker.issueStatusCategory.Started] },
|
|
|
|
space: currentSpace
|
|
|
|
},
|
2022-06-15 18:04:37 +00:00
|
|
|
(result) => {
|
2022-06-23 11:09:18 +00:00
|
|
|
query = { status: { $in: result.map(({ _id }) => _id) }, space: currentSpace }
|
2022-06-15 18:04:37 +00:00
|
|
|
}
|
|
|
|
)
|
2022-03-31 08:32:42 +00:00
|
|
|
</script>
|
2022-04-08 18:05:49 +00:00
|
|
|
|
2023-01-14 10:54:54 +00:00
|
|
|
<IssuesView {query} space={currentSpace} title={tracker.string.ActiveIssues} />
|