n8n/packages/nodes-base/nodes/UProc/GroupDescription.ts
Michael Kret 91d7e16c81
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
2022-08-17 17:50:24 +02:00

29 lines
656 B
TypeScript

import { IDataObject, INodeProperties } from 'n8n-workflow';
import { groups } from './Json/Groups';
const finalGroups = {
displayName: 'Resource',
name: 'group',
type: 'options',
default: 'communication',
options: [],
};
const options = [];
for (const group of (groups as IDataObject).groups as IDataObject[]) {
const item = {
name: group.translated,
value: group.name,
description: 'The ' + group.translated + ' Resource allows you to get tools from this resource',
};
options.push(item);
}
//@ts-ignore
finalGroups.options = options;
const mappedGroups = [finalGroups];
export const groupOptions = mappedGroups as INodeProperties[];