{#if noSymbol}
- {floorFractionDigits(value, 3)}
+ {floorFractionDigits(value, 1)}
+ {:else if value > 0 && value < 1}
+
{:else}
-
+
{/if}
diff --git a/plugins/tracker-resources/src/components/sprints/IssueStatistics.svelte b/plugins/tracker-resources/src/components/sprints/IssueStatistics.svelte
index b34093c1811..45749c61b61 100644
--- a/plugins/tracker-resources/src/components/sprints/IssueStatistics.svelte
+++ b/plugins/tracker-resources/src/components/sprints/IssueStatistics.svelte
@@ -20,8 +20,10 @@
import { statusStore } from '@hcengineering/presentation'
import EstimationProgressCircle from '../issues/timereport/EstimationProgressCircle.svelte'
import TimePresenter from '../issues/timereport/TimePresenter.svelte'
+ import { FixedColumn } from '@hcengineering/view-resources'
export let docs: Issue[] | undefined = undefined
export let capacity: number | undefined = undefined
+ export let category: string | undefined = undefined
$: ids = new Set(docs?.map((it) => it._id) ?? [])
@@ -60,7 +62,7 @@
.reduce((it, cur) => {
return it + cur
}, 0),
- 3
+ 1
)
$: totalReported = floorFractionDigits(
(noParents ?? [{ reportedTime: 0, childInfo: [] } as unknown as Issue])
@@ -76,22 +78,24 @@
.reduce((it, cur) => {
return it + cur
}, 0),
- 3
+ 1
)
-{#if docs}
-
-
(capacity ?? 0)}>
-
-
- {#if totalReported > 0}
-
- /
- {/if}
-
- {#if capacity}
-
- {/if}
-
+{#if docs && (category === 'sprint' || category === 'assignee')}
+
+
+ (capacity ?? 0)}>
+
+
+ {#if totalReported > 0}
+
+ /
+ {/if}
+
+ {#if capacity}
+
+ {/if}
+
+
{/if}
diff --git a/plugins/view-resources/src/components/list/ListHeader.svelte b/plugins/view-resources/src/components/list/ListHeader.svelte
index 6c6ea35f88d..a0a4e09356a 100644
--- a/plugins/view-resources/src/components/list/ListHeader.svelte
+++ b/plugins/view-resources/src/components/list/ListHeader.svelte
@@ -19,6 +19,7 @@
ActionIcon,
AnyComponent,
Button,
+ Component,
IconAdd,
IconBack,
IconCheck,
@@ -98,7 +99,7 @@
}}
on:click={() => dispatch('collapse')}
>
-
+
{#if level === 0}
{/if}
@@ -152,6 +153,11 @@
{:else}
{/if}
+
+ {#each extraHeaders ?? [] as extra}
+
+ {/each}
+
{#if createItemDialog !== undefined && createItemLabel !== undefined}
@@ -190,7 +196,7 @@
position: relative;
position: sticky;
top: 0;
- padding: 0 0.75rem 0 0.75rem;
+ padding: 0 2.5rem 0 0.75rem;
height: 2.75rem;
min-height: 2.75rem;
min-width: 0;
diff --git a/tests/sanity/tests/tracker.spec.ts b/tests/sanity/tests/tracker.spec.ts
index 50f4ce64440..16d8a538205 100644
--- a/tests/sanity/tests/tracker.spec.ts
+++ b/tests/sanity/tests/tracker.spec.ts
@@ -120,6 +120,18 @@ test('my-issues', async ({ page }) => {
await expect(page.locator('.antiPanel-component')).not.toContainText(name)
})
+function floorFractionDigits (n: number | string, amount: number): number {
+ return Number(Number(n).toFixed(amount))
+}
+
+function toTime (value: number): string {
+ if (value > 0 && value < 1) {
+ return `${floorFractionDigits(value * 8, 1)}h`
+ } else {
+ return `${floorFractionDigits(value, 1)}d`
+ }
+}
+
test('report-time-from-issue-card', async ({ page }) => {
await navigate(page)
const assignee = 'Chen Rosamund'
@@ -144,7 +156,7 @@ test('report-time-from-issue-card', async ({ page }) => {
await page.click('button:has-text("Create")')
await page.click('#card-close')
- await expect(page.locator('#ReportedTimeEditor')).toContainText(`${time}d`)
+ await expect(page.locator('#ReportedTimeEditor')).toContainText(toTime(time))
}
})
@@ -190,7 +202,7 @@ test('report-time-from-main-view', async ({ page }) => {
await page.click('button:has-text("Create")')
await page.click('#card-close')
- await expect(page.locator('.estimation-container >> span').first()).toContainText(`${Number(count.toFixed(2))}d`)
+ await expect(page.locator('.estimation-container >> span').first()).toContainText(toTime(count))
}
})