mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(Agile CRM Node): Fix issue with company address not working (#6997)
This commit is contained in:
parent
0e89a65b38
commit
2f81652400
|
@ -298,12 +298,16 @@ export class AgileCrm implements INodeType {
|
||||||
} as IDataObject);
|
} as IDataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (additionalFields.address) {
|
if (additionalFields.addressOptions) {
|
||||||
properties.push({
|
//@ts-ignore
|
||||||
type: 'SYSTEM',
|
additionalFields.addressOptions.addressProperties.map((property) => {
|
||||||
name: 'address',
|
properties.push({
|
||||||
value: additionalFields.address as string,
|
type: 'SYSTEM',
|
||||||
} as IDataObject);
|
subtype: property.subtype as string,
|
||||||
|
name: 'address',
|
||||||
|
value: property.address as string,
|
||||||
|
} as IDataObject);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (additionalFields.phone) {
|
if (additionalFields.phone) {
|
||||||
|
@ -313,6 +317,14 @@ export class AgileCrm implements INodeType {
|
||||||
value: additionalFields.phone as string,
|
value: additionalFields.phone as string,
|
||||||
} as IDataObject);
|
} as IDataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (additionalFields.name) {
|
||||||
|
properties.push({
|
||||||
|
type: 'SYSTEM',
|
||||||
|
name: 'name',
|
||||||
|
value: additionalFields.name as string,
|
||||||
|
} as IDataObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (additionalFields.websiteOptions) {
|
if (additionalFields.websiteOptions) {
|
||||||
|
@ -321,7 +333,7 @@ export class AgileCrm implements INodeType {
|
||||||
properties.push({
|
properties.push({
|
||||||
type: 'SYSTEM',
|
type: 'SYSTEM',
|
||||||
subtype: property.subtype as string,
|
subtype: property.subtype as string,
|
||||||
name: 'webiste',
|
name: 'website',
|
||||||
value: property.url as string,
|
value: property.url as string,
|
||||||
} as IDataObject);
|
} as IDataObject);
|
||||||
});
|
});
|
||||||
|
@ -450,12 +462,16 @@ export class AgileCrm implements INodeType {
|
||||||
} as IDataObject);
|
} as IDataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (additionalFields.address) {
|
if (additionalFields.addressOptions) {
|
||||||
properties.push({
|
//@ts-ignore
|
||||||
type: 'SYSTEM',
|
additionalFields.addressOptions.addressProperties.map((property) => {
|
||||||
name: 'address',
|
properties.push({
|
||||||
value: additionalFields.address as string,
|
type: 'SYSTEM',
|
||||||
} as IDataObject);
|
subtype: property.subtype as string,
|
||||||
|
name: 'address',
|
||||||
|
value: property.address as string,
|
||||||
|
} as IDataObject);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (additionalFields.phone) {
|
if (additionalFields.phone) {
|
||||||
|
@ -473,11 +489,18 @@ export class AgileCrm implements INodeType {
|
||||||
properties.push({
|
properties.push({
|
||||||
type: 'SYSTEM',
|
type: 'SYSTEM',
|
||||||
subtype: property.subtype as string,
|
subtype: property.subtype as string,
|
||||||
name: 'webiste',
|
name: 'website',
|
||||||
value: property.url as string,
|
value: property.url as string,
|
||||||
} as IDataObject);
|
} as IDataObject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (additionalFields.name) {
|
||||||
|
properties.push({
|
||||||
|
type: 'SYSTEM',
|
||||||
|
name: 'name',
|
||||||
|
value: additionalFields.name as string,
|
||||||
|
} as IDataObject);
|
||||||
|
}
|
||||||
if (additionalFields.customProperties) {
|
if (additionalFields.customProperties) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
additionalFields.customProperties.customProperty.map((property) => {
|
additionalFields.customProperties.customProperty.map((property) => {
|
||||||
|
|
|
@ -379,11 +379,47 @@ export const companyFields: INodeProperties[] = [
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
displayName: 'Address',
|
displayName: 'Address',
|
||||||
name: 'email',
|
name: 'addressOptions',
|
||||||
type: 'string',
|
type: 'fixedCollection',
|
||||||
placeholder: 'name@email.com',
|
default: {},
|
||||||
default: '',
|
|
||||||
description: 'Company address',
|
description: 'Company address',
|
||||||
|
typeOptions: {
|
||||||
|
multipleValues: true,
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
displayName: 'Address Properties',
|
||||||
|
name: 'addressProperties',
|
||||||
|
values: [
|
||||||
|
{
|
||||||
|
displayName: 'Type',
|
||||||
|
name: 'subtype',
|
||||||
|
type: 'options',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
description: 'Type of address',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Postal',
|
||||||
|
value: 'postal',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Office',
|
||||||
|
value: 'office',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Address',
|
||||||
|
name: 'address',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
description: 'Full address',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Email',
|
displayName: 'Email',
|
||||||
|
@ -655,11 +691,47 @@ export const companyFields: INodeProperties[] = [
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
displayName: 'Address',
|
displayName: 'Address',
|
||||||
name: 'email',
|
name: 'addressOptions',
|
||||||
type: 'string',
|
type: 'fixedCollection',
|
||||||
placeholder: 'name@email.com',
|
default: {},
|
||||||
default: '',
|
|
||||||
description: 'Company address',
|
description: 'Company address',
|
||||||
|
typeOptions: {
|
||||||
|
multipleValues: true,
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
displayName: 'Address Properties',
|
||||||
|
name: 'addressProperties',
|
||||||
|
values: [
|
||||||
|
{
|
||||||
|
displayName: 'Type',
|
||||||
|
name: 'subtype',
|
||||||
|
type: 'options',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
description: 'Type of address',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Postal',
|
||||||
|
value: 'postal',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Office',
|
||||||
|
value: 'office',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Address',
|
||||||
|
name: 'address',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
description: 'Full address',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Email',
|
displayName: 'Email',
|
||||||
|
|
Loading…
Reference in a new issue