mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 04:37:44 +02:00
TSK-678: Update First/Last names (#2652)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
"CreatePerson": "Create person",
|
||||
"CreatePersons": "Create persons folder",
|
||||
"CreateOrganization": "Create organization",
|
||||
"OrganizationNamePlaceholder": "Apple",
|
||||
"OrganizationNamePlaceholder": "Organization name",
|
||||
"OrganizationsNamePlaceholder": "Organizations",
|
||||
"PersonFirstNamePlaceholder": "John",
|
||||
"PersonLastNamePlaceholder": "Appleseed",
|
||||
"PersonFirstNamePlaceholder": "First name",
|
||||
"PersonLastNamePlaceholder": "Last name",
|
||||
"PersonLocationPlaceholder": "Location",
|
||||
"PersonsNamePlaceholder": "Folder",
|
||||
"CreateOrganizations": "Create organizations folder",
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
"CreatePerson": "Создать персону",
|
||||
"CreatePersons": "Создать папку для людей",
|
||||
"CreateOrganization": "Создать организацию",
|
||||
"OrganizationNamePlaceholder": "Apple",
|
||||
"OrganizationNamePlaceholder": "Имя организации",
|
||||
"OrganizationsNamePlaceholder": "Организации",
|
||||
"PersonFirstNamePlaceholder": "John",
|
||||
"PersonLastNamePlaceholder": "Appleseed",
|
||||
"PersonFirstNamePlaceholder": "Имя",
|
||||
"PersonLastNamePlaceholder": "Фамилия",
|
||||
"PersonLocationPlaceholder": "Местоположение",
|
||||
"PersonsNamePlaceholder": "Папка",
|
||||
"CreateOrganizations": "Создать папку для организаций",
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div class="buttons-group xsmall-gap">
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<span
|
||||
class="select-text cover-channel"
|
||||
class:show
|
||||
|
||||
@@ -168,7 +168,6 @@
|
||||
}
|
||||
const saveItems = (): void => {
|
||||
value = filterUndefined(displayItems)
|
||||
dispatch('change', value)
|
||||
updateMenu(displayItems)
|
||||
}
|
||||
|
||||
@@ -206,6 +205,9 @@
|
||||
displayItems = dropItem(n)
|
||||
} else {
|
||||
item.value = result
|
||||
if (displayItems.find((it) => item.value === it.value) === undefined) {
|
||||
displayItems = [...displayItems, item]
|
||||
}
|
||||
}
|
||||
saveItems()
|
||||
focusManager?.setFocusPos(focusIndex + 1 + n)
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
// Copyright © 2021 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { ScrollBox, tooltip } from '@hcengineering/ui'
|
||||
import ActionIcon from '@hcengineering/ui/src/components/ActionIcon.svelte'
|
||||
import view from '@hcengineering/view'
|
||||
import { queries, toIntl } from '..'
|
||||
import ContentPopup from './ContentPopup.svelte'
|
||||
</script>
|
||||
|
||||
<ScrollBox vertical>
|
||||
<div class="query-content">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Index</th>
|
||||
<th>Class</th>
|
||||
<th>Query</th>
|
||||
<th>Options</th>
|
||||
<th>Result Count</th>
|
||||
<th>Result</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each queries as q}
|
||||
<tr class="tr-body">
|
||||
<td>{queries.indexOf(q)}</td>
|
||||
<td>{q._class}</td>
|
||||
<td>{JSON.stringify(q.query)}</td>
|
||||
<td>{JSON.stringify(q.options ?? {})}</td>
|
||||
<td>{q.result.length}</td>
|
||||
<td>
|
||||
<span use:tooltip={{ label: toIntl('Content'), component: ContentPopup, props: { content: q.result } }}>
|
||||
Results
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<ActionIcon
|
||||
direction={undefined}
|
||||
size="small"
|
||||
icon={view.icon.MoreH}
|
||||
label={toIntl('Perform Class Query')}
|
||||
action={() => {}}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</ScrollBox>
|
||||
|
||||
<style lang="scss">
|
||||
.query-content {
|
||||
display: flex;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 0.5rem 1.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
height: 2.5rem;
|
||||
font-weight: 500;
|
||||
font-size: 0.75rem;
|
||||
color: var(--theme-content-dark-color);
|
||||
box-shadow: inset 0 -1px 0 0 var(--theme-bg-focused-color);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.tr-body {
|
||||
height: 3.25rem;
|
||||
color: var(--theme-caption-color);
|
||||
border-bottom: 1px solid var(--theme-button-border-hovered);
|
||||
}
|
||||
</style>
|
||||
@@ -23,7 +23,6 @@ import core, {
|
||||
Hierarchy,
|
||||
ModelDb,
|
||||
Ref,
|
||||
toFindResult,
|
||||
Tx,
|
||||
TxResult,
|
||||
WithLookup
|
||||
@@ -51,17 +50,16 @@ export interface QueryWithResult {
|
||||
}
|
||||
|
||||
export const transactions: TxWitHResult[] = []
|
||||
export const notifications: Tx[] = []
|
||||
export const queries: QueryWithResult[] = []
|
||||
|
||||
class ModelClient implements Client {
|
||||
notifyEnabled = true
|
||||
constructor (readonly client: Client) {
|
||||
this.notifyEnabled = (localStorage.getItem('#platform.notification.logging') ?? 'true') === 'true'
|
||||
|
||||
client.notify = (tx) => {
|
||||
this.notify?.(tx)
|
||||
console.info('devmodel# notify=>', tx, this.client.getModel(), getMetadata(devmodel.metadata.DevModel))
|
||||
notifications.push(tx)
|
||||
if (notifications.length > 500) {
|
||||
notifications.shift()
|
||||
if (this.notifyEnabled) {
|
||||
console.info('devmodel# notify=>', tx, this.client.getModel(), getMetadata(devmodel.metadata.DevModel))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,26 +80,18 @@ class ModelClient implements Client {
|
||||
options?: FindOptions<T>
|
||||
): Promise<WithLookup<T> | undefined> {
|
||||
const result = await this.client.findOne(_class, query, options)
|
||||
console.info(
|
||||
'devmodel# findOne=>',
|
||||
_class,
|
||||
query,
|
||||
options,
|
||||
'result => ',
|
||||
result,
|
||||
' =>model',
|
||||
this.client.getModel(),
|
||||
getMetadata(devmodel.metadata.DevModel)
|
||||
)
|
||||
queries.push({
|
||||
_class,
|
||||
query,
|
||||
options: options as FindOptions<Doc>,
|
||||
result: toFindResult(result !== undefined ? [result] : []),
|
||||
findOne: true
|
||||
})
|
||||
if (queries.length > 100) {
|
||||
queries.shift()
|
||||
if (this.notifyEnabled) {
|
||||
console.info(
|
||||
'devmodel# findOne=>',
|
||||
_class,
|
||||
query,
|
||||
options,
|
||||
'result => ',
|
||||
result,
|
||||
' =>model',
|
||||
this.client.getModel(),
|
||||
getMetadata(devmodel.metadata.DevModel)
|
||||
)
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -112,27 +102,27 @@ class ModelClient implements Client {
|
||||
options?: FindOptions<T>
|
||||
): Promise<FindResult<T>> {
|
||||
const result = await this.client.findAll(_class, query, options)
|
||||
console.info(
|
||||
'devmodel# findAll=>',
|
||||
_class,
|
||||
query,
|
||||
options,
|
||||
'result => ',
|
||||
result,
|
||||
' =>model',
|
||||
this.client.getModel(),
|
||||
getMetadata(devmodel.metadata.DevModel)
|
||||
)
|
||||
queries.push({ _class, query, options: options as FindOptions<Doc>, result, findOne: false })
|
||||
if (queries.length > 100) {
|
||||
queries.shift()
|
||||
if (this.notifyEnabled) {
|
||||
console.info(
|
||||
'devmodel# findAll=>',
|
||||
_class,
|
||||
query,
|
||||
options,
|
||||
'result => ',
|
||||
result,
|
||||
' =>model',
|
||||
this.client.getModel(),
|
||||
getMetadata(devmodel.metadata.DevModel)
|
||||
)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
async tx (tx: Tx): Promise<TxResult> {
|
||||
const result = await this.client.tx(tx)
|
||||
console.info('devmodel# tx=>', tx, result, getMetadata(devmodel.metadata.DevModel))
|
||||
if (this.notifyEnabled) {
|
||||
console.info('devmodel# tx=>', tx, result, getMetadata(devmodel.metadata.DevModel))
|
||||
}
|
||||
transactions.push({ tx, result })
|
||||
if (transactions.length > 100) {
|
||||
transactions.shift()
|
||||
@@ -166,12 +156,6 @@ export async function Hook (client: Client): Promise<Client> {
|
||||
icon: view.icon.Table,
|
||||
id: 'transactions',
|
||||
component: devmodel.component.ModelView
|
||||
},
|
||||
{
|
||||
label: 'Queries' as IntlString,
|
||||
icon: view.icon.Table,
|
||||
id: 'queries',
|
||||
component: devmodel.component.QueryView
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
"Location": "Location",
|
||||
"Title": "Title",
|
||||
"Source": "Source",
|
||||
"PersonFirstNamePlaceholder": "John",
|
||||
"PersonLastNamePlaceholder": "Appleseed",
|
||||
"PersonFirstNamePlaceholder": "First name",
|
||||
"PersonLastNamePlaceholder": "Last name",
|
||||
"PersonLocationPlaceholder": "Location",
|
||||
"ManageVacancyStatuses": "Manage vacancy templates",
|
||||
"EditVacancy": "Edit",
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
"Location": "Местоположение",
|
||||
"Title": "Заголовок",
|
||||
"Source": "Источник",
|
||||
"PersonFirstNamePlaceholder": "John",
|
||||
"PersonLastNamePlaceholder": "Appleseed",
|
||||
"PersonFirstNamePlaceholder": "First name",
|
||||
"PersonLastNamePlaceholder": "Last name",
|
||||
"PersonLocationPlaceholder": "Местоположение",
|
||||
"ManageVacancyStatuses": "Управление шаблонами вакансии",
|
||||
"EditVacancy": "Редактировать",
|
||||
|
||||
Reference in New Issue
Block a user