mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
Support facebook channel (#915)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
d8219734aa
commit
06756881fd
@ -208,6 +208,17 @@ export function createModel (builder: Builder): void {
|
||||
contact.channelProvider.GitHub
|
||||
)
|
||||
|
||||
builder.createDoc(
|
||||
contact.class.ChannelProvider,
|
||||
core.space.Model,
|
||||
{
|
||||
label: 'Facebook' as IntlString,
|
||||
icon: contact.icon.Facebook,
|
||||
placeholder: '' as IntlString
|
||||
},
|
||||
contact.channelProvider.Facebook
|
||||
)
|
||||
|
||||
builder.createDoc(
|
||||
core.class.Space,
|
||||
core.space.Model,
|
||||
|
@ -19,13 +19,13 @@
|
||||
export interface ReconiDocument {
|
||||
firstName: string
|
||||
lastName: string
|
||||
title?: string
|
||||
avatar?: string
|
||||
email?: string
|
||||
phone?: string
|
||||
city?: string
|
||||
skype?: string
|
||||
linkedin?: string
|
||||
gmail?: string
|
||||
github?: string
|
||||
facebook?: string
|
||||
telegram?: string
|
||||
|
@ -139,7 +139,8 @@ export default plugin(contactId, {
|
||||
LinkedIn: '' as Ref<ChannelProvider>,
|
||||
Twitter: '' as Ref<ChannelProvider>,
|
||||
Telegram: '' as Ref<ChannelProvider>,
|
||||
GitHub: '' as Ref<ChannelProvider>
|
||||
GitHub: '' as Ref<ChannelProvider>,
|
||||
Facebook: '' as Ref<ChannelProvider>
|
||||
},
|
||||
icon: {
|
||||
Phone: '' as Asset,
|
||||
|
@ -139,6 +139,10 @@
|
||||
try {
|
||||
const doc = await recognizeDocument(token, fileUrl)
|
||||
|
||||
if (isUndef(object.title) && doc.title !== undefined) {
|
||||
object.title = doc.title
|
||||
}
|
||||
|
||||
if (isUndef(firstName) && doc.firstName !== undefined) {
|
||||
firstName = doc.firstName
|
||||
}
|
||||
@ -169,6 +173,7 @@
|
||||
addChannel(newChannels, contact.channelProvider.Phone, doc.phone)
|
||||
addChannel(newChannels, contact.channelProvider.Telegram, doc.telegram)
|
||||
addChannel(newChannels, contact.channelProvider.Twitter, doc.twitter)
|
||||
addChannel(newChannels, contact.channelProvider.Facebook, doc.facebook)
|
||||
channels = newChannels
|
||||
|
||||
console.log(doc, channels)
|
||||
|
Loading…
Reference in New Issue
Block a user