# Features — pestelite_html (Pest Elite)

Evidence date: 2026-10-06.

Source: `main` at `c5476a0` (2024-02-19, Jason Wandrag, "Functional Updates"). Parent commit: `158f88b` (2024-02-09, "First commit").

Status words used here:

- **Current** — present on `main` and reachable from the screens or from `config.xml`.
- **Completed** — introduced in a commit and still present.
- **Unused** — present in the tree and not referenced by the current screens.
- **Removed** — present in an earlier commit or in a comment, and not the active path.
- **External** — behaviour that lives in the live Form.io project, not in git.
- **Not in repository** — named by the onboarding scan or by the product shape, and absent from git.

No feature is marked planned. The repository does not describe future work.

## Current features

| Feature | Status | Where |
|---|---|---|
| Cordova widget PestElite, id `com.elite.pest`, version 1.0.0, start page `index.html` | Current. Completed in `158f88b`. Icon added in `c5476a0` | `config.xml` |
| Android and iOS declared as Cordova platforms | Current. Packages locked at cordova-android `12.0.1` and cordova-ios `7.0.1`. `platforms/` is gitignored and not in the clone | `package.json`, `package-lock.json` |
| Login with email and password | Current. Completed in `c5476a0` | `www/index.html` |
| JWT and user id stored in `localStorage` | Current. Keys `x-jwt-token`, `pest-elite-user`, `pest-elite-user-id` | `www/index.html` |
| Redirect to site forms after login | Current | `www/index.html` sends the browser to `./sites.html` |
| Site / service report list, add, and details | Current. Completed in `c5476a0` | `www/sites.html` |
| Client list, alphabetical by client name, add, and details | Current. Completed in `c5476a0` | `www/clients.html` |
| Pesticide list, add, and details | Current. Completed in `c5476a0` | `www/pesticides.html` |
| User list, add, and details | Current. Completed in `c5476a0` | `www/users.html` |
| Top navigation between the four registers | Current. On sites, a class toggle runs when the user role is `admin` | `www/sites.html`, `www/clients.html`, `www/pesticides.html`, `www/users.html` |
| Failed list request returns to login | Current | the four list pages |
| Pest Elite logo in the nav and on the login form | Current. File replaced in `c5476a0` (21814 bytes to 24952 bytes) | `www/img/logo.png` |
| Bootstrap layout and Form.io modals | Current. Libraries loaded from CDNs, not vendored | the HTML pages |
| npm scripts `start` (`cordova emulate`) and `android` (`cordova emulate android`) | Current. Completed in `158f88b`. The Cordova CLI is not a declared dependency | `package.json` |

## External features the screens depend on

These forms are **Current** on Form.io as fetched on 2026-10-06. They are not files in git. The login form was last modified on 2024-02-12, before the last app commit. The other four were modified after `c5476a0`. See the PRD for the field lists.

| Form.io path | Title | Used by |
|---|---|---|
| `pestelitelogin` | Pest Elite Login | `www/index.html` (hand-written POST, not the Form.io renderer) |
| `digimonkv1` | Digimonkv1 | `www/sites.html` |
| `clientregister` | PE Client Register | `www/clients.html`, and the site form's client dropdown |
| `pesticidesregister` | PE PesticidesRegister | `www/pesticides.html`, `www/sites/index.html`, and the site form's pesticide dropdown |
| `pesteliteusers` | Pest Elite Users (resource) | `www/users.html`, the sites page role check, and the site form's technician dropdown |

Service-report sections that exist only on the Form.io form (service report, pesticide grid, signatures, checklists, non-conformance, recommendation, file upload) are **External**. The HTML does not draw those fields. It embeds the form.

## Unused or leftover

| Item | Status | Notes |
|---|---|---|
| `www/js/index.js` device-ready handler | Unused by the screens. Still loaded by every page | Looks for `#deviceready`, which is not in the HTML. Completed in `158f88b` as the Cordova sample |
| `www/css/index.css` | Unused. Link tags are commented out | Cordova sample stylesheet. Completed in `158f88b` |
| `www/js/formio.js` | Unused. Empty file | Completed in `158f88b` |
| `www/js/lib/constants.js` | Unused. Nothing imports it | Exports `FORMIO_BASE_URL` as `https://rzkiqpzlxxtfqjl.form.io`. Completed in `158f88b` |
| `openUpdateModal` on all four list pages | Unused. No button calls it | Completed in `c5476a0`. Details uses the view modal instead |
| `www/sites/index.html` | Unused by navigation | Renders `pesticidesregister` and logs submit. Title remains "Hello World". Script path `js/index.js` does not resolve from that folder |
| Sample description and Apache author | Still current in the metadata, and not what the screens show | `config.xml`, `package.json` |
| Login page title "Hello World" | Current | `www/index.html` `<title>` |

## Changed between the two commits

`c5476a0` added `www/clients.html`, `www/pesticides.html`, `www/sites.html`, `www/users.html`, and `www/sites/index.html`. It also replaced the login body in `www/index.html`, replaced the logo, and added the icon element to `config.xml`.

The active login is a `fetch` POST. The previous Form.io renderer path remains in `www/index.html` as a comment. That comment redirects to `./pesticide.html` and uses `sessionStorage` key `pestEliteUser`. Neither the file nor that storage key is used by the active script.

## Removed

Nothing has been deleted from git. The commented login flow is the only retired path, and it is still in the file.

## Not in the repository

| Item | Status |
|---|---|
| Logout | Not in the UI |
| Delete record | Not in the UI |
| Role behaviour for `client` and `technician` | Values exist on the user form. No screen implements them |
| Tests | `npm test` exits 1 with "no test specified" |
| CI, Docker, README, deployment config | Not in the tree |
| `sonar-project.properties`, `sonarqube_scan.bat` | Listed by the onboarding scan of the host working copy. Not in `main` |
| Committed Android/iOS platform projects and plugins | Gitignored. Absent from the clone |
| `cordova.js` script tag | Not in the HTML |

## Recently changed

The last git change is `c5476a0` on 2024-02-19. After that, the live forms changed without a matching commit: `digimonkv1` modified 2024-02-23, `pesteliteusers` 2024-04-08, `pesticidesregister` 2024-04-15, `clientregister` 2024-07-12. Provenance: the `modified` field on each form. Those form edits are **External** and are not a git diff.
