fix: crash bugs in TeamInvoices + faster load

Bug fixes:
- TeamInvoices: add useAuth import/currentUser (invoice-create crash)
- TeamInvoices: setChartYear -> setExportYear (year-dropdown crash)
- TeamDashboard: drop redundant setState-in-effect (cascading renders)
- Companies: delete dead _UnusedClientCompanies (illegal hook calls)
- annotate intentional empty PDF-fallback catches

Load speed:
- preconnect/dns-prefetch to Supabase origin
- lazy-load heic-to in Converters: page chunk 2737KB -> 9KB
- split recharts into its own 'charts' vendor chunk

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Krao Hasanee
2026-06-08 12:59:11 -04:00
parent 85625f4d95
commit 04e0911e9f
101 changed files with 11786 additions and 7445 deletions
+185
View File
@@ -0,0 +1,185 @@
# Site Completion and Billing Audit
Generated: 2026-06-04T13:58:27.846Z
- Listed sites: 95
- Found in database: 39
- Missing from database: 56
- Checked vs DB mismatches: 15
## Missing From Database
- 00278
- 00279
- 00281
- 00282
- 00284
- 00290
- 00291
- 30051
- 30054
- 30056
- 30058
- 30061
- 30063
- 30068
- 30095
- 30098
- 30210
- 30262
- 30319
- 30342
- 00288
- 30344
- 30345
- 30348
- 30349
- 30350
- 30355
- 30357
- 30407
- 68175
- 30412
- 30413
- 68215
- 68216
- 30437
- 68220
- 68432
- 68516
- 68617
- 68620
- 68631
- 68636
- 68637
- 68638
- 68715
- 68723
- 68751
- 68776
- 68777
- 68778
- 68779
- 68780
- 68781
- 68782
- 68784
- 68785
## Checked vs Database Mismatches
- 00286 00286 Riverside, CA: you marked completed, DB status is not_started
- 30055 30055 Moreno Valley, CA: you marked completed, DB status is client_review
- 30096 30096 Eerie, CO: you marked completed, DB status is not_started
- 68639 68639 NSA Los Lunas NM: you marked completed, DB status is client_review
- 68663 68663 NSA Oklahoma City OK: you marked completed, DB status is not_started
- 68664 68664 NSA Oklahoma City OK: you marked completed, DB status is not_started
- 68666 68666 NSA Oklahoma City, OK: you marked completed, DB status is not_started
- 68669 68669 NSA Oklahoma City OK: you marked completed, DB status is not_started
- 68670 68670 NSA Oklahoma City OK: you marked completed, DB status is not_started
- 68671 68671 NSA Oklahoma City OK: you marked completed, DB status is not_started
- 68673 68673 NSA Oklahoma City OK: you marked completed, DB status is client_review
- 68808 68808 Camas, WA: you marked completed, DB status is not_started
- 68809 68809 Centralia, WA: you marked completed, DB status is not_started
- 68810 68810 Chehalis, WA: you marked completed, DB status is not_started
- 68811 68811 Kelso, WA: you marked completed, DB status is not_started
## Audit Table
| Site # | DB Title | Internal # | In DB | Your Check | DB Completed | Match | Current R# | Active Status | R00 Billed | Billed Revisions | Completed Unbilled Revisions | Version Status Summary |
|---|---|---:|---:|---:|---:|---:|---|---|---|---|---|---|
| 00278 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 00279 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 00281 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 00282 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 00284 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 00285 | 00285 NSA Moreno Valley CA | 65 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 00286 | 00286 Riverside, CA | 31 | Yes | Yes | No | No | R01 | not_started | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: not_started |
| 00290 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 00291 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30049 | 30049 Elk Grove, CA | 32 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 30051 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30054 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30055 | 30055 Moreno Valley, CA | 33 | Yes | Yes | No | No | R01 | client_review | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: client_review |
| 30056 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30058 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30060 | 30060 NSA Palmdale CA | 66 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 30061 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30062 | 30062 Riverside, CA | 34 | Yes | Yes | Yes | Yes | R00 | invoiced | Yes (INV-2026-006 (sent)) | — | — | R00: invoiced / billed |
| 30063 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30068 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30091 | 30091 NSA Colorado Springs CO | 67 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 30094 | 30094 Colorado Springs, CO | 35 | Yes | Yes | Yes | Yes | R00 | client_approved | No | — | — | R00: client_approved |
| 30095 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30096 | 30096 Eerie, CO | 36 | Yes | Yes | No | No | R02 | not_started | Yes (INV-2026-006 (sent)) | — | R01 | R00: completed / billed; R01: completed; R02: not_started |
| 30098 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30101 | 30101 Monument, CO | 37 | Yes | No | No | Yes | R00 | on_hold | No | — | — | R00: on_hold |
| 30210 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30211 | 30211 NSA Post Falls ID | 68 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 30212 | 30212 NSA Sandpoint ID | 69 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 30258 | 30258 Lebanon, NH | 38 | Yes | Yes | Yes | Yes | R00 | invoiced | Yes (INV-2026-006 (sent)) | — | — | R00: invoiced / billed |
| 30259 | 30259 Hamburg, NJ | 39 | Yes | Yes | Yes | Yes | R00 | invoiced | Yes (INV-2026-006 (sent)) | — | — | R00: invoiced / billed |
| 30261 | 30261 NSA Clovis NM | 70 | Yes | Yes | Yes | Yes | R00 | client_approved | No | — | — | R00: client_approved |
| 30262 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30319 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30342 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 00288 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30344 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30345 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30348 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30349 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30350 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30355 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30357 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30407 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68175 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30412 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30413 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68215 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68216 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 30437 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68220 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68432 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68452 | 68452 NSA Houston TX | 71 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 68453 | 68453 NSA Katy TX | 72 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 68454 | 68454 NSA Katy TX | 73 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 68516 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68617 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68620 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68631 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68636 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68637 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68638 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68639 | 68639 NSA Los Lunas NM | 40 | Yes | Yes | No | No | R01 | client_review | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: client_review |
| 68663 | 68663 NSA Oklahoma City OK | 41 | Yes | Yes | No | No | R01 | not_started | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: not_started |
| 68664 | 68664 NSA Oklahoma City OK | 42 | Yes | Yes | No | No | R01 | not_started | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: not_started |
| 68666 | 68666 NSA Oklahoma City, OK | 43 | Yes | Yes | No | No | R01 | not_started | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: not_started |
| 68669 | 68669 NSA Oklahoma City OK | 44 | Yes | Yes | No | No | R01 | not_started | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: not_started |
| 68670 | 68670 NSA Oklahoma City OK | 45 | Yes | Yes | No | No | R02 | not_started | Yes (INV-2026-006 (sent)) | R01 [INV-2026-006 (sent)] | — | R00: completed / billed; R01: completed / billed; R02: not_started |
| 68671 | 68671 NSA Oklahoma City OK | 46 | Yes | Yes | No | No | R01 | not_started | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: not_started |
| 68673 | 68673 NSA Oklahoma City OK | 47 | Yes | Yes | No | No | R01 | client_review | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: client_review |
| 68715 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68720 | 68720 NSA Lancaster PA | 74 | Yes | Yes | Yes | Yes | R00 | client_approved | No | — | — | R00: client_approved |
| 68721 | 68721 NSA Mechanicsburg PA | 48 | Yes | Yes | Yes | Yes | R02 | client_approved | Yes (INV-2026-006 (sent)) | R01 [INV-2026-006 (sent)] | R02 | R00: completed / billed; R01: completed / billed; R02: client_approved |
| 68723 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68724 | 68724 NSA York PA | 75 | Yes | Yes | Yes | Yes | R00 | invoiced | Yes (INV-2026-006 (sent)) | — | — | R00: invoiced / billed |
| 68751 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68752 | 68752 NSA Brownsville TX | 76 | Yes | Yes | Yes | Yes | R00 | invoiced | Yes (INV-2026-006 (sent)) | — | — | R00: invoiced / billed |
| 68753 | 68753 NSA Brownsville TX | 77 | Yes | Yes | Yes | Yes | R00 | invoiced | Yes (INV-2026-006 (sent)) | — | — | R00: invoiced / billed |
| 68754 | 68754 NSA Brownsville TX | 78 | Yes | No | No | Yes | R00 | in_progress | No | — | — | R00: in_progress |
| 68755 | 68755 NSA Brownsville TX | 79 | Yes | No | No | Yes | R00 | not_started | No | — | — | R00: not_started |
| 68756 | 68756 NSA Brownsville TX | 80 | Yes | No | No | Yes | R00 | in_progress | No | — | — | R00: in_progress |
| 68758 | 68758 NSA Brownsville TX | 81 | Yes | Yes | Yes | Yes | R00 | invoiced | Yes (INV-2026-006 (sent)) | — | — | R00: invoiced / billed |
| 68776 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68777 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68778 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68779 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68780 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68781 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68782 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68784 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68785 | — | — | No | No | — | — | — | — | — | — | — | Missing from DB |
| 68808 | 68808 Camas, WA | 49 | Yes | Yes | No | No | R01 | not_started | Yes (INV-2026-006 (sent)) | — | — | R00: completed / billed; R01: not_started |
| 68809 | 68809 Centralia, WA | 50 | Yes | Yes | No | No | R02 | not_started | Yes (INV-2026-006 (sent)) | R01 [INV-2026-006 (sent)] | — | R00: completed / billed; R01: completed / billed; R02: not_started |
| 68810 | 68810 Chehalis, WA | 51 | Yes | Yes | No | No | R02 | not_started | Yes (INV-2026-006 (sent)) | R01 [INV-2026-006 (sent)] | — | R00: completed / billed; R01: completed / billed; R02: not_started |
| 68811 | 68811 Kelso, WA | 52 | Yes | Yes | No | No | R02 | not_started | Yes (INV-2026-006 (sent)) | — | R01 | R00: completed / billed; R01: completed; R02: not_started |