Hide subissues button if not exist (#2671)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-02-21 14:22:49 +06:00 committed by GitHub
parent 7befac7d55
commit 117f9f291a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,27 +110,29 @@
{#if viewlet && hasSubIssues && viewOptions}
<ViewletSettingButton bind:viewOptions {viewlet} kind={'transparent'} />
{/if}
<Button
width="min-content"
icon={IconScaleFull}
kind={'transparent'}
size={'small'}
showTooltip={{ label: tracker.string.OpenSubIssues, direction: 'bottom' }}
on:click={() => {
const filter = createFilter(tracker.class.Issue, 'attachedTo', [issue._id])
if (filter !== undefined) {
closeTooltip()
const loc = getCurrentLocation()
loc.fragment = undefined
loc.query = undefined
loc.path[2] = trackerId
loc.path[3] = issue.space
loc.path[4] = 'issues'
navigate(loc)
$filterStore = [filter]
}
}}
/>
{#if hasSubIssues}
<Button
width="min-content"
icon={IconScaleFull}
kind={'transparent'}
size={'small'}
showTooltip={{ label: tracker.string.OpenSubIssues, direction: 'bottom' }}
on:click={() => {
const filter = createFilter(tracker.class.Issue, 'attachedTo', [issue._id])
if (filter !== undefined) {
closeTooltip()
const loc = getCurrentLocation()
loc.fragment = undefined
loc.query = undefined
loc.path[2] = trackerId
loc.path[3] = issue.space
loc.path[4] = 'issues'
navigate(loc)
$filterStore = [filter]
}
}}
/>
{/if}
<Button
id="add-sub-issue"
width="min-content"