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

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -14017,12 +14017,13 @@ var InvestmentCreationComponent = function (props) {
14017
14017
  var formTwo = antd.Form.useForm()[0];
14018
14018
  var post = useConnection().post;
14019
14019
  var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
14020
- var _c = React.useState(false), loadingList = _c[0], setLoadingList = _c[1];
14021
- var _d = React.useState(0), current = _d[0], setCurrent = _d[1];
14022
- var _e = React.useState(0), currentPercTotal = _e[0], setCurrentPercTotal = _e[1];
14023
- var _f = React.useState([]), organisationsList = _f[0], setOrganisationList = _f[1];
14024
- var _g = React.useState([]), instrument = _g[0], setInstrument = _g[1];
14025
- var _h = React.useState(), stepOneData = _h[0], setStepOneData = _h[1];
14020
+ var _c = React.useState("New"); _c[0]; _c[1];
14021
+ var _d = React.useState(false), loadingList = _d[0], setLoadingList = _d[1];
14022
+ var _e = React.useState(0), current = _e[0], setCurrent = _e[1];
14023
+ var _f = React.useState(0), currentPercTotal = _f[0], setCurrentPercTotal = _f[1];
14024
+ var _g = React.useState([]), organisationsList = _g[0], setOrganisationList = _g[1];
14025
+ var _h = React.useState([]), instrument = _h[0], setInstrument = _h[1];
14026
+ var _j = React.useState(), stepOneData = _j[0], setStepOneData = _j[1];
14026
14027
  var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
14027
14028
  label: addSpaces(Object.values(exports.Instrument)[index]),
14028
14029
  value: Object.values(exports.Instrument)[index],
@@ -14088,7 +14089,6 @@ var InvestmentCreationComponent = function (props) {
14088
14089
  });
14089
14090
  }); };
14090
14091
  React.useEffect(function () {
14091
- console.log("state ---------------- > ", state);
14092
14092
  if (!state) {
14093
14093
  onNavigateToProgrammeManagementView();
14094
14094
  return;
@@ -14112,12 +14112,14 @@ var InvestmentCreationComponent = function (props) {
14112
14112
  return React.createElement(Loading, null);
14113
14113
  }
14114
14114
  var companyName = {};
14115
- for (var _i = 0, _j = data === null || data === void 0 ? void 0 : data.company; _i < _j.length; _i++) {
14116
- var company = _j[_i];
14117
- companyName[company === null || company === void 0 ? void 0 : company.companyId] = company;
14118
- }
14119
- if (!data.proponentPercentage) {
14120
- data.proponentPercentage = [100];
14115
+ if (data && Object.keys(data)[0] !== "ownership") {
14116
+ for (var _i = 0, _k = data === null || data === void 0 ? void 0 : data.company; _i < _k.length; _i++) {
14117
+ var company = _k[_i];
14118
+ companyName[company === null || company === void 0 ? void 0 : company.companyId] = company;
14119
+ }
14120
+ if (!data.proponentPercentage) {
14121
+ data.proponentPercentage = [100];
14122
+ }
14121
14123
  }
14122
14124
  var nextOne = function (val) {
14123
14125
  setCurrent(current + 1);
@@ -14208,9 +14210,10 @@ var InvestmentCreationComponent = function (props) {
14208
14210
  required: true,
14209
14211
  },
14210
14212
  ] },
14211
- React.createElement(antd.Radio.Group, { size: "large", defaultValue: "New" }, Object.values(exports.InvestmentCreationType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
14213
+ React.createElement(antd.Radio.Group, { size: "large", value: "New" }, Object.values(exports.InvestmentCreationType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
14212
14214
  React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
14213
- return deselectOnClick(e, "type");
14215
+ console.log(e);
14216
+ deselectOnClick(e, "type");
14214
14217
  } }, t("programme:" + k)))); }))))),
14215
14218
  React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
14216
14219
  React.createElement(antd.Col, { xl: 12, md: 24 },