Merge branch 'main' into next
Some checks are pending
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase FrontEnd Test / frontend-test (18) (push) Waiting to run

This commit is contained in:
GitHub Actions Bot 2024-07-29 15:20:27 +00:00
commit 252cb00207
3 changed files with 14 additions and 4 deletions

View File

@ -86,7 +86,7 @@ function useVariables(config, options) {
export default class extends Trigger {
title = `{{t("Post-action event", { ns: "${NAMESPACE}" })}}`;
description = `{{t('Triggered after the completion of a request initiated through an action button or API, such as after adding, updating, or deleting data. Suitable for data processing, sending notifications, etc., after actions are completed.', { ns: "${NAMESPACE}" })}}`;
description = `{{t('Triggered after the completion of a request initiated through an action button or API, such as after adding or updating data. Suitable for data processing, sending notifications, etc., after actions are completed.', { ns: "${NAMESPACE}" })}}`;
fieldset = {
collection: {
type: 'string',

View File

@ -1,7 +1,7 @@
{
"Post-action event": "操作后事件",
"Triggered after the completion of a request initiated through an action button or API, such as after adding, updating, or deleting data. Suitable for data processing, sending notifications, etc., after actions are completed.":
"通过操作按钮或 API 发起请求时,在请求执行成功后触发该事件,比如新增、更新、删除操作之后。适用于在操作完成后进行数据处理、发送通知等。",
"Triggered after the completion of a request initiated through an action button or API, such as after adding or updating data. Suitable for data processing, sending notifications, etc., after actions are completed.":
"通过操作按钮或 API 发起请求时,在请求执行成功后触发该事件,比如新增、更新操作之后。适用于在操作完成后进行数据处理、发送通知等。",
"Collection": "数据表",
"The collection to which the triggered data belongs.": "触发数据所属的数据表。",
"Trigger mode": "触发模式",

View File

@ -8,8 +8,10 @@
*/
import React from 'react';
import { useFieldSchema } from '@formily/react';
import { isValid } from '@formily/shared';
import { Plugin } from '@nocobase/client';
import { Plugin, WorkflowConfig } from '@nocobase/client';
import { Registry } from '@nocobase/utils/client';
import { ExecutionPage } from './ExecutionPage';
@ -91,6 +93,14 @@ export default class PluginWorkflowClient extends Plugin {
this.app.schemaSettingsManager.add(customizeSubmitToWorkflowActionSettings);
this.app.schemaSettingsManager.addItem('actionSettings:delete', 'workflowConfig', {
Component: WorkflowConfig,
useVisible() {
const fieldSchema = useFieldSchema();
return isValid(fieldSchema?.['x-action-settings']?.triggerWorkflows);
},
});
this.registerTrigger('collection', CollectionTrigger);
this.registerTrigger('schedule', ScheduleTrigger);