@undp/carbon-library 1.0.136-support-section-changes.1 → 1.0.136-support-section-changes.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -14097,13 +14097,18 @@ var InvestmentCreationComponent = function (props) {
14097
14097
  setData(state === null || state === void 0 ? void 0 : state.record);
14098
14098
  }
14099
14099
  else {
14100
- setData({});
14100
+ setData({ ownership: true });
14101
14101
  }
14102
14102
  }, []);
14103
14103
  React.useEffect(function () {
14104
- getOrganisationsDetails();
14104
+ if (data) {
14105
+ var keys = Object.keys(data);
14106
+ if (keys[0] !== "ownership") {
14107
+ getOrganisationsDetails();
14108
+ }
14109
+ }
14105
14110
  }, [data]);
14106
- if (!data || !(state === null || state === void 0 ? void 0 : state.ownership)) {
14111
+ if (!data) {
14107
14112
  return React.createElement(Loading, null);
14108
14113
  }
14109
14114
  var companyName = {};
@@ -14412,7 +14417,7 @@ var InvestmentCreationComponent = function (props) {
14412
14417
  React.createElement("div", { className: "step-count" }, "02"),
14413
14418
  React.createElement("div", { className: "title" }, t("programme:ownership")))),
14414
14419
  description: current === 1 && (React.createElement("div", null,
14415
- React.createElement("div", { className: "programme-sought-form-container ownership-container" }, (state === null || state === void 0 ? void 0 : state.ownership) !== true &&
14420
+ React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 &&
14416
14421
  React.createElement("div", { className: "programme-sought-form" },
14417
14422
  React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment }, data === null || data === void 0 ? void 0 :
14418
14423
  data.companyId.map(function (companyId, index) {