From 9ce5b45b79f1f3961e9bbca6901cbfb1c1076c74 Mon Sep 17 00:00:00 2001 From: Joel Wedemire Date: Sun, 26 Jul 2026 19:05:30 -0400 Subject: [PATCH] Delete three pockets of dead code, on evidence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. App\Mail\LoginCodeMail + its Blade view. Login codes go through SystemEmail::send('login_code', …), whose TEMPLATES entry carries its own plain-text body — the `emails.login-code` view was referenced ONLY from LoginCodeMail::content(). Checked all 30 repos: the remaining hits were the class itself, two now-unused imports in LoginCodeService, its own render test, and one historical plan doc (prose, left). 2. CustomFieldsController::index(). It rendered 'Admin/Tables', and **no Tables.vue exists anywhere in the workspace** — so it would have blank-screened even if something routed to it, and nothing does. The live editor is Admin → User Settings → Fields (UserSettingsController::index builds a strict superset of that payload), and /admin/settings/tables already redirects there. All four registered actions (store/update/destroy/reorder) still route and were re-verified by name after the change. A docblock now records where the UI lives so the method does not get re-added. 3. Thirteen stale Vue duplicates in dashboard-expenses and dashboard-ticketing. Those pages are served FROM THE SHELL — app.js resolves ./Pages/** before any packages/* glob, Ticketing was never globbed at all, and the built manifest carried the packages/expenses copies only as shadowed dead weight. All 13 were diffed against the shell before deletion: every one is the April original plus the July full-width sweep. Two were not merely stale but BROKEN — Expenses/Budgets called route('expenses.budgets.index'), a name that does not exist, and BudgetEdit still used fiscal_year after the controller moved to schoolYears. One genuine difference is noted rather than lost: the snap-in's Ticketing/Create gated its "Go to Settings" link on isSiteAdmin while the shell's shows it unconditionally, so a non-admin sees a link that 403s — a pre-existing shell behaviour (Index.vue does the same), not caused by this. This matters because config/inertia.php now registers snap-in page roots for tests: a page added ONLY to a snap-in copy would have PASSED tests while 404ing in a browser. resources/js/app.js drops the dangling packages/expenses glob, with a comment tying its list to config/inertia.php so the two cannot drift. Bonus: the same trap existed in dashboard-unifi, whose resources/js/Pages was an empty untracked scaffold that app.js never globbed. Removed. The glob now returns exactly the four roots app.js resolves — admissions, forms, tuition, verification. Tests: 83 (was 84; -1 is the deleted mailable render test), doctor exit 0, and a browser pass over all seven Expenses/Ticketing pages plus /admin/user-settings/fields and /admin/settings/tables — 200, mounted, zero console errors. /app/ticketing/create renders the attachments input, proving the shell copy is what serves. Co-Authored-By: Claude Opus 4.8 --- composer.json | 2 +- resources/js/Pages/Ticketing/Create.vue | 131 ---- resources/js/Pages/Ticketing/Edit.vue | 117 --- resources/js/Pages/Ticketing/Index.vue | 798 --------------------- resources/js/Pages/Ticketing/MyTickets.vue | 76 -- resources/js/Pages/Ticketing/Settings.vue | 560 --------------- resources/js/Pages/Ticketing/Show.vue | 314 -------- 7 files changed, 1 insertion(+), 1997 deletions(-) delete mode 100644 resources/js/Pages/Ticketing/Create.vue delete mode 100644 resources/js/Pages/Ticketing/Edit.vue delete mode 100644 resources/js/Pages/Ticketing/Index.vue delete mode 100644 resources/js/Pages/Ticketing/MyTickets.vue delete mode 100644 resources/js/Pages/Ticketing/Settings.vue delete mode 100644 resources/js/Pages/Ticketing/Show.vue diff --git a/composer.json b/composer.json index d6253b6..fa3ad8d 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dashboard/ticketing", "description": "Help desk ticketing snap-in for the Dashboard platform", - "version": "1.0.2", + "version": "1.0.3", "type": "library", "require": { "php": "^8.2", diff --git a/resources/js/Pages/Ticketing/Create.vue b/resources/js/Pages/Ticketing/Create.vue deleted file mode 100644 index 9a72f11..0000000 --- a/resources/js/Pages/Ticketing/Create.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - diff --git a/resources/js/Pages/Ticketing/Edit.vue b/resources/js/Pages/Ticketing/Edit.vue deleted file mode 100644 index 8a54f85..0000000 --- a/resources/js/Pages/Ticketing/Edit.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - diff --git a/resources/js/Pages/Ticketing/Index.vue b/resources/js/Pages/Ticketing/Index.vue deleted file mode 100644 index 05d7b06..0000000 --- a/resources/js/Pages/Ticketing/Index.vue +++ /dev/null @@ -1,798 +0,0 @@ - - - - - diff --git a/resources/js/Pages/Ticketing/MyTickets.vue b/resources/js/Pages/Ticketing/MyTickets.vue deleted file mode 100644 index 750320f..0000000 --- a/resources/js/Pages/Ticketing/MyTickets.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - diff --git a/resources/js/Pages/Ticketing/Settings.vue b/resources/js/Pages/Ticketing/Settings.vue deleted file mode 100644 index ff15d07..0000000 --- a/resources/js/Pages/Ticketing/Settings.vue +++ /dev/null @@ -1,560 +0,0 @@ - - - diff --git a/resources/js/Pages/Ticketing/Show.vue b/resources/js/Pages/Ticketing/Show.vue deleted file mode 100644 index 59973c8..0000000 --- a/resources/js/Pages/Ticketing/Show.vue +++ /dev/null @@ -1,314 +0,0 @@ - - -