mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-25 19:58:30 +03:00
allow creation of new custom attributes for owner/maintainer (#5834)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
863e9032cf
commit
f2ca2a73c1
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import core, { Class, Doc, Obj, Ref } from '@hcengineering/core'
|
||||
import core, { Class, Doc, Obj, Ref, isOwnerOrMaintainer } from '@hcengineering/core'
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import {
|
||||
@ -50,6 +50,7 @@
|
||||
export let useOfClassAttributes = true
|
||||
export let visibleNav: boolean = true
|
||||
|
||||
const canEdit = isOwnerOrMaintainer()
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const loc = getLocation()
|
||||
@ -143,7 +144,7 @@
|
||||
<Scroller align={'center'} padding={'var(--spacing-3)'} bottomPadding={'var(--spacing-3)'}>
|
||||
<div class="hulyComponent-content">
|
||||
{#if _class !== undefined}
|
||||
<ClassAttributes {_class} {ofClass} {attributeMapper} />
|
||||
<ClassAttributes {_class} {ofClass} {attributeMapper} disabled={!canEdit} />
|
||||
{/if}
|
||||
</div>
|
||||
</Scroller>
|
||||
|
Loading…
Reference in New Issue
Block a user