Fix small issues (#2646)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-02-16 16:19:48 +07:00 committed by GitHub
parent 96a00697d4
commit e8d6a10ab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 19 deletions

View File

@ -30,7 +30,7 @@
}
</script>
{#if _value}
{#if _value !== undefined}
{_value}
{:else}
{label}

View File

@ -21,11 +21,11 @@
import bitrix from '../plugin'
import { BitrixClient, BitrixEntityMapping, BitrixProfile, StatusValue } from '@hcengineering/bitrix'
import { Button, eventToHTMLElement, IconAdd, Label, showPopup } from '@hcengineering/ui'
import { Button, eventToHTMLElement, IconAdd, showPopup } from '@hcengineering/ui'
import { bitrixQueue } from '../queue'
import CreateMapping from './CreateMapping.svelte'
import EntiryMapping from './EntityMapping.svelte'
import { bitrixQueue } from '../queue'
export let integration: Integration
@ -78,18 +78,14 @@
{/if}
</svelte:fragment>
{#if profile}
{#if !profile.ADMIN}
<Label label={bitrix.string.NotAllowed} />
{:else}
<div class="flex flex-reverse flex-grab">
<Button icon={IconAdd} label={presentation.string.Add} on:click={addMapping} />
</div>
<div class="flex-row">
{#each mappings as mapping}
<EntiryMapping {mapping} {bitrixClient} {statusList} />
{/each}
</div>
{/if}
<div class="flex flex-reverse flex-grab">
<Button icon={IconAdd} label={presentation.string.Add} on:click={addMapping} />
</div>
<div class="flex-row">
{#each mappings as mapping}
<EntiryMapping {mapping} {bitrixClient} {statusList} />
{/each}
</div>
{/if}
<!-- <EditBox label={bitrix.string.BitrixTokenUrl} bind:value={url} /> -->
<svelte:fragment slot="pool" />

View File

@ -73,9 +73,15 @@
}}
>
<svelte:fragment slot="subtitle">
<a href={object.description} target="_blank" rel="noreferrer noopener">
{object.description}
</a>
{#if object.description}
{#if object.description.trim().startsWith('http://') || object.description.trim().startsWith('https://')}
<a href={object.description} class="whitespace-nowrap" target="_blank" rel="noreferrer noopener">
{object.description}
</a>
{:else}
{object.description}
{/if}
{/if}
</svelte:fragment>
<svelte:fragment slot="attributes" let:direction={dir}>
{#if dir === 'column'}

View File

@ -149,6 +149,8 @@
templateId = undefined
template = undefined
object = { ...defaultIssue }
subIssues = []
labels = []
if (!originalIssue && !draft) {
updateIssueStatusId(currentTeam, status)
}

View File

@ -26,13 +26,23 @@
<div class="ac-header__wrap-description">
<div class="flex-row-center clear-mins">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="ac-header__wrap-title" on:click>
{#if icon}<div class="ac-header__icon"><Icon {icon} size={'small'} /></div>{/if}
<span class="ac-header__title">{label}</span>
</div>
{#if _class}<div class="ml-4"><FilterButton {_class} /></div>{/if}
</div>
{#if description}<span class="ac-header__description">{description}</span>{/if}
{#if description}
<span class="ac-header__description">
{#if description.trim().startsWith('http://') || description.trim().startsWith('https://')}
<a href={description} class="whitespace-nowrap" target="_blank" rel="noreferrer noopener">
{description}
</a>
{:else}
{description}
{/if}
</span>{/if}
</div>
<style lang="scss">