Shows the three live packages as cards with their price and what is included. Each card links to the contact section with ?pakket=<id>, so the contact form can preselect it. Invalid packages from the CMS are skipped and the pakket value is only accepted when it names a package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.4 KiB
4.4 KiB
Business Rules — Unit 3: Prijzen
Rules
| ID | Rule | Source |
|---|---|---|
| BR-PRICE-01 | A price is shown as € + non-breaking space + the amount in Dutch notation without decimals: € 175, € 1.250. The non-breaking space keeps the price on one line. |
Live site, NFR-HP-01 |
| BR-PRICE-02 | Only packages that meet the invariants (domain-entities.md) are shown; invalid ones are skipped, duplicates by id keep the first. The order of the list is kept. | Q5 = A, robustness for API data |
| BR-PRICE-03 | No VAT note (KOR). | Q1 = C |
| BR-BOOK-01 | Each card has one link to the contact section of the homepage with the package id: /?pakket=<id>#contact. |
FR-HP-04, design Q4 |
| BR-BOOK-02 | The visible link text is Boek <name> when the name has at most 14 characters; otherwise Boek je shoot with the package name added as visually hidden text (Boek je shoot: <name> for screen readers). 14 characters is what fits on one line in the button down to a 320 px phone. |
Q2 = B if it fits, else A |
| BR-BOOK-03 | The button text never wraps (one line on every screen width); on phones the button uses less horizontal padding so the longest allowed label still fits. | Q2 |
| BR-PARAM-01 | pakket is accepted only as a string that matches a shown package id, compared case-insensitively and trimmed; the result is the package's own id. Anything else (unknown id, empty, number, array, missing) is ignored without an error. |
design Q4, security (no reflection of input) |
| BR-PARAM-02 | When the form has taken over the package, pakket is removed from the address bar with a history replace (the #contact hash stays, no extra history entry, no scroll jump). Reloading the page therefore no longer preselects. |
Q4 = B |
| BR-PARAM-03 | Every "Boek" click selects that package in the form, also when the visitor had chosen something else in the form before: the last click wins. | Q3 = A |
| BR-PARAM-04 | Applying, ignoring and removing pakket happen the same way whether the form is switched on or covered by the coming-soon gate. |
FR-HP-07 |
BR-PARAM-02/03/04 are carried out by the contact form (unit 5); this unit defines them and delivers packageFromSearch and the links.
Decision flow: link label (BR-BOOK-02)
graph TD
Start["Package name"] --> Len{"At most 14 characters?"}
Len -->|"yes"| Short["Visible: Boek name"]
Len -->|"no"| Long["Visible: Boek je shoot"]
Long --> Hidden["Hidden for screen readers: colon and name"]
Short --> Done["Accessible name always contains the package name"]
Hidden --> Done
classDef input fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
classDef decision fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
classDef outcome fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
class Start input;
class Len decision;
class Short,Long,Hidden,Done outcome;
Text alternative: a name of at most 14 characters gives the visible label "Boek" plus the name; a longer one gives "Boek je shoot" with the name as hidden text; either way the accessible name contains the package name.
Decision flow: pakket parameter (BR-PARAM-01…03)
graph TD
In["Search parameter pakket"] --> IsString{"Is it a string?"}
IsString -->|"no"| Ignore["Ignore, no preselection"]
IsString -->|"yes"| Match{"Trimmed, lowercase, equals a shown package id?"}
Match -->|"no"| Ignore
Match -->|"yes"| Select["Form selects that package, replacing any earlier choice"]
Select --> Clean["Remove pakket from the URL with history replace, keep hash contact"]
Ignore --> CleanAlso["Remove pakket from the URL as well"]
classDef input fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
classDef decision fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
classDef outcome fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
class In input;
class IsString,Match decision;
class Ignore,Select,Clean,CleanAlso outcome;
Text alternative: a non-string or unknown pakket is ignored; a matching one selects that package in the form (replacing an earlier choice); in both cases the parameter is then removed from the URL with a history replace, keeping #contact.
Misuse considerations (SECURITY-11)
pakketis never rendered or reflected; only a known id from our own list can come out ofpackageFromSearch.- Crafted values (very long strings, script, unicode look-alikes) simply match nothing.