File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/settings/components/admin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 Chip ,
88 ChipConfirmModal ,
99 ChipInput ,
10+ ChipModalError ,
1011 ChipModalField ,
1112 ChipSelect ,
1213 Label ,
@@ -269,7 +270,10 @@ export function Admin() {
269270 } ,
270271 {
271272 label : u . role === 'admin' ? 'Demote' : 'Promote' ,
272- onSelect : ( ) => setPendingAction ( { type : 'role' , user : u } ) ,
273+ onSelect : ( ) => {
274+ setUserRole . reset ( )
275+ setPendingAction ( { type : 'role' , user : u } )
276+ } ,
273277 disabled : pendingUserIds . has ( u . id ) ,
274278 } ,
275279 u . banned
@@ -527,6 +531,7 @@ export function Admin() {
527531 placeholder = 'Optional'
528532 disabled = { banUser . isPending }
529533 />
534+ < ChipModalError > { banUser . error ?. message } </ ChipModalError >
530535 </ ChipConfirmModal >
531536
532537 < ChipConfirmModal
@@ -553,7 +558,9 @@ export function Admin() {
553558 pending : setUserRole . isPending ,
554559 pendingLabel : isDemotion ? 'Demoting...' : 'Promoting...' ,
555560 } }
556- />
561+ >
562+ < ChipModalError > { setUserRole . error ?. message } </ ChipModalError >
563+ </ ChipConfirmModal >
557564
558565 < AddUserModal
559566 open = { isAddUserOpen }
You can’t perform that action at this time.
0 commit comments