# Features — label_system

Evidence date: 2026-10-10. Source: `master` at `c8b07d50` (2026-06-03).

Status values: **Current** (reachable in this tree), **Completed** (present and not marked unfinished), **Planned** (only a TODO or external link), **Changed** (called out in changelog or a revert commit), **Deprecated / leftover** (starter code with no label workflow).

## Current — label product

| Feature | What it does | Evidence |
|---|---|---|
| SAWIS seamless login | Referer-checked handoff with `shareSesh` and `code`, SHA-256 check against `sysLabelSystemLogin`, auto-registration | `app/Controllers/Welcome.php` |
| Local login | Email and password, SAWIS hash first, then `password_verify` | `Welcome::index` |
| Identity-unknown and forbidden pages | Failed handoff and missing menu grant | `Welcome::identityUnknown`, `Welcome::forbiddenPage`, `Authorization` |
| Label list | Role-scoped, date range, status chips, hides inactive and pre-2024-04-28 rows | `Labels::index`, `app/Views/label/labelList.php` |
| Label form | Product fields, files, history, emails, comments | `Labels::labelForm`, `labelForm.php`, `labelFormMember.php` |
| PDF upload and JPEG preview | Single-page PDF, Imagick, landscape rotated to portrait | `Labels::createLabel` |
| Multi-page label upload | Separate create path and page mapping | `createMultiPageLabel`, `fetchLabelPages`, `saveLabelFileMapping` |
| Submit | Status becomes 1 | `completeLabelSubmission` |
| Resubmit file version | Front, back, neck, supporting, or generic. Version increments | `resubmitLabelFile`, `LabelModel::resubmitLabelFile` |
| Previous versions | Lists older files | `getPreviousLabelFileVersions` |
| Per-file approve or reject | Sets `file.file_approved` and a note | `labelFileApprovalStatus` |
| Comments, replies, agree, delete | `label_note`, optional saved comment | `commentLabel`, `replyComment`, `agreeComment`, `deleteComment` |
| Meeting-group assignment | Sets status 2 and `meeting_group_id` | `reassignToMeetingGroup` |
| Approve / approve with provisions | Status 5 or 6, minutes note, queued email, certificate PDF | `approveLabel`, `labelApprovalPDF` |
| Reject | Status 4, minutes note, queued email, certificate PDF | `rejectLabel` |
| Contest a rejection | Status 7, note type 3, no email in the model method | `contestRejectedlabel` |
| Dispensation request | PDF, DOC, or DOCX, status 11, cron notification | `requestDispensation`, `CronJobs::sendDispensationNotifications` |
| Manual status and group edits | Admin override | `manualLabelSubmissionStatusUpdate`, `manualMeetingGroupUpdate` |
| Soft delete | `label.active = 0` | `deleteLabel` |
| Email templates | CRUD and `{userName}`, `{LabelNumber}`, `{Note}`, `{labelURL}` | `LabelEmailTemplates`, `Email::sendEmailNotification` |
| Send now / reschedule | Acts on `sent_queue` | `Labels::sendEmailNow`, `rescheduleEmail` |
| Open tracking | Public `tracking-pixel` | `EmailPixelTracking::index` |
| Trademark, producer, and production-area search | Typeahead against SAWIS or local data | `typeAndSearchTrademark`, `typeAndSearchProducer`, `typeAndSearchWoo` |
| Status catalogue | Create and edit status, group, and parent | `LabelStatus` |
| Meeting groups and members | Name, active flag, user checkboxes | `LabelUserGroups` |
| Provisions, container types, saved comments, holidays, cron, dispensation address | Settings screens | `SystemSettings` |
| Meeting minutes | List, edit, draft, PDF, email, signed upload | `MeetingMinutes` |
| Analytics screen | Counts by container type | `Analytics` |
| Weekly analytics email | Monday 07:00 SAST, previous week, year-on-year | `CronJobs::sendWeeklyAnalyticsReport` |
| Users, roles, menu permissions | Starter admin, still used for access | `Users`, `Developers\MenuManagement` |
| Home dashboard | Role-filtered label counts | `Home::index` |

## Completed

The label schema from the 2023-10 label table through the 2025-08 meeting-minute documents is migrated in `app/Database/Migrations/`. Blend cultivars (2025-05) and signed meeting documents (2025-01 and 2025-08) are in the tree and used by the form and minutes controllers.

Provenance: **Implemented**. "Completed" here means the code and migration exist. It does not mean a release was signed off. No release record was found.

## Changed

- 2026-01-21, `CHANGELOG.md`: weekly analytics email gained summary, absolute totals, and week, month, and year comparison tables. A temporary `shouldCronRun = true` override was removed.
- 2026-06-03, `master` tip: "Revert changes made by Jacques to match QA". The reverted diff was not available on the depth-1 clone. What was undone is **Unknown / Requires Confirmation**.

## Planned

- `createLabel` TODO: tamper protection breaks that function. Not done.
- `LabelModel::resubmitLabelFile` TODO: whether the replaced file should become inactive. Not done.
- `MenuModel::getSawisMenu` default branch: security group `9999` with a TODO to double-check.
- `CronJobs::checkCronTiming` TODO to verify recurrence during testing.
- README links a Jira board and a Confluence space as development TODOs and documentation. The pages were not read. Contents are **Unknown**.

No in-repository roadmap marks a feature as in development.

## Deprecated / leftover

These ship in the same app. They are not referenced by the label workflows that were read. Provenance: **Implemented** code, **Inferred** as starter leftovers because `composer.json` and `README.md` still describe Admin Overdrive, and Sonar excludes several of the views.

| Feature | Evidence |
|---|---|
| Car finance wizard and `CarApi` steps | `app/Controllers/Car.php`, `CarApi.php`, migrations `car*` |
| ChatGPT page | `ChatGPT`, route `chatGPT` |
| Master file import (Overland, ModelliQ, taste notes, history) and CSV export | `MasterFile.php` |
| UI testing and test log | `Test`, `TestLog` |
| Uploaded files and media files | `UploadedFile`, `MediaFile` |
| Organisations JWT CRUD | `Organisations`, public in the auth filter |
| CRUD generator that writes controller and view files | `Developers\CRUDGenerator`, `MenuManagement` |
| Site health, DB admin, Adminer views | `SiteHealth`, `DbAdmin`, `app/Views/projects/adminer.php` |
| App-session dashboard | `dashboards/appSessions.php` |
| `Users_old.php` | Parallel copy of `Users.php` |

`aws/aws-sdk-php` is required by Composer. No `Aws\` use was found under `app/`. Whether a removed feature needed it is **Unknown**.

## Recently changed

Only the changelog entry of 2026-01-21 and the 2026-06-03 revert message are evidenced. Older commit subjects were not retrieved.

## Removed

No feature flag or migration drops a label capability. `Users_old.php` remains beside `Users.php`. The upgrade-notice redirect in `Welcome::index` is commented out, so a maintenance page is not active.
