Skip to content

Commit ba6302f

Browse files
committed
Merge branch 'main' into main-v10
# Conflicts: # src/Umbraco.Forms.Integrations.Automation.Zapier/Umbraco.Forms.Integrations.Automation.Zapier.csproj # src/Umbraco.Forms.Integrations.Automation.Zapier/ZapierFormsComposer.cs # src/Umbraco.Forms.Integrations.Crm.Hubspot/Services/HubspotContactService.cs # src/Umbraco.Forms.Integrations.Crm.Hubspot/Umbraco.Forms.Integrations.Crm.Hubspot.csproj # src/Umbraco.Forms.Integrations.Crm.Hubspot/package.xml # src/Umbraco.Forms.Integrations.sln
2 parents ab0f2a6 + 32616f3 commit ba6302f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+670
-244
lines changed

src/Umbraco.Forms.Integrations.Automation.Zapier/package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<info>
44
<package>
55
<name>Umbraco.Forms.Integrations.Automation.Zapier</name>
6-
<version>1.0.0</version>
6+
<version>1.0.1</version>
77
<iconUrl></iconUrl>
88
<licence url="https://opensource.org/licenses/MIT">MIT</licence>
99
<url>https://github.com/umbraco/Umbraco.Forms.Integrations</url>
@@ -25,4 +25,4 @@
2525
<files>
2626
<file path="bin/release/net472/Umbraco.Forms.Integrations.Automation.Zapier.dll" orgPath="bin/Umbraco.Forms.Integrations.Automation.Zapier.dll" />
2727
</files>
28-
</umbPackage>
28+
</umbPackage>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
function CurrencyController($scope, umbracoFormsIntegrationsCommerceEMerchantPayResource) {
1+
function CurrencyController($scope, umbracoFormsIntegrationsCommerceEmerchantpayResource) {
22

33
var vm = this;
44

55
if ($scope.setting && $scope.setting.value) vm.selectedCurrency = $scope.setting.value;
66

7-
umbracoFormsIntegrationsCommerceEMerchantPayResource.getCurrencies().then(function (response) {
7+
umbracoFormsIntegrationsCommerceEmerchantpayResource.getCurrencies().then(function (response) {
88
vm.currencies = response;
99
});
1010

@@ -14,4 +14,4 @@
1414
}
1515

1616
angular.module("umbraco")
17-
.controller("UmbracoForms.Integrations.Commerce.eMerchantPay.CurrencyController", CurrencyController);
17+
.controller("UmbracoForms.Integrations.Commerce.Emerchantpay.CurrencyController", CurrencyController);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-controller="UmbracoForms.Integrations.Commerce.eMerchantPay.CurrencyController as vm">
1+
<div ng-controller="UmbracoForms.Integrations.Commerce.Emerchantpay.CurrencyController as vm">
22

33
<div>
44
<select ng-model="vm.selectedCurrency" ng-click="vm.saveCurrency()">
@@ -7,4 +7,4 @@
77
</select>
88
</div>
99

10-
</div>
10+
</div>
Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function CustomerDetailsMapperController($scope, notificationsService, emerchantpayService) {
1+
function CustomerDetailsMapperController($scope, notificationsService, emerchantpayService, umbracoFormsIntegrationsCommerceEmerchantpayResource) {
22

33
var vm = this;
44

@@ -31,10 +31,29 @@
3131

3232

3333
function init() {
34-
vm.customerProperties = ["Email", "FirstName", "LastName", "Phone", "Address", "ZipCode", "City", "State", "Country"];
34+
35+
umbracoFormsIntegrationsCommerceEmerchantpayResource.isAccountAvailable().then(function (response) {
36+
if (response === "UNAVAILABLE") {
37+
notificationsService.add({
38+
headline: "emerchantpay",
39+
message: "Account details are missing. Please create an account before continuing",
40+
type: "error",
41+
sticky: true,
42+
url: "https://www.emerchantpay.com/"
43+
});
44+
}
45+
});
46+
47+
umbracoFormsIntegrationsCommerceEmerchantpayResource.getAvailableMappingFields().then(function (response) {
48+
vm.customerProperties = response;
49+
});
3550

3651
vm.fields = [];
3752

53+
umbracoFormsIntegrationsCommerceEmerchantpayResource.getRequiredMappingFields().then(function (response) {
54+
vm.requiredFields = response.join();
55+
});
56+
3857
emerchantpayService.getFormFields(function (response) {
3958
vm.fields = response;
4059
});
@@ -49,4 +68,4 @@
4968
}
5069

5170
angular.module("umbraco")
52-
.controller("UmbracoForms.Integrations.Commerce.eMerchantPay.CustomerDetailsMapperController", CustomerDetailsMapperController);
71+
.controller("UmbracoForms.Integrations.Commerce.Emerchantpay.CustomerDetailsMapperController", CustomerDetailsMapperController);
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-controller="UmbracoForms.Integrations.Commerce.eMerchantPay.CustomerDetailsMapperController as vm">
1+
<div ng-controller="UmbracoForms.Integrations.Commerce.Emerchantpay.CustomerDetailsMapperController as vm">
22

33
<div>
44
<select ng-model="vm.selectedCustomerProperty">
@@ -10,15 +10,19 @@
1010
<option ng-repeat="field in vm.fields" value="{{ field.id }}">{{ field.value }}</option>
1111
</select>
1212
</div>
13-
13+
14+
<div ng-if="vm.requiredFields.length > 0" class="alert alert-info mt2 mr3" role="alert">
15+
<span>Mandatory fields: {{ vm.requiredFields }}</span>
16+
</div>
17+
1418
<div class="mt2">
1519
<umb-button type="button" class="mt2"
1620
action="vm.addMapping()"
1721
label="Add mapping"
1822
disabled="vm.selectedCustomerProperty.length === 0 || vm.selectedField.length === 0">
1923
</umb-button>
2024
</div>
21-
25+
2226
<div class="umb-forms-mappings mt2" ng-if="vm.mappings.length > 0">
2327

2428
<div class="umb-forms-mapping-header">
@@ -38,4 +42,4 @@
3842
</div>
3943
</div>
4044

41-
</div>
45+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
function emerchantpayResource($http, umbRequestHelper) {
2+
3+
const apiEndpoint = "backoffice/UmbracoFormsIntegrationsCommerceEmerchantpay/Emerchantpay";
4+
5+
return {
6+
isAccountAvailable: function () {
7+
return umbRequestHelper.resourcePromise(
8+
$http.get(`${apiEndpoint}/IsAccountAvailable`),
9+
"Failed to get resource");
10+
},
11+
getCurrencies: function () {
12+
return umbRequestHelper.resourcePromise(
13+
$http.get(`${apiEndpoint}/GetCurrencies`),
14+
"Failed to get resource");
15+
},
16+
getAvailableMappingFields: function () {
17+
return umbRequestHelper.resourcePromise(
18+
$http.get(`${apiEndpoint}/GetAvailableMappingFields`),
19+
"Failed to get resource");
20+
},
21+
getRequiredMappingFields: function () {
22+
return umbRequestHelper.resourcePromise(
23+
$http.get(`${apiEndpoint}/GetRequiredMappingFields`),
24+
"Failed to get resource");
25+
}
26+
};
27+
}
28+
29+
angular.module('umbraco.resources').factory('umbracoFormsIntegrationsCommerceEmerchantpayResource', emerchantpayResource);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
}
1414

1515
angular.module("umbraco.services")
16-
.factory("emerchantpayService", emerchantpayService)
16+
.factory("emerchantpayService", emerchantpayService)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
}
2222

2323
angular.module("umbraco")
24-
.controller("UmbracoForms.Integrations.Commerce.eMerchantPay.FieldPickerController", FieldPickerController);
24+
.controller("UmbracoForms.Integrations.Commerce.Emerchantpay.FieldPickerController", FieldPickerController);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div ng-controller="UmbracoForms.Integrations.Commerce.eMerchantPay.FieldPickerController as vm">
1+
<div ng-controller="UmbracoForms.Integrations.Commerce.Emerchantpay.FieldPickerController as vm">
22

33
<div>
44
<select ng-model="vm.selectedField" ng-click="vm.saveField()">
@@ -7,4 +7,4 @@
77
</select>
88
</div>
99

10-
</div>
10+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"javascript": [
3+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/Emerchantpay/customer-details-mapper.controller.js",
4+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/Emerchantpay/currency.controller.js",
5+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/Emerchantpay/emerchantpay.resource.js",
6+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/Emerchantpay/emerchantpay.service.js",
7+
"~/App_Plugins/UmbracoForms.Integrations/Commerce/Emerchantpay/field-picker.controller.js"
8+
],
9+
"css": [ "" ]
10+
}

0 commit comments

Comments
 (0)