Add priority filter (#2114)

Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
Alex 2022-06-21 11:05:59 +07:00 committed by GitHub
parent 190954e747
commit 0555aa402e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -13,6 +13,7 @@ Tracker:
- Issue state history.
- Subissue issue popup.
- Label support
- Priority filter
Lead:

View File

@ -409,6 +409,10 @@ export function createModel (builder: Builder): void {
presenter: tracker.component.PriorityPresenter
})
builder.mixin(tracker.class.TypeIssuePriority, core.class.Class, view.mixin.AttributeFilter, {
component: view.component.ValueFilter
})
builder.mixin(tracker.class.IssueStatus, core.class.Class, view.mixin.AttributePresenter, {
presenter: tracker.component.StatusPresenter
})

View File

@ -13,15 +13,22 @@
// limitations under the License.
-->
<script lang="ts">
import { Asset, IntlString } from '@anticrm/platform'
import { IssuePriority } from '@anticrm/tracker'
import { Label } from '@anticrm/ui'
import { Icon, Label } from '@anticrm/ui'
import { issuePriorities } from '../../utils'
export let value: IssuePriority | undefined
let label: IntlString, icon: Asset
$: if (value !== undefined) ({ label, icon } = issuePriorities[value])
</script>
{#if value !== undefined}
<div class="icon">
<Icon {icon} size={'small'} />
</div>
<span class="overflow-label">
<Label label={issuePriorities[value].label} />
<Label {label} />
</span>
{/if}