feat(clients): four party tabs — Clients/Partners/Past clients/Prospective - #116
Open
itkujo wants to merge 1 commit into
Open
feat(clients): four party tabs — Clients/Partners/Past clients/Prospective#116itkujo wants to merge 1 commit into
itkujo wants to merge 1 commit into
Conversation
…ctive Rework the Clients roster to exactly four party tabs (Aug 11 review), in order, alphabetical within each tab: - Clients → client - Partners → partner + unassigned (unassigned no longer a separate tab) - Past clients → new type past_client - Prospective clients → prospect + lead (leads fold in; lead value stays valid) Adds an additive `past_client` enum value (migration 0019, shared enums, database.types, exhaustive Record<ClientType> maps, orgTypeLabel). Tabs now fetch a type-set via a comma-separated `?type=` (resolveTypes extended, backward compatible). Drops the Leads tab and the unassigned special-casing; Add modal offers Client/Prospective/Partner/Past client. Re-assignment via the existing edit path. Migration 0019_client_type_past_client.sql needs applying (shared Supabase, additive). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Reworks the Clients roster to exactly four party tabs (Aug 11 review), in this order, alphabetical within each tab:
clientpartner+unassigned(the worker's domain-named placeholder orgs default here instead of a separate "Unassigned" tab)past_clientprospect+lead(leads == prospects; theleadenum value stays valid, just displays here)Internal (the single GA workspace) stays separate, linked beside the tabs.
Changes
past_client(additive): migration0019,CLIENT_TYPES, hand-regendatabase.types.ts(union + runtime array), exhaustiveRecord<ClientType>maps (ClientDetailsCardTYPE_LABELS,contacts/sharedORG_TYPE_STYLE), and apast_clientcase inorgTypeLabelso calendar chips don't fall back to "Internal".clients/page.tsx):PARTY_TABS→ four entries each carrying atypesset; active tab fetches all its types in one request (?type=partner,unassigned). Removed the Leads tab and theparty === 'unassigned'special-casing. List sortedname.localeCompare.clients/route.ts):resolveTypesnow also accepts a comma-separated?type=list (split + filter againstCLIENT_TYPES);all/ single-value / absent cases unchanged. Backward compatible.Re-assignment is unchanged — the client-details type picker moves an org to any tab (except system-managed
internal/unassigned), so demoting a live client → Past clients is the intended path.Migration
0019_client_type_past_client.sqlneeds applying to the shared Supabase (coordinate with orchestrator). Additive only —add value if not exists, nothing destructive or renamed.Verification
pnpm -r typecheck✓ ·pnpm -r lint✓ · web tests 66/66 ✓ · worker tests 215/215 ✓. Live preview of the authenticated/clientspage wasn't run (nolaunch.json; page behind Logto SSO). Change is presentational + additive-enum and fully type-checked.Brief:
docs/plan/clients-four-categories.md🤖 Generated with Claude Code