Fix UI. Update Scroller. (#2270)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov
2022-09-16 09:59:16 +07:00
committed by GitHub
parent 13b6459c95
commit 719da02f7c
18 changed files with 157 additions and 78 deletions
@@ -1,4 +1,5 @@
<script lang="ts">
import { createEventDispatcher, afterUpdate } from 'svelte'
import { Class, Doc, Ref, RelatedDocument } from '@anticrm/core'
import { getResource, IntlString, translate } from '@anticrm/platform'
import { createQuery, getClient, ObjectSearchPopup, ObjectSearchResult } from '@anticrm/presentation'
@@ -10,6 +11,8 @@
export let value: Issue
const dispatch = createEventDispatcher()
const client = getClient()
const query = createQuery()
$: relations = {
@@ -119,6 +122,10 @@
},
...(hasRelation ? removeRelationAction : [])
]
afterUpdate(() => dispatch('changeContent', true))
</script>
<Menu {actions} />
{#if actions}
<Menu {actions} on:changeContent={() => dispatch('changeContent', true)} />
{/if}
@@ -1,5 +1,5 @@
<script lang="ts">
import { Scroller } from '@anticrm/ui'
import { Scroller, issueSP, defaultSP } from '@anticrm/ui'
import IssuesListBrowser from './IssuesListBrowser.svelte'
import tracker from '../../plugin'
import { Issue, IssueStatus, ViewOptions } from '@anticrm/tracker'
@@ -68,7 +68,7 @@
</script>
<div class="w-full h-full clear-mins">
<Scroller tableFade={categories[0] !== undefined} fadeTopOffset={48}>
<Scroller fade={categories[0] !== undefined ? issueSP : defaultSP}>
<IssuesListBrowser
{_class}
{currentSpace}
@@ -18,7 +18,17 @@
import { FindOptions } from '@anticrm/core'
import presentation, { Card } from '@anticrm/presentation'
import { Issue, TimeSpendReport } from '@anticrm/tracker'
import { Button, EditBox, EditStyle, eventToHTMLElement, IconAdd, Label, Scroller, showPopup } from '@anticrm/ui'
import {
Button,
EditBox,
EditStyle,
eventToHTMLElement,
IconAdd,
Label,
Scroller,
tableSP,
showPopup
} from '@anticrm/ui'
import { TableBrowser } from '@anticrm/view-resources'
import { createEventDispatcher } from 'svelte'
import tracker from '../../../plugin'
@@ -75,7 +85,7 @@
</div>
<Label label={tracker.string.ChildEstimation} />:
<div class="h-50">
<Scroller tableFade>
<Scroller fade={tableSP}>
<TableBrowser
showFilterBar={false}
_class={tracker.class.Issue}
@@ -91,7 +101,7 @@
</div>
<Label label={tracker.string.ReportedTime} />:
<div class="h-50">
<Scroller tableFade>
<Scroller fade={tableSP}>
<TableBrowser
_class={tracker.class.TimeSpendReport}
query={{ attachedTo: { $in: [object._id, ...childIds] } }}
@@ -17,7 +17,7 @@
import { FindOptions } from '@anticrm/core'
import presentation, { Card } from '@anticrm/presentation'
import { Issue, TimeSpendReport } from '@anticrm/tracker'
import { Button, eventToHTMLElement, IconAdd, Scroller, showPopup } from '@anticrm/ui'
import { Button, eventToHTMLElement, IconAdd, Scroller, tableSP, showPopup } from '@anticrm/ui'
import { TableBrowser } from '@anticrm/view-resources'
import tracker from '../../../plugin'
import IssuePresenter from '../IssuePresenter.svelte'
@@ -54,7 +54,7 @@
<IssuePresenter value={issue} disableClick />
</svelte:fragment>
<div class="h-50">
<Scroller tableFade>
<Scroller fade={tableSP}>
<TableBrowser
showFilterBar={false}
_class={tracker.class.TimeSpendReport}