@undp/carbon-library 1.0.169-investment-fixes.0 → 1.0.169
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +15 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +15 -8
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -14242,7 +14242,7 @@ var InvestmentCreationComponent = function (props) {
|
|
14242
14242
|
return [3 /*break*/, 5];
|
14243
14243
|
case 3:
|
14244
14244
|
error_2 = _b.sent();
|
14245
|
-
console.log("Error in getting
|
14245
|
+
console.log("Error in getting organization list", error_2);
|
14246
14246
|
return [3 /*break*/, 5];
|
14247
14247
|
case 4:
|
14248
14248
|
setLoadingList(false);
|
@@ -14256,7 +14256,12 @@ var InvestmentCreationComponent = function (props) {
|
|
14256
14256
|
onNavigateToProgrammeManagementView();
|
14257
14257
|
return;
|
14258
14258
|
}
|
14259
|
-
|
14259
|
+
if (state === null || state === void 0 ? void 0 : state.record) {
|
14260
|
+
setData(state === null || state === void 0 ? void 0 : state.record);
|
14261
|
+
}
|
14262
|
+
else {
|
14263
|
+
setData({ ownership: true });
|
14264
|
+
}
|
14260
14265
|
}, []);
|
14261
14266
|
React.useEffect(function () {
|
14262
14267
|
if (data) {
|
@@ -14272,12 +14277,14 @@ var InvestmentCreationComponent = function (props) {
|
|
14272
14277
|
}
|
14273
14278
|
console.log('data', data);
|
14274
14279
|
var companyName = {};
|
14275
|
-
|
14276
|
-
var
|
14277
|
-
|
14278
|
-
|
14279
|
-
|
14280
|
-
data.proponentPercentage
|
14280
|
+
if (data && Object.keys(data)[0] !== "ownership") {
|
14281
|
+
for (var _i = 0, _l = data === null || data === void 0 ? void 0 : data.company; _i < _l.length; _i++) {
|
14282
|
+
var company = _l[_i];
|
14283
|
+
companyName[company === null || company === void 0 ? void 0 : company.companyId] = company;
|
14284
|
+
}
|
14285
|
+
if (!data.proponentPercentage) {
|
14286
|
+
data.proponentPercentage = [100];
|
14287
|
+
}
|
14281
14288
|
}
|
14282
14289
|
var nextOne = function (val) {
|
14283
14290
|
setCurrent(current + 1);
|