Minor fixes (#1103)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov 2022-03-05 10:59:27 +06:00 committed by GitHub
parent d22fbaee48
commit 07ad3bba09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 16 deletions

View File

@ -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
})

View File

@ -50,7 +50,8 @@
"PersonLastNamePlaceholder": "Appleseed",
"PersonLocationPlaceholder": "Location",
"ManageVacancyStatuses": "Manage vacancy statuses",
"EditVacancy": "Edit"
"EditVacancy": "Edit",
"FullDescription": "Full description"
},
"status": {
"CandidateRequired": "Please select candidate",

View File

@ -50,7 +50,8 @@
"PersonLastNamePlaceholder": "Appleseed",
"PersonLocationPlaceholder": "Местоположение",
"ManageVacancyStatuses": "Управление статусами вакансии",
"EditVacancy": "Редактировать"
"EditVacancy": "Редактировать",
"FullDescription": "Детальное описание"
},
"status": {
"CandidateRequired": "Пожалуйста выберите кандидата",

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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<Client | undefined> {
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 {