MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / handleChangeRole

Function handleChangeRole

packages/react/src/pages/org.tsx:192–205  ·  view source on GitHub ↗
(membershipId: string, roleSlug: string, roleName: string)

Source from the content-addressed store, hash-verified

190 };
191
192 const handleChangeRole = async (membershipId: string, roleSlug: string, roleName: string) => {
193 const exit = await doUpdateRole({
194 params: { membershipId },
195 payload: { roleSlug },
196 reactivityKeys: orgMemberWriteKeys,
197 });
198 trackEvent("org_member_role_changed", {
199 role: roleSlug,
200 success: Exit.isSuccess(exit),
201 });
202 toast[Exit.isSuccess(exit) ? "success" : "error"](
203 Exit.isSuccess(exit) ? `Role changed to ${roleName}` : "Failed to change role",
204 );
205 };
206
207 const handleSaveName = async () => {
208 const trimmed = editName.trim();

Callers 1

OrgPageFunction · 0.85

Calls 1

trackEventFunction · 0.90

Tested by

no test coverage detected