fix: sort workflow dropdown to show org before teams (#26796)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
fc518bfdc1
commit
9f231d98a4
@@ -113,6 +113,13 @@ export const teamsAndUserProfilesQuery = async ({ ctx, input }: TeamsAndUserProf
|
||||
teamsData = teamsData.filter((_, index) => permissionChecks[index]);
|
||||
}
|
||||
|
||||
// Sort teams so organizations come first, followed by other teams
|
||||
teamsData.sort((a, b) => {
|
||||
if (a.team.isOrganization && !b.team.isOrganization) return -1;
|
||||
if (!a.team.isOrganization && b.team.isOrganization) return 1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
const rolesWithWriteAccess = [MembershipRole.ADMIN, MembershipRole.OWNER] as MembershipRole[];
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user