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

Function handleChangeRole

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

Source from the content-addressed store, hash-verified

202 };
203
204 const handleChangeRole = async (membershipId: string, roleSlug: string, roleName: string) => {
205 const exit = await doUpdateRole({
206 params: { membershipId },
207 payload: { roleSlug },
208 reactivityKeys: orgMemberWriteKeys,
209 });
210 trackEvent("org_member_role_changed", {
211 role: roleSlug,
212 success: Exit.isSuccess(exit),
213 });
214 toast[Exit.isSuccess(exit) ? "success" : "error"](
215 Exit.isSuccess(exit) ? `Role changed to ${roleName}` : "Failed to change role",
216 );
217 };
218
219 const handleSaveName = async () => {
220 const trimmed = editName.trim();

Callers 1

OrgPageFunction · 0.85

Calls 1

trackEventFunction · 0.90

Tested by

no test coverage detected