# Features — magalies-pharma-heisenberg-frontend

Evidence date: 2026-10-09. Source: `git@bitbucket.org:overdrive/magalies-pharma-heisenberg-frontend.git`, `master` at `f153f4f` (2026-02-02). Full hash `f153f4f5d4807c85e49c01a5e5a77c594eff0cc3`.

Provenance labels: **Documented**, **Implemented**, **Inferred**, **Planned**, **Unknown**.

No feature list existed in the repository or in `silicon_ark/magalies-pharma-heisenberg-frontend/` before this file. `README.md` does not list features.

## Current

Routed screens and the services they call. "Menu" means a side-nav entry in `src/core/components/side-nav/side-nav.component.ts`.

| Feature | Route | Menu | Status |
|---|---|---|---|
| Email sign-in, signup hidden, link to terms | `/portal` | n/a | **Implemented** `portal.component.html` |
| Redirect to dashboard after sign-in | `/portal` → `/portal/dashboard` | n/a | **Implemented** `app.component.ts` |
| Full page reload on sign-in | n/a | n/a | **Implemented** `auth.service.ts` Hub `signIn` |
| Global sign-out | side nav | n/a | **Implemented** `Auth.signOut({ global: true })` |
| Welcome heading | `/portal/dashboard` | Dashboard (SuperAdmin) | **Implemented**. Heading is outside the SuperAdmin card, so other roles who open the URL still see it |
| Orders, batches, and medicine charts; date range; Excel/report download | `/portal/dashboard` | SuperAdmin | **Implemented** `dashboard.component.ts`, `dashboard.service.ts` |
| New prescription stepper (PDF, individual or company, lines) | `/portal/submit` | New Prescription | **Implemented** `client-form.component.ts` |
| Prescription list with status filter from the API | `/portal/prescriptions` | Prescriptions | **Implemented** `prescription-list`, `OrdersResolver` |
| Prescription review, status change, PDF with optional OTP line | `/portal/prescriptions/review/:id` | from the list | **Implemented** |
| Prescription view | `/portal/prescriptions/view/:id` | no menu entry found | **Implemented** route |
| Prescription form (second form component) | `/portal/prescriptions-form` | no menu entry found | **Implemented** route `PrescriptionFormComponent` |
| Split an order | `/portal/split/:id` | link from review | **Implemented** `POST /order/{id}/split` |
| Fulfilment scanning | `/portal/fulfill/:id` | link from review | **Implemented** |
| Shipping list and shipping form | `/portal/shipping`, `/portal/shipping/details/:id` | no menu entry found | **Implemented** routes. Inbound link to the list was not found |
| Waybill generate, capture, parcel, complete, mark shipped | dialogs from `ShippingService` | from order actions | **Implemented** |
| Public waybill order table | `/waybill/review/:waybill` | none (outside authenticator) | **Implemented** `f153f4f` |
| Batch list, create, view, link order item, print barcode and label | `/portal/batches` and children | New batch, Batches | **Implemented** |
| User list, create, view, enable, delete, reset password, multiple roles | `/portal/users` and children | SuperAdmin | **Implemented**. List card is SuperAdmin-only |
| Individual list, create, view | `/portal/individuals` and children | SuperAdmin, Prescription | **Implemented** |
| Company list, create, view | `/portal/companies` and children | SuperAdmin, Prescription | **Implemented** |
| Medicine catalogue, dosage type, dosage unit, package type | `/portal/medicine` and children | SuperAdmin, Prescription, Fulfilment, Packaging | **Implemented**. "New medicine" allow-list contains `Fulfilmennt` |
| Order-medicine list and create | `/portal/order-medicine`, `create` | same family as medicine, with the same `Fulfilmennt` typo on create | **Implemented** in `f153f4f` |
| Stocktake count and barcode scan | `/portal/stocktake` | New Stocktake | **Implemented** in `f153f4f` |
| Stocktake difference and scanned reports | `/portal/stocktake/report` | Reports | **Implemented** in `f153f4f` |
| Audit log list | `/portal/logs` | SuperAdmin | **Implemented** |
| Terms page | `/tandcs` | sign-in link | **Implemented**. Body is a placeholder sentence |
| Not-found page | `**` | n/a | **Implemented** |
| Unsaved-changes prompt | forms marked dirty | n/a | **Implemented** `DirtinessGuard` |
| Leave-fulfilment prompt | `/portal/fulfill/:id` | n/a | **Implemented** `FulfilmentGuard` |
| what3words address lookup | shipping service | n/a | **Implemented** |
| Prescription file via presigned S3 URL | `presigned-url.service.ts` | upload control | **Implemented** |
| Role-based menu hiding | side nav | n/a | **Implemented** `authGroup` |

## Completed

Selected history. This is not all 661 commits.

