Use entries count for access review closure
Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
committed by
Bryan Frimin
parent
5bf8727076
commit
ba2a47d262
@@ -148,7 +148,9 @@ export const campaignDetailPageQuery = graphql`
|
||||
id
|
||||
name
|
||||
status
|
||||
pendingEntryCount
|
||||
pendingEntries: entries(first: 0, filter: { decision: PENDING }) {
|
||||
totalCount
|
||||
}
|
||||
canDelete: permission(action: "access-review:campaign:delete")
|
||||
sources {
|
||||
id
|
||||
@@ -249,7 +251,7 @@ export default function CampaignDetailPage({ queryRef }: Props) {
|
||||
const [deleteCampaign, isDeleting]
|
||||
= useMutation<CampaignDetailPageDeleteMutation>(deleteCampaignMutation);
|
||||
|
||||
const canComplete = campaign.pendingEntryCount === 0;
|
||||
const canComplete = campaign.pendingEntries.totalCount === 0;
|
||||
|
||||
const handleStart = () => {
|
||||
startCampaign({
|
||||
|
||||
Reference in New Issue
Block a user