KamoCRM

Fill the Position card the moment a member is promoted

Fixkamo-internal
Shipped
4 ஆகஸ்ட், 2026 அன்று 7:49 PM UTC
Author
kamo
Commit
cba9b16

Department, job title, official title, work location, membership status and the two Autocomplete option lists were only ever loaded inside the memberType === 'TEAM_MEMBER' branch of the mount-time member fetch, keyed on [memberID]. Promoting flipped isTeamMember locally and stopped there, so the newly revealed card showed every value null with zero dropdown choices — you could not pick a department until the page was refreshed. The server already had something to show at that point: ensureTeamMemberRow writes **************** and its ON CONFLICT DO NOTHING keeps the department and job title of anyone demoted earlier, which is why a refresh filled the card in. Extract the load into app/lib/memberPosition.ts so the mount path and the promote path share one implementation, and have the promote path read it before flipping the flag — while the button still shows its spinner — so the card arrives populated instead of flashing empty.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing