Play Center · Play centre stays (check-in / check-out)
The supervised-play-area desk screen: who is currently inside, with the child’s name, birth date, guardian, guardian contact details and time in the centre, plus check-in and check-out against the centre’s capacity.
| Area | Play Center |
| Routes | play-center · play-center.children · play-center.children.index |
| Centre modules | playcenter |
| Staff levels | root · admin · manager · crmmanager · crmoperator · weboperator |
| Models | child · child-stay · user |
| UI label | play-center-stays / menu.navbar.playcenter.show |
| Coverage | 5 use cases · 2 happy · 6 failure |
How it works
playcenterFull compares current occupancy with the capacity configured on the centre — the only hard capacity control in the product. Check-in requires the guardian to have a VAT number on file (child#canCheckIn needs hasVatNumber && !isInPlayCenter), which is a legal-identification requirement expressed as an ability, and the message tells the operator exactly how to fix it. is-in-play-center and play-center.time make the current state and dwell time visible at a glance; the same operations are also reachable from a customer’s children list.
Use cases
Why someone opens this (5)
- Checking a child in when a parent drops them off, recording the expected pick-up time.
- Seeing who is inside and how long they have been there during an evacuation or shift handover.
- Refusing entry when the area is at capacity.
- Refusing entry when the guardian has no VAT number on file.
- Checking a child out when collected.
Path map
flowchart LR F(["Play centre stays check-in / check-out"]):::feat F --> H1["Child checked in"]:::ok F --> H2["Child checked out"]:::ok F -.-> X1["Play area full"]:::bad F -.-> X2["Guardian without a VAT number"]:::bad F -.-> X3["Child already inside"]:::bad F -.-> X4["Check-in/out rejected"]:::bad F -.-> X5["Times missing"]:::bad F -.-> X6["Module disabled"]:::bad classDef feat fill:#a6406c,stroke:#a6406c,color:#ffffff,font-weight:bold classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13
Happy paths
Child checked in
- Operator finds the guardian and their registered child.
- The guardian has a VAT number and the area is below capacity.
- Entry time and expected exit time are entered in the check-in modal.
child.checkin-success-messageconfirms and the child appears in the current-stays list with a running time.
Child checked out
- Operator opens the check-out modal for a child inside.
- Confirms;
child.checkout-success-messageis shown and occupancy drops.
Failure paths
Play area full
Cause —
playcenterFulltrue against the configured capacity.What happens — Check-in is blocked — the capacity limit is enforced in the UI rather than only server-side.
Guardian without a VAT number
Cause —
hasVatNumberfalse.What happens —
child.not-dni-error-message(“It isn’t allowed to use the play center without entering a VAT number. Please, go to user profile to set it”) — a rare example of an error that tells the user exactly where to go.
Child already inside
Cause —
isInPlayCentertrue on check-in.What happens —
canCheckInfalse, so only check-out is offered.
Check-in/out rejected
Cause — API error.
What happens —
response.errorsare mapped throughmapErrorsintoerrorDetailsand listed.
Times missing
Cause — Entry or expected exit time blank.
What happens —
error.crm.children.entryTime.required/error.crm.children.expectedExitTime.required.
Module disabled
Cause —
playcentermodule off.What happens —
module-playcenter#canAccesshides the section.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Child checked in
- ✅ Child checked out
- ⛔ Play area full
- ⛔ Guardian without a VAT number
- ⛔ Child already inside
- ⛔ Check-in/out rejected
- ⛔ Times missing
- ⛔ Module disabled
Implementation
app/controllers/play-center/children/index.jsapp/routes/play-center/children/index.jsapp/models/child.jsapp/models/child-stay.jsapp/abilities/module-playcenter.jsapp/abilities/child.js
Translation keys (14)
Key English play-center-staysPlay center menu.navbar.playcenter.showPlay center check-inCheck in child.check-outCheck out is-in-play-centerIs in play center play-center.timeTime play-center.tutorTutor crm.children.nameName crm.children.bdateBirthday date child.checkin-success-messageChild register correctly child.checkout-success-messageChild checkout confirmed child.not-dni-error-messageIt isn’t allowed to use the play center without entering a VAT number. Please, go to user profile to set it error.crm.children.entryTime.requiredEntry time is required error.crm.children.expectedExitTime.requiredExpected exit time is required
Related
- Shares data with — Customer children (dependants) · Children CSV import · Customer list & filtering · Customer create & edit · Customer deletion with unsubscribe notice · Customer CSV export with column picker · Customer CSV import · AI natural-language customer filter
- Behind the same module — Customer children (dependants) · Children CSV import
Generated from doc/feature-inventory.json · id playcenter-stays · commit 276788ca6