mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-09 17:05:01 +00:00
Add parent label in navigator
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
fe08287484
commit
fa4a2ff430
@ -22,6 +22,7 @@
|
||||
|
||||
export let label: string | undefined = undefined
|
||||
export let labelIntl: IntlString | undefined = undefined
|
||||
export let secondLabel: string | undefined = undefined
|
||||
export let icon: IconComponent
|
||||
export let selected: boolean = false
|
||||
export let notify: boolean = false
|
||||
@ -39,6 +40,9 @@
|
||||
{:else if labelIntl}
|
||||
<Label label={labelIntl} />
|
||||
{/if}
|
||||
{#if secondLabel}
|
||||
({secondLabel})
|
||||
{/if}
|
||||
</span>
|
||||
{#if notify && notificationsCount > 0}
|
||||
<span class="nav-item__notifications-count">
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { Card, CardSpace, MasterTag } from '@hcengineering/card'
|
||||
import { Ref, SortingOrder } from '@hcengineering/core'
|
||||
import { Ref, SortingOrder, WithLookup } from '@hcengineering/core'
|
||||
import { createLabelsQuery, createNotificationContextsQuery, createQuery, getClient } from '@hcengineering/presentation'
|
||||
import uiNext, { Button, ButtonVariant, NavItem } from '@hcengineering/ui-next'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
@ -39,8 +39,8 @@
|
||||
const labelsQuery = createLabelsQuery()
|
||||
const notificationContextsQuery = createNotificationContextsQuery()
|
||||
|
||||
let cards: Card[] = []
|
||||
let sortedCards: Card[] = []
|
||||
let cards: WithLookup<Card>[] = []
|
||||
let sortedCards: WithLookup<Card>[] = []
|
||||
let total = -1
|
||||
let contextByCard = new Map<Ref<Card>, NotificationContext>()
|
||||
let labels: Label[] = []
|
||||
@ -84,7 +84,14 @@
|
||||
total = res.total
|
||||
isLoading = false
|
||||
},
|
||||
{ total: true, limit, sort: sort === 'alphabetical' ? { title: SortingOrder.Ascending } : { modifiedOn: SortingOrder.Descending } }
|
||||
{
|
||||
total: true,
|
||||
limit,
|
||||
sort: sort === 'alphabetical' ? { title: SortingOrder.Ascending } : { modifiedOn: SortingOrder.Descending },
|
||||
lookup: {
|
||||
parent: cardPlugin.class.Card
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@ -138,6 +145,7 @@
|
||||
{@const context = contextByCard.get(card._id)}
|
||||
<NavItem
|
||||
label={card.title}
|
||||
secondLabel={card.$lookup?.parent?.title}
|
||||
icon={clazz.icon ?? cardPlugin.icon.Card}
|
||||
selected={selectedCard === card._id}
|
||||
paddingLeft="1.75rem"
|
||||
|
Loading…
Reference in New Issue
Block a user