diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/api-regular/usage/APIRegular.setting.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/api-regular/usage/APIRegular.setting.tsx index 02af9f20a..e4eca482e 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/api-regular/usage/APIRegular.setting.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/api-regular/usage/APIRegular.setting.tsx @@ -2,14 +2,11 @@ import { ActionDesigner, SchemaSettings, SchemaSettingsItemType, - useDesignable, useSchemaToolbar, WorkflowConfig, } from '@tachybase/client'; import { isValid, useFieldSchema } from '@tachybase/schema'; -import { useTranslation } from 'react-i18next'; - const schemaSettingsItems: SchemaSettingsItemType[] = [ { name: 'editButton', @@ -19,32 +16,6 @@ const schemaSettingsItems: SchemaSettingsItemType[] = [ return buttonEditorProps; }, }, - { - name: 'Date', - type: 'select', - useComponentProps() { - const { dn } = useDesignable(); - const { t } = useTranslation(); - const fieldSchema = useFieldSchema(); - return { - title: t('Data will be updated'), - options: [ - { label: t('Selected'), value: 'selected' }, - { label: t('All'), value: 'all' }, - ], - value: fieldSchema['x-action-settings']?.['updateMode'], - onChange: (value) => { - fieldSchema['x-action-settings']['updateMode'] = value; - dn.emit('patch', { - schema: { - 'x-uid': fieldSchema['x-uid'], - 'x-action-settings': fieldSchema['x-action-settings'], - }, - }); - }, - }; - }, - }, { name: 'workflowConfig', Component: WorkflowConfig, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/omni-trigger/CustomActionTrigger.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/omni-trigger/CustomActionTrigger.ts index 25c338d6a..c524260de 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/omni-trigger/CustomActionTrigger.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/omni-trigger/CustomActionTrigger.ts @@ -42,7 +42,12 @@ export class OmniTrigger extends Trigger { triggerWorkflowsArray.push(key); } const workflows = Array.from(this.workflow.enabledCache.values()) - .filter((item) => item.type === OmniTrigger.TYPE && item.config.collection === jointCollectionName) + .filter( + (item) => + item.type === OmniTrigger.TYPE && + item.config.collection === jointCollectionName && + triggerWorkflowsArray.includes(item.key), + ) .sort((a, b) => { const aIndex = triggerWorkflowsArray.indexOf(a.key); const bIndex = triggerWorkflowsArray.indexOf(b.key);