diff --git a/web/src/lib/components/phases/PhaseChart.svelte b/web/src/lib/components/phases/PhaseChart.svelte new file mode 100644 index 00000000..8da0c61d --- /dev/null +++ b/web/src/lib/components/phases/PhaseChart.svelte @@ -0,0 +1,251 @@ + + +{#if chartData} +
+ + + + {#each chartData.yTicks as tick (tick.value)} + + + {tick.value} + + {/each} + + + + + + + + + + + + {#if chartData.showTodayMarker} + + + today + + {/if} + + + + + + + {chartData.startLabel} + + + {chartData.endLabel} + + + +
+{/if} + + diff --git a/web/src/lib/components/phases/PhaseTasks.svelte b/web/src/lib/components/phases/PhaseTasks.svelte index e11edc99..66ffeafc 100644 --- a/web/src/lib/components/phases/PhaseTasks.svelte +++ b/web/src/lib/components/phases/PhaseTasks.svelte @@ -5,14 +5,16 @@ import { parseFields, formatItemRef } from '$lib/types'; import { dndzone, TRIGGERS, SHADOW_ITEM_MARKER_PROPERTY_NAME } from 'svelte-dnd-action'; import type { DndEvent } from 'svelte-dnd-action'; + import PhaseChart from './PhaseChart.svelte'; interface Props { wsSlug: string; itemSlug: string; itemId: string; + phaseFields?: Record; } - let { wsSlug, itemSlug, itemId }: Props = $props(); + let { wsSlug, itemSlug, itemId, phaseFields }: Props = $props(); let tasks = $state([]); let loading = $state(true); @@ -123,6 +125,10 @@
+ {#if !loading && tasks.length > 0 && phaseFields?.start_date} + + {/if} + {#if loading}
diff --git a/web/src/routes/[workspace]/[collection]/[slug]/+page.svelte b/web/src/routes/[workspace]/[collection]/[slug]/+page.svelte index fcf63b3a..80d00448 100644 --- a/web/src/routes/[workspace]/[collection]/[slug]/+page.svelte +++ b/web/src/routes/[workspace]/[collection]/[slug]/+page.svelte @@ -454,7 +454,7 @@ {#if collSlug === 'phases' && item} - + {/if}