mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-24 03:59:50 +03:00
add more channels
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
2af1b2aad3
commit
0f6fde311c
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,7 @@ export const DOMAIN_CONTACT = 'contact' as Domain
|
|||||||
export class TChannelProvider extends TDoc implements ChannelProvider {
|
export class TChannelProvider extends TDoc implements ChannelProvider {
|
||||||
label!: IntlString
|
label!: IntlString
|
||||||
icon?: Asset
|
icon?: Asset
|
||||||
|
placeholder!: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@Model(contact.class.TypeChannels, core.class.Type)
|
@Model(contact.class.TypeChannels, core.class.Type)
|
||||||
@ -85,9 +86,22 @@ export function createModel (builder: Builder): void {
|
|||||||
|
|
||||||
builder.createDoc(contact.class.ChannelProvider, core.space.Model, {
|
builder.createDoc(contact.class.ChannelProvider, core.space.Model, {
|
||||||
label: 'Email' as IntlString,
|
label: 'Email' as IntlString,
|
||||||
icon: contact.icon.Email
|
icon: contact.icon.Email,
|
||||||
|
placeholder: 'john.appleseed@apple.com'
|
||||||
}, contact.channelProvider.Email)
|
}, contact.channelProvider.Email)
|
||||||
|
|
||||||
|
builder.createDoc(contact.class.ChannelProvider, core.space.Model, {
|
||||||
|
label: 'Phone' as IntlString,
|
||||||
|
icon: contact.icon.Email,
|
||||||
|
placeholder: '+1 555 333 7777'
|
||||||
|
})
|
||||||
|
|
||||||
|
builder.createDoc(contact.class.ChannelProvider, core.space.Model, {
|
||||||
|
label: 'LinkedIn' as IntlString,
|
||||||
|
icon: contact.icon.Email,
|
||||||
|
placeholder: 'https://linkedin.com/in/jappleseed'
|
||||||
|
})
|
||||||
|
|
||||||
builder.createDoc(core.class.Space, core.space.Model, {
|
builder.createDoc(core.class.Space, core.space.Model, {
|
||||||
name: 'Employees',
|
name: 'Employees',
|
||||||
description: 'Employees',
|
description: 'Employees',
|
||||||
|
@ -23,6 +23,11 @@ import {} from '@anticrm/core'
|
|||||||
export const ids = mergeIds(contactId, contact, {
|
export const ids = mergeIds(contactId, contact, {
|
||||||
channelProvider: {
|
channelProvider: {
|
||||||
Email: '' as Ref<ChannelProvider>
|
Email: '' as Ref<ChannelProvider>
|
||||||
|
// Phone: '' as Ref<ChannelProvider>,
|
||||||
|
// LinkedIn: '' as Ref<ChannelProvider>,
|
||||||
|
// Twitter: '' as Ref<ChannelProvider>,
|
||||||
|
// GitHub: '' as Ref<ChannelProvider>,
|
||||||
|
// Telegram: '' as Ref<ChannelProvider>,
|
||||||
},
|
},
|
||||||
component: {
|
component: {
|
||||||
PersonPresenter: '' as AnyComponent,
|
PersonPresenter: '' as AnyComponent,
|
||||||
|
@ -66,6 +66,6 @@ let displayItems: Item[] = []
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each displayItems as item}
|
{#each displayItems as item}
|
||||||
{item.value}<Icon icon={item.icon} size={'small'}/>
|
<Icon icon={item.icon} size={'medium'}/>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import type { Doc, Ref, Class, UXObject } from '@anticrm/core'
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export interface ChannelProvider extends Doc, UXObject {
|
export interface ChannelProvider extends Doc, UXObject {
|
||||||
|
placeholder: string
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<div class="popup-block">
|
<div class="popup-block">
|
||||||
<span>Contact</span>
|
<span>Contact</span>
|
||||||
{#each providers as provider, i}
|
{#each providers as provider, i}
|
||||||
<EditBox label={provider.label} placeholder={'+7 (000) 000-00-00'} bind:value={newValues[i].value} maxWidth={'12.5rem'}/>
|
<EditBox label={provider.label} placeholder={provider.placeholder} bind:value={newValues[i].value} maxWidth={'12.5rem'}/>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="popup-block">
|
<!-- <div class="popup-block">
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user