allow creation of new custom attributes for owner/maintainer (#5834)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2024-06-17 13:42:56 +05:00 committed by GitHub
parent 863e9032cf
commit f2ca2a73c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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>