create.config.ts
1002 Bytes
import {
CustomerAttributesFieldsEnum,
CustomerAttributesFieldsNameEnum,
} from '../../../enum/formField/enrichment';
import { FormSchema, useComponentRegister } from '/@/components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration';
const { t } = useI18n();
useComponentRegister('AttributeConfiguration', AttributeConfiguration);
export const formSchemas: FormSchema[] = [
{
field: CustomerAttributesFieldsEnum.TELEMETRY,
component: 'Checkbox',
label: '',
renderComponentContent: () => {
return {
default: () => t(CustomerAttributesFieldsNameEnum.TELEMETRY),
};
},
},
{
field: CustomerAttributesFieldsEnum.ATTR_MAPING,
component: 'AttributeConfiguration',
label: t(CustomerAttributesFieldsNameEnum.ATTR_MAPING),
slot: CustomerAttributesFieldsEnum.ATTR_MAPING,
valueField: 'value',
changeEvent: 'update:value',
},
];