You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1015 B

import { $t } from 'platform-core';
import { PlaceHolder } from '@/utils/PlaceHolder';
class SingleRule {
public static getToolbarAction(parameter: any) {
return {
extend: 'add',
name: 'singleRule',
label: $t('io.sc.engine.rule.core.enums.ProcessorType.SINGLE_RULE'),
icon: 'bi-noise-reduction',
enableIf: (args: any) => {
return parameter.type === 'RULE_RESULT' || parameter.type === 'SINGLE_RULE_RESULT';
},
afterClick: (args: any) => {
args.grid.getEditorForm().setFieldValue('type', 'SINGLE_RULE');
},
};
}
public static format(row: any) {
return row.singleRule;
}
public static getEditorFields(properties: any) {
return [];
}
public static getViewerFields(properties: any) {
return [{ name: 'singleRule', label: $t('re.resources.designer.processor.grid.entity.singleRule') }];
}
public static beforeEditorDataSubmit(args: any) {}
public static afterEditorOpen(args: any) {}
}
export { SingleRule };