assessment-model/src/app/api
Khalim Conn-Kowlessar 66cc71d228 Fix collaborators-not-iterable crash; rename misspelled colloborators route
Crash root cause: UsersPermissionsCard and CapabilitiesCard both used the
TanStack Query key ["portfolioUsers", id], but a previous change made
UsersPermissionsCard's fetcher return { users, currentUser } while
CapabilitiesCard's still returned an array. TanStack Query dedupes by
key — whichever component mounted first won the cache; the other read an
incompatible shape and crashed on `for (const c of collaborators)`.

Fix: extracted a single shared fetcher (collaboratorsClient.ts) so both
components import the same fetchCollaborators function and consume the
same response shape. CapabilitiesCard projects data?.users ?? []; the
shared cache stays consistent regardless of mount order.

Also rename the route folder from "colloborators" to "collaborators"
(spelling fix). Used git mv so history follows. Fetch URLs, console
error labels, and the route doc comment updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 17:12:00 +00:00
..
auth initial implementation for portfolio invitations. A user can send an invitation to a user and they will receive an invitation email 2026-05-27 16:18:21 +00:00
book-survey push to develop 2025-11-03 19:08:05 +00:00
due-considerations commiting due considerations, fixing bug with updating of sap and cost on recommendations 2023-09-28 09:28:49 +01:00
eco-spreadsheet added api to trigger eco spreadsheet 2023-10-13 00:22:27 +08:00
energy-assessment-documents fixing typescript error 2024-09-09 15:12:41 +01:00
live-tracking/property-documents implemeting document search on deal id instead of uprn 2026-04-20 18:58:24 +00:00
organisations added missing files 2026-04-04 13:37:42 +00:00
plan Updating the plans ui 2026-04-08 20:47:14 +00:00
portfolio Fix collaborators-not-iterable crash; rename misspelled colloborators route 2026-05-27 17:12:00 +00:00
postcode fixed cachig to store more than 100 2025-11-13 19:21:42 +00:00
properties adjusted lazy load banner 2026-04-13 15:47:49 +00:00
property-meta/[propertyId] added notify for user when we've remodelled 2026-04-15 09:50:17 +00:00
search Adding page layout, added react query 2023-05-30 11:41:08 +01:00
sign-document-url added missing files 2026-04-04 13:37:42 +00:00
sign-s3-url push 2026-01-19 13:41:39 +00:00
tasks deploy to main 2026-05-15 11:34:14 +00:00
upload refactored with improve-code-archievture and grill-with-docs 2026-05-06 15:49:34 +00:00
user Fixing auth options export issue 2025-10-28 11:49:19 +00:00