mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-10 01:15:03 +00:00
Add search for meetings (#8341)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> Signed-off-by: Andrey Sobolev <haiodo@gmail.com> Co-authored-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
b37c119628
commit
d9316aa8da
@ -201,7 +201,14 @@ export class TMeeting extends TEvent implements Meeting {
|
||||
}
|
||||
|
||||
@Model(love.class.MeetingMinutes, core.class.Doc, DOMAIN_MEETING_MINUTES)
|
||||
@UX(love.string.MeetingMinutes, love.icon.Cam, undefined, 'createdOn', undefined, love.string.MeetingsMinutes)
|
||||
@UX(
|
||||
love.string.MeetingMinutes,
|
||||
love.icon.MeetingMinutes,
|
||||
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)
|
||||
@ -644,6 +651,28 @@ export function createModel (builder: Builder): void {
|
||||
editor: love.component.PanelControlBar
|
||||
})
|
||||
|
||||
builder.createDoc(core.class.FullTextSearchContext, core.space.Model, {
|
||||
toClass: love.class.MeetingMinutes,
|
||||
fullTextSummary: true,
|
||||
forceIndex: true,
|
||||
propagate: []
|
||||
})
|
||||
|
||||
builder.createDoc(
|
||||
presentation.class.ObjectSearchCategory,
|
||||
core.space.Model,
|
||||
{
|
||||
icon: love.icon.MeetingMinutes,
|
||||
label: love.string.SearchMeetingMinutes,
|
||||
title: love.string.MeetingMinutes,
|
||||
query: love.completion.MeetingMinutesQuery,
|
||||
context: ['search', 'mention', 'spotlight'],
|
||||
classToSearch: love.class.MeetingMinutes,
|
||||
priority: 600
|
||||
},
|
||||
love.completion.MeetingMinutesCategory
|
||||
)
|
||||
|
||||
createAttributePresenter(
|
||||
builder,
|
||||
view.component.DateTimePresenter,
|
||||
|
@ -20,6 +20,7 @@ import { type AnyComponent } from '@hcengineering/ui/src/types'
|
||||
import { type ActionCategory, type ViewAction } from '@hcengineering/view'
|
||||
import { loveId } from '@hcengineering/love'
|
||||
import love from '@hcengineering/love-resources/src/plugin'
|
||||
import { type ObjectSearchCategory, type ObjectSearchFactory } from '@hcengineering/model-presentation'
|
||||
|
||||
export default mergeIds(loveId, love, {
|
||||
component: {
|
||||
@ -50,5 +51,9 @@ export default mergeIds(loveId, love, {
|
||||
},
|
||||
function: {
|
||||
MeetingMinutesTitleProvider: '' as Resource<(client: Client, ref: Ref<Doc>, doc?: Doc) => Promise<string>>
|
||||
},
|
||||
completion: {
|
||||
MeetingMinutesQuery: '' as Resource<ObjectSearchFactory>,
|
||||
MeetingMinutesCategory: '' as Ref<ObjectSearchCategory>
|
||||
}
|
||||
})
|
||||
|
@ -79,4 +79,9 @@ export function createModel (builder: Builder): void {
|
||||
_class: core.class.TxCreateDoc
|
||||
}
|
||||
})
|
||||
|
||||
builder.mixin(love.class.MeetingMinutes, core.class.Class, serverCore.mixin.SearchPresenter, {
|
||||
searchIcon: love.icon.MeetingMinutes,
|
||||
title: [['title']]
|
||||
})
|
||||
}
|
||||
|
@ -94,4 +94,18 @@
|
||||
<path d="M21.7071 20.2931C21.3166 19.9026 20.6834 19.9026 20.2929 20.2931C19.9024 20.6837 19.9024 21.3168 20.2929 21.7074L23.5858 25.0002L20.2929 28.2931C19.9024 28.6837 19.9024 29.3168 20.2929 29.7074C20.6761 30.0906 21.2929 30.0977 21.6849 29.7289L25 26.4138L28.2929 29.7074C28.6834 30.0979 29.3166 30.0979 29.7071 29.7074C30.0976 29.3168 30.0976 28.6837 29.7071 28.2931L26.4142 25.0002L29.7071 21.7074C30.0976 21.3168 30.0976 20.6837 29.7071 20.2931C29.3166 19.9026 28.6834 19.9026 28.2929 20.2931L25 23.586L21.7071 20.2931Z" />
|
||||
<path d="M13 20.0002C9.13401 20.0002 6 23.1343 6 27.0002V29.0002C6 29.5525 6.44772 30.0002 7 30.0002C7.55228 30.0002 8 29.5525 8 29.0002V27.0002C8 24.2388 10.2386 22.0002 13 22.0002H17C17.5523 22.0002 18 21.5525 18 21.0002C18 20.448 17.5523 20.0002 17 20.0002H13Z" />
|
||||
</symbol>
|
||||
<symbol id="meeting-minutes" viewBox="0 0 24 24">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M5.71189 3.83264C4.85895 3.94913 4.38616 4.16477 4.04365 4.51269C3.69954 4.86223 3.48508 5.3473 3.36966 6.21935C3.25155 7.11179 3.25 8.29059 3.25 9.96139V14.9614C3.25 16.6322 3.25155 17.811 3.36966 18.7034C3.48508 19.5755 3.69954 20.0606 4.04367 20.4102C4.38617 20.7581 4.85896 20.9737 5.71188 21.0902C6.58762 21.2098 7.74533 21.2114 9.39111 21.2114H10.2892C10.7034 21.2114 11.0392 21.5472 11.0392 21.9614C11.0392 22.3756 10.7034 22.7114 10.2892 22.7114H9.3347C7.75835 22.7114 6.49795 22.7114 5.50892 22.5764C4.48532 22.4366 3.64139 22.1397 2.97472 21.4625C2.30967 20.7869 2.01951 19.9344 1.88263 18.9002C1.74997 17.8979 1.74998 16.6196 1.75 15.0164V9.9064C1.74998 8.30316 1.74997 7.02486 1.88263 6.02254C2.01951 4.98839 2.30964 4.13594 2.97471 3.46037C3.64138 2.78316 4.48531 2.48623 5.50891 2.34644C6.49795 2.21137 7.75835 2.21138 9.33468 2.2114L12.3444 2.2114C13.9561 2.2114 15.298 2.22381 16.3666 2.37448C17.4384 2.52559 18.36 2.8305 19.0344 3.51552C19.6977 4.18921 19.9869 5.02585 20.122 6.05049C20.2502 7.02263 20.2501 8.26241 20.25 9.82556C20.25 9.87057 20.25 9.91584 20.25 9.96139V11.1478C20.25 11.562 19.9142 11.8978 19.5 11.8978C19.0858 11.8978 18.75 11.562 18.75 11.1478V9.93079C18.75 8.27471 18.75 7.11968 18.6349 6.24657C18.5223 5.39261 18.3115 4.9193 17.9655 4.56787C17.6307 4.22777 17.0988 3.99255 16.1572 3.85979C15.2125 3.72658 13.9812 3.7114 12.3444 3.7114H9.39111C7.74533 3.7114 6.58762 3.71304 5.71189 3.83264Z"
|
||||
fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M5.94531 1.25C6.35952 1.25 6.69531 1.58579 6.69531 2V4C6.69531 4.41421 6.35952 4.75 5.94531 4.75C5.5311 4.75 5.19531 4.41421 5.19531 4V2C5.19531 1.58579 5.5311 1.25 5.94531 1.25ZM10.9453 1.25C11.3595 1.25 11.6953 1.58579 11.6953 2V4C11.6953 4.41421 11.3595 4.75 10.9453 4.75C10.5311 4.75 10.1953 4.41421 10.1953 4V2C10.1953 1.58579 10.5311 1.25 10.9453 1.25ZM15.9453 1.25C16.3595 1.25 16.6953 1.58579 16.6953 2V4C16.6953 4.41421 16.3595 4.75 15.9453 4.75C15.5311 4.75 15.1953 4.41421 15.1953 4V2C15.1953 1.58579 15.5311 1.25 15.9453 1.25Z"
|
||||
fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M6.25 10C6.25 9.58579 6.58579 9.25 7 9.25H15C15.4142 9.25 15.75 9.58579 15.75 10C15.75 10.4142 15.4142 10.75 15 10.75H7C6.58579 10.75 6.25 10.4142 6.25 10ZM6.25 15C6.25 14.5858 6.58579 14.25 7 14.25H11C11.4142 14.25 11.75 14.5858 11.75 15C11.75 15.4142 11.4142 15.75 11 15.75H7C6.58579 15.75 6.25 15.4142 6.25 15Z"
|
||||
fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M21.2934 14.3502C21.5749 14.6092 21.8863 14.9349 22.0742 15.3683C22.2807 15.8446 22.305 16.3686 22.1485 16.9557L22.1369 16.9993L22.1202 17.0411C21.9359 17.5017 21.5651 17.9034 21.2284 18.2408C21.0781 18.3913 20.932 18.5316 20.7845 18.6732C20.5537 18.8948 20.3194 19.1197 20.0602 19.3926L20.0513 19.402L20.0421 19.4111C19.5788 19.8663 19.1878 20.2648 18.8492 20.6101C18.6963 20.7659 18.554 20.9109 18.4206 21.0454C18.026 21.443 17.6525 21.8093 17.3432 21.995C16.9172 22.2506 16.3793 22.3895 15.7622 22.5006L15.7503 22.5028L15.7382 22.5045C15.5558 22.5313 15.3563 22.5631 15.1613 22.5942C14.9218 22.6324 14.689 22.6695 14.5029 22.6949C14.3206 22.7198 14.1385 22.7404 13.9744 22.7474C13.8288 22.7536 13.6184 22.7541 13.419 22.6934C12.8757 22.5278 12.7854 21.9926 12.7664 21.8533C12.737 21.6379 12.752 21.3999 12.7736 21.1969C12.8071 20.8822 12.8762 20.4988 12.9395 20.1475C12.9582 20.0435 12.9765 19.9423 12.9931 19.8465C13.0853 19.1972 13.2782 18.5548 13.5357 18.131C13.5858 18.0456 13.6467 17.9737 13.6698 17.9463C13.6712 17.9447 13.6725 17.9432 13.6736 17.9419C13.7192 17.8877 13.7757 17.8247 13.8378 17.7571C13.9631 17.621 14.1305 17.4461 14.3228 17.2488C14.7084 16.8532 15.2087 16.3528 15.7058 15.8617L15.7194 15.8482L15.7337 15.8355C15.9104 15.6778 16.1614 15.4167 16.4558 15.1102C16.626 14.9331 16.8107 14.7408 17.004 14.5447C17.2521 14.293 17.5098 14.0405 17.7395 13.8437C17.8537 13.7458 17.9749 13.6495 18.0945 13.5714C18.1804 13.5153 18.3354 13.4203 18.5262 13.3771C18.8564 13.2798 19.3011 13.1783 19.8191 13.3205C20.3324 13.4614 20.8043 13.8084 21.2934 14.3502ZM19.422 14.767C19.3092 14.736 19.1934 14.7429 18.9231 14.824L18.9169 14.8258C18.9163 14.8263 18.9156 14.8267 18.9149 14.8271C18.8721 14.8551 18.8061 14.905 18.7157 14.9826C18.536 15.1365 18.3146 15.3518 18.0723 15.5976C17.9241 15.748 17.7641 15.9143 17.6046 16.0801C17.2841 16.4133 16.9654 16.7447 16.7472 16.9414C16.2576 17.4253 15.7699 17.9132 15.3969 18.2959C15.2082 18.4894 15.0524 18.6524 14.9416 18.7728C14.8857 18.8336 14.8459 18.8785 14.8206 18.9085C14.8177 18.9119 14.8152 18.915 14.8129 18.9177C14.7007 19.1069 14.5522 19.5287 14.4769 20.0669L14.4752 20.079L14.4731 20.0911C14.4511 20.2179 14.4289 20.3412 14.4075 20.4604C14.358 20.7353 14.3125 20.9881 14.2827 21.211C14.2884 21.2102 14.2941 21.2095 14.2999 21.2087C14.4901 21.1827 14.6807 21.1521 14.8917 21.1182C15.0769 21.0884 15.2778 21.0562 15.5081 21.0223C16.0905 20.9167 16.3948 20.8147 16.5712 20.7088C16.6844 20.6409 16.9145 20.4336 17.3559 19.9888C17.4795 19.8642 17.6162 19.7249 17.7657 19.5725C18.1059 19.2257 18.5124 18.8114 18.9816 18.3501C19.2519 18.0661 19.5426 17.7862 19.7939 17.5442C19.9338 17.4095 20.0616 17.2865 20.1667 17.1811C20.4836 16.8636 20.6435 16.6617 20.7116 16.5199C20.7801 16.2328 20.7453 16.0742 20.6979 15.9649C20.6356 15.8211 20.5092 15.6649 20.2546 15.4328L20.226 15.4068L20.2003 15.3779C19.7932 14.9219 19.5484 14.8017 19.422 14.767ZM14.2526 21.6505C14.2526 21.6501 14.2525 21.6498 14.2525 21.6494L14.2526 21.6505Z"
|
||||
fill="currentColor"/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 20 KiB |
@ -85,6 +85,7 @@
|
||||
"WithAudio": "Zahrnout systémový zvuk",
|
||||
"ShareWithAudioTooltip": "Sdílejte obrazovku se systémovým zvukem. Restartujte sdílení obrazovky, aby se změny projevily.",
|
||||
"MicPermission": "Mikrofon nebyl nalezen, zkontrolujte oprávnění prohlížeče",
|
||||
"CamPermission": "Kamera nebyla nalezena, zkontrolujte oprávnění prohlížeče"
|
||||
"CamPermission": "Kamera nebyla nalezena, zkontrolujte oprávnění prohlížeče",
|
||||
"SearchMeetingMinutes": "Vyhledat minuty schůzky..."
|
||||
}
|
||||
}
|
@ -83,6 +83,7 @@
|
||||
"WithAudio": "Systemaudio einschließen",
|
||||
"ShareWithAudioTooltip": "Teile deinen Bildschirm mit Systemaudio. Starte die Bildschirmfreigabe neu, um Änderungen anzuwenden.",
|
||||
"MicPermission": "Mikrofon nicht gefunden, überprüfen Sie die Browserberechtigungen",
|
||||
"CamPermission": "Kamera nicht gefunden, überprüfen Sie die Browserberechtigungen"
|
||||
"CamPermission": "Kamera nicht gefunden, überprüfen Sie die Browserberechtigungen",
|
||||
"SearchMeetingMinutes": "Meetingprotokoll suchen..."
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@
|
||||
"WithAudio": "Include system audio",
|
||||
"ShareWithAudioTooltip": "Share your screen with system audio. Restart screen share to apply changes.",
|
||||
"MicPermission": "Microphone not found, check browser permissions",
|
||||
"CamPermission": "Camera not found, check browser permissions"
|
||||
"CamPermission": "Camera not found, check browser permissions",
|
||||
"SearchMeetingMinutes": "Search meeting minutes..."
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@
|
||||
"WithAudio": "Incluir audio del sistema",
|
||||
"ShareWithAudioTooltip": "Comparte tu pantalla con el audio del sistema. Reinicia la pantalla compartida para aplicar los cambios.",
|
||||
"MicPermission": "Micrófono no encontrado, comprueba los permisos del navegador",
|
||||
"CamPermission": "Cámara no encontrada, comprueba los permisos del navegador"
|
||||
"CamPermission": "Cámara no encontrada, comprueba los permisos del navegador",
|
||||
"SearchMeetingMinutes": "Buscar minutos de reunión..."
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@
|
||||
"WithAudio": "Inclure l'audio du système",
|
||||
"ShareWithAudioTooltip": "Partagez votre écran avec l'audio du système. Redémarrez le partage d’écran pour appliquer les modifications.",
|
||||
"MicPermission": "Microphone non trouvé, vérifiez les autorisations du navigateur",
|
||||
"CamPermission": "Caméra non trouvée, vérifiez les autorisations du navigateur"
|
||||
"CamPermission": "Caméra non trouvée, vérifiez les autorisations du navigateur",
|
||||
"SearchMeetingMinutes": "Rechercher des minutes de réunion..."
|
||||
}
|
||||
}
|
@ -85,6 +85,7 @@
|
||||
"WithAudio": "Includi l'audio di sistema",
|
||||
"ShareWithAudioTooltip": "Condividi lo schermo con l'audio di sistema. Riavvia la condivisione dello schermo per applicare le modifiche.",
|
||||
"MicPermission": "Microfono non trovato, controlla le autorizzazioni del browser",
|
||||
"CamPermission": "Camera non trovata, controlla le autorizzazioni del browser"
|
||||
"CamPermission": "Camera non trovata, controlla le autorizzazioni del browser",
|
||||
"SearchMeetingMinutes": "Cerca i minuti della riunione..."
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@
|
||||
"WithAudio": "Incluir áudio do sistema",
|
||||
"ShareWithAudioTooltip": "Compartilhe sua tela com o áudio do sistema. Reinicie o compartilhamento de tela para aplicar as alterações.",
|
||||
"MicPermission": "Microfone não encontrado, verifique as permissões do navegador",
|
||||
"CamPermission": "Câmera não encontrada, verifique as permissões do navegador"
|
||||
"CamPermission": "Câmera não encontrada, verifique as permissões do navegador",
|
||||
"SearchMeetingMinutes": "Procurar minutos de reunião..."
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@
|
||||
"WithAudio": "С системным звуком",
|
||||
"ShareWithAudioTooltip": "Делитесь экраном с системным звуком. Перезапустите трансляцию, чтобы применить изменения.",
|
||||
"MicPermission": "Микрофон не найден, проверьте разрешения браузера",
|
||||
"CamPermission": "Камера не найдена, проверьте разрешения браузера"
|
||||
"CamPermission": "Камера не найдена, проверьте разрешения браузера",
|
||||
"SearchMeetingMinutes": "Поиск протоколов встреч..."
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@
|
||||
"WithAudio": "包含系统音频",
|
||||
"ShareWithAudioTooltip": "与系统音频一起共享屏幕。重新启动屏幕共享以应用更改。",
|
||||
"MicPermission": "未找到麦克风,请检查浏览器权限",
|
||||
"CamPermission": "未找到摄像头,请检查浏览器权限"
|
||||
"CamPermission": "未找到摄像头,请检查浏览器权限",
|
||||
"SearchMeetingMinutes": "搜索会议分钟..."
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,8 @@ loadMetadata(love.icon, {
|
||||
FullScreen: `${icons}#fullscreen`,
|
||||
ExitFullScreen: `${icons}#exitfullscreen`,
|
||||
Invite: `${icons}#invite`,
|
||||
Kick: `${icons}#kick`
|
||||
Kick: `${icons}#kick`,
|
||||
MeetingMinutes: `${icons}#meeting-minutes`
|
||||
})
|
||||
loadMetadata(love.sound, {
|
||||
Knock: require('../assets/knock.wav')
|
||||
|
@ -37,7 +37,7 @@
|
||||
<div class="flex-presenter" use:tooltip={{ label: getEmbeddedLabel(value.title) }}>
|
||||
{#if shouldShowAvatar}
|
||||
<div class="icon">
|
||||
<Icon icon={love.icon.Love} size={'small'} />
|
||||
<Icon icon={love.icon.MeetingMinutes} size={'medium'} />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="label nowrap flex flex-gap-2" class:no-underline={noUnderline || disabled} class:fs-bold={accent}>
|
||||
|
@ -0,0 +1,31 @@
|
||||
<!--
|
||||
// Copyright © 2025 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 { WithLookup } from '@hcengineering/core'
|
||||
import love, { type MeetingMinutes } from '@hcengineering/love'
|
||||
import { Icon } from '@hcengineering/ui'
|
||||
|
||||
export let value: WithLookup<MeetingMinutes>
|
||||
</script>
|
||||
|
||||
<div class="flex-row-center">
|
||||
<div class="flex-center p-1 content-dark-color flex-no-shrink mr-2-5">
|
||||
<Icon icon={love.icon.MeetingMinutes} size={'medium'} />
|
||||
</div>
|
||||
<span class="overflow-label">
|
||||
{value.title}
|
||||
</span>
|
||||
</div>
|
@ -33,7 +33,8 @@ import {
|
||||
stopTranscription,
|
||||
toggleMic,
|
||||
toggleVideo,
|
||||
getMeetingMinutesTitle
|
||||
getMeetingMinutesTitle,
|
||||
queryMeetingMinutes
|
||||
} from './utils'
|
||||
|
||||
export { setCustomCreateScreenTracks } from './utils'
|
||||
@ -85,5 +86,8 @@ export default async (): Promise<Resources> => ({
|
||||
StopTranscribing: stopTranscription,
|
||||
ShowRoomSettings: showRoomSettings,
|
||||
CopyGuestLink: copyGuestLink
|
||||
},
|
||||
completion: {
|
||||
MeetingMinutesQuery: queryMeetingMinutes
|
||||
}
|
||||
})
|
||||
|
@ -7,16 +7,20 @@ import contact, { getCurrentEmployee, getName, type Person } from '@hcengineerin
|
||||
import { personByIdStore } from '@hcengineering/contact-resources'
|
||||
import core, {
|
||||
AccountRole,
|
||||
type Client,
|
||||
concatLink,
|
||||
type Data,
|
||||
type Doc,
|
||||
type DocumentQuery,
|
||||
generateId,
|
||||
getCurrentAccount,
|
||||
type Hierarchy,
|
||||
type IdMap,
|
||||
type Ref,
|
||||
type RelatedDocument,
|
||||
type Space,
|
||||
type TxOperations
|
||||
type TxOperations,
|
||||
type WithLookup
|
||||
} from '@hcengineering/core'
|
||||
import login from '@hcengineering/login'
|
||||
import {
|
||||
@ -43,7 +47,8 @@ import presentation, {
|
||||
copyTextToClipboard,
|
||||
createQuery,
|
||||
type DocCreatePhase,
|
||||
getClient
|
||||
getClient,
|
||||
type ObjectSearchResult
|
||||
} from '@hcengineering/presentation'
|
||||
import {
|
||||
closePanel,
|
||||
@ -87,6 +92,7 @@ import { sendMessage } from './broadcast'
|
||||
import RoomSettingsPopup from './components/RoomSettingsPopup.svelte'
|
||||
import love from './plugin'
|
||||
import { $myPreferences, currentMeetingMinutes, currentRoom, myOffice, selectedRoomPlace } from './stores'
|
||||
import MeetingMinutesSearchItem from './components/MeetingMinutesSearchItem.svelte'
|
||||
|
||||
export const selectedCamId = 'selectedDevice_cam'
|
||||
export const selectedMicId = 'selectedDevice_mic'
|
||||
@ -1161,3 +1167,28 @@ export async function getMeetingMinutesTitle (
|
||||
|
||||
return meeting?.title ?? ''
|
||||
}
|
||||
|
||||
export async function queryMeetingMinutes (
|
||||
client: Client,
|
||||
search: string,
|
||||
filter?: { in?: RelatedDocument[], nin?: RelatedDocument[] }
|
||||
): Promise<ObjectSearchResult[]> {
|
||||
const q: DocumentQuery<MeetingMinutes> = { title: { $like: `%${search}%` } }
|
||||
if (filter?.in !== undefined || filter?.nin !== undefined) {
|
||||
q._id = {}
|
||||
if (filter.in !== undefined) {
|
||||
q._id.$in = filter.in?.map((it) => it._id as Ref<MeetingMinutes>)
|
||||
}
|
||||
if (filter.nin !== undefined) {
|
||||
q._id.$nin = filter.nin?.map((it) => it._id as Ref<MeetingMinutes>)
|
||||
}
|
||||
}
|
||||
return (await client.findAll(love.class.MeetingMinutes, q, { limit: 200 })).map(toMeetingMinutesObjectSearchResult)
|
||||
}
|
||||
|
||||
const toMeetingMinutesObjectSearchResult = (e: WithLookup<MeetingMinutes>): ObjectSearchResult => ({
|
||||
doc: e,
|
||||
title: e.title,
|
||||
icon: love.icon.MeetingMinutes,
|
||||
component: MeetingMinutesSearchItem
|
||||
})
|
||||
|
@ -228,7 +228,8 @@ const love = plugin(loveId, {
|
||||
Finished: '' as IntlString,
|
||||
StartWithRecording: '' as IntlString,
|
||||
Kick: '' as IntlString,
|
||||
EndMeeting: '' as IntlString
|
||||
EndMeeting: '' as IntlString,
|
||||
SearchMeetingMinutes: '' as IntlString
|
||||
},
|
||||
ids: {
|
||||
MainFloor: '' as Ref<Floor>,
|
||||
@ -258,7 +259,8 @@ const love = plugin(loveId, {
|
||||
FullScreen: '' as Asset,
|
||||
ExitFullScreen: '' as Asset,
|
||||
Invite: '' as Asset,
|
||||
Kick: '' as Asset
|
||||
Kick: '' as Asset,
|
||||
MeetingMinutes: '' as Asset
|
||||
},
|
||||
sound: {
|
||||
Knock: '' as Asset
|
||||
|
Loading…
Reference in New Issue
Block a user