Hide meeting minutes to guests (#9009)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / uitest-workspaces (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions

Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
Anton Alexeyev 2025-05-21 21:19:58 +07:00 committed by GitHub
parent f914027b85
commit 47c61d14e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 48 additions and 32 deletions

View File

@ -39,13 +39,21 @@
let editable: boolean = false
$: editable = hasAccountRole(me, AccountRole.Maintainer)
let canViewMinutes: boolean = false
$: canViewMinutes = hasAccountRole(me, AccountRole.User)
</script>
<div class="hulyComponent">
<Header adaptive={'disabled'}>
<Breadcrumb title={selectedFloor?.name ?? ''} size={'large'} isCurrent />
<svelte:fragment slot="beforeTitle">
<ViewletSelector bind:viewlet bind:preference bind:loading viewletQuery={{ attachTo: lovePlg.class.Floor }} />
<ViewletSelector
bind:viewlet
bind:preference
bind:loading
hidden={!canViewMinutes}
viewletQuery={{ attachTo: lovePlg.class.Floor }}
/>
</svelte:fragment>
<svelte:fragment slot="actions">
{#if editable}

View File

@ -14,6 +14,7 @@
-->
<script lang="ts">
import type { Class, Doc, Ref, Space } from '@hcengineering/core'
import { AccountRole, getCurrentAccount, hasAccountRole } from '@hcengineering/core'
import { Label, Section, Scroller } from '@hcengineering/ui'
import { Table, ViewletsSettingButton } from '@hcengineering/view-resources'
import { Viewlet, ViewletPreference } from '@hcengineering/view'
@ -26,11 +27,17 @@
export let readonly: boolean = false
export let meetings: number
const me = getCurrentAccount()
let viewlet: Viewlet | undefined
let preference: ViewletPreference | undefined
let loading = true
let canViewMinutes: boolean = false
$: canViewMinutes = hasAccountRole(me, AccountRole.User)
</script>
{#if canViewMinutes}
<Section label={love.string.MeetingMinutes} icon={love.icon.Cam}>
<svelte:fragment slot="header">
<ViewletsSettingButton
@ -63,3 +70,4 @@
{/if}
</svelte:fragment>
</Section>
{/if}