Intranet · Utility consumptions

Records each store’s electricity, gas and water consumption for a period, for service-charge apportionment and sustainability reporting.

AreaIntranet
Routesintranet.consumptions
Centre modulesconsumptions · intranet
Staff levelsroot · admin · manager · storeManager · commerce
Modelscommerce · consumption
UI labeltitle.header.consumption / menu.navbar.intranet.consumption
Coverage3 use cases · 1 happy · 5 failure

How it works

Small and self-contained: pick the store (changeCommerce), then add rows with type, value and a start/end period. Validation covers all three realistic mistakes — missing start date, missing end date, end before start, and a non-positive value (0 < consumption). Notably the end-before-start message is borrowed from the email-campaign namespace (error.email-campaign.endDatetime.post_startDatetime), which works but is a copy smell.

Use cases

Why someone opens this (3)

  • Entering quarterly meter readings per tenant for service-charge recharges.
  • Tracking centre-wide utility consumption for ESG reporting.
  • Correcting a mis-entered reading.

Path map

flowchart LR
    F(["Utility consumptions"]):::feat
    F --> H1["Reading recorded"]:::ok
    F -.-> X1["Start date missing"]:::bad
    F -.-> X2["End date missing"]:::bad
    F -.-> X3["End before start"]:::bad
    F -.-> X4["Non-positive value"]:::bad
    F -.-> X5["Module off"]:::bad
    classDef feat fill:#26688f,stroke:#26688f,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Reading recorded

  1. User selects the store.
  2. Adds a row: type electricity, a positive value and the period start and end.
  3. update validates and saves; the row appears in the table.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Reading recorded
  • ⛔ Start date missing
  • ⛔ End date missing
  • ⛔ End before start
  • ⛔ Non-positive value
  • ⛔ Module off

Implementation


Generated from doc/feature-inventory.json · id intranet-consumptions · commit 276788ca6