Hide workflow manual trigger from command menu on "Select All" (#19718)
https://github.com/user-attachments/assets/e19c6d23-03c1-49c8-8b83-5c8f5f0f1135
This commit is contained in:
+16
-5
@@ -74,12 +74,23 @@ export const useEnrichHeadlessCommandContextApiWithWorkflowVersionTriggerInforma
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const selectedRecordIds =
|
||||
if (
|
||||
headlessEngineCommandContextApi.targetedRecordsRule.mode ===
|
||||
'selection'
|
||||
? headlessEngineCommandContextApi.targetedRecordsRule
|
||||
.selectedRecordIds
|
||||
: [];
|
||||
'exclusion'
|
||||
) {
|
||||
enqueueWarningSnackBar({
|
||||
message: t`Running workflows on all records is not yet supported. Please select records manually.`,
|
||||
options: {
|
||||
dedupeKey: 'workflow-manual-trigger-select-all-not-supported',
|
||||
},
|
||||
});
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const selectedRecordIds =
|
||||
headlessEngineCommandContextApi.targetedRecordsRule
|
||||
.selectedRecordIds;
|
||||
|
||||
if (selectedRecordIds.length > QUERY_MAX_RECORDS) {
|
||||
const selectedCountFormatted =
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { isNonEmptyString } from '@sniptt/guards';
|
||||
import { type ActorMetadata } from 'twenty-shared/types';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user