diff --git a/models/card/src/index.ts b/models/card/src/index.ts index 2fe5dfd8bd..510bf98f4b 100644 --- a/models/card/src/index.ts +++ b/models/card/src/index.ts @@ -137,23 +137,6 @@ export function createSystemType ( type ) - builder.createDoc(view.class.Viewlet, core.space.Model, { - attachTo: type, - descriptor: view.viewlet.List, - viewOptions: { - groupBy: ['_class', 'createdBy', 'modifiedBy'], - orderBy: [ - ['modifiedOn', SortingOrder.Descending], - ['rank', SortingOrder.Ascending] - ], - other: [] - }, - configOptions: { - hiddenKeys: ['content', 'title'] - }, - config: listConfig - }) - builder.mixin(type, card.class.MasterTag, setting.mixin.Editable, { value: false }) @@ -171,6 +154,23 @@ export function createSystemType ( 'modifiedOn' ] }) + + builder.createDoc(view.class.Viewlet, core.space.Model, { + attachTo: type, + descriptor: view.viewlet.List, + viewOptions: { + groupBy: ['_class', 'createdBy', 'modifiedBy'], + orderBy: [ + ['modifiedOn', SortingOrder.Descending], + ['rank', SortingOrder.Ascending] + ], + other: [] + }, + configOptions: { + hiddenKeys: ['content', 'title'] + }, + config: listConfig + }) } export function createModel (builder: Builder): void { diff --git a/plugins/view-resources/src/components/NumberEditor.svelte b/plugins/view-resources/src/components/NumberEditor.svelte index e359a575ac..3a564234da 100644 --- a/plugins/view-resources/src/components/NumberEditor.svelte +++ b/plugins/view-resources/src/components/NumberEditor.svelte @@ -19,13 +19,12 @@ import { EditBox, Label, showPopup, eventToHTMLElement, Button } from '@hcengineering/ui' import EditBoxPopup from './EditBoxPopup.svelte' - // export let label: IntlString - export let placeholder: IntlString + export let label: IntlString export let value: number | undefined export let autoFocus: boolean = false // export let maxWidth: string = '10rem' export let onChange: (value: number | undefined) => void - export let kind: 'no-border' | 'link' | 'button' = 'no-border' + export let kind: 'no-border' | 'link' | 'button' | 'list' = 'no-border' export let readonly = false export let size: ButtonSize = 'small' export let justify: 'left' | 'center' = 'center' @@ -41,7 +40,7 @@ } -{#if kind === 'button' || kind === 'link'} +{#if kind === 'button' || kind === 'link' || kind === 'list'} @@ -71,8 +70,8 @@ {#if value != null} {value} {:else} - + {/if} {:else} - + {/if} diff --git a/plugins/view-resources/src/components/NumberPresenter.svelte b/plugins/view-resources/src/components/NumberPresenter.svelte index fd174c279d..a3de59c0d4 100644 --- a/plugins/view-resources/src/components/NumberPresenter.svelte +++ b/plugins/view-resources/src/components/NumberPresenter.svelte @@ -14,18 +14,18 @@ // limitations under the License. --> {#if onChange !== undefined && !readonly} - + {:else} {value || ''} {/if} diff --git a/plugins/view-resources/src/components/ViewletSetting.svelte b/plugins/view-resources/src/components/ViewletSetting.svelte index 1bd50bac27..d1efc5be83 100644 --- a/plugins/view-resources/src/components/ViewletSetting.svelte +++ b/plugins/view-resources/src/components/ViewletSetting.svelte @@ -237,11 +237,13 @@ processAttribute(attribute, result) } - hierarchy.getDescendants(viewlet.attachTo).forEach((it) => { - hierarchy.getOwnAttributes(it).forEach((attr) => { + const desc = hierarchy.getDescendants(viewlet.attachTo) + for (const d of desc) { + if (!hierarchy.isMixin(d)) continue + hierarchy.getOwnAttributes(d).forEach((attr) => { processAttribute(attr, result, true) }) - }) + } const ancestors = new Set(hierarchy.getAncestors(viewlet.attachTo)) const parent = hierarchy.getParentClass(viewlet.attachTo)