EZQMS-602: Moved Rank type to core (utilities stay in its own package) (#5019)

This commit is contained in:
Pete Anøther
2024-03-20 09:39:30 +07:00
committed by GitHub
parent 23a3c8e94f
commit b2d3256df0
19 changed files with 49 additions and 170 deletions
@@ -76,14 +76,14 @@
const selection = listProvider.selection
let resultQuery: DocumentQuery<DocWithRank>
let resultQuery: DocumentQuery<Card>
$: resultQuery = { ...query, isArchived: { $nin: [true] }, space }
const cardQuery = createQuery()
let cards: DocWithRank[] = []
let cards: Card[] = []
$: cardQuery.query<DocWithRank>(
$: cardQuery.query<Card>(
_class,
getCategoryQueryNoLookup(resultQuery),
(result) => {
+3 -2
View File
@@ -20,6 +20,7 @@ import {
Class,
Doc,
Mixin,
type Rank,
Ref,
Space,
Status,
@@ -29,7 +30,6 @@ import {
import { NotificationType } from '@hcengineering/notification'
import type { Asset, IntlString, Plugin, Resource } from '@hcengineering/platform'
import { plugin } from '@hcengineering/platform'
import type { Rank } from '@hcengineering/rank'
import type { AnyComponent, ComponentExtensionId } from '@hcengineering/ui'
import { Action, IconProps, ViewletDescriptor } from '@hcengineering/view'
@@ -48,7 +48,7 @@ export interface Project extends Space {
/**
* @public
*/
export interface Task extends AttachedDoc, DocWithRank {
export interface Task extends AttachedDoc {
kind: Ref<TaskType>
status: Ref<Status>
isDone?: boolean
@@ -59,6 +59,7 @@ export interface Task extends AttachedDoc, DocWithRank {
attachments?: number
labels?: number
identifier: string
rank: Rank
}
/**
+3 -2
View File
@@ -26,16 +26,17 @@ import core, {
TxOperations,
generateId,
type AnyAttribute,
type Rank,
type RefTo
} from '@hcengineering/core'
import { PlatformError, getEmbeddedLabel, unknownStatus } from '@hcengineering/platform'
import task, { Project, ProjectStatus, ProjectType, Task, TaskType } from '.'
import { makeRank, type Rank } from '@hcengineering/rank'
import { makeRank } from '@hcengineering/rank'
export { genRanks, makeRank } from '@hcengineering/rank'
/**
* @public
* @deprecated Prefer {@link makeRank}
*
* TODO: Drop after everything migrates to {@link makeRank}
*/
@@ -13,7 +13,7 @@
// limitations under the License.
-->
<script lang="ts">
import core, { AttachedData, FindOptions, Ref, SortingOrder } from '@hcengineering/core'
import core, { AttachedData, FindOptions, type Rank, Ref, SortingOrder } from '@hcengineering/core'
import { ObjectPopup, getClient } from '@hcengineering/presentation'
import { makeRank } from '@hcengineering/task'
import { Issue, IssueDraft } from '@hcengineering/tracker'
@@ -42,7 +42,7 @@
parentIssue?._id !== docValue.attachedTo &&
parentIssue?._id !== docValue._id
) {
let rank: string | null = null
let rank: Rank | null = null
if (parentIssue) {
const lastAttachedIssue = await client.findOne<Issue>(