Skip to content

Commit 8164d7a

Browse files
committed
V14: Integrations (ActiveCampaign/Forms)
- Continue update ActiveCampaign client implementation
1 parent 76e32cb commit 8164d7a

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/Umbraco.Forms.Integrations.Crm.ActiveCampaign/Client/src/models/activecampaign.model.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@ export interface ContactMappingValue {
66
export interface FormFieldValue {
77
id: string;
88
value: string;
9+
}
10+
11+
export interface CustomMappingValue {
12+
customField: string;
13+
formField: FormFieldValue | undefined;
914
}

src/Umbraco.Forms.Integrations.Crm.ActiveCampaign/Client/src/property-editor/account/account-property-editor.element.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export class AccountPropertyUiElement extends UmbLitElement implements UmbProper
1616

1717
@state()
1818
private accounts: Array<AccountDto> | undefined = [];
19-
20-
2119

2220
constructor() {
2321
super();

src/Umbraco.Forms.Integrations.Crm.ActiveCampaign/Client/src/property-editor/contact-mapping/contact-mapping-property-editor.element.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ const elementName = "contact-mapping-property-editor";
1212
export class ContactMappingPropertyUiElement extends UmbLitElement implements UmbPropertyEditorUiElement {
1313
#activeCampaignContext!: typeof ACTIVECAMPAIGN_CONTEXT_TOKEN.TYPE;
1414

15-
@property({ attribute: false })
15+
@property({ type: String })
16+
public value = "";
17+
18+
@state()
1619
public contactMapping : Array<ContactMappingValue> = [];
1720

1821
@state()
@@ -74,6 +77,7 @@ export class ContactMappingPropertyUiElement extends UmbLitElement implements Um
7477
}
7578
});
7679

80+
this.value = JSON.stringify(this.contactMapping);
7781
this.requestUpdate();
7882
this.dispatchEvent(new CustomEvent('property-value-change'));
7983
}
@@ -89,6 +93,7 @@ export class ContactMappingPropertyUiElement extends UmbLitElement implements Um
8993
#onDeleteClick(idx: number){
9094
this.contactMapping.splice(idx, 1);
9195

96+
this.value = JSON.stringify(this.contactMapping);
9297
this.requestUpdate();
9398
this.dispatchEvent(new CustomEvent('property-value-change'));
9499
}

src/Umbraco.Forms.Integrations.Crm.ActiveCampaign/Client/src/property-editor/custom-mapping/custom-mapping-property-editor.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
44
import { ACTIVECAMPAIGN_CONTEXT_TOKEN } from '@umbraco-integrations/activecampaign/context';
55
import { CustomFieldDto, Field } from '@umbraco-integrations/activecampaign/generated';
66
import { UUISelectEvent } from '@umbraco-cms/backoffice/external/uui';
7+
import { CustomMappingValue } from '../../models/activecampaign.model';
78

89
const elementName = "custom-mapping-property-editor";
910

0 commit comments

Comments
 (0)