Intranet · Utility consumptions
Records each store’s electricity, gas and water consumption for a period, for service-charge apportionment and sustainability reporting.
| Area | Intranet |
| Routes | intranet.consumptions |
| Centre modules | consumptions · intranet |
| Staff levels | root · admin · manager · storeManager · commerce |
| Models | commerce · consumption |
| UI label | title.header.consumption / menu.navbar.intranet.consumption |
| Coverage | 3 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
- User selects the store.
- Adds a row: type electricity, a positive value and the period start and end.
updatevalidates and saves; the row appears in the table.
Failure paths
Start date missing
Cause — Blank start date.
What happens —
error.consumption.start-date.required.
End date missing
Cause — Blank end date.
What happens —
error.consumption.end-date.required.
End before start
Cause — Period reversed.
What happens —
error.email-campaign.endDatetime.post_startDatetime— correct behaviour, borrowed copy.
Non-positive value
Cause — Consumption 0 or negative.
What happens —
error.consumption.required(‘Consumption is required’).
Module off
Cause —
consumptionsmodule disabled.What happens —
intranet-consumption#canAccessfalse; entry hidden.
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
app/controllers/intranet/consumptions.jsapp/routes/intranet/consumptions.jsapp/models/consumption.jsapp/abilities/intranet-consumption.jsapp/enums/consumption-types.js
Translation keys (10)
Key English title.header.consumptionConsumption management menu.navbar.intranet.consumptionConsumptions consumption.typeType of consumption consumption.valueConsumption consumptions.electricityElectricity (kWh) consumptions.gasGas (m3) consumptions.waterWater (m3) error.consumption.start-date.requiredStart date required error.consumption.end-date.requiredEnd date required error.consumption.requiredConsumption is required
Related
- Same area — Store sales declaration & month closing · Sales status overview & Yardi export · Sales & audit-log CSV download · Annual sales statement · Intranet communications (threads, confirmations, authorisations) · Communication subtypes · Files management · Footfall (flows) & Yardi upload · SAFT-E - IntelliSales import
- Shares data with — Customer receipts tab & ticket-stamp generation · Customer loyalty — coupon exchanges · Receipt verification queue · Store list, filters & exports · Store create & edit · Store CSV import · Activity editor (loyalty mechanics, rules & targeting) · Proposal editor (content, coupon, push, AI images)
Generated from doc/feature-inventory.json · id intranet-consumptions · commit 276788ca6