23 lines
2.8 KiB
Markdown
23 lines
2.8 KiB
Markdown
# 01 — Open plan statistics for calculated leave usage
|
|
|
|
**What to build:** The user opens a statistics popup from the calendar and sees how many new leave days the displayed valid plan uses, including a valid plan retained after cancellation. This establishes a usable first slice that later tickets extend with the other statistics.
|
|
|
|
**Blocked by:** None — can start immediately.
|
|
|
|
**Status:** ready-for-agent
|
|
|
|
**GitLab:** [#65](https://gitlab.nessar.fr/nessar/vac-optimizer/-/work_items/65)
|
|
|
|
Source: the agreed Plan Statistics Popup spec for [#3](https://gitlab.nessar.fr/nessar/vac-optimizer/-/issues/3) and [#29](https://gitlab.nessar.fr/nessar/vac-optimizer/-/issues/29), in milestone %3: V1 stats. Follow the domain glossary and ADRs 0002, 0004, 0006, and 0007.
|
|
|
|
- [ ] A labelled calendar control opens one statistics popup for the latest calculated valid plan. Opening it runs no optimization and changes no planning data.
|
|
- [ ] The popup shows the number of leave placement dates with an explicit leave-day label. Declared non-working days consume no balance and are excluded from this count. A valid plan with no placements displays 0 and still permits opening the popup.
|
|
- [ ] A retained valid plan from an incomplete calculation exposes the same popup with a prominent "Partial plan" label. Invalid input, a planning conflict, or an incomplete calculation without a retained valid plan exposes no statistics.
|
|
- [ ] Statistics refer to the producing calculation and its submitted inputs. Editing balances, rules, declarations, or the horizon, inspecting historical trace steps, and exploring hypothetical dates do not change the displayed count.
|
|
- [ ] A new valid outcome replaces the statistics. A new outcome without a valid plan clears them, including any already open popup. Late replies from an older calculation cannot restore or overwrite them.
|
|
- [ ] Popup access is available with the valid outcome while trace delivery is pending or has failed. Reuse the existing result lifecycle and dialog patterns without introducing another calculation or trace-dependent summary.
|
|
- [ ] The control and popup work with the existing language settings, keyboard opening and dismissal, visible focus, focus containment and restoration, meaningful accessible labels, and a readable mobile layout.
|
|
- [ ] Existing behavior tests verify complete and retained partial plans, zero placements, declared-day exclusion, pending input edits, delayed or failed trace delivery, stale replies, and replacement by an outcome without a valid plan. Verify keyboard behavior and run the repository's existing tests, lint, formatting, type checks, and production build.
|
|
|
|
This ticket is independently demonstrable by calculating a plan and opening its leave-usage summary. It does not depend on declared-day period aggregation or earned-leave acquisition changes.
|