create.config.ts
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { useRuleChainI18n } from '../../../hook/useRuleChainI18n';
import { FormSchema } from '/@/components/Form';
export enum UnassignFromCustomerFieldsEnum {
CUSTOMER_NAME_PATTERN = 'customerNamePattern',
CUSTOMER_CACHE_EXPIRATION = 'customerCacheExpiration',
}
const { tLabel, tPlaceholder } = useRuleChainI18n('action', 'unassignFromCustomer');
export const formSchemas: FormSchema[] = [
{
field: UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN,
label: tLabel(UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN),
component: 'Input',
required: true,
helpMessage: [
'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body',
],
componentProps: {
placeholder: tPlaceholder(UnassignFromCustomerFieldsEnum.CUSTOMER_NAME_PATTERN),
},
},
{
field: UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION,
component: 'InputNumber',
label: tLabel(UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION),
required: true,
helpMessage: [
'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.',
],
componentProps: {
min: 0,
placeholder: tPlaceholder(UnassignFromCustomerFieldsEnum.CUSTOMER_CACHE_EXPIRATION),
},
},
];