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

Function handleChangeRole

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

Source from the content-addressed store, hash-verified

219 };
220
221 const handleChangeRole = async (membershipId: string, roleSlug: string, roleName: string) => {
222 const exit = await doUpdateRole({
223 params: { membershipId },
224 payload: { roleSlug },
225 reactivityKeys: orgMemberWriteKeys,
226 });
227 trackEvent("org_member_role_changed", {
228 role: roleSlug,
229 success: Exit.isSuccess(exit),
230 });
231 toast[Exit.isSuccess(exit) ? "success" : "error"](
232 Exit.isSuccess(exit) ? `Role changed to ${roleName}` : "Failed to change role",
233 );
234 };
235
236 const handleSaveName = async () => {
237 const trimmed = editName.trim();

Callers 1

OrgPageFunction · 0.85

Calls 1

trackEventFunction · 0.90

Tested by

no test coverage detected