Intranet · Intranet communications (threads, confirmations, authorisations)
Internal messaging between centre management and stores: typed communications (issues, access authorisations, general notices) with threads and responses, per-recipient read/confirm tracking, state changes, urgency flags, a signed confirmation PDF and a CSV export of recipients.
| Area | Intranet |
| Routes | intranet.communications · intranet.communications.index · intranet.communications.new · intranet.communications.show |
| Centre modules | intranet |
| Staff levels | root · admin · manager · scmanager · storeManager · commerce · services |
| Models | commerce · intranet-communication · intranet-staff · intranet-subtype · staff-member |
| UI label | title.header.communication / menu.navbar.intranet.communication.index |
| Coverage | 6 use cases · 3 happy · 10 failure |
Known issues (1)
Missing translations
These keys are used on this screen but do not exist in
translations.json, so users see the raw key:
error.communication.store.requiredintranet.communications.terms-and-conditions
How it works
Permission logic here is the most explicit in the codebase and uses dedicated error classes rather than booleans: changeState throws NotAllowedError when the user is not management, when their staff level equals the communication’s from_role, or when the type is not issue/access; confirm throws IllegalStateError if already confirmed and NotAllowedError if the user’s level may not confirm; respondTo throws when the responder’s role does not match. A business rule is encoded in a validation message: an access authorisation must be dated at least 48 hours after creation unless the Urgent flag is set (error.communication.date.invalid). Confirmation is tracked per recipient (total_confirmed, confirmed, viewed, received) and a per-recipient PDF is downloadable from /v3/intranet_communications/:id/confirm_receipt, saved as <email>_confirmation.pdf. The index can filter by source and type (changeSource, changeType, changeFiltersWithSource) and uses a v3 meta shape (metaV3).
Use cases
Why someone opens this (6)
- Management broadcasting an operational notice to all stores and seeing who has read and confirmed it.
- A store raising an issue (e.g. a maintenance fault) and following the thread to resolution.
- Requesting access authorisation for contractors, with companion details and a 48-hour notice rule.
- Downloading a signed confirmation PDF as proof a store acknowledged a notice.
- Exporting the recipient list with read/confirm status for compliance.
- Duplicating a recurring notice.
Path map
flowchart LR F(["Intranet communications threads, confirmations,…"]):::feat F --> H1["Notice sent and confirmed"]:::ok F --> H2["Access authorisation with companions"]:::ok F --> H3["Recipients exported"]:::ok F -.-> X1["Access date too soon"]:::bad F -.-> X2["No recipient store"]:::bad F -.-> X3["Companion data incomplete"]:::bad F -.-> X4["State change not allowed"]:::bad F -.-> X5["Double confirmation"]:::bad F -.-> X6["Response from the wrong role"]:::bad F -.-> X7["Staff update fails"]:::bad F -.-> X8["Confirmation PDF unavailable"]:::bad F -.-> X9["Detail not permitted"]:::bad F -.-> X10["Raw translation key on screen"]:::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
Notice sent and confirmed
- Management creates a communication, picks a subtype and selects the recipient stores.
- Stores receive it; each recipient’s
received/viewedstate updates as they open it.- A store user clicks confirm;
confirmchecks it is not already confirmed and that their level may confirm, then setsconfirmed.total_confirmedincreases on the index and management downloads the confirmation PDF.
Access authorisation with companions
- A store creates an access communication at least 48 hours ahead, listing companions.
- Validation passes and the authorisation is sent.
- Management changes its state as it is processed.
Recipients exported
- Management opens the show view and triggers the CSV export of recipients.
informative-message.export-crm-csv.success.messageconfirms the emailed file.
Failure paths
Access date too soon
Cause — Authorisation dated less than 48 hours after creation without the Urgent flag.
What happens —
error.communication.date.invalidspells out both the rule and the escape hatch.
No recipient store
Cause — No store selected.
What happens —
error.communication.commerce.required(‘Select at least one shop’).
Companion data incomplete
Cause — A companion row left partly blank.
What happens —
error.communication.companion.required(‘Some companions have blank data’).
State change not allowed
Cause — Non-management user, same level as
from_role, or a type other than issue/access.What happens — Throws
NotAllowedErrorwith a specific message per case — precise, but surfaced as an exception rather than a UI message.
Double confirmation
Cause — Confirming an already-confirmed communication.
What happens — Throws
IllegalStateError('only can be confirmed communications that haven\'t been confirmed before').
Response from the wrong role
Cause —
respondTocalled by a role the communication does not accept.What happens — Throws
NotAllowedErrornaming thefrom_role.
Staff update fails
Cause — API error updating a recipient’s state.
What happens —
intranet.communications.error(‘Error updating staff member’).
Confirmation PDF unavailable
Cause — The recipient has no signature on file.
What happens —
error.signature.not_exist(‘The user does not have signature’).
Detail not permitted
Cause —
canShowDetail/canDetailfalse for the role.What happens — The detail action is hidden;
canShowAlladditionally limits whose communications are listed.
Raw translation key on screen
Cause — The code references
error.communication.store.required,intranet.communications.terms-and-conditionsbut the key does not exist in translations.json.What happens — ember-intl renders the missing key (or its missing-message placeholder) instead of text — visible to every user of this screen until the key is added.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Notice sent and confirmed
- ✅ Access authorisation with companions
- ✅ Recipients exported
- ⛔ Access date too soon
- ⛔ No recipient store
- ⛔ Companion data incomplete
- ⛔ State change not allowed
- ⛔ Double confirmation
- ⛔ Response from the wrong role
- ⛔ Staff update fails
- ⛔ Confirmation PDF unavailable
- ⛔ Detail not permitted
- ⛔ Raw translation key on screen
Implementation
app/controllers/intranet/communications/index.jsapp/controllers/intranet/communications/show.jsapp/routes/intranet/communications/show.jsapp/models/intranet-communication.jsapp/abilities/intranet-communication.jsapp/enums/communication-types.jsapp/components/form-intranet-communication.jsapp/components/intranet-communication-thread.jsapp/components/communication-state.jsapp/components/eula-communications-modal.js
Translation keys (20)
Key English title.header.communicationCommunications menu.navbar.intranet.communication.indexCommunications intranet.new-communicationNew communication communications.subjectSubject communications.typeType communications.stateState communications.urgencyUrgent communications.creatorCreator communications.datetimeDatetime communication.confirmedConfirmed communication.viewedViewed communication.receivedReceived communication.roleRol communication.commerce-nameShop communications.show.download-confirmation-pdfDownload confirmation error.communication.date.invalidThe date must be more than 48 hours from the creation of the authorization. You must check the Urgent check for earlier dates error.communication.commerce.requiredSelect at least one shop error.communication.companion.requiredSome companions have blank data intranet.communications.errorError updating staff member error.signature.not_existThe user does not have signature
Related
- Same area — Store sales declaration & month closing · Sales status overview & Yardi export · Sales & audit-log CSV download · Annual sales statement · Communication subtypes · Files management · Footfall (flows) & Yardi upload · SAFT-E - IntelliSales import · Utility consumptions
- Shares data with — Staff member editor (levels, scope, API token) · 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)
Generated from doc/feature-inventory.json · id intranet-communications · commit 276788ca6