# Shared hosting patch file list (code only)

Upload these files into your live **`securetransactionportal/`** tree (paths relative to the Laravel app root). **Do not** upload `.env`, `database/`, `storage/logs/`, or SQLite/MySQL data files.

After upload on the server (if you have Terminal):

```bash
cd ~/path/to/securetransactionportal
php artisan view:clear
php artisan route:clear
```

---

## Operations page — browser translate flicker (latest)

| Upload to | File on your Mac |
|-----------|------------------|
| `resources/views/operations.blade.php` | `resources/views/operations.blade.php` |
| `resources/views/partials/browser-translation-body-script.blade.php` | `resources/views/partials/browser-translation-body-script.blade.php` |

**What this fixes:** Spanish (or other) browser translate fighting with live JSON refresh on **Operational Lifecycle States** and **Active Alerts** (English/Spanish mixing every few seconds).

**Behaviour after patch:**
- Section titles and labels like “Vessel ·”, “Remaining:”, “Rank” can still be translated.
- Status codes, descriptions, USD amounts, and countdown timers stay English (`translate="no"`) so they do not flicker when the board auto-refreshes.

---

## Operations approval notices → Task queue (latest)

| Upload to | File on your Mac |
|-----------|------------------|
| `resources/views/operations.blade.php` | same |
| `resources/views/tasks.blade.php` | same |
| `resources/views/partials/task-queue-workspace-script.blade.php` | same |
| `resources/views/partials/task-queue-actions.blade.php` | same |
| `app/Services/OperationalStateService.php` | same |
| `app/Services/TaskWorkspaceService.php` | same |
| `app/Services/ActionAttentionWorkflowService.php` | same |
| `app/Http/Controllers/TaskWorkspaceController.php` | same |
| `app/Models/TradeOffer.php` | same (if not yet deployed for intake copy) |

**What this fixes:** **Approval notices** chips on Operations opened Offers inside the workspace frame (deformed layout). They now go to **`/tasks`** (Company lane), focus the treasury approval card, and **hide after click** (per browser, stored locally).

**After upload:** `php artisan view:clear`

---

## Task queue · intake acceptance directives (production copy)

| Upload to | File on your Mac |
|-----------|------------------|
| `app/Models/TradeOffer.php` | same |
| `app/Models/TaskQueueAdminMessage.php` | same |
| `app/Services/TradeOfferIntakeService.php` | same |
| `resources/views/partials/control-panel-task-queue-directives.blade.php` | same |
| `resources/views/partials/task-queue-directives-banner.blade.php` | same |

**What this fixes:** Auto-published directives like `[Intake] INT-GOLD-DEMO accepted` with demo placeholder text; replaces with production headlines, step-by-step body, and readable processing labels.

**On live now:** Archive the old row (Control Panel → Task queue directives → **Archive** on ID 1). New acceptances use the updated copy. Optional: rename `INT-GOLD-DEMO` (and other `*-DEMO` refs) in `trade_offers` via admin/SQL if you want intake cards to match — not required for new directives.

**Fresh installs / re-seed only:** `database/seeders/TradeOfferSeeder.php` uses `INT-GOLD-2406` style refs (do not upload seeder to production DB).

---

## Incoming correspondent wires — amount input

| Upload to | File on your Mac |
|-----------|------------------|
| `resources/views/partials/control-station/sections/incoming-wires.blade.php` | same |
| `resources/views/partials/control-station/incoming-wire-form-script.blade.php` | same (new file) |
| `app/Http/Controllers/ControlPanelController.php` | same |

**What this fixes:** Wire **amount** field hard to type or submit on hosted (number-input locale issues, Alpine-only institution binding).

**After upload:** `php artisan view:clear`

---

## Offers & trade intake — communications / actions empty on live

| Upload to | File on your Mac |
|-----------|------------------|
| `resources/views/offers.blade.php` | `resources/views/offers.blade.php` |
| `app/Http/Controllers/TradeOffersController.php` | `app/Http/Controllers/TradeOffersController.php` |
| `app/Services/TradeOfferIntakeService.php` | `app/Services/TradeOfferIntakeService.php` |

