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

Function handleChangeRole

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

Source from the content-addressed store, hash-verified

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

Callers 1

OrgPageFunction · 0.85

Calls 1

trackEventFunction · 0.90

Tested by

no test coverage detected