mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 20:45:00 +02:00
TSK-887 InviteSettings should not depend on login-resources (#2799)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import login from '@hcengineering/login-resources/src/plugin'
|
||||
import login from '@hcengineering/login'
|
||||
import presentation, { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import setting, { InviteSettings } from '@hcengineering/setting'
|
||||
import { Button, EditBox, MiniToggle } from '@hcengineering/ui'
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
import setting from '@hcengineering/setting'
|
||||
import presentation from '@hcengineering/presentation'
|
||||
import { Button, EditBox, Icon, Label } from '@hcengineering/ui'
|
||||
import { changePassword } from '@hcengineering/login-resources'
|
||||
import login from '@hcengineering/login'
|
||||
import Error from './icons/Error.svelte'
|
||||
import plugin from '../plugin'
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
|
||||
let oldPassword: string = ''
|
||||
let password: string = ''
|
||||
@@ -34,6 +35,7 @@
|
||||
label = setting.string.Saving
|
||||
saved = true
|
||||
try {
|
||||
const changePassword = await getResource(login.function.ChangePassword)
|
||||
await changePassword(oldPassword, password)
|
||||
label = setting.string.Saved
|
||||
} catch (e) {
|
||||
|
||||
@@ -13,14 +13,13 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { AttributeEditor, getClient } from '@hcengineering/presentation'
|
||||
|
||||
import contact, { EmployeeAccount, getFirstName, getLastName } from '@hcengineering/contact'
|
||||
import { ChannelsEditor, EditableAvatar, employeeByIdStore } from '@hcengineering/contact-resources'
|
||||
import contactRes from '@hcengineering/contact-resources/src/plugin'
|
||||
import { ChannelsEditor, employeeByIdStore } from '@hcengineering/contact-resources'
|
||||
import { getCurrentAccount } from '@hcengineering/core'
|
||||
import { changeName, leaveWorkspace } from '@hcengineering/login-resources'
|
||||
import { MessageBox } from '@hcengineering/presentation'
|
||||
import login from '@hcengineering/login'
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
import { AttributeEditor, getClient, MessageBox } from '@hcengineering/presentation'
|
||||
import { EditableAvatar } from '@hcengineering/contact-resources'
|
||||
import { Button, createFocusManager, EditBox, FocusHandler, Icon, Label, showPopup } from '@hcengineering/ui'
|
||||
import setting from '../plugin'
|
||||
const client = getClient()
|
||||
@@ -57,6 +56,7 @@
|
||||
undefined,
|
||||
async (res?: boolean) => {
|
||||
if (res === true) {
|
||||
const leaveWorkspace = await getResource(login.function.LeaveWorkspace)
|
||||
await leaveWorkspace(getCurrentAccount().email)
|
||||
}
|
||||
}
|
||||
@@ -94,26 +94,28 @@
|
||||
</div>
|
||||
<div class="flex-grow flex-col">
|
||||
<EditBox
|
||||
placeholder={contactRes.string.PersonFirstNamePlaceholder}
|
||||
placeholder={contact.string.PersonFirstNamePlaceholder}
|
||||
bind:value={firstName}
|
||||
kind={'large-style'}
|
||||
focus
|
||||
focusIndex={1}
|
||||
on:change={() => {
|
||||
on:change={async () => {
|
||||
const changeName = await getResource(login.function.ChangeName)
|
||||
changeName(firstName, lastName)
|
||||
}}
|
||||
/>
|
||||
<EditBox
|
||||
placeholder={contactRes.string.PersonLastNamePlaceholder}
|
||||
placeholder={contact.string.PersonLastNamePlaceholder}
|
||||
bind:value={lastName}
|
||||
kind={'large-style'}
|
||||
focusIndex={2}
|
||||
on:change={() => {
|
||||
on:change={async () => {
|
||||
const changeName = await getResource(login.function.ChangeName)
|
||||
changeName(firstName, lastName)
|
||||
}}
|
||||
/>
|
||||
<EditBox
|
||||
placeholder={contactRes.string.DisplayName}
|
||||
placeholder={contact.string.DisplayName}
|
||||
bind:value={displayName}
|
||||
kind={'large-style'}
|
||||
focusIndex={2}
|
||||
|
||||
Reference in New Issue
Block a user