diff --git a/packages/core/client/src/schema-initializer/items/index.tsx b/packages/core/client/src/schema-initializer/items/index.tsx index 4f8bf80b91..242c6a7063 100644 --- a/packages/core/client/src/schema-initializer/items/index.tsx +++ b/packages/core/client/src/schema-initializer/items/index.tsx @@ -19,7 +19,6 @@ export * from './CreateFilterActionInitializer'; export * from './CreateResetActionInitializer'; export * from './CustomizeActionInitializer'; export * from './DataBlockInitializer'; -export * from './DeleteEventActionInitializer'; export * from './G2PlotInitializer'; export * from './InitializerWithSwitch'; export * from './RecordAssociationBlockInitializer'; diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx index 48e1ff9998..df414373b9 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/initializers/CalendarFormActionInitializers.tsx @@ -9,11 +9,11 @@ import { SchemaInitializer, SchemaInitializerItemType, useCollection_deprecated } from '@nocobase/client'; import { generateNTemplate } from '../../../locale'; - +import { DeleteEventActionInitializer } from '../items/DeleteEventActionInitializer'; export const deleteEventActionInitializer: SchemaInitializerItemType = { name: 'deleteEvent', title: generateNTemplate('Delete Event'), - Component: 'DeleteEventActionInitializer', + Component: DeleteEventActionInitializer, schema: { 'x-component': 'Action', 'x-decorator': 'ACLActionProvider', diff --git a/packages/core/client/src/schema-initializer/items/DeleteEventActionInitializer.tsx b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/DeleteEventActionInitializer.tsx similarity index 89% rename from packages/core/client/src/schema-initializer/items/DeleteEventActionInitializer.tsx rename to packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/DeleteEventActionInitializer.tsx index 31f63a8d40..1b9fbc4430 100644 --- a/packages/core/client/src/schema-initializer/items/DeleteEventActionInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/DeleteEventActionInitializer.tsx @@ -8,12 +8,13 @@ */ import React from 'react'; -import { ActionInitializerItem } from './ActionInitializerItem'; +import { ActionInitializerItem } from '@nocobase/client'; export const DeleteEventActionInitializer = (props) => { const schema = { title: '{{ t("Delete Event") }}', 'x-action': 'deleteEvent', + 'x-acl-action': 'destroy', 'x-component': 'Action', 'x-designer': 'Action.Designer', 'x-component-props': { diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/index.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/index.ts index 0501600742..ae3825c61c 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/index.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/schema-initializer/items/index.ts @@ -9,3 +9,4 @@ export * from './CalendarBlockInitializer'; export * from './RecordAssociationCalendarBlockInitializer'; +export * from './DeleteEventActionInitializer';