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> </script>
{#if _value} {#if _value !== undefined}
{_value} {_value}
{:else} {:else}
{label} {label}

View File

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

View File

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

View File

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

View File

@ -26,13 +26,23 @@
<div class="ac-header__wrap-description"> <div class="ac-header__wrap-description">
<div class="flex-row-center clear-mins"> <div class="flex-row-center clear-mins">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="ac-header__wrap-title" on:click> <div class="ac-header__wrap-title" on:click>
{#if icon}<div class="ac-header__icon"><Icon {icon} size={'small'} /></div>{/if} {#if icon}<div class="ac-header__icon"><Icon {icon} size={'small'} /></div>{/if}
<span class="ac-header__title">{label}</span> <span class="ac-header__title">{label}</span>
</div> </div>
{#if _class}<div class="ml-4"><FilterButton {_class} /></div>{/if} {#if _class}<div class="ml-4"><FilterButton {_class} /></div>{/if}
</div> </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> </div>
<style lang="scss"> <style lang="scss">