**What this fixes:** **View details / communications**, **Send to review**, **Accept offer**, and **Reject offer** showing blank or endless “Loading…” on hosted installs.

**Behaviour after patch:**
- Modal opens immediately with offer header + scaffold content from the list row.
- Snapshot and form POST URLs use Laravel `route()` (respects `APP_URL` / subdirectory).
- First open auto-seeds a baseline communications thread when the DB has no messages (no migration upload).
- Failed snapshot loads show an error + **Retry** instead of an empty panel.

**After upload:** `php artisan view:clear` and `php artisan route:clear` on the server.

---

## Turbo workspace POST — `TurboFrameMissingError` (404)

| Upload to | File on your Mac |
|-----------|------------------|
| `resources/views/partials/head-meta.blade.php` | same |
| `resources/views/partials/task-queue-workspace-script.blade.php` | same |
| `resources/views/partials/task-queue-actions.blade.php` | same |
| `resources/views/partials/task-queue-directives-banner.blade.php` | same |
| `resources/views/partials/attention-workflow-dialog.blade.php` | same |
| `resources/views/partials/attention-workflow-item-card.blade.php` | same |
| `resources/views/partials/activity-panel-inner.blade.php` | same |
| `resources/views/notifications-center.blade.php` | same |
| `resources/views/tasks.blade.php` | same |
| `app/Http/Controllers/TradeOffersController.php` | same (`approveCost` redirects to `/tasks`) |
| `routes/web.php` | same (must include `POST operational-costs/{operational_cost}/approve`) |

**What this fixes:** Console error `The response (404) did not contain the expected <turbo-frame id="workspace-main">` when confirming task actions (e.g. **Approve company-treasury cost**). Turbo was intercepting POSTs inside the workspace frame; a missing/stale route on the server also returns 404.

**After upload:**

```bash
php artisan view:clear
php artisan route:clear
php artisan route:list --name=operational-costs
```

You should see `operational-costs.approve`. If not, `routes/web.php` did not deploy correctly.

---

## Other UI fixes from this workspace (optional — include if not yet on live)

| Area | Files |
|------|--------|
| Linked reserve layout | `resources/views/partials/mandate-earnings-linked-reserve-card.blade.php` |
| Accounts snapshot KPIs | `resources/views/accounts.blade.php` |
| Earnings settlement headlines | `resources/views/settlements-earnings.blade.php`, `resources/views/partials/settlements-earnings-participation-headline.blade.php`, `app/Http/Controllers/DashboardController.php` (method `resolveTreasuryParticipationHeadline` + `settlementsEarnings`) |
| Card expense review task | `app/Http/Controllers/CardController.php`, `app/Services/CardManagementService.php`, `app/Services/TaskWorkspaceService.php`, `app/Services/ActionAttentionWorkflowService.php`, `resources/views/cards/transactions.blade.php`, `resources/views/cards/security-events.blade.php`, `routes/web.php` |
| Withdraw earnings `$mandate` bug | `app/Http/Controllers/DashboardController.php` |
| Stripe removed on Operations header | `resources/views/operations.blade.php` (same file as above) |

**After card routes change:** run `php artisan route:clear` on the server (or locally before zipping).

---

## Do not upload for a code-only patch

- `database/` (migrations, seeders, `database.sqlite`)
- `.env` / `.env.example` (unless you intentionally change production config)
- `storage/` (except ensure `storage/framework/{cache,sessions,views}` and `bootstrap/cache` are writable on the server)
- `node_modules/`, `vendor/` (unless you rebuilt dependencies locally and need to sync `vendor/`)
- `bootstrap/cache/routes-v7.php` — delete on server and run `route:clear` instead

---

## Quick zip from your Mac (operations translate fix only)

```bash
cd "/Users/seun/Downloads/banking system"
zip -r ~/Desktop/ops-translate-patch.zip \
  resources/views/operations.blade.php \
  resources/views/partials/browser-translation-body-script.blade.php
```

Extract inside `securetransactionportal/` on cPanel, preserving folder structure.
