@things-factory/integration-lmd 4.3.461 → 4.3.464
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -668,11 +668,27 @@ class IntegrationLmdDetail extends localize(i18next)(PageView) {
|
|
|
668
668
|
|
|
669
669
|
_getLmdSettingData() {
|
|
670
670
|
return this._lmdSettingGrist.dirtyData.records.map(record => {
|
|
671
|
+
|
|
672
|
+
let includePostalCodes = record.includePostalCode ? record.includePostalCode
|
|
673
|
+
.toString()
|
|
674
|
+
.split(',')
|
|
675
|
+
.map(item => item.trim()) : []
|
|
676
|
+
let excludePostalCodes = record.excludePostalCode ? record.excludePostalCode
|
|
677
|
+
.toString()
|
|
678
|
+
.split(',')
|
|
679
|
+
.map(item => item.trim()) : []
|
|
680
|
+
|
|
681
|
+
for(let includePostalCode of includePostalCodes){
|
|
682
|
+
if(excludePostalCodes.includes(includePostalCode)){
|
|
683
|
+
throw new Error ('include and exclude postal code cannot have the same value')
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
671
687
|
let data = {
|
|
672
688
|
id: record.id ? record.id.toString() : null,
|
|
673
689
|
name: record.name ? record.name.toString() : null,
|
|
674
690
|
geoCountry: record.geoCountry,
|
|
675
|
-
includePostalCode: record.includePostalCode ? record.includePostalCode.toString()
|
|
691
|
+
includePostalCode: record.includePostalCode ? record.includePostalCode.toString(): null,
|
|
676
692
|
excludePostalCode: record.excludePostalCode ? record.excludePostalCode.toString() : null
|
|
677
693
|
}
|
|
678
694
|
|
|
@@ -65,7 +65,7 @@ let LastMileDeliveryMutation = class LastMileDeliveryMutation {
|
|
|
65
65
|
throw new Error('record exists - name cannot be duplicated.');
|
|
66
66
|
}
|
|
67
67
|
if (!settingPatch || settingPatch.length < 1) {
|
|
68
|
-
throw new Error('
|
|
68
|
+
throw new Error('No settings have been added - At least 1 is required');
|
|
69
69
|
}
|
|
70
70
|
lmd = await lmdRepo.save(Object.assign(Object.assign({}, patch), { domain: domain, creator: user, updater: user, status: constants_1.LMD_STATUS.ACTIVE }));
|
|
71
71
|
let id = lmd.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-lmd",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.464",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"nock": "^13.0.2",
|
|
50
50
|
"should": "^13.2.3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "dc2feb22015b76dc2ccb311676a5fdf2ef2c6372"
|
|
53
53
|
}
|
|
@@ -94,7 +94,7 @@ export class LastMileDeliveryMutation {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
if (!settingPatch || settingPatch.length < 1) {
|
|
97
|
-
throw new Error('
|
|
97
|
+
throw new Error('No settings have been added - At least 1 is required')
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
lmd = await lmdRepo.save({
|