Skip to content

Commit

Permalink
⚡ Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoE105 committed Mar 30, 2022
1 parent d863e2c commit 0b76caa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
28 changes: 15 additions & 13 deletions packages/nodes-base/nodes/Emelia/CampaignDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export const campaignFields: INodeProperties[] = [
name: 'campaignId',
type: 'options',
typeOptions: {
// nodelinter-ignore-next-line
loadOptionsMethod: 'getCampaigns',
},
default: [],
Expand Down Expand Up @@ -154,7 +153,7 @@ export const campaignFields: INodeProperties[] = [
{
displayName: 'Last Contacted',
name: 'lastContacted',
type: 'string',
type: 'dateTime',
default: '',
description: 'Last contacted date of the contact to add',
},
Expand All @@ -168,14 +167,14 @@ export const campaignFields: INodeProperties[] = [
{
displayName: 'Last Open',
name: 'lastOpen',
type: 'string',
type: 'dateTime',
default: '',
description: 'Last opened date of the contact to add',
},
{
displayName: 'Last Replied',
name: 'lastReplied',
type: 'string',
type: 'dateTime',
default: '',
description: 'Last replied date of the contact to add',
},
Expand Down Expand Up @@ -335,10 +334,13 @@ export const campaignFields: INodeProperties[] = [
{
displayName: 'Campaign ID',
name: 'campaignId',
type: 'string',
type: 'options',
default: '',
required: true,
description: 'The ID of the campaign to duplicate',
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
displayOptions: {
show: {
resource: [
Expand Down Expand Up @@ -386,11 +388,11 @@ export const campaignFields: INodeProperties[] = [
},
options: [
{
displayName: 'Copy Global Settings',
name: 'copySettings',
displayName: 'Copy Contacts',
name: 'copyContacts',
type: 'boolean',
default: true,
description: 'Whether to copy all the general settings from the original campaign',
default: false,
description: 'Whether to copy all the contacts from the original campaign',
},
{
displayName: 'Copy Email Provider',
Expand All @@ -407,11 +409,11 @@ export const campaignFields: INodeProperties[] = [
description: 'Whether to copy all the steps of the email sequence from the original campaign',
},
{
displayName: 'Copy Contacts',
name: 'copyContacts',
displayName: 'Copy Global Settings',
name: 'copySettings',
type: 'boolean',
default: false,
description: 'Whether to copy all the contacts from the original campaign',
default: true,
description: 'Whether to copy all the general settings from the original campaign',
},
],
},
Expand Down
1 change: 0 additions & 1 deletion packages/nodes-base/nodes/Emelia/ContactListDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const contactListFields: INodeProperties[] = [
name: 'contactListId',
type: 'options',
typeOptions: {
// nodelinter-ignore-next-line
loadOptionsMethod: 'getContactLists',
},
default: [],
Expand Down
5 changes: 2 additions & 3 deletions packages/nodes-base/nodes/Emelia/Emelia.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export class Emelia implements INodeType {
copyProvider: true,
...options,
};
await emeliaGraphqlRequest.call(this, {
const { data: { duplicateCampaign } } = await emeliaGraphqlRequest.call(this, {
query: `
mutation duplicateCampaign(
$fromId: ID!
Expand All @@ -337,8 +337,7 @@ export class Emelia implements INodeType {
variables,
});

returnData.push({ success: true });

returnData.push({ duplicateCampaign });
}

} else if (resource === 'contactList') {
Expand Down

0 comments on commit 0b76caa

Please sign in to comment.