mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-23 18:15:03 +02:00
Card fixes (#8136)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -57,18 +57,22 @@
|
||||
if (added.has(_id) || ignore.has(_id)) continue
|
||||
const _class = hierarchy.getClass(_id)
|
||||
if (_class.label === undefined) continue
|
||||
if (viewlets.has(hierarchy.getBaseClass(_id))) {
|
||||
added.add(_id)
|
||||
const descendants = hierarchy.getDescendants(_id)
|
||||
const toAdd: Class<Doc>[] = []
|
||||
for (const desc of descendants) {
|
||||
if (added.has(desc) || ignore.has(desc)) continue
|
||||
const _class = hierarchy.getClass(desc)
|
||||
if (_class.label === undefined) continue
|
||||
added.add(desc)
|
||||
toAdd.push(_class)
|
||||
try {
|
||||
if (viewlets.has(hierarchy.getBaseClass(_id))) {
|
||||
added.add(_id)
|
||||
const descendants = hierarchy.getDescendants(_id)
|
||||
const toAdd: Class<Doc>[] = []
|
||||
for (const desc of descendants) {
|
||||
if (added.has(desc) || ignore.has(desc)) continue
|
||||
const _class = hierarchy.getClass(desc)
|
||||
if (_class.label === undefined) continue
|
||||
added.add(desc)
|
||||
toAdd.push(_class)
|
||||
}
|
||||
base.set(_id, toAdd)
|
||||
}
|
||||
base.set(_id, toAdd)
|
||||
} catch (err) {
|
||||
ignore.add(_id)
|
||||
}
|
||||
}
|
||||
const result: [DropdownIntlItem, DropdownIntlItem[]][] = []
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
is={getComponent(selected)}
|
||||
props={{
|
||||
type: type?.of,
|
||||
nested: true,
|
||||
editable,
|
||||
kind,
|
||||
size
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
export let type: EnumOf | undefined
|
||||
export let editable: boolean = true
|
||||
export let value: Enum | undefined
|
||||
export let nested: boolean = false
|
||||
export let defaultValue: string | undefined
|
||||
export let kind: ButtonKind = 'no-border'
|
||||
export let size: ButtonSize = 'small'
|
||||
@@ -66,7 +67,9 @@
|
||||
{#if editable}
|
||||
<EnumSelect label={core.string.Enum} bind:value {create} {kind} {size} />
|
||||
{:else if value}
|
||||
{value.name}
|
||||
<div>
|
||||
{value.name}
|
||||
</div>
|
||||
{/if}
|
||||
{#if value}
|
||||
<Button
|
||||
@@ -79,7 +82,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{#if value && type}
|
||||
{#if value && type && !nested}
|
||||
<div class="hulyModal-content__settingsSet-line">
|
||||
<span class="label">
|
||||
<Label label={setting.string.DefaultValue} />
|
||||
|
||||
Reference in New Issue
Block a user