@colijnit/relation 259.1.0 → 259.1.1
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.
- package/bundles/colijnit-relation.umd.js +64 -15
- package/bundles/colijnit-relation.umd.js.map +1 -1
- package/colijnit-relation-259.1.0.tgz +0 -0
- package/colijnit-relation.metadata.json +1 -1
- package/esm2015/lib/component/relation/relation.component.js +21 -10
- package/esm2015/lib/component/relation-avatar/relation-avatar.component.js +1 -1
- package/esm2015/lib/relation-version.js +3 -3
- package/esm2015/lib/service/relation-base.service.js +4 -1
- package/esm2015/lib/service/relation-connector-adapter.service.js +13 -1
- package/esm2015/lib/service/relation-connector.service.js +6 -1
- package/fesm2015/colijnit-relation.js +41 -11
- package/fesm2015/colijnit-relation.js.map +1 -1
- package/lib/component/relation/relation.component.d.ts +1 -1
- package/lib/component/relation-avatar/relation-avatar.component.d.ts +1 -1
- package/lib/service/relation-base.service.d.ts +1 -0
- package/lib/service/relation-connector-adapter.service.d.ts +1 -0
- package/lib/service/relation-connector.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
function Version() {
|
|
32
32
|
this.name = "@colijnit/relation";
|
|
33
33
|
this.description = "Colijn IT relation package specific for version 2.5.7.";
|
|
34
|
-
this.symVer = "259.1.
|
|
35
|
-
this.publishDate = "7
|
|
34
|
+
this.symVer = "259.1.1";
|
|
35
|
+
this.publishDate = "16-7-2025 11:47:22";
|
|
36
36
|
}
|
|
37
37
|
return Version;
|
|
38
38
|
}());
|
|
@@ -1080,6 +1080,26 @@
|
|
|
1080
1080
|
}); });
|
|
1081
1081
|
});
|
|
1082
1082
|
};
|
|
1083
|
+
RelationConnectorAdapterService.prototype.getFirstCustomerForContact = function (relationNo) {
|
|
1084
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1085
|
+
var result;
|
|
1086
|
+
return __generator(this, function (_a) {
|
|
1087
|
+
switch (_a.label) {
|
|
1088
|
+
case 0: return [4 /*yield*/, this.connector.getFirstCustomerForContact(relationNo, true)];
|
|
1089
|
+
case 1:
|
|
1090
|
+
result = _a.sent();
|
|
1091
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1092
|
+
return [2 /*return*/, this._boFactory.makeWithRawBackendData(customerFullObject_bo.CustomerFullObject, result.resultObject)];
|
|
1093
|
+
}
|
|
1094
|
+
else {
|
|
1095
|
+
this._handleExceptionFromResponse(result);
|
|
1096
|
+
return [2 /*return*/, null];
|
|
1097
|
+
}
|
|
1098
|
+
return [2 /*return*/];
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
});
|
|
1102
|
+
};
|
|
1083
1103
|
RelationConnectorAdapterService.prototype.getCustomerFullObject = function (relationNo) {
|
|
1084
1104
|
return __awaiter(this, void 0, void 0, function () {
|
|
1085
1105
|
var result;
|
|
@@ -1468,6 +1488,13 @@
|
|
|
1468
1488
|
});
|
|
1469
1489
|
});
|
|
1470
1490
|
};
|
|
1491
|
+
RelationConnectorService.prototype.getFirstCustomerForContact = function (relationNo) {
|
|
1492
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1493
|
+
return __generator(this, function (_a) {
|
|
1494
|
+
return [2 /*return*/, this._adapterService.getFirstCustomerForContact(relationNo)];
|
|
1495
|
+
});
|
|
1496
|
+
});
|
|
1497
|
+
};
|
|
1471
1498
|
RelationConnectorService.prototype.getCustomerFullObject = function (relationNo) {
|
|
1472
1499
|
return __awaiter(this, void 0, void 0, function () {
|
|
1473
1500
|
return __generator(this, function (_a) {
|
|
@@ -1915,6 +1942,9 @@
|
|
|
1915
1942
|
});
|
|
1916
1943
|
});
|
|
1917
1944
|
};
|
|
1945
|
+
RelationBaseService.prototype.getFirstCustomerForContact = function (relationNo) {
|
|
1946
|
+
return this.connector.getFirstCustomerForContact(relationNo);
|
|
1947
|
+
};
|
|
1918
1948
|
RelationBaseService.prototype._getCustomerFullObject = function (relationNo) {
|
|
1919
1949
|
return this.connector.getCustomerFullObject(relationNo);
|
|
1920
1950
|
};
|
|
@@ -2103,25 +2133,44 @@
|
|
|
2103
2133
|
return true;
|
|
2104
2134
|
};
|
|
2105
2135
|
RelationComponent.prototype.ngOnInit = function () {
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
}
|
|
2110
|
-
this._subs.push(this.relationEventService.relationLoaded.subscribe(function (relation) { return __awaiter(_this, void 0, void 0, function () {
|
|
2136
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2137
|
+
var customer;
|
|
2138
|
+
var _this = this;
|
|
2111
2139
|
return __generator(this, function (_a) {
|
|
2112
2140
|
switch (_a.label) {
|
|
2113
2141
|
case 0:
|
|
2114
|
-
if (!(
|
|
2115
|
-
this.
|
|
2116
|
-
return [4 /*yield*/, this.
|
|
2142
|
+
if (!(this.loadRelationFromLoginResponse && this._relationConnectorService.loginResponse)) return [3 /*break*/, 3];
|
|
2143
|
+
if (!(this._relationConnectorService.loginResponse.relationKind === relationKind_enum.RelationKind.ContactPerson)) return [3 /*break*/, 2];
|
|
2144
|
+
return [4 /*yield*/, this._relationService.getFirstCustomerForContact(this._relationConnectorService.loginResponse.relationId)];
|
|
2117
2145
|
case 1:
|
|
2118
|
-
_a.sent();
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2146
|
+
customer = _a.sent();
|
|
2147
|
+
if (customer && (customer.relationId !== null && customer.relationId !== undefined)) {
|
|
2148
|
+
this._relationService.relationId = customer.relationId;
|
|
2149
|
+
}
|
|
2150
|
+
return [3 /*break*/, 3];
|
|
2151
|
+
case 2:
|
|
2152
|
+
this._relationService.relationId = this._relationConnectorService.loginResponse.relationId;
|
|
2153
|
+
_a.label = 3;
|
|
2154
|
+
case 3:
|
|
2155
|
+
this._subs.push(this.relationEventService.relationLoaded.subscribe(function (relation) { return __awaiter(_this, void 0, void 0, function () {
|
|
2156
|
+
return __generator(this, function (_a) {
|
|
2157
|
+
switch (_a.label) {
|
|
2158
|
+
case 0:
|
|
2159
|
+
if (!(relation && relation.relationId)) return [3 /*break*/, 2];
|
|
2160
|
+
this.relation = relation;
|
|
2161
|
+
return [4 /*yield*/, this.getTitleCollection()];
|
|
2162
|
+
case 1:
|
|
2163
|
+
_a.sent();
|
|
2164
|
+
this.relationTitle = this.getTitleForRelation(this.relation);
|
|
2165
|
+
_a.label = 2;
|
|
2166
|
+
case 2: return [2 /*return*/];
|
|
2167
|
+
}
|
|
2168
|
+
});
|
|
2169
|
+
}); }));
|
|
2170
|
+
return [2 /*return*/];
|
|
2122
2171
|
}
|
|
2123
2172
|
});
|
|
2124
|
-
});
|
|
2173
|
+
});
|
|
2125
2174
|
};
|
|
2126
2175
|
RelationComponent.prototype.ngOnDestroy = function () {
|
|
2127
2176
|
this._subs.forEach(function (s) { return s.unsubscribe(); });
|