fix: plugin-approval, kit add (#1038)

Reviewed-on: daoyoucloud/tachybase#1038
Co-authored-by: bai.zixv <bai.zixv@foxmail.com>
Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
bai.zixv 2024-05-23 12:51:30 +08:00 committed by sealday
parent 395b2ce827
commit 057e8d4aa8
5 changed files with 8 additions and 26 deletions

View File

@ -1,12 +0,0 @@
import { Plugin } from '@tachybase/client';
import PluginKitApprovalInstruction from './instruction';
import { PluginKitApprovalTrigger } from './trigger';
export class PluginKitApprovalConfiguration extends Plugin {
async afterAdd() {
this.pm.add(PluginKitApprovalTrigger);
this.pm.add(PluginKitApprovalInstruction);
}
async beforeLoad() {}
async load() {}
}

View File

@ -1,18 +1,16 @@
import { Plugin } from '@tachybase/client';
import { tval } from '../../locale';
import { PluginKitApprovalCommon } from '../approval-common/plugin';
import { KitApprovalCommon } from '../approval-common/plugin';
import { ApprovalBlockComponent, SCApprovalBlock } from './ApprovalBlock.schema';
import { ViewActionLaunch } from './launch/VC.ViewActionLaunch';
import { ViewActionTodos } from './todos/VC.ViewActionTodos';
export class KitApprovalBlock extends Plugin {
async afterAdd() {
this.pm.add(PluginKitApprovalCommon);
this.pm.add(KitApprovalCommon);
this.pm.add(SCApprovalBlock);
}
async beforeLoad() {}
async load() {
this.app.addComponents({
'ApprovalBlock.BlockInitializer': ApprovalBlockComponent,

View File

@ -3,9 +3,7 @@ import { ApprovalDataProvider } from './ApprovalData.provider';
import { ApprovalProcess } from './ApprovalProcess.view';
import { ApprovalsSummary } from './ApprovalsSummary.view';
export class PluginKitApprovalCommon extends Plugin {
async afterAdd() {}
async beforeLoad() {}
export class KitApprovalCommon extends Plugin {
async load() {
this.app.addComponents({
// ApprovalCommon,

View File

@ -1,13 +1,13 @@
import { Plugin } from '@tachybase/client';
import { tval } from '../../locale';
import { PluginKitApprovalCommon } from '../approval-common/plugin';
import { KitApprovalCommon } from '../approval-common/plugin';
import { RecordApprovalsDecorator } from './RecordApprovals.decorator';
import { RecordApprovalsInitializer } from './RecordApprovals.initializer';
import { RecordApprovals } from './RecordApprovals.view';
export class PluginKitApprovalRecordBlock extends Plugin {
export class KitApprovalRecordBlock extends Plugin {
async afterAdd() {
this.pm.add(PluginKitApprovalCommon);
this.pm.add(KitApprovalCommon);
}
async beforeLoad() {}
async load() {

View File

@ -1,12 +1,10 @@
import { Plugin } from '@tachybase/client';
import { PluginKitApprovalRecordBlock } from './approval-record-block/plugin';
import { KitApprovalRecordBlock } from './approval-record-block/plugin';
import { KitApprovalBlock } from './approval-block/plugin';
export class KitApprovalUsage extends Plugin {
async afterAdd() {
this.pm.add(PluginKitApprovalRecordBlock);
this.pm.add(KitApprovalRecordBlock);
this.pm.add(KitApprovalBlock);
}
async beforeLoad() {}
async load() {}
}