| When | Commit | What |
|---|---|---|
| 2021-11-15 | `b1bc0fe` | Initial commit |
| 2021-11-28 | `f20f6cc` | Initial import of the Angular app |
| 2023-04-21 | `6f2f520` | Users table hidden from non-admins |
| 2023-04-21 | `e137bc9` | Same intent on an earlier fix commit ("Non admin users should not see users table") |
| 2023-04-25 | `ec24304` | Password field removed from create user; password reset UI |
| 2023-04-25 | `e8dd19a` | Multiple roles on a user |
| 2023-04-25 | `ac21d49` | Email and phone not editable on user view |
| 2023-04-25 | `c178dee` | Dashboard welcome heading |
| 2023-04-25 | `f333fa4` | Reload on login |
| 2023-05-17 | `374b53d` | Waybill numbers come from `GET /waybill/generate` |
| 2023-05-17 | `2262c2f` | Search by name on orders |
| 2023-05-24 | `1fd0e54` | Dashboard date time zones |
| 2023-05-30 | `5acc36e` | Environment fix. Last commit of the 2023 line |
| 2026-02-02 | `f153f4f` | Stocktake, order medicine, OTP, prescription form and view, waybill review page, CodeBuild dev and prod files, large review and dashboard edits |

## In development

Nothing. The only remote branch is `master`. No open branch name in this clone indicates in-progress work. Whether someone is working in another clone is **Unknown**.

## Planned

No backlog, TODO register, or milestone file is in the repository.

These look unfinished from the code, and are **not** recorded as an approved plan:

| Item | Why it looks unfinished | Status |
|---|---|---|
| Terms and conditions | `assets/swahilli.txt` says they are "coming soon", while sign-in copy says the user has agreed | **Implemented** placeholder. A real terms document is **Unknown / Requires Confirmation** |
| Public prescription submission | `PublicFormComponent` and Cypress `public-submission.ts` visit `/submit` and expect `/thanks`. Neither path is in the router | **Implemented** as unused component and a stale test. Not a routed feature |
| Thank-you page | `ThanksComponent` is declared in `AppModule` and `core`. No route | **Implemented** as unused components |
| `PrescriptionModule` | Declared, never imported | **Implemented** unused |
| Role guard map | Written, child checks commented out | **Implemented** inactive for child routes |
| `WaybillAuthInterceptor` | Class exists, not provided | **Implemented** unused |
| Live courier tracking | `trackOrder` reads `assets/tracking.json` | **Implemented** fixture, not a carrier API |
| `npm test` via Puppeteer | Script requires `puppeteer` and `mkdirp`, which are not dependencies | **Implemented** script. Whether it runs is **Unknown** |

## Recently changed

`f153f4f` (2026-02-02, Dirk) is the only commit after 2023-05-30. 133 files, +34,656 / −4,528. The message does not name features. The diff adds, among other files:

- `stocktake-view`, `stocktake-reports`, `stocktake.service.ts`
- `order-medicine-*`, `add-order-medicine`, `order-medicine.service.ts`
- `otp.service.ts`, `otp.interface.ts`
- `prescription-form`, `prescription-view`
- `waybill-review-orders`
- `buildspec-dev.yml`, `buildspec-prod.yml`
- Large edits to `prescription-review`, `dashboard`, `prescription.service.ts`, `side-nav`

`package.json` version stayed `0.0.0`.

## Deprecated or removed

| Item | Evidence | Status |
|---|---|---|
| Password on the create-user form | Commit `ec24304`. The form group has no password control. `ngOnInit` still `patchValue`s `password: ""`, which is not a control | **Removed** from the template. The patch is leftover |
| Public `/submit` and `/thanks` routes | Cypress and `PublicFormComponent` still name them. `app-routing.module.ts` does not | **Removed** from the router if they ever existed. The first route table was not fully reconstructed. **Requires Confirmation** |
| Child `RoleAuthorisationGuard` | `canActivateChild` and per-route `canActivate` lines are comments | **Removed** from the active router config. The guard class remains |
| Direct Dawn Wing calls from an older client | `374b53d` "modified waybill generation to use the server" | Generation is `GET /waybill/generate`. Capture still posts to this app's API `/waybill/capture`, which the serverless docs describe as a proxy |

Commented `printServerBaseUrl` lines in `environment.prod.ts` name older LAN hosts (`10.10.0.34`, `10.10.0.15`, `10.10.0.17`, `10.10.0.109`). They are comments, not the active URL.

## Not a feature

- `src/**/dist/*.js` files are compiled JavaScript sitting next to TypeScript. The Angular build uses the `.ts` sources. The `.js` copies are repository content, not a second application.
- `src/app/core/components/order-medicine-list` template text is `order-medicine-list works!`. The routed list is `src/core/components/order-medicine-list`.
