|
|
@ -7,6 +7,7 @@ |
|
|
|
import LabeledProgress from "../common/LabeledProgress.svelte"; |
|
|
|
import LabeledProgressRow from "../common/LabeledProgressRow.svelte"; |
|
|
|
import Markdown from "../common/Markdown.svelte"; |
|
|
|
import SprintKindSelect from "../controls/SprintKindSelect.svelte"; |
|
|
|
import ItemSubSection from "../project/ItemSubSection.svelte"; |
|
|
|
|
|
|
|
export let sprint: Sprint |
|
|
@ -19,12 +20,22 @@ |
|
|
|
} else { |
|
|
|
timeRange = void(0); |
|
|
|
} |
|
|
|
|
|
|
|
let aggregateRequired = 0; |
|
|
|
let aggregateSmooth = false; |
|
|
|
$: if (sprint.kind === SprintKind.Stats && sprint.aggregateRequired < 1) { |
|
|
|
aggregateSmooth = true; |
|
|
|
aggregateRequired = sprint.progress.reduce((a, c) => a + (c.weight * c.required), 0); |
|
|
|
} else { |
|
|
|
aggregateSmooth = false; |
|
|
|
aggregateRequired = sprint.aggregateRequired; |
|
|
|
} |
|
|
|
</script> |
|
|
|
<Markdown source={sprint.description} /> |
|
|
|
{#if sprint.kind === SprintKind.Items} |
|
|
|
<LabeledProgress timeRange={timeRange} green name={sprint.aggregateName || "Items"} count={sprint.itemsAcquired} target={sprint.itemsRequired} /> |
|
|
|
{:else} |
|
|
|
<LabeledProgress timeRange={timeRange} name={sprint.aggregateName} count={sprint.aggregateAcquired} target={sprint.aggregateRequired} weighted={!sprint.isUnweighted} /> |
|
|
|
<LabeledProgress alwaysSmooth={aggregateSmooth} timeRange={timeRange} name={sprint.aggregateName} count={sprint.aggregateAcquired} target={aggregateRequired} weighted={!sprint.isUnweighted} /> |
|
|
|
{/if} |
|
|
|
{#if !sprint.isCoarse} |
|
|
|
<LabeledProgressRow> |
|
|
@ -34,7 +45,7 @@ |
|
|
|
</LabeledProgressRow> |
|
|
|
{/if} |
|
|
|
{#if sprint.kind !== SprintKind.Items && sprint.aggregateBurndown != null && sprint.aggregateBurndown.length > 0} |
|
|
|
<BurndownChart data={sprint.aggregateBurndown} from={sprint.fromTime} to={sprint.toTime} milestone={sprint.aggregateRequired||1} /> |
|
|
|
<BurndownChart data={sprint.aggregateBurndown} from={sprint.fromTime} to={sprint.toTime} milestone={aggregateRequired||1} /> |
|
|
|
{/if} |
|
|
|
{#if sprint.kind === SprintKind.Items && sprint.itemBurndown != null && sprint.itemBurndown.length > 0} |
|
|
|
<BurndownChart green data={sprint.itemBurndown} from={sprint.fromTime} to={sprint.toTime} milestone={sprint.itemsRequired||1} /> |
|
|
|