Fix meeting minutes (#7181)
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 / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-11-16 20:30:36 +04:00 committed by GitHub
parent 430be8c3ba
commit bcdfed6871
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
62 changed files with 744 additions and 254 deletions

View File

@ -201,11 +201,8 @@ export class TDocUpdateMessageViewlet extends TDoc implements DocUpdateMessageVi
@Model(activity.class.ActivityExtension, core.class.Doc, DOMAIN_MODEL)
export class TActivityExtension extends TDoc implements ActivityExtension {
@Prop(TypeRef(core.class.Class), core.string.Class)
@Index(IndexKind.Indexed)
ofClass!: Ref<Class<Doc>>
components!: Record<ActivityExtensionKind, AnyComponent>
ofClass!: Ref<Class<Doc>>
components!: Record<ActivityExtensionKind, { component: AnyComponent, props?: Record<string, any> }>
}
@Model(activity.class.ActivityMessagesFilter, core.class.Doc, DOMAIN_MODEL)

View File

@ -85,7 +85,7 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: analyticsCollector.class.OnboardingChannel,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc<ActivityMessageControl<OnboardingChannel>>(

View File

@ -273,27 +273,27 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: chunter.class.Channel,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: chunter.class.DirectMessage,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: activity.class.DocUpdateMessage,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: chunter.class.ChatMessage,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: activity.class.ActivityReference,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
// Indexing

View File

@ -263,22 +263,22 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: contact.class.Contact,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: contact.class.Person,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: contact.class.Organization,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: contact.class.Member,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(contact.mixin.Employee, core.class.Class, view.mixin.ObjectFactory, {

View File

@ -514,7 +514,7 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: documents.class.DocumentCategory,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(documents.class.DocumentCategory, core.class.Class, view.mixin.ObjectPresenter, {
@ -768,7 +768,7 @@ export function defineNotifications (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: documents.class.DocumentComment,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(documents.class.ControlledDocument, core.class.Class, notification.mixin.ClassCollaborators, {

View File

@ -492,7 +492,7 @@ function defineDocument (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: document.class.Document,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
// Search

View File

@ -595,7 +595,7 @@ function defineFile (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: drive.class.File,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
// Search

View File

@ -85,17 +85,17 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: inventory.class.Product,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: inventory.class.Category,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: inventory.class.Variant,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(inventory.class.Category, core.class.Class, view.mixin.ObjectPresenter, {

View File

@ -51,12 +51,12 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: lead.class.Lead,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: lead.class.Funnel,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(lead.class.Funnel, core.class.Class, workbench.mixin.SpaceView, {

View File

@ -28,8 +28,8 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/activity": "^0.6.0",
"@hcengineering/attachment": "^0.6.14",
"@hcengineering/chunter": "^0.6.20",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/core": "^0.6.32",
@ -46,6 +46,7 @@
"@hcengineering/notification": "^0.6.23",
"@hcengineering/platform": "^0.6.11",
"@hcengineering/setting": "^0.6.17",
"@hcengineering/time": "^0.6.0",
"@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13",
"@hcengineering/workbench": "^0.6.16"

View File

@ -20,7 +20,10 @@ import {
DOMAIN_TRANSIENT,
IndexKind,
type Ref,
type CollaborativeDoc
type CollaborativeDoc,
type Doc,
type Timestamp,
type CollectionSize
} from '@hcengineering/core'
import {
type DevicesPreference,
@ -37,7 +40,8 @@ import {
type RoomInfo,
type RoomType,
type RoomLanguage,
type MeetingMinutes
type MeetingMinutes,
type MeetingStatus
} from '@hcengineering/love'
import {
type Builder,
@ -52,7 +56,9 @@ import {
TypeCollaborativeDoc,
TypeRef,
TypeString,
UX
TypeTimestamp,
UX,
TypeAny
} from '@hcengineering/model'
import calendar, { TEvent } from '@hcengineering/model-calendar'
import core, { TAttachedDoc, TDoc } from '@hcengineering/model-core'
@ -66,6 +72,7 @@ import workbench, { WidgetType } from '@hcengineering/workbench'
import activity from '@hcengineering/activity'
import chunter from '@hcengineering/chunter'
import attachment from '@hcengineering/attachment'
import time, { type ToDo, type Todoable } from '@hcengineering/time'
import love from './plugin'
@ -107,6 +114,9 @@ export class TRoom extends TDoc implements Room {
@Prop(PropCollection(love.class.MeetingMinutes), love.string.MeetingMinutes)
meetings?: number
@Prop(PropCollection(chunter.class.ChatMessage), activity.string.Messages)
messages?: number
}
@Model(love.class.Office, love.class.Room)
@ -184,8 +194,13 @@ export class TMeeting extends TEvent implements Meeting {
}
@Model(love.class.MeetingMinutes, core.class.Doc, DOMAIN_MEETING_MINUTES)
@UX(love.string.MeetingMinutes, love.icon.Cam)
export class TMeetingMinutes extends TAttachedDoc implements MeetingMinutes {
@UX(love.string.MeetingMinutes, love.icon.Cam, undefined, 'createdOn', undefined, love.string.MeetingsMinutes)
export class TMeetingMinutes extends TAttachedDoc implements MeetingMinutes, Todoable {
@Prop(TypeRef(core.class.Doc), love.string.Room, { editor: love.component.MeetingMinutesDocEditor })
@Index(IndexKind.Indexed)
@ReadOnly()
declare attachedTo: Ref<Doc>
@Hidden()
sid!: string
@ -197,6 +212,12 @@ export class TMeetingMinutes extends TAttachedDoc implements MeetingMinutes {
@Index(IndexKind.FullText)
description!: CollaborativeDoc
@Prop(TypeAny(love.component.MeetingMinutesStatusPresenter, love.string.Status), love.string.Status, {
editor: love.component.MeetingMinutesStatusPresenter
})
@ReadOnly()
status!: MeetingStatus
@Prop(Collection(attachment.class.Attachment), attachment.string.Attachments, { shortLabel: attachment.string.Files })
attachments?: number
@ -205,6 +226,18 @@ export class TMeetingMinutes extends TAttachedDoc implements MeetingMinutes {
@Prop(PropCollection(chunter.class.ChatMessage), activity.string.Messages)
messages?: number
@Prop(TypeTimestamp(), love.string.MeetingStart, { editor: view.component.TimestampPresenter })
@ReadOnly()
@Index(IndexKind.IndexedDsc)
declare createdOn: Timestamp
@Prop(TypeTimestamp(), love.string.MeetingEnd)
@ReadOnly()
meetingEnd?: Timestamp
@Prop(Collection(time.class.ToDo), getEmbeddedLabel('Action Items'))
todos?: CollectionSize<ToDo>
}
export default love
@ -418,17 +451,17 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: love.class.Room,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput, props: { collection: 'messages' } } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: love.class.Office,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput, props: { collection: 'messages' } } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: love.class.MeetingMinutes,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput, props: { collection: 'messages' } } }
})
builder.mixin(love.class.MeetingMinutes, core.class.Class, activity.mixin.ActivityDoc, {})
@ -439,6 +472,10 @@ export function createModel (builder: Builder): void {
presenter: love.component.MeetingMinutesPresenter
})
builder.mixin(love.class.Room, core.class.Class, view.mixin.ObjectPresenter, {
presenter: love.component.RoomPresenter
})
builder.mixin(love.class.MeetingMinutes, core.class.Class, view.mixin.CollectionEditor, {
editor: love.component.MeetingMinutesSection
})
@ -467,10 +504,11 @@ export function createModel (builder: Builder): void {
descriptor: view.viewlet.Table,
config: [
'',
{ key: 'status', presenter: love.component.MeetingMinutesStatusPresenter, label: love.string.Status },
'createdOn',
'meetingEnd',
{ key: 'messages', displayProps: { key: 'messages', suffix: true } },
{ key: 'transcription', displayProps: { key: 'transcription', suffix: true } },
'modifiedOn',
'modifiedBy'
{ key: 'transcription', displayProps: { key: 'transcription', suffix: true } }
],
configOptions: {
hiddenKeys: ['description'],
@ -481,6 +519,26 @@ export function createModel (builder: Builder): void {
love.viewlet.TableMeetingMinutes
)
builder.createDoc(
view.class.Viewlet,
core.space.Model,
{
attachTo: love.class.MeetingMinutes,
descriptor: view.viewlet.Table,
config: [
'',
{ key: 'status', presenter: love.component.MeetingMinutesStatusPresenter, label: love.string.Status },
'createdOn',
'meetingEnd'
],
configOptions: {
sortable: true
},
variant: 'embedded'
},
love.viewlet.TableMeetingMinutesEmbedded
)
builder.createDoc(
view.class.ViewletDescriptor,
core.space.Model,
@ -574,4 +632,8 @@ export function createModel (builder: Builder): void {
indexes: [],
searchDisabled: true
})
builder.mixin(love.class.MeetingMinutes, core.class.Class, view.mixin.ObjectPanelFooter, {
editor: love.component.PanelControlBar
})
}

View File

@ -16,7 +16,16 @@
import contact from '@hcengineering/contact'
import { type Space, TxOperations, type Ref, makeCollaborativeDoc } from '@hcengineering/core'
import drive from '@hcengineering/drive'
import { RoomAccess, RoomType, createDefaultRooms, isOffice, loveId, type Floor, type Room } from '@hcengineering/love'
import {
MeetingStatus,
RoomAccess,
RoomType,
createDefaultRooms,
isOffice,
loveId,
type Floor,
type Room
} from '@hcengineering/love'
import {
createDefaultSpace,
migrateSpace,
@ -142,6 +151,16 @@ export const loveOperation: MigrateOperation = {
}
}
}
},
{
state: 'default-meeting-minutes-status',
func: async (client) => {
await client.update(
DOMAIN_MEETING_MINUTES,
{ status: { $exists: false } },
{ status: MeetingStatus.Finished }
)
}
}
])
},

View File

@ -159,7 +159,7 @@ function defineProduct (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: products.class.Product,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(products.class.Product, core.class.Class, view.mixin.ObjectEditor, {
@ -299,7 +299,7 @@ function defineProductVersion (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: products.class.ProductVersion,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(products.class.ProductVersion, core.class.Class, view.mixin.ObjectEditor, {

View File

@ -56,17 +56,17 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: recruit.class.Vacancy,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: recruit.class.Applicant,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: recruit.class.Review,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(recruit.class.Vacancy, core.class.Class, workbench.mixin.SpaceView, {

View File

@ -99,7 +99,7 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: survey.class.Survey,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc<Viewlet>(
@ -137,7 +137,7 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: survey.class.Poll,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(survey.class.Poll, core.class.Class, view.mixin.CollectionEditor, {

View File

@ -143,7 +143,7 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: testManagement.class.TestProject,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
defineTestSuite(builder)
@ -218,7 +218,7 @@ function defineTestSuite (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: testManagement.class.TestSuite,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(testManagement.class.TestSuite, core.class.Class, view.mixin.ObjectEditor, {
@ -283,7 +283,7 @@ function defineTestCase (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: testManagement.class.TestCase,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(testManagement.class.TestCase, core.class.Class, view.mixin.ObjectEditor, {
@ -388,7 +388,7 @@ function defineTestRun (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: testManagement.class.TestRun,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.mixin(testManagement.class.TestRun, core.class.Class, view.mixin.ObjectEditor, {

View File

@ -461,22 +461,22 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: tracker.class.Issue,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: tracker.class.Milestone,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: tracker.class.Component,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: tracker.class.IssueTemplate,
components: { input: chunter.component.ChatMessageInput }
components: { input: { component: chunter.component.ChatMessageInput } }
})
defineViewlets(builder)

View File

@ -67,6 +67,7 @@ import {
type ListItemPresenter,
type ObjectEditor,
type ObjectEditorFooter,
type ObjectPanelFooter,
type ObjectEditorHeader,
type ObjectFactory,
type ObjectPanel,
@ -216,6 +217,11 @@ export class TObjectEditorFooter extends TClass implements ObjectEditorFooter {
editor!: AnyComponent
}
@Mixin(view.mixin.ObjectPanelFooter, core.class.Class)
export class TObjectPanelFooter extends TClass implements ObjectPanelFooter {
editor!: AnyComponent
}
@Mixin(view.mixin.SpaceHeader, core.class.Class)
export class TSpaceHeader extends TClass implements SpaceHeader {
header!: AnyComponent
@ -445,6 +451,7 @@ export function createModel (builder: Builder): void {
TObjectTitle,
TObjectEditorHeader,
TObjectEditorFooter,
TObjectPanelFooter,
TSpaceHeader,
TSpaceName,
TSpacePresenter,

View File

@ -158,6 +158,11 @@
<svelte:fragment slot="pre-utils">
<slot name="pre-utils" />
</svelte:fragment>
<svelte:fragment slot="panel-footer">
<slot name="panel-footer" />
</svelte:fragment>
<svelte:fragment slot="utils">
{#if isUtils && $$slots.utils}
<slot name="utils" />

View File

@ -626,7 +626,7 @@ export async function getAttributeEditor (
function filterKeys (hierarchy: Hierarchy, keys: KeyedAttribute[], ignoreKeys: string[]): KeyedAttribute[] {
const docKeys: Set<string> = new Set<string>(hierarchy.getAllAttributes(core.class.AttachedDoc).keys())
keys = keys.filter((k) => !docKeys.has(k.key))
keys = keys.filter((k) => !docKeys.has(k.key) || k.attr.editor !== undefined)
keys = keys.filter((k) => !ignoreKeys.includes(k.key))
return keys
}

View File

@ -309,6 +309,11 @@
</div>
{/if}
</div>
{#if $$slots['panel-footer']}
<div class="popupPanel-footer">
<slot name="panel-footer" />
</div>
{/if}
<div class="popupPanel-pageHeader only-print" id="page-header">
<slot name="page-header" />
</div>

View File

@ -372,7 +372,8 @@ export function fitPopupElement (
newProps.right = '1px'
show = true
} else if (element === 'full-centered') {
newProps.top = '20px'
const rect = contentPanel !== undefined ? contentPanel.getBoundingClientRect() : { top: 0 }
newProps.top = `${Math.max(20, rect.top + 1)}px`
newProps.bottom = '20px'
newProps.left = '20px'
newProps.right = '20px'

View File

@ -24,5 +24,11 @@
</script>
{#if extension}
<Component is={extension.components[kind]} {props} on:close on:open on:submit />
<Component
is={extension.components[kind].component}
props={{ ...extension.components[kind].props, ...props }}
on:close
on:open
on:submit
/>
{/if}

View File

@ -30,7 +30,7 @@
$: attrViewletConfig = viewlet?.config?.[attributeModel.key]
$: attributeIcon = attrViewletConfig?.icon ?? attributeModel.icon ?? IconEdit
$: isUnset = values.length > 0 && !values.some((value) => value !== null && value !== '')
$: isUnset = values.length > 0 && !values.some((value) => value != null && value !== '')
$: isTextType = getIsTextType(attributeModel)
@ -42,7 +42,7 @@
</script>
{#if isUnset}
<div class="row overflow-label">
<div class="unset row overflow-label">
<span class="mr-1"><Icon icon={attributeIcon} size="small" /></span>
<Label label={activity.string.Unset} />
<span class="lower"><Label label={attributeModel.label} /></span>
@ -89,6 +89,7 @@
display: flex;
align-items: center;
gap: 0.25rem;
color: var(--global-primary-TextColor);
}
.showMore {

View File

@ -210,7 +210,7 @@ export type ActivityExtensionKind = 'input'
*/
export interface ActivityExtension extends Doc {
ofClass: Ref<Class<Doc>>
components: Record<ActivityExtensionKind, AnyComponent>
components: Record<ActivityExtensionKind, { component: AnyComponent, props?: Record<string, any> }>
}
/**

View File

@ -72,9 +72,6 @@
async function updateDataProvider (attachedTo: Ref<Doc>, selectedMessageId?: Ref<ActivityMessage>): Promise<void> {
if (dataProvider === undefined) {
// For now loading all messages for documents with activity. Need to correct handle aggregation with pagination.
// Perhaps we should load all activity messages once, and keep loading in chunks only for ChatMessages then merge them correctly with activity messages
const loadAll = isDocChannel
const ctx =
context ??
(await client.findOne(notification.class.DocNotifyContext, {
@ -90,7 +87,7 @@
attachedTo,
activity.class.ActivityMessage,
selectedMessageId,
loadAll,
false,
hasRefs,
collection
)
@ -112,7 +109,7 @@
provider={dataProvider}
{freeze}
{autofocus}
loadMoreAllowed={!isDocChannel}
loadMoreAllowed
{withInput}
{readonly}
{onReply}

View File

@ -68,9 +68,15 @@
"Transcription": "Transcription",
"StartWithTranscription": "Start with transcription",
"MeetingMinutes": "Meeting minutes",
"MeetingsMinutes": "Meetings minutes",
"StartMeeting": "Start meeting",
"Video": "Video",
"NoMeetingMinutes": "No meeting minutes",
"JoinMeeting": "Join meeting"
"JoinMeeting": "Join meeting",
"MeetingStart": "Meeting start",
"MeetingEnd": "Meeting end",
"Status": "Status",
"Active": "Active",
"Finished": "Finished"
}
}

View File

@ -68,9 +68,15 @@
"Transcription": "Transcripción",
"StartWithTranscription": "Iniciar con transcripción",
"MeetingMinutes": "Minutos de la reunión",
"MeetingsMinutes": "Minutos de las reuniones",
"StartMeeting": "Iniciar reunión",
"Video": "Video",
"NoMeetingMinutes": "Sin minutos de reunión",
"JoinMeeting": "Unirse a la reunión"
"JoinMeeting": "Unirse a la reunión",
"MeetingStart": "Inicio de la reunión",
"MeetingEnd": "Fin de la reunión",
"Status": "Estado",
"Active": "Activo",
"Finished": "Terminado"
}
}

View File

@ -68,9 +68,15 @@
"Transcription": "Transcription",
"StartWithTranscription": "Démarrer avec la transcription",
"MeetingMinutes": "Minutes de la réunion",
"MeetingsMinutes": "Minutes des réunions",
"StartMeeting": "Démarrer la réunion",
"Video": "Vidéo",
"NoMeetingMinutes": "Pas de minutes de réunion",
"JoinMeeting": "Rejoindre la réunion"
"JoinMeeting": "Rejoindre la réunion",
"MeetingStart": "Début de la réunion",
"MeetingEnd": "Fin de la réunion",
"Status": "Statut",
"Active": "Actif",
"Finished": "Terminé"
}
}

View File

@ -68,9 +68,15 @@
"Transcription": "Trascrizione",
"StartWithTranscription": "Inizia con la trascrizione",
"MeetingMinutes": "Verbale della riunione",
"MeetingsMinutes": "Verbali delle riunioni",
"StartMeeting": "Inizia riunione",
"Video": "Video",
"NoMeetingMinutes": "Nessun verbale della riunione",
"JoinMeeting": "Unisciti alla riunione"
"JoinMeeting": "Unisciti alla riunione",
"MeetingStart": "Inizio riunione",
"MeetingEnd": "Fine riunione",
"Status": "Stato",
"Active": "Attivo",
"Finished": "Finito"
}
}

View File

@ -68,9 +68,15 @@
"Transcription": "Transcrição",
"StartWithTranscription": "Começar com transcrição",
"MeetingMinutes": "Minutos da reunião",
"MeetingsMinutes": "Minutos das reuniões",
"StartMeeting": "Iniciar reunião",
"Video": "Vídeo",
"NoMeetingMinutes": "Sem minutos de reunião",
"JoinMeeting": "Participar na reunião"
"JoinMeeting": "Participar na reunião",
"MeetingStart": "Início da reunião",
"MeetingEnd": "Fim da reunião",
"Status": "Estado",
"Active": "Ativo",
"Finished": "Finalizado"
}
}

View File

@ -67,10 +67,16 @@
"Meeting": "Встреча",
"Transcription": "Транскрипция",
"StartWithTranscription": "Начинать с транскрипцией",
"MeetingMinutes": "Результаты встреч",
"MeetingMinutes": "Протокол встречи",
"MeetingsMinutes": "Протоколы встреч",
"StartMeeting": "Начать встречу",
"Video": "Видео",
"NoMeetingMinutes": "Нет результатов встреч",
"JoinMeeting": "Присоединиться к встрече"
"JoinMeeting": "Присоединиться к встрече",
"MeetingStart": "Начало встречи",
"MeetingEnd": "Конец встречи",
"Status": "Статус",
"Active": "Активно",
"Finished": "Завершено"
}
}

View File

@ -68,9 +68,15 @@
"Transcription": "转录",
"StartWithTranscription": "开始转录",
"MeetingMinutes": "会议记录",
"MeetingsMinutes": "会议记录",
"StartMeeting": "开始会议",
"Video": "视频",
"NoMeetingMinutes": "无会议记录",
"JoinMeeting": "加入会议"
"JoinMeeting": "加入会议",
"MeetingStart": "会议开始",
"MeetingEnd": "会议结束",
"Status": "状态",
"Active": "活动",
"Finished": "已完成"
}
}

View File

@ -1,90 +0,0 @@
<!--
// Copyright © 2024 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import { personByIdStore } from '@hcengineering/contact-resources'
import { Room as TypeRoom } from '@hcengineering/love'
import { getMetadata } from '@hcengineering/platform'
import { Label, Loading, deviceOptionsStore as deviceInfo } from '@hcengineering/ui'
import { onDestroy, onMount } from 'svelte'
import presentation, { getClient } from '@hcengineering/presentation'
import { EditDoc } from '@hcengineering/view-resources'
import { subscribeDoc } from '@hcengineering/notification-resources'
import love from '../plugin'
import { storePromise, currentRoom, infos, invites, myInfo, myRequests, meetingMinutesStore } from '../stores'
import { awaitConnect, isConnected, isCurrentInstanceConnected, isFullScreen, tryConnect } from '../utils'
import ControlBar from './ControlBar.svelte'
export let room: TypeRoom
let loading: boolean = false
let configured: boolean = false
onMount(async () => {
loading = true
const wsURL = getMetadata(love.metadata.WebSocketURL)
if (wsURL === undefined) {
return
}
configured = true
await $storePromise
if (
!$isConnected &&
!$isCurrentInstanceConnected &&
$myInfo?.sessionId === getMetadata(presentation.metadata.SessionId)
) {
const info = $infos.filter((p) => p.room === room._id)
await tryConnect($personByIdStore, $myInfo, room, info, $myRequests, $invites)
}
await awaitConnect()
loading = false
})
let replacedPanel: HTMLElement
$: $deviceInfo.replacedPanel = replacedPanel
onDestroy(() => ($deviceInfo.replacedPanel = undefined))
$: if ($meetingMinutesStore) {
void subscribeDoc(getClient(), $meetingMinutesStore._class, $meetingMinutesStore._id, 'add', $meetingMinutesStore)
}
</script>
<div class="antiPanel-component filledNav" bind:this={replacedPanel}>
<div class="hulyComponent">
{#if $isConnected && !$isCurrentInstanceConnected}
<div class="flex-center justify-center error h-full w-full clear-mins">
<Label label={love.string.AnotherWindowError} />
</div>
{:else if !configured}
<div class="flex-center justify-center error h-full w-full clear-mins">
<Label label={love.string.ServiceNotConfigured} />
</div>
{:else if loading || !$currentRoom || !$meetingMinutesStore}
<Loading />
{:else}
<EditDoc _id={$meetingMinutesStore._id} _class={$meetingMinutesStore._class} embedded selectedAside={false} />
{/if}
{#if $currentRoom}
<div class="flex-grow flex-shrink" />
<ControlBar room={$currentRoom} fullScreen={$isFullScreen} />
{/if}
</div>
</div>

View File

@ -29,7 +29,8 @@
type CompAndProps,
IconMoreV,
ButtonMenu,
DropdownIntlItem
DropdownIntlItem,
IconMaximize
} from '@hcengineering/ui'
import view, { Action } from '@hcengineering/view'
import { getActions } from '@hcengineering/view-resources'
@ -60,8 +61,10 @@
import RoomAccessPopup from './RoomAccessPopup.svelte'
import RoomLanguageSelector from './RoomLanguageSelector.svelte'
import ControlBarContainer from './ControlBarContainer.svelte'
import RoomModal from './RoomModal.svelte'
export let room: Room
export let canMaximize: boolean = true
export let fullScreen: boolean = false
export let onFullScreen: (() => void) | undefined = undefined
@ -159,6 +162,10 @@
await fn(room)
}
$: withVideo = $screenSharing || room.type === RoomType.Video
function maximize (): void {
showPopup(RoomModal, { room }, 'full-centered')
}
</script>
<ControlBarContainer bind:noLabel>
@ -253,6 +260,20 @@
}}
/>
{/if}
{#if ($screenSharing || room.type === RoomType.Video) && $isConnected && canMaximize}
<ModernButton
icon={IconMaximize}
tooltip={{
label: love.string.FullscreenMode,
direction: 'top'
}}
kind={'secondary'}
iconSize="medium"
size={'large'}
on:click={maximize}
/>
{/if}
{#if $isConnected && moreItems.length > 0}
<ButtonMenu
items={moreItems}

View File

@ -16,6 +16,7 @@
import { getClient } from '@hcengineering/presentation'
import { EditBox } from '@hcengineering/ui'
import { MeetingMinutes } from '@hcengineering/love'
import { createEventDispatcher, onMount } from 'svelte'
import love from '../plugin'
@ -23,10 +24,15 @@
export let readonly: boolean = false
const client = getClient()
const dispatch = createEventDispatcher()
async function changeTitle (): Promise<void> {
await client.diffUpdate(object, { title: object.title })
await client.update(object, { title: object.title })
}
onMount(() => {
dispatch('open', { ignoreKeys: ['title'] })
})
</script>
<div class="flex-row-stretch">

View File

@ -14,7 +14,7 @@
-->
<script lang="ts">
import { getClient } from '@hcengineering/presentation'
import { EditBox, ModernButton, closePanel } from '@hcengineering/ui'
import { EditBox, ModernButton } from '@hcengineering/ui'
import { Room, isOffice } from '@hcengineering/love'
import { createEventDispatcher, onMount } from 'svelte'
import { personByIdStore } from '@hcengineering/contact-resources'
@ -22,7 +22,7 @@
import love from '../plugin'
import { getRoomName, tryConnect } from '../utils'
import { infos, invites, myInfo, myRequests, selectedRoomPlace } from '../stores'
import { infos, invites, myInfo, myRequests, selectedRoomPlace, myOffice, currentRoom } from '../stores'
export let object: Room
export let readonly: boolean = false
@ -59,8 +59,6 @@
)
connecting = false
selectedRoomPlace.set(undefined)
closePanel()
dispatch('close')
}
let connectLabel: IntlString = love.string.StartMeeting
@ -83,7 +81,9 @@
focusIndex={1}
/>
</div>
<ModernButton label={connectLabel} size="large" kind={'primary'} on:click={connect} loading={connecting} />
{#if object._id !== $myOffice?._id && ($currentRoom?._id !== object._id || connecting)}
<ModernButton label={connectLabel} size="large" kind={'primary'} on:click={connect} loading={connecting} />
{/if}
</div>
</div>

View File

@ -14,12 +14,15 @@
-->
<script lang="ts">
import { deviceOptionsStore as deviceInfo } from '@hcengineering/ui'
import { onDestroy } from 'svelte'
import { onDestroy, onMount } from 'svelte'
import presentation from '@hcengineering/presentation'
import { personByIdStore } from '@hcengineering/contact-resources'
import Hall from './Hall.svelte'
import { currentRoom } from '../stores'
import { isConnected } from '../utils'
import ActiveMeeting from './ActiveMeeting.svelte'
import { getMetadata } from '@hcengineering/platform'
import love from '../plugin'
import { tryConnect, isConnected, isCurrentInstanceConnected } from '../utils'
import { infos, invites, myInfo, myRequests, storePromise, currentRoom } from '../stores'
const localNav: boolean = $deviceInfo.navigator.visible
const savedNav = localStorage.getItem('love-visibleNav')
@ -29,12 +32,30 @@
onDestroy(() => {
$deviceInfo.navigator.visible = localNav
})
onMount(async () => {
const wsURL = getMetadata(love.metadata.WebSocketURL)
if (wsURL === undefined) {
return
}
await $storePromise
const room = $currentRoom
if (room === undefined) return
if (
!$isConnected &&
!$isCurrentInstanceConnected &&
$myInfo?.sessionId === getMetadata(presentation.metadata.SessionId)
) {
const info = $infos.filter((p) => p.room === room._id)
await tryConnect($personByIdStore, $myInfo, room, info, $myRequests, $invites)
}
})
</script>
<div class="hulyPanels-container">
{#if $currentRoom && $isConnected}
<ActiveMeeting room={$currentRoom} />
{:else}
<Hall />
{/if}
<Hall />
</div>

View File

@ -0,0 +1,54 @@
<!--
// Copyright © 2024 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import { MeetingMinutes } from '@hcengineering/love'
import { ObjectPresenter, openDoc } from '@hcengineering/view-resources'
import view from '@hcengineering/view'
import { ActionIcon } from '@hcengineering/ui'
import { createQuery, getClient } from '@hcengineering/presentation'
import type { Doc } from '@hcengineering/core'
export let object: MeetingMinutes
const client = getClient()
const docQuery = createQuery()
let doc: Doc | undefined
$: docQuery.query(object.attachedToClass, { _id: object.attachedTo }, (r) => {
doc = r.shift()
})
</script>
{#if doc}
<span class="label flex-row-center flex-gap-4 ml-3 no-word-wrap">
<ObjectPresenter
objectId={doc._id}
_class={doc._class}
value={doc}
shouldShowAvatar={false}
disabled
props={{ type: 'text' }}
/>
<ActionIcon
icon={view.icon.Open}
size={'small'}
action={async () => {
if (doc === undefined) return
await openDoc(client.getHierarchy(), doc)
}}
/>
</span>
{/if}

View File

@ -15,24 +15,43 @@
<script lang="ts">
import type { Class, Doc, Ref, Space } from '@hcengineering/core'
import { Label, Section } from '@hcengineering/ui'
import { Table } from '@hcengineering/view-resources'
import love from '@hcengineering/love'
import { Table, ViewletsSettingButton } from '@hcengineering/view-resources'
import { Viewlet, ViewletPreference } from '@hcengineering/view'
import love from '../plugin'
export let objectId: Ref<Doc>
export let space: Ref<Space>
export let _class: Ref<Class<Doc>>
export let readonly: boolean = false
export let meetings: number
let viewlet: Viewlet | undefined
let preference: ViewletPreference | undefined
let loading = true
</script>
<Section label={love.string.MeetingMinutes} icon={love.icon.Cam}>
<svelte:fragment slot="header">
<div class="flex-row-center gap-2 reverse">
<ViewletsSettingButton
viewletQuery={{ _id: love.viewlet.TableMeetingMinutesEmbedded }}
kind={'tertiary'}
bind:viewlet
bind:loading
bind:preference
/>
</div>
</svelte:fragment>
<svelte:fragment slot="content">
{#if meetings > 0}
{#if meetings > 0 && viewlet}
<Table
_class={love.class.MeetingMinutes}
config={['', 'transcription', 'messages']}
config={preference?.config ?? viewlet.config}
query={{ attachedTo: objectId }}
loadingProps={{ length: meetings }}
prefferedSorting="createdOn"
{readonly}
/>
{:else}

View File

@ -0,0 +1,46 @@
<!--
// Copyright © 2024 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import { MeetingMinutes, MeetingStatus } from '@hcengineering/love'
import { StateType, StateTag } from '@hcengineering/ui'
import love from '../plugin'
export let object: MeetingMinutes | undefined
export let value: MeetingStatus | undefined
export let attributeKey: string | undefined
const displayData = {
[MeetingStatus.Active]: {
label: love.string.Active,
type: StateType.Positive
},
[MeetingStatus.Finished]: {
label: love.string.Finished,
type: StateType.Regular
}
}
let status: MeetingStatus | undefined
$: status = value ?? object?.status
$: data = status !== undefined ? displayData[status] : undefined
</script>
{#if data}
<span class="flex-row-center" class:ml-3={attributeKey !== undefined}>
<StateTag type={data.type} label={data.label} />
</span>
{/if}

View File

@ -51,7 +51,8 @@
viewlet,
viewOptions,
viewOptionsConfig: viewlet.viewOptions?.other,
enableChecking: false
enableChecking: false,
prefferedSorting: 'createdOn'
}}
/>
{/if}

View File

@ -0,0 +1,29 @@
<!--
// Copyright © 2024 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import { MeetingMinutes } from '@hcengineering/love'
import ControlBar from './ControlBar.svelte'
import { currentRoom, currentMeetingMinutes } from '../stores'
export let object: MeetingMinutes
</script>
{#if $currentRoom && $currentMeetingMinutes?._id === object._id}
<div class="flex-grow flex-shrink">
<ControlBar room={$currentRoom} />
</div>
{/if}

View File

@ -50,6 +50,7 @@
import ParticipantView from './ParticipantView.svelte'
export let withVideo: boolean
export let canMaximize: boolean = true
export let room: TypeRoom
interface ParticipantData {
@ -432,7 +433,7 @@
{/if}
</div>
{#if $currentRoom}
<ControlBar room={$currentRoom} fullScreen={$isFullScreen} {onFullScreen} />
<ControlBar room={$currentRoom} fullScreen={$isFullScreen} {onFullScreen} {canMaximize} />
{/if}
</div>

View File

@ -38,6 +38,6 @@
padding="0"
on:close={() => dispatch('close')}
>
<RoomComponent withVideo={$currentRoom.type === RoomType.Video} room={$currentRoom} />
<RoomComponent withVideo={$currentRoom.type === RoomType.Video} room={$currentRoom} canMaximize={false} />
</Modal>
{/if}

View File

@ -15,7 +15,7 @@
<script lang="ts">
import { Person, PersonAccount } from '@hcengineering/contact'
import { personByIdStore, UserInfo } from '@hcengineering/contact-resources'
import { IdMap, getCurrentAccount } from '@hcengineering/core'
import { IdMap, getCurrentAccount, Ref, Class, Doc } from '@hcengineering/core'
import ui, {
ModernButton,
SplitButton,
@ -23,12 +23,12 @@
IconUpOutline,
Label,
eventToHTMLElement,
getCurrentLocation,
Location,
location,
navigate,
showPopup,
Scroller,
closePanel
panelstore
} from '@hcengineering/ui'
import {
ParticipantInfo,
@ -37,11 +37,14 @@
isOffice,
loveId,
roomAccessIcon,
roomAccessLabel
roomAccessLabel,
MeetingMinutes
} from '@hcengineering/love'
import { createEventDispatcher } from 'svelte'
import { getObjectLinkFragment } from '@hcengineering/view-resources'
import { getClient } from '@hcengineering/presentation'
import love from '../plugin'
import { currentRoom, infos, invites, myInfo, myOffice, myRequests } from '../stores'
import { currentRoom, infos, invites, myInfo, myOffice, myRequests, currentMeetingMinutes } from '../stores'
import {
getRoomName,
isCameraEnabled,
@ -58,9 +61,11 @@
import CamSettingPopup from './CamSettingPopup.svelte'
import MicSettingPopup from './MicSettingPopup.svelte'
import RoomAccessPopup from './RoomAccessPopup.svelte'
import view from '@hcengineering/view'
export let room: Room
const client = getClient()
function getPerson (info: ParticipantInfo | undefined, employees: IdMap<Person>): Person | undefined {
if (info !== undefined) {
return employees.get(info.person)
@ -104,12 +109,20 @@
dispatch('close')
}
function back (): void {
closePanel()
const loc = getCurrentLocation()
loc.path[2] = loveId
loc.path.length = 3
navigate(loc)
async function back (): Promise<void> {
const meetingMinutes = $currentMeetingMinutes
if (meetingMinutes !== undefined) {
const hierarchy = client.getHierarchy()
const panelComponent = hierarchy.classHierarchyMixin(
meetingMinutes._class as Ref<Class<Doc>>,
view.mixin.ObjectPanel
)
const comp = panelComponent?.component ?? view.component.EditDoc
const loc = await getObjectLinkFragment(hierarchy, meetingMinutes, {}, comp)
loc.path[2] = loveId
loc.path.length = 3
navigate(loc)
}
}
function micSettings (e: MouseEvent): void {
@ -129,6 +142,16 @@
}
const me = (getCurrentAccount() as PersonAccount).person
function canGoBack (joined: boolean, location: Location, meetingMinutes?: MeetingMinutes): boolean {
if (!joined) return false
if (location.path[2] !== loveId) return true
if (meetingMinutes === undefined) return false
const panel = $panelstore.panel
const { _id } = panel ?? {}
return _id !== meetingMinutes._id
}
</script>
<div class="antiPopup room-popup">
@ -215,7 +238,7 @@
on:click={connect}
/>
{/if}
{#if $location.path[2] !== loveId}
{#if canGoBack(joined, $location, $currentMeetingMinutes)}
<ModernButton icon={IconArrowLeft} label={ui.string.Back} kind={'secondary'} size={'large'} on:click={back} />
{/if}
</div>

View File

@ -0,0 +1,53 @@
<!--
// Copyright © 2024 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import love, { Room } from '@hcengineering/love'
import { WithLookup } from '@hcengineering/core'
import { ObjectPresenterType } from '@hcengineering/view'
import { getEmbeddedLabel } from '@hcengineering/platform'
import { DocNavLink, ObjectMention } from '@hcengineering/view-resources'
import { tooltip, Icon } from '@hcengineering/ui'
export let value: WithLookup<Room>
export let inline: boolean = false
export let disabled: boolean = false
export let accent: boolean = false
export let noUnderline: boolean = false
export let shouldShowAvatar = true
export let type: ObjectPresenterType = 'link'
</script>
{#if value}
{#if inline}
<ObjectMention object={value} {disabled} {accent} {noUnderline} />
{:else if type === 'link'}
<DocNavLink object={value} {disabled} {accent} {noUnderline}>
<div class="flex-presenter" use:tooltip={{ label: getEmbeddedLabel(value.name) }}>
{#if shouldShowAvatar}
<div class="icon">
<Icon icon={love.icon.Love} size={'small'} />
</div>
{/if}
<div class="label nowrap flex flex-gap-2" class:no-underline={noUnderline || disabled} class:fs-bold={accent}>
<span>{value.name}</span>
</div>
</div>
</DocNavLink>
{:else if type === 'text'}
<span class="overflow-label" use:tooltip={{ label: getEmbeddedLabel(value.name) }}>
{value.name}
</span>
{/if}
{/if}

View File

@ -24,7 +24,7 @@
import { get } from 'svelte/store'
import love from '../plugin'
import { myInfo, selectedRoomPlace, currentRoom, meetingMinutesStore } from '../stores'
import { myInfo, selectedRoomPlace, currentRoom, currentMeetingMinutes } from '../stores'
import { getRoomLabel, lk } from '../utils'
import PersonActionPopup from './PersonActionPopup.svelte'
import RoomLanguage from './RoomLanguage.svelte'
@ -64,23 +64,32 @@
hovered = false
}
async function clickHandler (e: MouseEvent, x: number, y: number, person: Person | undefined): Promise<void> {
async function openRoom (x: number, y: number): Promise<void> {
const client = getClient()
const hierarchy = client.getHierarchy()
if ($currentRoom?._id === room._id) {
const sid = await lk.getSid()
const meetingMinutes =
get(currentMeetingMinutes) ?? (await client.findOne(love.class.MeetingMinutes, { sid, attachedTo: room._id }))
if (meetingMinutes === undefined) {
await openDoc(hierarchy, room)
} else {
await openDoc(hierarchy, meetingMinutes)
}
} else {
selectedRoomPlace.set({ _id: room._id, x, y })
await openDoc(hierarchy, room)
}
}
async function placeClickHandler (e: MouseEvent, x: number, y: number, person: Person | undefined): Promise<void> {
e.stopPropagation()
e.preventDefault()
if (person !== undefined) {
if (room._id === $myInfo?.room || $myInfo === undefined) return
showPopup(PersonActionPopup, { room, person: person._id }, eventToHTMLElement(e))
} else {
const client = getClient()
const hierarchy = client.getHierarchy()
if ($currentRoom?._id === room._id) {
const sid = await lk.getSid()
const meetingMinutes =
get(meetingMinutesStore) ?? (await client.findOne(love.class.MeetingMinutes, { sid, attachedTo: room._id }))
if (meetingMinutes === undefined) return
await openDoc(hierarchy, meetingMinutes)
} else {
selectedRoomPlace.set({ _id: room._id, x, y })
await openDoc(hierarchy, room)
}
await openRoom(x, y)
}
}
@ -121,6 +130,10 @@
}
return init
}
async function handleClick (): Promise<void> {
await openRoom(0, 0)
}
</script>
<!-- svelte-ignore a11y-no-static-element-interactions -->
@ -141,6 +154,7 @@
on:mouseover|stopPropagation
on:mouseenter|stopPropagation={mouseEnter}
on:mouseleave|stopPropagation={mouseLeave}
on:click|stopPropagation={handleClick}
>
{#each new Array(room.height) as _, y}
{#each new Array(room.width + extraRow) as _, x}
@ -162,7 +176,7 @@
hoveredRoomY = undefined
}}
on:click={(e) => {
clickHandler(e, x, y, person)
placeClickHandler(e, x, y, person)
}}
>
{#if personInfo}

View File

@ -21,7 +21,7 @@
import love from '../../plugin'
import VideoTab from './VideoTab.svelte'
import { isCurrentInstanceConnected, lk } from '../../utils'
import { currentRoom, meetingMinutesStore } from '../../stores'
import { currentRoom, currentMeetingMinutes } from '../../stores'
import ChatTab from './ChatTab.svelte'
import TranscriptionTab from './TranscriptionTab.svelte'
@ -60,7 +60,9 @@
$: if (sid != null && room !== undefined) {
meetingQuery.query(love.class.MeetingMinutes, { sid, attachedTo: room._id }, async (res) => {
meetingMinutes = res[0]
meetingMinutesStore.set(meetingMinutes)
if (meetingMinutes) {
currentMeetingMinutes.set(meetingMinutes)
}
isMeetingMinutesLoaded = true
})
} else {

View File

@ -18,6 +18,10 @@ import EditRoom from './components/EditRoom.svelte'
import FloorAttributePresenter from './components/FloorAttributePresenter.svelte'
import FloorView from './components/FloorView.svelte'
import MeetingMinutesTable from './components/MeetingMinutesTable.svelte'
import PanelControlBar from './components/PanelControlBar.svelte'
import RoomPresenter from './components/RoomPresenter.svelte'
import MeetingMinutesDocEditor from './components/MeetingMinutesDocEditor.svelte'
import MeetingMinutesStatusPresenter from './components/MeetingMinutesStatusPresenter.svelte'
import {
copyGuestLink,
@ -49,7 +53,11 @@ export default async (): Promise<Resources> => ({
EditRoom,
FloorAttributePresenter,
FloorView,
MeetingMinutesTable
MeetingMinutesTable,
PanelControlBar,
RoomPresenter,
MeetingMinutesDocEditor,
MeetingMinutesStatusPresenter
},
function: {
CreateMeeting: createMeeting,

View File

@ -25,12 +25,16 @@ export default mergeIds(loveId, love, {
MeetingData: '' as AnyComponent,
EditMeetingData: '' as AnyComponent,
MeetingMinutesPresenter: '' as AnyComponent,
RoomPresenter: '' as AnyComponent,
MeetingMinutesSection: '' as AnyComponent,
EditMeetingMinutes: '' as AnyComponent,
EditRoom: '' as AnyComponent,
FloorAttributePresenter: '' as AnyComponent,
MeetingMinutesTable: '' as AnyComponent,
FloorView: '' as AnyComponent
FloorView: '' as AnyComponent,
PanelControlBar: '' as AnyComponent,
MeetingMinutesDocEditor: '' as AnyComponent,
MeetingMinutesStatusPresenter: '' as AnyComponent
},
function: {
CreateMeeting: '' as Resource<DocCreateFunction>,

View File

@ -60,7 +60,7 @@ export const activeInvites = derived(invites, (val) => {
export const myPreferences = writable<DevicesPreference | undefined>()
export let $myPreferences: DevicesPreference | undefined
export const meetingMinutesStore = writable<MeetingMinutes | undefined>(undefined)
export const currentMeetingMinutes = writable<MeetingMinutes | undefined>(undefined)
export const selectedRoomPlace = writable<{ _id: Ref<Room>, x: number, y: number } | undefined>(undefined)
function filterParticipantInfo (value: ParticipantInfo[]): ParticipantInfo[] {

View File

@ -30,7 +30,8 @@ import {
RoomType,
TranscriptionStatus,
type RoomMetadata,
type MeetingMinutes
type MeetingMinutes,
MeetingStatus
} from '@hcengineering/love'
import { getEmbeddedLabel, getMetadata, getResource, type IntlString } from '@hcengineering/platform'
import presentation, {
@ -39,7 +40,14 @@ import presentation, {
type DocCreatePhase,
getClient
} from '@hcengineering/presentation'
import { type DropdownTextItem, getCurrentLocation, navigate, showPopup } from '@hcengineering/ui'
import {
type DropdownTextItem,
getCurrentLocation,
navigate,
showPopup,
panelstore,
closePanel
} from '@hcengineering/ui'
import { isKrispNoiseFilterSupported, KrispNoiseFilter } from '@livekit/krisp-noise-filter'
import { BackgroundBlur, type BackgroundOptions, type ProcessorWrapper } from '@livekit/track-processors'
import {
@ -70,10 +78,11 @@ import {
import { type Widget, type WidgetTab } from '@hcengineering/workbench'
import view from '@hcengineering/view'
import chunter from '@hcengineering/chunter'
import { openDoc } from '@hcengineering/view-resources'
import { sendMessage } from './broadcast'
import love from './plugin'
import { $myPreferences, meetingMinutesStore, currentRoom } from './stores'
import { $myPreferences, currentRoom, currentMeetingMinutes, selectedRoomPlace } from './stores'
import RoomSettingsPopup from './components/RoomSettingsPopup.svelte'
export const selectedCamId = 'selectedDevice_cam'
@ -444,7 +453,6 @@ export async function disconnect (): Promise<void> {
isMicEnabled.set(false)
isCameraEnabled.set(false)
isSharingEnabled.set(false)
meetingMinutesStore.set(undefined)
sendMessage({ type: 'mic', value: false })
sendMessage({ type: 'cam', value: false })
sendMessage({ type: 'share', value: false })
@ -463,6 +471,22 @@ export async function leaveRoom (ownInfo: ParticipantInfo | undefined, ownOffice
}
}
await disconnect()
closeMeetingMinutes()
}
function closeMeetingMinutes (): void {
const loc = getCurrentLocation()
if (loc.path[2] === loveId) {
const meetingMinutes = get(currentMeetingMinutes)
const panel = get(panelstore).panel
const { _id } = panel ?? {}
if (_id !== undefined && meetingMinutes !== undefined && _id === meetingMinutes._id) {
closePanel()
}
}
currentMeetingMinutes.set(undefined)
}
export async function setCam (value: boolean): Promise<void> {
@ -593,7 +617,7 @@ async function connectLK (currentPerson: Person, room: Room): Promise<void> {
])
}
async function createMeetingMinutes (room: Room): Promise<void> {
async function openMeetingMinutes (room: Room): Promise<void> {
const client = getClient()
const sid = await lk.getSid()
@ -601,7 +625,17 @@ async function createMeetingMinutes (room: Room): Promise<void> {
const doc = await client.findOne(love.class.MeetingMinutes, { sid })
if (doc === undefined) {
const dateStr = new Date().toISOString().replace('T', ' ').slice(0, 19)
const date = new Date()
.toLocaleDateString('en-GB', {
day: 'numeric',
month: 'long',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
hour12: false,
timeZone: 'UTC'
})
.replace(',', ' at')
const _id = generateId<MeetingMinutes>()
const newDoc: MeetingMinutes = {
_id,
@ -611,24 +645,35 @@ async function createMeetingMinutes (room: Room): Promise<void> {
attachedToClass: room._class,
collection: 'meetings',
space: core.space.Workspace,
title: room.name + ' ' + dateStr,
title: `${room.name} ${date}`,
description: makeCollaborativeDoc(_id, 'description'),
status: MeetingStatus.Active,
modifiedBy: getCurrentAccount()._id,
modifiedOn: Date.now()
}
await client.addCollection(
love.class.MeetingMinutes,
core.space.Workspace,
room._id,
room._class,
'meetings',
{ sid, title: newDoc.title, description: newDoc.description },
{ sid, title: newDoc.title, description: newDoc.description, status: newDoc.status },
_id
)
meetingMinutesStore.set(newDoc)
currentMeetingMinutes.set(newDoc)
const loc = getCurrentLocation()
if (loc.path[2] === loveId) {
await openDoc(client.getHierarchy(), newDoc)
}
} else {
meetingMinutesStore.set(doc)
currentMeetingMinutes.set(doc)
const loc = getCurrentLocation()
if (loc.path[2] === loveId) {
await openDoc(client.getHierarchy(), doc)
}
if (doc.status !== MeetingStatus.Active) {
void client.update(doc, { status: MeetingStatus.Active, meetingEnd: undefined })
}
}
}
}
@ -643,7 +688,8 @@ export async function connectRoom (
await disconnect()
await moveToRoom(x, y, currentInfo, currentPerson, room, getMetadata(presentation.metadata.SessionId) ?? null)
await connectLK(currentPerson, room)
await createMeetingMinutes(room)
selectedRoomPlace.set(undefined)
await openMeetingMinutes(room)
}
export const joinRequest: Ref<JoinRequest> | undefined = undefined

View File

@ -1,6 +1,6 @@
import { Event } from '@hcengineering/calendar'
import { Person } from '@hcengineering/contact'
import { AttachedDoc, Class, CollaborativeDoc, Doc, Mixin, Ref } from '@hcengineering/core'
import { AttachedDoc, Class, CollaborativeDoc, Doc, Mixin, Ref, Timestamp } from '@hcengineering/core'
import { Drive } from '@hcengineering/drive'
import { NotificationType } from '@hcengineering/notification'
import { Asset, IntlString, Metadata, Plugin, plugin } from '@hcengineering/platform'
@ -105,6 +105,7 @@ export interface Room extends Doc {
description: CollaborativeDoc
attachments?: number
meetings?: number
messages?: number
}
export interface Office extends Room {
@ -158,12 +159,22 @@ export interface DevicesPreference extends Preference {
camEnabled: boolean
}
export enum MeetingStatus {
Active,
Finished
}
export interface MeetingMinutes extends AttachedDoc {
sid: string
title: string
description: CollaborativeDoc
status: MeetingStatus
meetingEnd?: Timestamp
transcription?: number
messages?: number
description: CollaborativeDoc
attachments?: number
}
@ -205,10 +216,16 @@ const love = plugin(loveId, {
Transcription: '' as IntlString,
StartWithTranscription: '' as IntlString,
MeetingMinutes: '' as IntlString,
MeetingsMinutes: '' as IntlString,
StartMeeting: '' as IntlString,
Video: '' as IntlString,
NoMeetingMinutes: '' as IntlString,
JoinMeeting: '' as IntlString
JoinMeeting: '' as IntlString,
MeetingStart: '' as IntlString,
MeetingEnd: '' as IntlString,
Status: '' as IntlString,
Active: '' as IntlString,
Finished: '' as IntlString
},
ids: {
MainFloor: '' as Ref<Floor>,
@ -254,6 +271,7 @@ const love = plugin(loveId, {
},
viewlet: {
TableMeetingMinutes: '' as Ref<Viewlet>,
TableMeetingMinutesEmbedded: '' as Ref<Viewlet>,
MeetingMinutesDescriptor: '' as Ref<ViewletDescriptor>,
FloorDescriptor: '' as Ref<ViewletDescriptor>,
Floor: '' as Ref<Viewlet>,

View File

@ -20,7 +20,7 @@
import { Component, showPanel } from '@hcengineering/ui'
import view from '@hcengineering/view'
import time from '../plugin'
import { getObjectLinkId } from '@hcengineering/view-resources'
import { DocReferencePresenter, getObjectLinkId } from '@hcengineering/view-resources'
export let todo: ToDo
export let kind: 'default' | 'todo-line' = 'default'
@ -50,16 +50,22 @@
}
</script>
{#if presenter?.presenter && doc}
{#if kind === 'default'}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="cursor-pointer clear-mins" on:click={click}>
<Component is={presenter.presenter} props={{ value: doc, withoutSpace }} />
</div>
{#if doc}
{#if presenter?.presenter}
{#if kind === 'default'}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="cursor-pointer clear-mins" on:click={click}>
<Component is={presenter.presenter} props={{ value: doc, withoutSpace }} />
</div>
{:else}
<Component is={presenter.presenter} props={{ value: doc, withoutSpace }} on:click={click}>
<slot />
</Component>
{/if}
{:else}
<Component is={presenter.presenter} props={{ value: doc, withoutSpace }} on:click={click}>
<DocReferencePresenter value={doc} on:click={click}>
<slot />
</Component>
</DocReferencePresenter>
{/if}
{/if}

View File

@ -155,9 +155,24 @@
return undefined
}
function getPanelFooter (
_class: Ref<Class<Doc>>,
object?: Doc
): { footer: AnyComponent, props?: Record<string, any> } | undefined {
if (object !== undefined) {
const footer = hierarchy.findClassOrMixinMixin(object, view.mixin.ObjectPanelFooter)
if (footer !== undefined) {
return { footer: footer.editor, props: footer.props }
}
}
return undefined
}
let mainEditor: MixinEditor | undefined
$: editorFooter = getEditorFooter(_class, object)
$: panelFooter = getPanelFooter(_class, object)
const getEditorOrDefault = reduceCalls(async function (_class: Ref<Class<Doc>>, _id?: Ref<Doc>): Promise<void> {
if (objectId === undefined) return
@ -341,5 +356,11 @@
<Component is={editorFooter.footer} props={{ object, _class, ...editorFooter.props, readonly }} />
</div>
{/if}
<svelte:fragment slot="panel-footer">
{#if panelFooter}
<Component is={panelFooter.footer} props={{ object, _class, ...panelFooter.props, readonly }} />
{/if}
</svelte:fragment>
</Panel>
{/if}

View File

@ -33,6 +33,7 @@
export let enableChecking = true
export let tableId: string | undefined = undefined
export let fade: FadeOptions = tableSP
export let prefferedSorting: string = 'modifiedOn'
// If defined, will show a number of dummy items before real data will appear.
export let loadingProps: LoadingProps | undefined = undefined
@ -55,11 +56,9 @@
// Search config
const _config = config
let prefferedSorting: string = 'modifiedOn'
function updateConfig (config: Array<BuildModelKey | string>, search?: string): void {
const useSearch = search !== '' && search != null
prefferedSorting = !useSearch ? 'modifiedOn' : '#score'
prefferedSorting = !useSearch ? prefferedSorting : '#score'
}
$: updateConfig(config, query.$search)

View File

@ -27,7 +27,9 @@
{#if kind === 'link'}
<Button {kind} {size} {justify} {width}>
<svelte:fragment slot="content">
<TimeSince {value} />
{#if value != null}
<TimeSince {value} />
{/if}
</svelte:fragment>
</Button>
{:else}

View File

@ -91,6 +91,7 @@ const view = plugin(viewId, {
ObjectPresenter: '' as Ref<Mixin<ObjectPresenter>>,
ObjectEditorHeader: '' as Ref<Mixin<ObjectEditorHeader>>,
ObjectEditorFooter: '' as Ref<Mixin<ObjectEditorFooter>>,
ObjectPanelFooter: '' as Ref<Mixin<ObjectEditorFooter>>,
ObjectValidator: '' as Ref<Mixin<ObjectValidator>>,
ObjectFactory: '' as Ref<Mixin<ObjectFactory>>,
ObjectTitle: '' as Ref<Mixin<ObjectTitle>>,

View File

@ -236,6 +236,11 @@ export interface ObjectEditorFooter extends Class<Doc> {
props?: Record<string, any>
}
export interface ObjectPanelFooter extends Class<Doc> {
editor: AnyComponent
props?: Record<string, any>
}
/**
* @public
*/

View File

@ -13,29 +13,30 @@
// limitations under the License.
//
import contact, { Employee, Person, PersonAccount, formatName, getName } from '@hcengineering/contact'
import contact, { Employee, formatName, getName, Person, PersonAccount } from '@hcengineering/contact'
import core, {
Account,
concatLink,
Doc,
Ref,
Tx,
TxCUD,
TxCreateDoc,
TxCUD,
TxMixin,
TxProcessor,
TxUpdateDoc,
UserStatus,
Doc,
concatLink
UserStatus
} from '@hcengineering/core'
import love, {
Invite,
isOffice,
JoinRequest,
loveId,
MeetingMinutes,
MeetingStatus,
ParticipantInfo,
RequestStatus,
RoomAccess,
isOffice,
loveId
RoomAccess
} from '@hcengineering/love'
import notification from '@hcengineering/notification'
import { getMetadata, translate } from '@hcengineering/platform'
@ -240,6 +241,40 @@ async function setDefaultRoomAccess (info: ParticipantInfo, control: TriggerCont
return res
}
async function finishMeetingMinutes (
info: ParticipantInfo,
control: TriggerControl,
tx: TxCUD<ParticipantInfo>
): Promise<Tx[]> {
const res: Tx[] = []
const roomInfos = await control.queryFind(control.ctx, love.class.RoomInfo, {})
const roomInfo = roomInfos.find((ri) => ri.persons.includes(info.person))
if (roomInfo === undefined) {
return res
}
const currentPersons = roomInfo.persons.filter((p) => p !== info.person)
if (currentPersons.length === 0) {
const meetingMinutes = await control.findAll(control.ctx, love.class.MeetingMinutes, {
attachedTo: roomInfo.room,
status: MeetingStatus.Active
})
for (const meeting of meetingMinutes) {
res.push(
control.txFactory.createTxUpdateDoc(meeting._class, meeting.space, meeting._id, {
status: MeetingStatus.Finished,
meetingEnd: tx.modifiedOn
})
)
}
}
return res
}
export async function OnParticipantInfo (txes: Tx[], control: TriggerControl): Promise<Tx[]> {
const result: Tx[] = []
for (const tx of txes) {
@ -254,6 +289,7 @@ export async function OnParticipantInfo (txes: Tx[], control: TriggerControl): P
continue
}
result.push(...(await setDefaultRoomAccess(removedInfo, control)))
result.push(...(await finishMeetingMinutes(removedInfo, control, actualTx)))
continue
}
if (actualTx._class === core.class.TxUpdateDoc) {
@ -269,6 +305,7 @@ export async function OnParticipantInfo (txes: Tx[], control: TriggerControl): P
}
result.push(...(await rejectJoinRequests(info, control)))
result.push(...(await setDefaultRoomAccess(info, control)))
result.push(...(await finishMeetingMinutes(info, control, actualTx)))
result.push(...(await roomJoinHandler(info, control)))
}
}

View File

@ -949,7 +949,7 @@ export function createModel (builder: Builder): void {
builder.createDoc(activity.class.ActivityExtension, core.space.Model, {
ofClass: github.class.GithubPullRequest,
components: {
input: chunter.component.ChatMessageInput
input: { component: chunter.component.ChatMessageInput }
}
})