# Features — myPass

Evidence date: 2026-10-09. Source: `git@bitbucket.org:overdrive/mypass.git`, `master` at `803166e` (2022-01-27).

Status words used here:

- **Current** — present on `master` and reached from `index.html`.
- **In the tree, not on the page** — files exist; the registration page does not load them.
- **Removed or disabled in the page** — an earlier commit added it; the current page does not offer it.
- **Not in this repository** — named only so it is not mistaken for a feature of this tree.

There is no issue tracker, README, or feature list in the repository. "Planned" is empty: nothing in the tree describes future work. The later repositories `myPass-registration` and `myPass-App` are separate products, not a roadmap written here.

## Current

### F-001 — Four-step accreditation form

Personal, Identity, Events, Submit. Tab headers are not clickable (`pointer-events: none`). Movement is the Next and Previous controls.

Evidence: `index.html` `#tab-1` through `#tab-4`, `setTabActive` in `scripts/core.js`.

### F-002 — Subdomain event map

First hostname label selects an event id from `domains.js`. Unknown labels replace the page with "Please check subdomain".

Evidence: `domains.js`, `scripts/core.js`. Commits `e59cc74`, `30793f6`, `4f628e7`, `9a07309`, `803166e`.

### F-003 — Event content from Footprint

Titles, banner, categories, roles, terms, declaration text, linked events, organisation-reference flag, and close date come from `GET /api/mypass/getevent/EventID/{id}`.

Evidence: `DOMContentLoaded` handler in `scripts/core.js`.

### F-004 — Registration closed message

When `DATA.DateTo` is today or earlier, the form body is hidden and the page shows "Registration for this event is now closed."

Evidence: `dateInPast` in `scripts/core.js`. Commit `11e1d9f` (2021-06-15).

### F-005 — Step completion gates

Next on Personal and Identity is hidden until `checkDivInputs` finds no empty values, with address line 2 and the organisation reference exempt. Events Next requires one checked linked event. Submit requires both declaration checkboxes.

Evidence: `checkDivInputs`, `oncheckEventSubmit`, `oncheckSubmit`.

### F-006 — Nationality drives country, dial code, and ethnicity

Choosing a nationality sets the country and dial code by substring match and enables ethnicity only for `South Africa`.

Evidence: `onNationality`. Ethnicity options in `index.html` `#ethnicity`.

### F-007 — Dial codes, including UK and USA

`#mobileNumberPre` is a long hardcoded list. United Kingdom is `44`. United States of America is `1`.

Evidence: `index.html`. Commits `65f74d7`, `9c25c70` (2021-06-08, `heinrichoverdrive`).

### F-008 — Mobile number tick

More than 9 characters shows a green tick. Fewer shows a red cross. Leading zeros are stripped only in the submitted payload.

Evidence: `validateField`, `submitRegistration`. Commit `803166e`.

### F-009 — Free-text postal code

`#postalCode` is a text input. It is not numeric-only.

Evidence: `index.html`. Commit `89d3668` (2021-06-08, "Made postal code freetext").

### F-010 — Birth years 1930 to the current year

The year list is built in script. 1990 is the selected option. Day and month are static lists. The day and month placeholders use value `00`.

Evidence: `scripts/core.js` year loop. Commit `5ce83bc`.

### F-011 — Gender options

Male (default), Female, Prefer not to say. The payload is `F` or `M` only. Prefer not to say is sent as `M`.

Evidence: `index.html` gender radios, `submitRegistration`. Commit `7a305d2` ("New gender and colors").

### F-012 — Pass name from personal names

First name copies into the pass name. Surname appends onto it.

Evidence: `nameToPass`, `surnameToPass`.

### F-013 — Organisation lookup

Search by reference number against `GET /api/mypass/getorganisation/ORefNumber/{ref}`. Six characters triggers the search automatically. The trading name fills a disabled organisation-name field.

Evidence: `searchOrg`, `orgCodeSearch`. Commit `b62f2dc` ("Add new search and and API").

### F-014 — Optional organisation reference

When `RegistrationFields.RequireOrganisationReference` is `"0"`, the reference row is hidden and the organisation name can be typed.

Evidence: `scripts/core.js` after `getevent`.

### F-015 — Categories and roles from the event

Categories come from `Cats`. Roles filter by the selected category's `ACID`. Category value `0` shows every role.

Evidence: `roleSelect`. The event payload is cached in `localStorage` key `regFormDetails`.

### F-016 — Role description

Required by the empty check. The hint asks for function, responsibilities, and any special access.

Evidence: `#roleDescription` in `index.html`.

### F-017 — Photo upload and crop

File input accepts `image/*`. Cropme viewport is 250 by 280, square, with zoom and rotation. Crop result is the image posted as `profileImage`.

Evidence: `readFile`, `editImage`, `cropImage`, `plugins/cropme/`. Commits `96a7203`, `d68baa3`, `66f3e3d`.

### F-018 — Linked events step

Shown when `MediaEvent` is not `"0"` and `Linked` is present. Checkboxes use `LID` and label `Acc_Secondary`. Checked ids are posted as `eventsLinked`.

