mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-12 18:35:45 +00:00
uberf-9603: fix account rename (#8371)
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 / uitest-workspaces (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
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 / uitest-workspaces (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
c6326b3c73
commit
9b7a85ec4e
@ -334,14 +334,6 @@ export const myEmployeeStore = derived(
|
||||
export const personByIdStore = writable<IdMap<WithLookup<Person>>>(new Map())
|
||||
export const socialIdsStore = writable<Array<WithLookup<SocialIdentity>>>([])
|
||||
|
||||
// NOTE
|
||||
// In-workspace social ids of the current employee
|
||||
// Should not be used except some rare cases
|
||||
// Use getCurrentAccount().socialIds instead
|
||||
export const mySocialIdsStore = derived([currentEmployeeRefStore, socialIdsStore], ([myEmployeeRef, socialIds]) => {
|
||||
return socialIds.filter((si) => si.attachedTo === myEmployeeRef)
|
||||
})
|
||||
|
||||
/**
|
||||
* [Ref<Person> => SocialIdentity[]] mapping
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import contact, { combineName, getCurrentEmployee, getFirstName, getLastName } from '@hcengineering/contact'
|
||||
import { ChannelsEditor, EditableAvatar, personByIdStore, mySocialIdsStore } from '@hcengineering/contact-resources'
|
||||
import { ChannelsEditor, EditableAvatar, personByIdStore } from '@hcengineering/contact-resources'
|
||||
import { getCurrentAccount, SocialIdType } from '@hcengineering/core'
|
||||
import login, { loginId } from '@hcengineering/login'
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
@ -36,11 +36,11 @@
|
||||
const client = getClient()
|
||||
const account = getCurrentAccount()
|
||||
const me = getCurrentEmployee()
|
||||
const employee = $personByIdStore.get(me)
|
||||
const email = account.fullSocialIds.find((si) => si.type === SocialIdType.EMAIL)?.value ?? ''
|
||||
|
||||
$: employee = $personByIdStore.get(me)
|
||||
$: firstName = employee !== undefined ? getFirstName(employee.name) : ''
|
||||
$: lastName = employee !== undefined ? getLastName(employee.name) : ''
|
||||
$: email = $mySocialIdsStore.find((si) => si.type === SocialIdType.EMAIL)?.value ?? ''
|
||||
let firstName = employee !== undefined ? getFirstName(employee.name) : ''
|
||||
let lastName = employee !== undefined ? getLastName(employee.name) : ''
|
||||
|
||||
let avatarEditor: EditableAvatar
|
||||
async function onAvatarDone (e: any): Promise<void> {
|
||||
|
Loading…
Reference in New Issue
Block a user