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

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/dist/esm/index.js CHANGED
@@ -14077,13 +14077,18 @@ var InvestmentCreationComponent = function (props) {
14077
14077
  setData(state === null || state === void 0 ? void 0 : state.record);
14078
14078
  }
14079
14079
  else {
14080
- setData({});
14080
+ setData({ ownership: true });
14081
14081
  }
14082
14082
  }, []);
14083
14083
  useEffect(function () {
14084
- getOrganisationsDetails();
14084
+ if (data) {
14085
+ var keys = Object.keys(data);
14086
+ if (keys[0] !== "ownership") {
14087
+ getOrganisationsDetails();
14088
+ }
14089
+ }
14085
14090
  }, [data]);
14086
- if (!data || !(state === null || state === void 0 ? void 0 : state.ownership)) {
14091
+ if (!data) {
14087
14092
  return React.createElement(Loading, null);
14088
14093
  }
14089
14094
  var companyName = {};
@@ -14392,7 +14397,7 @@ var InvestmentCreationComponent = function (props) {
14392
14397
  React.createElement("div", { className: "step-count" }, "02"),
14393
14398
  React.createElement("div", { className: "title" }, t("programme:ownership")))),
14394
14399
  description: current === 1 && (React.createElement("div", null,
14395
- React.createElement("div", { className: "programme-sought-form-container ownership-container" }, (state === null || state === void 0 ? void 0 : state.ownership) !== true &&
14400
+ React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 &&
14396
14401
  React.createElement("div", { className: "programme-sought-form" },
14397
14402
  React.createElement(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 :
14398
14403
  data.companyId.map(function (companyId, index) {