Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ export const AddMemberDialog = ({ appId }: { appId: string }) => {
query: GetAppMembers,
variables: { appId: appId },
},
...selectedMembers.map((m) => ({
query: GetAppEnvironments,
variables: { appId: appId, memberId: m.id },
})),
],
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import RemoveMemberFromApp from '@/graphql/mutations/apps/removeAppMember.gql'
import GetAppMembers from '@/graphql/queries/apps/getAppMembers.gql'
import { GetAppEnvironments } from '@/graphql/queries/secrets/getAppEnvironments.gql'
import { useMutation } from '@apollo/client'
import { Fragment, useRef, useState } from 'react'
import { OrganisationMemberType } from '@/apollo/graphql'
Expand Down Expand Up @@ -32,6 +33,10 @@ export const RemoveMemberConfirmDialog = ({
query: GetAppMembers,
variables: { appId: appId },
},
{
query: GetAppEnvironments,
variables: { appId: appId, memberId: member.id },
},
],
})
toast.success('Removed member from app', { autoClose: 2000 })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ export const AddAccountDialog = ({ appId }: { appId: string }) => {
query: GetAppServiceAccounts,
variables: { appId: appId },
},
...selectedAccounts.map((a) => ({
query: GetAppEnvironments,
variables: { appId: appId, memberId: a.id, memberType: MemberType.Service },
})),
],
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import RemoveMemberFromApp from '@/graphql/mutations/apps/removeAppMember.gql'
import { GetAppServiceAccounts } from '@/graphql/queries/apps/getAppServiceAccounts.gql'
import { GetAppEnvironments } from '@/graphql/queries/secrets/getAppEnvironments.gql'
import { useMutation } from '@apollo/client'
import { useRef } from 'react'
import { ServiceAccountType, MemberType } from '@/apollo/graphql'
Expand Down Expand Up @@ -32,6 +33,10 @@ export const RemoveAccountConfirmDialog = ({
query: GetAppServiceAccounts,
variables: { appId: appId },
},
{
query: GetAppEnvironments,
variables: { appId: appId, memberId: account.id, memberType: MemberType.Service },
},
],
})
toast.success('Removed member from app', { autoClose: 2000 })
Expand Down