remove test action
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { UmbInvalidateWorkspaceAction } from './test-workspace-action.js';
|
||||
import { UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
|
||||
import type {
|
||||
ManifestWorkspaces,
|
||||
@@ -77,24 +76,6 @@ const workspaceActions: Array<ManifestWorkspaceActions> = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'workspaceAction',
|
||||
kind: 'default',
|
||||
alias: 'Umb.WorkspaceAction.DataType.Test',
|
||||
name: 'TEST VALIDATION SYSTEM',
|
||||
api: UmbInvalidateWorkspaceAction,
|
||||
meta: {
|
||||
label: 'Invalidate',
|
||||
look: 'primary',
|
||||
color: 'danger',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceAlias',
|
||||
match: workspace.alias,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export const manifests = [workspace, ...workspaceViews, ...workspaceActions];
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
import { UMB_VALIDATION_CONTEXT } from '@umbraco-cms/backoffice/validation';
|
||||
import { type UmbSubmittableWorkspaceContext, UmbWorkspaceActionBase } from '@umbraco-cms/backoffice/workspace';
|
||||
|
||||
export class UmbInvalidateWorkspaceAction extends UmbWorkspaceActionBase<UmbSubmittableWorkspaceContext> {
|
||||
async execute() {
|
||||
const validationContext = await this.getContext(UMB_VALIDATION_CONTEXT);
|
||||
console.log(validationContext);
|
||||
validationContext.messages.removeMessagesByType('server');
|
||||
//validationContext.messages.addMessage('server', 'values[0]', 'This is a test message from workspace action');
|
||||
validationContext.messages.addMessage('server', 'values[1]', 'This is a test message from workspace action');
|
||||
return;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user