Test fixes (#1197)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2022-03-24 16:04:29 +07:00
committed by GitHub
parent 6f7e95e233
commit dd809242b1
23 changed files with 439 additions and 86 deletions
@@ -30,21 +30,23 @@
</script>
{#if channels?.length === 0}
<CircleButton
icon={IconAdd}
size={'small'}
selected
on:click={(ev) =>
showPopup(contact.component.SocialEditor, { values: channels }, ev.target, (result) => {
if (result !== undefined) {
dispatch('change', result)
}
})}
/>
<span class="ml-2"><Label label={presentation.string.AddSocialLinks} /></span>
<div id="channels-edit">
<CircleButton
icon={IconAdd}
size={'small'}
selected
on:click={(ev) =>
showPopup(contact.component.SocialEditor, { values: channels }, ev.target, (result) => {
if (result !== undefined) {
dispatch('change', result)
}
})}
/>
<span class="ml-2"><Label label={presentation.string.AddSocialLinks} /></span>
</div>
{:else}
<ChannelsView value={channels} size={'small'} {integrations} on:click />
<div class="ml-1">
<div id="channels-edit" class="ml-1">
<CircleButton
icon={contact.icon.Edit}
size={'small'}
@@ -60,7 +60,6 @@
let container: HTMLElement
</script>
<div class="caption-color cursor-pointer" bind:this={container} class:empty={selected === undefined} on:click|preventDefault={() => {
if (!opened) {
opened = true
@@ -30,6 +30,10 @@
const query = createQuery()
const dispatch = createEventDispatcher()
let items: ListItem[] = []
let selected: ListItem | undefined
let resolved = false
query.query(contact.class.Organization, {}, (res) => {
items = res.map((org) => {
return {
@@ -41,12 +45,13 @@
if (value !== undefined) {
selected = items.find((p) => p._id === value)
}
resolved = true
})
let items: ListItem[] = []
let selected: ListItem | undefined
$: setValue(selected)
$: if (resolved) {
setValue(selected)
}
function setValue (selected: ListItem | undefined): void {
if (selected === undefined) {
@@ -60,7 +60,7 @@
async function createApplication () {
const state = await client.findOne(task.class.State, { space: doc.space })
if (state === undefined) {
throw new Error('create application: state not found')
throw new Error(`create application: state not found space:${doc.space}`)
}
const sequence = await client.findOne(task.class.Sequence, { attachedTo: recruit.class.Applicant })
if (sequence === undefined) {
@@ -23,15 +23,13 @@
Data,
Doc,
FindResult,
generateId,
Hierarchy,
MixinData,
generateId, MixinData,
Ref,
TxProcessor
} from '@anticrm/core'
import login from '@anticrm/login'
import { getMetadata, getResource, setPlatformStatus, unknownError } from '@anticrm/platform'
import presentation, {
import {
Card,
createQuery,
EditableAvatar,
@@ -271,7 +269,7 @@
const categoriesMap = new Map(Array.from(categories.map((it) => [it._id, it])))
const newSkills: TagReference[] = []
// Create missing tag elemnts
for (const s of doc.skills ?? []) {
const title = s.trim().toLowerCase()
@@ -17,13 +17,13 @@
import calendar from '@anticrm/calendar'
import contact, { Contact } from '@anticrm/contact'
import { OrganizationSelector } from '@anticrm/contact-resources'
import { getClient, UserBox, UserBoxList, UserInfo } from '@anticrm/presentation'
import { getClient, UserBox, UserBoxList } from '@anticrm/presentation'
import type { Review } from '@anticrm/recruit'
import { StyledTextBox } from '@anticrm/text-editor'
import { Grid, Label, showPanel, StylishEdit } from '@anticrm/ui'
import view from '@anticrm/view'
import { createEventDispatcher, onMount } from 'svelte'
import recruit from '../../plugin'
import view from '@anticrm/view'
export let object: Review
@@ -80,21 +80,6 @@
}}
/>
</div>
<Grid column={2}>
<StylishEdit
label={calendar.string.Location}
bind:value={object.location}
on:change={() => client.update(object, { location: object.location })}
/>
<div class="antiComponentBox">
<OrganizationSelector
bind:value={object.company}
label={recruit.string.Company}
on:change={() => client.update(object, { company: object.company })}
/>
</div>
</Grid>
<div class="flex-row">
<div class="mt-4 mb-2">
<Label label={calendar.string.Participants} />
@@ -90,11 +90,11 @@
}
</script>
<div class="flex-between trans-title mb-3">
<div id='create-template' class="flex-between trans-title mb-3">
<Label label={setting.string.Templates}/>
<CircleButton icon={IconAdd} size="medium" on:click={createTemplate} />
</div>
<div class="flex-col overflow-y-auto">
<div id='templates' class="flex-col overflow-y-auto">
{#each templates as t (t._id)}
<div class="ac-column__list-item" class:selected={t._id === template?._id} on:click={() => select(t)}>
<AttributeEditor maxWidth={'15rem'} _class={task.class.KanbanTemplate} object={t} key="title"/>
@@ -77,7 +77,7 @@
<ShowMore ignore={!showTitle}>
<div class:tags-container={showTitle} class:mt-4={showTitle}>
<div class="flex flex-reverse">
<div class="ml-4">
<div id='add-tag' class="ml-4">
<Tooltip label={tags.string.AddTagTooltip} props={{ word: keyLabel }}>
<CircleButton icon={IconAdd} size={'small'} selected on:click={addTag} />
</Tooltip>
@@ -65,7 +65,7 @@
<div class="ap-header">
<EditWithIcon icon={IconSearch} bind:value={search} placeholder={tags.string.SearchCreate} focus>
<svelte:fragment slot="extra">
<div class="ml-27" bind:this={anchor}>
<div id='new-tag' class="ml-27" bind:this={anchor}>
<ActionIcon
label={tags.string.AddNowTooltip}
labelProps={{ word: title }}
@@ -57,7 +57,7 @@
async function createTask () {
const state = await client.findOne(task.class.State, { space: _space })
if (state === undefined) {
throw new Error('create application: state not found')
throw new Error('create task: state not found')
}
const sequence = await client.findOne(task.class.Sequence, { attachedTo: task.class.Issue })
@@ -66,7 +66,7 @@
<div class="ac-body columns">
<div class="ac-column">
<div class="flex-between trans-title mb-3">
<div id='create-template' class="flex-between trans-title mb-3">
<Label label={templatesPlugin.string.TemplatesHeader} />
<CircleButton icon={IconAdd} on:click={addTemplate} />
</div>
@@ -218,7 +218,7 @@
value={getValue(object, attribute.key)}
{...attribute.props}
/>
<div class="antiTable-cells__firstCell-menuRow" on:click={(ev) => showMenu(ev, object, row)}>
<div id='context-menu' class="antiTable-cells__firstCell-menuRow" on:click={(ev) => showMenu(ev, object, row)}>
<MoreV size={'small'} />
</div>
</div>
@@ -262,7 +262,7 @@
notify={hasNotification}
/>
<div class="flex-center">
<div
<div id="profile-button"
class="cursor-pointer"
on:click|stopPropagation={(el) => {
showPopup(AccountPopup, {}, 'account')
@@ -64,7 +64,7 @@
{:else}
{#await actions() then actionItems}
{#if actionItems.length === 1}
<div class="an-element__tool">
<div id={_id} class="an-element__tool">
<ActionIcon
label={actionItems[0].label}
icon={actionItems[0].icon}