diff --git a/packages/presentation/src/components/UserBox.svelte b/packages/presentation/src/components/UserBox.svelte index 0de693e9f9..67243fecd1 100644 --- a/packages/presentation/src/components/UserBox.svelte +++ b/packages/presentation/src/components/UserBox.svelte @@ -72,18 +72,13 @@ if (!opened) { opened = true showPopup(UsersPopup, { _class, title, caption, allowDeselect, selected: value, titleDeselect }, container, (result) => { - if (result === undefined) { - // Value is not changed. - opened = false - return - } - if (result != null) { - value = result._id - dispatch('change', value) - } else { + if (result === null) { value = null selected = undefined dispatch('change', null) + } else if (result !== undefined && result._id !== value) { + value = result._id + dispatch('change', value) } opened = false }) diff --git a/plugins/recruit-assets/lang/en.json b/plugins/recruit-assets/lang/en.json index b74db1f1ea..49ebda211d 100644 --- a/plugins/recruit-assets/lang/en.json +++ b/plugins/recruit-assets/lang/en.json @@ -50,7 +50,8 @@ "PersonLastNamePlaceholder": "Appleseed", "PersonLocationPlaceholder": "Location", "ManageVacancyStatuses": "Manage vacancy statuses", - "EditVacancy": "Edit" + "EditVacancy": "Edit", + "FullDescription": "Full description" }, "status": { "CandidateRequired": "Please select candidate", diff --git a/plugins/recruit-assets/lang/ru.json b/plugins/recruit-assets/lang/ru.json index e659143fe5..5452a3f603 100644 --- a/plugins/recruit-assets/lang/ru.json +++ b/plugins/recruit-assets/lang/ru.json @@ -50,7 +50,8 @@ "PersonLastNamePlaceholder": "Appleseed", "PersonLocationPlaceholder": "Местоположение", "ManageVacancyStatuses": "Управление статусами вакансии", - "EditVacancy": "Редактировать" + "EditVacancy": "Редактировать", + "FullDescription": "Детальное описание" }, "status": { "CandidateRequired": "Пожалуйста выберите кандидата", diff --git a/plugins/task-resources/src/components/state/DoneStateEditor.svelte b/plugins/task-resources/src/components/state/DoneStateEditor.svelte index 53812949fe..481a3ea390 100644 --- a/plugins/task-resources/src/components/state/DoneStateEditor.svelte +++ b/plugins/task-resources/src/components/state/DoneStateEditor.svelte @@ -49,10 +49,10 @@ if (!opened) { opened = true showPopup(DoneStatesPopup, { space }, container, (result) => { - if (result) { + if (result && result._id !== value) { value = result._id onChange(value) - } else if (result === null) { + } else if (result === null && value !== null) { value = null onChange(value) } diff --git a/plugins/task-resources/src/components/state/StateEditor.svelte b/plugins/task-resources/src/components/state/StateEditor.svelte index 7068a076bc..99ecd2b53b 100644 --- a/plugins/task-resources/src/components/state/StateEditor.svelte +++ b/plugins/task-resources/src/components/state/StateEditor.svelte @@ -40,7 +40,7 @@ if (!opened) { opened = true showPopup(StatesPopup, { space: state.space }, container, (result) => { - if (result) { + if (result && result._id !== value) { value = result._id onChange(value) } diff --git a/plugins/workbench-resources/src/components/WorkbenchApp.svelte b/plugins/workbench-resources/src/components/WorkbenchApp.svelte index c3c3133177..9fc1850313 100644 --- a/plugins/workbench-resources/src/components/WorkbenchApp.svelte +++ b/plugins/workbench-resources/src/components/WorkbenchApp.svelte @@ -19,7 +19,7 @@ import { getMetadata, getResource } from '@anticrm/platform' import type { Client } from '@anticrm/core' import core from '@anticrm/core' import { setCurrentAccount } from '@anticrm/core' -import { navigate, Loading, fetchMetadataLocalStorage } from '@anticrm/ui' +import { navigate, Loading, fetchMetadataLocalStorage, setMetadataLocalStorage } from '@anticrm/ui' import client from '@anticrm/client' import login from '@anticrm/login' @@ -49,7 +49,12 @@ async function connect (): Promise { console.log('login: employee account', me) setCurrentAccount(me) } else { - console.log('WARNING: no employee account found.') + console.error('WARNING: no employee account found.') + setMetadataLocalStorage(login.metadata.LoginToken, null) + setMetadataLocalStorage(login.metadata.LoginEndpoint, null) + setMetadataLocalStorage(login.metadata.LoginEmail, null) + navigate({ path: [login.component.LoginApp] }) + return } try {