Evidence: `scripts/core.js` linked-event loop. Commits `1d0b8d4`, `03bc855`.

### F-019 — Hide events step

When `MediaEvent` is `"0"` or `Linked` is absent, the Events tabs are hidden and Identity Next's collapse target becomes the Submit step.

Evidence: `scripts/core.js`. Commit `dad93a4`, `03bc855`.

### F-020 — Terms modal and second declaration

Terms HTML comes from `DATA.TermsAndConditions`. The second checkbox label comes from `DATA.AccreditationNote`. Both must be checked to submit. The HTML default for the second label is a 14-day Covid-19 statement.

Evidence: `#menu-call`, `#tandcCheck`, `#covidCheck`, `#covidLabel`.

### F-021 — Submit application

`POST /api/mypass/postaccreditation` with the JSON payload in the PRD (FR-010). Success shows the event team name, `REF: {REFNUMBER}`, and `info@mypass.zone`. Close reloads the page.

Evidence: `submitRegistration`, `#response`. Contact address commit `097486a`.

### F-022 — Service worker

Cache-first, precache list is only `index.html`, cache name `Cache-Version-v1`. Registered because `isPWA` is true.

Evidence: `_service-worker.js`, `scripts/custom.js` (`pwaLocation = "/_service-worker.js"`).

### F-023 — Deploy to S3 and CloudFront

Pushes to `master` use `PROD_*` variables. Pushes to `qa` use `QA_*` variables. Each branch uploads the clone directory, then invalidates CloudFront.

Evidence: `bitbucket-pipelines.yml`. Invalidation added in `6122675` (2021-05-28).

### F-024 — Green highlight override

On load, local storage highlight `MyPass-Highlight` is set to `green`, and the body background is set to white.

Evidence: top of `scripts/core.js`.

## In the tree, not on the page

### F-025 — Design exports

Static HTML under `exports/` for sign-in, sign-up, organisation sign-up, forgot password, reset password, welcome, add-to-home, home, menu, health list, health-pass profiles, temperature list and profile, onboarding, and an accreditation application mock. Commit `7d10e20` ("XD Exports", 2021-05-11).

`index.html` does not link to these files. They are not a working product.

### F-026 — Theme catalogue

`template/` is the AppKit / Enabled component gallery (menus, galleries, store pages, charts). `menu-main.html` still titles the drawer "AppKit".

### F-027 — Theme mailer

`php/contact.php` (and a copy under `template/php/`) emails `mail@domain.com`. No form on the registration page posts to it.

### F-028 — Country dataset

`country.json` holds country name, code, capital, region, currency, language, flag URL, and dialling code. No script on the registration page reads it. Lists in `index.html` are independent.

### F-029 — Theme behaviours that the page does not use

`scripts/custom.js` includes dark mode, install prompt, QR generation via `api.qrserver.com`, geolocation, share links, contact-form `XMLHttpRequest`, and AJAX page transitions (`isAJAX = true`). The registration page does not include the markup those features query, except the shared menu and preloader helpers that do run.

### F-030 — Sonar scanner leftovers

`sonar-scanner.bat` launches a scanner from `C:\sonar-scanner`. `.scannerwork/report-task.txt` records project key `MyPassRegistration` and SonarQube 8.9.1. Commit `da1b9b8` ("Sonar-Scan done", 2021-07-10). There is no `sonar-project.properties` in the tree, and no pipeline step runs a scan.

### F-031 — vCard file

`scripts/vcard.vcf` is present. The registration page does not link to it.

## Removed or disabled in the page

| Item | Evidence |
|---|---|
| Phone field on Identity | Markup is inside an HTML comment. `registerUser.phone` is commented out in `submitRegistration` |
| Success-panel contact name | `#contactName` assignment is commented out. The div is commented out in `index.html` |
| API-provided contact email | `json.EMAIL` assignment is commented out. The panel always uses `info@mypass.zone` |
| Reset-photo button | `resetImage` exists. The button that called it is commented out |
| Hardcoded role list | `905e7f8` "All roles removed" (2021-05-31). Current roles are filled from the event API, which is a replacement, not an empty list |

## Not in this repository

| Item | Where it actually is |
|---|---|
| `getstyling` hostname lookup, organisation limit stop, favicon from the API, Covid checkbox removed and restored | `myPass-registration` (later client; last commit on that repo 2023-01-18) |
| Sign-in, health certificate, symptom check, pass QR | `myPass-App`, and only as pictures under this repo's `exports/` |
| Vehicle permit dashboard | `track.mypass.zone` |
| Footprint API implementation, mail sending, application review | Not in any of the front-end trees inspected for this document |

## Recently changed

The last five commits on `master`, newest first:

| Commit | Date | Change |
|---|---|---|
| `803166e` | 2022-01-27 | Domain map and mobile-number length tick |
| `b6d159d` | 2022-01-25 | Spelling |
| `097486a` | 2022-01-17 | Contact email address on the success panel |
| `0e11ca6` | 2022-01-05 | "Update code registration package" |
| `9a07309` | 2022-01-04 | Domain list |

Nothing has been committed since 2022-01-27.
