Fix product filters (#2192)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-07-02 17:27:26 +07:00 committed by GitHub
parent fb8685d46d
commit 8f3129c225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 5 deletions

View File

@ -165,6 +165,10 @@ export function createModel (builder: Builder): void {
group: 'associate'
}
})
builder.mixin(inventory.class.Product, core.class.Class, view.mixin.ClassFilters, {
filters: ['attachedTo', 'name', 'modifiedOn']
})
}
export { default } from './plugin'

View File

@ -112,7 +112,7 @@
<div bind:this={container} class="min-w-0" class:w-full={width === '100%'}>
<Button
{focusIndex}
icon={hideIcon && selected ? undefined : icon}
icon={hideIcon || selected ? undefined : icon}
width={width ?? 'min-content'}
{size}
{kind}
@ -122,7 +122,7 @@
>
<span slot="content" class="overflow-label disabled">
{#if selected}
{#if hideIcon}
{#if hideIcon || selected}
<UserInfo value={selected} size={kind === 'link' ? 'x-small' : 'medium'} {icon} />
{:else}
{getName(selected)}

View File

@ -15,12 +15,21 @@
-->
<script lang="ts">
import { Category } from '@anticrm/inventory'
import { getPanelURI } from '@anticrm/ui'
import view from '@anticrm/view'
export let value: Category
export let inline: boolean = false
</script>
{#if value}
<a
class="flex-presenter"
class:inline-presenter={inline}
href="#{getPanelURI(view.component.EditDoc, value._id, value._class, 'content')}"
>
<div class="overflow-label sm-tool-icon">
{value.name}
</div>
</a>
{/if}