# Active / Priority Branches

Branches with work in progress or ready to deploy. Updated manually as work progresses.

---

## PRIORITY — Ready to Deploy

### `irrigation-tablet-repair-flow`
Tablet repair workflow terminology update.
- "Approve Now" button → "Approve Or Complete" on proposal screen
- Repair document title: "Repair Estimate for" → "Tablet Repair Completed for"
- Files: `Controller/Tablet.php`, `views/admin/acctmgr/proposal/v_detail2.php`
- Status: committed, not yet merged to main or deployed to live

---

## ACTIVE — Work In Progress

### `dial`
Dial/phone feature

### `enh-statereport-and-pipeline`
State report + pipeline enhancements

### `property-brochure`
Property brochure

### `property-budgeting`
Property budgeting

### `proposal-analysis-v2`
Proposal analysis v2

### `workorder-notifications`
Work order notification system

---

## RECENT — Merged to Main

### `review-system`
Direct Google redirect for 8-10 NPS ratings — skips intermediate page, goes straight to Google review URL. Tracks `google_clicked_at` server-side.

### `tablet-site-map`
Overview button on tablet property maps view — loads irrimaps.us in an iframe filling available window height. Controlled per-company via `application/config/sitemap.php`.

### `proposal-copy-fix`
Copied proposal now owned by session user (`users.cophone` fallback also in this area). `copy()` JS uses `ajaxStop` instead of blind timeout to load detail after list refresh. `showSignature` dialog loads content before opening.

### `pdf-generation`
Proposal PDF phone number — uses `users.cophone` for the proposal owner with fallback to `company['cophone']`. Also fixed `showSignature` dialog loading content before opening (was blank on first click).

### `proposal-change-log`
Field-level change tracking on `proposal` and `proposal_item` tables via PostgreSQL triggers. Logs field, previous value, new value, user_id, timestamp to `proposal_log` and `proposal_item_log`. PHP userid passed via `application/classes/Controller.php` `before()` using `set_config('app.current_userid')` — covers all controllers. Deploy SQL: `docs/proposal-change-log.sql`. Requires `app.current_userid = ''` in postgresql.conf (PG9.4: `custom_variable_classes = 'app'`).

### `train-walkthrough-dial`
Dial feature training walkthrough — `Train.php` `action_walkthrough_dial()`, `views/training/dial/v_dial_walkthrough.php`, 15 training images in `images/training/dial/`. Accessible at `/train/walkthrough_dial`.

### `support-incident-system`
- `reviewResolution()` button and `commitKB()` function added to incident modal view (Resolution tab, only shown when status is not resolved/closed)
- `.mi-btn-danger` margin-right spacing fix

---

## ENVIRONMENT BRANCHES (reference only, never merge to main)

| Branch | Purpose |
|--------|---------|
| `environment-all` | Runtime folders: `files/`, `trainingfiles/` |
| `environment-php8` | PHP8 compatibility patches |
| `environment-php5` | PHP5.4 live server compatibility |
| `environment-xampp` | XAMPP Apache vhost, SSL certs, mkcert CA, hosts file |
| `environment-training` | Static training content for dev machines |
