mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
Add CreateGuest functionality to AddParticipant component (#5606)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
cbddcf9a3e
commit
0462e0e082
@ -14,13 +14,13 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import contact, { Person, PersonAccount } from '@hcengineering/contact'
|
||||
import { personAccountByIdStore } from '@hcengineering/contact-resources'
|
||||
import { CreateGuest, personAccountByIdStore } from '@hcengineering/contact-resources'
|
||||
import { IdMap, Ref } from '@hcengineering/core'
|
||||
import { IntlString, translate } from '@hcengineering/platform'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import setting, { Integration } from '@hcengineering/setting'
|
||||
import { themeStore } from '@hcengineering/theme'
|
||||
import { closePopup, registerFocus, resizeObserver, showPopup } from '@hcengineering/ui'
|
||||
import { Button, IconAdd, closePopup, registerFocus, resizeObserver, showPopup } from '@hcengineering/ui'
|
||||
import { afterUpdate, createEventDispatcher, onMount } from 'svelte'
|
||||
import calendar from '../plugin'
|
||||
import ParticipantsPopup from './ParticipantsPopup.svelte'
|
||||
@ -161,6 +161,15 @@
|
||||
closePopup('participants')
|
||||
}
|
||||
}
|
||||
|
||||
function addGuest (e: MouseEvent) {
|
||||
showPopup(CreateGuest, {}, undefined, (res) => {
|
||||
if (res) {
|
||||
value = ''
|
||||
dispatch('ref', res)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
@ -185,6 +194,7 @@
|
||||
}}
|
||||
>
|
||||
<div class="hidden-text" bind:this={text} />
|
||||
<div class="flex-row-center w-full">
|
||||
<div class="ghost flex-row-center clear-mins" class:focusable class:w-full={fullSize}>
|
||||
<input
|
||||
{disabled}
|
||||
@ -202,4 +212,17 @@
|
||||
on:blur
|
||||
/>
|
||||
</div>
|
||||
<div class="ml-2">
|
||||
<Button
|
||||
focusIndex={2}
|
||||
kind={'ghost'}
|
||||
size={'small'}
|
||||
icon={IconAdd}
|
||||
showTooltip={{
|
||||
label: contact.string.AddGuest
|
||||
}}
|
||||
on:click={addGuest}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -178,7 +178,8 @@ export {
|
||||
SelectUsersPopup,
|
||||
IconAddMember,
|
||||
UserDetails,
|
||||
DeleteConfirmationPopup
|
||||
DeleteConfirmationPopup,
|
||||
CreateGuest
|
||||
}
|
||||
|
||||
const toObjectSearchResult = (e: WithLookup<Contact>): ObjectSearchResult => ({
|
||||
|
@ -78,8 +78,7 @@ export default mergeIds(contactId, contact, {
|
||||
DeleteEmployee: '' as IntlString,
|
||||
DeleteEmployeeDescr: '' as IntlString,
|
||||
HasMessagesIn: '' as IntlString,
|
||||
HasNewMessagesIn: '' as IntlString,
|
||||
AddGuest: '' as IntlString
|
||||
HasNewMessagesIn: '' as IntlString
|
||||
},
|
||||
function: {
|
||||
GetContactLink: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<Location>>,
|
||||
|
@ -262,7 +262,8 @@ export const contactPlugin = plugin(contactId, {
|
||||
NumberMembers: '' as IntlString,
|
||||
Position: '' as IntlString,
|
||||
For: '' as IntlString,
|
||||
SelectUsers: '' as IntlString
|
||||
SelectUsers: '' as IntlString,
|
||||
AddGuest: '' as IntlString
|
||||
},
|
||||
viewlet: {
|
||||
TableMember: '' as Ref<Viewlet>,
|
||||
|
Loading…
Reference in New Issue
Block a user