@undp/carbon-library 1.0.292-CARBON-239.0 → 1.0.292-CARBON-347.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@ import React, { createContext, useState, useEffect, useCallback, useContext, use
4
4
  import { DateTime } from 'luxon';
5
5
  import { Buffer } from 'buffer';
6
6
  import axios, { HttpStatusCode } from 'axios';
7
- import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber, isPossiblePhoneNumber } from 'react-phone-number-input';
7
+ import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } from 'react-phone-number-input';
8
8
  import validator from 'validator';
9
9
  import { plainToClass } from 'class-transformer';
10
10
  import * as Icon from 'react-bootstrap-icons';
@@ -1277,6 +1277,11 @@ var InvestmentCreationType;
1277
1277
  InvestmentCreationType["EXISTING"] = "Existing";
1278
1278
  InvestmentCreationType["NEW"] = "New";
1279
1279
  })(InvestmentCreationType || (InvestmentCreationType = {}));
1280
+ var InvestmentOwnershipType;
1281
+ (function (InvestmentOwnershipType) {
1282
+ InvestmentOwnershipType["PROJECT"] = "Project";
1283
+ InvestmentOwnershipType["NATIONAL"] = "National";
1284
+ })(InvestmentOwnershipType || (InvestmentOwnershipType = {}));
1280
1285
  var InvestmentStream;
1281
1286
  (function (InvestmentStream) {
1282
1287
  InvestmentStream["CLIMATE_FINANCE"] = "ClimateFinance";
@@ -6758,6 +6763,7 @@ var AddNewCompanyComponent = function (props) {
6758
6763
  },
6759
6764
  {
6760
6765
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
6766
+ var phoneNo;
6761
6767
  return __generator(this, function (_a) {
6762
6768
  if (String(value).trim() === "" ||
6763
6769
  String(value).trim() === undefined ||
@@ -6766,9 +6772,13 @@ var AddNewCompanyComponent = function (props) {
6766
6772
  throw new Error("".concat(t("addCompany:phoneNo"), " ").concat(t("isRequired")));
6767
6773
  }
6768
6774
  else {
6769
- formatPhoneNumber(String(value));
6770
- if (!isPossiblePhoneNumber(String(value))) {
6771
- throw new Error("".concat(t("addCompany:phoneNo"), " ").concat(t("isInvalid")));
6775
+ phoneNo = formatPhoneNumber(String(value));
6776
+ if (String(value).trim() !== "") {
6777
+ if (phoneNo === null ||
6778
+ phoneNo === "" ||
6779
+ phoneNo === undefined) {
6780
+ throw new Error("".concat(t("addCompany:phoneNo"), " ").concat(t("isRequired")));
6781
+ }
6772
6782
  }
6773
6783
  }
6774
6784
  return [2 /*return*/];
@@ -15804,7 +15814,7 @@ var UserManagementComponent = function (props) {
15804
15814
  React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openDeleteConfirmationModal, errorMsg: errorMsg, loading: loading })));
15805
15815
  };
15806
15816
 
15807
- var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .investment-radio-button .ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n width: fit-content; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .details-part-two .row .ant-picker-large {\n height: 40px !important;\n width: 100%; }\n";
15817
+ var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.details-part-two .ant-input-number {\n width: 50%;\n margin-left: 15px; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Rejected\"] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Cancelled\"] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Accepted\"] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Pending\"] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Recognised\"] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"NotRecognised\"] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .investment-radio-button .ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n width: fit-content; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .details-part-two .row .ant-picker-large {\n height: 40px !important;\n width: 100%; }\n";
15808
15818
  styleInject(css_248z$m);
15809
15819
 
15810
15820
  var Loading = function () {
@@ -15824,22 +15834,34 @@ var InsurancePayback;
15824
15834
 
15825
15835
  var RangePicker$3 = DatePicker.RangePicker;
15826
15836
  var InvestmentCreationComponent = function (props) {
15827
- var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
15837
+ var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onNavigateToInvestmentManagementView = props.onNavigateToInvestmentManagementView;
15828
15838
  var state = useLocation().state;
15829
15839
  var _a = useState(), data = _a[0], setData = _a[1];
15840
+ var _b = useState({}), companyNames = _b[0], setCompanyNames = _b[1];
15841
+ var _c = useState({}); _c[0]; var setUserOrganization = _c[1];
15842
+ var _d = useState({}), investmentNames = _d[0], setInvestmentNames = _d[1];
15843
+ var _e = useState(), projectData = _e[0], setProjectData = _e[1];
15844
+ var _f = useState(), investmentData = _f[0], setInvestmentData = _f[1];
15845
+ var _g = useState([]), allProjectData = _g[0], setAllProjectData = _g[1];
15830
15846
  var formOne = Form.useForm()[0];
15831
15847
  var formTwo = Form.useForm()[0];
15832
15848
  var post = useConnection().post;
15833
- var _b = useState(false), loading = _b[0], setLoading = _b[1];
15834
- var _c = useState("New"), typeCreation = _c[0], setTypeCreation = _c[1];
15835
- var _d = useState(false), loadingList = _d[0], setLoadingList = _d[1];
15836
- var _e = useState(0), current = _e[0], setCurrent = _e[1];
15837
- var _f = useState(0), currentPercTotal = _f[0], setCurrentPercTotal = _f[1];
15838
- var _g = useState([]), organisationsList = _g[0], setOrganisationList = _g[1];
15839
- var _h = useState([]), instrument = _h[0], setInstrument = _h[1];
15840
- var _j = useState(), stepOneData = _j[0], setStepOneData = _j[1];
15841
- var _k = useState(), govData = _k[0], setGovData = _k[1];
15849
+ var _h = useState(false), loading = _h[0], setLoading = _h[1];
15850
+ var _j = useState("New"), typeCreation = _j[0], setTypeCreation = _j[1];
15851
+ var _k = useState(InvestmentOwnershipType.PROJECT), investmentOwnershipType = _k[0], setInvestmentOwnershipType = _k[1];
15852
+ var _l = useState(false), loadingList = _l[0], setLoadingList = _l[1];
15853
+ var _m = useState(false), loadingInvestment = _m[0], setLoadingInvestment = _m[1];
15854
+ var _o = useState(false), loadingProgData = _o[0], setLoadingProgData = _o[1];
15855
+ var _p = useState(0), current = _p[0], setCurrent = _p[1];
15856
+ var _q = useState(0), currentPercTotal = _q[0], setCurrentPercTotal = _q[1];
15857
+ var _r = useState([]), organisationsList = _r[0], setOrganisationList = _r[1];
15858
+ var _s = useState([]), nationalInvestmentList = _s[0], setNationalInvestmentList = _s[1];
15859
+ var _t = useState([]), instrument = _t[0], setInstrument = _t[1];
15860
+ var _u = useState(), stepOneData = _u[0], setStepOneData = _u[1];
15861
+ var _v = useState(), govData = _v[0], setGovData = _v[1];
15842
15862
  var userInfoState = useUserContext().userInfoState;
15863
+ var _w = useState([]), ministrySectoralScope = _w[0], setMinistrySectoralScope = _w[1];
15864
+ var _x = useState({}), prevInvestor = _x[0], setPrevInvestor = _x[1];
15843
15865
  var instrumentOptions = Object.keys(Instrument).map(function (k, index) { return ({
15844
15866
  label: addSpaces(Object.values(Instrument)[index]),
15845
15867
  value: Object.values(Instrument)[index],
@@ -15891,52 +15913,225 @@ var InvestmentCreationComponent = function (props) {
15891
15913
  }
15892
15914
  });
15893
15915
  }); };
15894
- var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
15895
- var filterAnd, _i, _a, c, response, error_2;
15916
+ var getAllProjectData = function () { return __awaiter(void 0, void 0, void 0, function () {
15917
+ var response, error_2;
15918
+ return __generator(this, function (_a) {
15919
+ switch (_a.label) {
15920
+ case 0:
15921
+ setLoadingProgData(true);
15922
+ _a.label = 1;
15923
+ case 1:
15924
+ _a.trys.push([1, 5, 6, 7]);
15925
+ if (!data) return [3 /*break*/, 4];
15926
+ if (!!(data === null || data === void 0 ? void 0 : data.programmeId)) return [3 /*break*/, 3];
15927
+ console.log("data non existing", data);
15928
+ console.log("getting all Project data");
15929
+ return [4 /*yield*/, post("national/programme/query", {
15930
+ page: 1,
15931
+ size: 100,
15932
+ filterAnd: [
15933
+ {
15934
+ key: "currentStage",
15935
+ operation: "!=",
15936
+ value: ProgrammeStageUnified.Rejected,
15937
+ },
15938
+ ],
15939
+ })];
15940
+ case 2:
15941
+ response = _a.sent();
15942
+ if (response.data) {
15943
+ setAllProjectData(response === null || response === void 0 ? void 0 : response.data);
15944
+ console.log("all Project data", response === null || response === void 0 ? void 0 : response.data);
15945
+ }
15946
+ return [3 /*break*/, 4];
15947
+ case 3:
15948
+ console.log("setting current Project data");
15949
+ setAllProjectData([data]);
15950
+ _a.label = 4;
15951
+ case 4: return [3 /*break*/, 7];
15952
+ case 5:
15953
+ error_2 = _a.sent();
15954
+ console.log("Error in getting all programme data", error_2);
15955
+ return [3 /*break*/, 7];
15956
+ case 6:
15957
+ setLoadingProgData(false);
15958
+ return [7 /*endfinally*/];
15959
+ case 7: return [2 /*return*/];
15960
+ }
15961
+ });
15962
+ }); };
15963
+ var setSelectedProgramme = function (value) { return __awaiter(void 0, void 0, void 0, function () {
15964
+ var _i, allProjectData_1, obj;
15965
+ return __generator(this, function (_a) {
15966
+ console.log("setSelectedProgramme", value);
15967
+ for (_i = 0, allProjectData_1 = allProjectData; _i < allProjectData_1.length; _i++) {
15968
+ obj = allProjectData_1[_i];
15969
+ if (obj.programmeId == value) {
15970
+ setProjectData(obj);
15971
+ break;
15972
+ }
15973
+ }
15974
+ return [2 /*return*/];
15975
+ });
15976
+ }); };
15977
+ var setSelectedInvestment = function (value) { return __awaiter(void 0, void 0, void 0, function () {
15978
+ return __generator(this, function (_a) {
15979
+ console.log("setSelectedInvestment", value);
15980
+ setInvestmentData(investmentNames[value]);
15981
+ return [2 /*return*/];
15982
+ });
15983
+ }); };
15984
+ var getNationalInvestmentDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
15985
+ var optionalFilters, filterAnd, filterOr_1, response, investmentData_1, _i, _a, investment, error_3;
15896
15986
  return __generator(this, function (_b) {
15897
15987
  switch (_b.label) {
15898
15988
  case 0:
15899
- setLoadingList(true);
15989
+ setLoadingInvestment(true);
15900
15990
  _b.label = 1;
15901
15991
  case 1:
15902
15992
  _b.trys.push([1, 3, 4, 5]);
15993
+ optionalFilters = {};
15903
15994
  filterAnd = [];
15904
15995
  filterAnd = [
15905
15996
  {
15906
- key: "companyRole",
15997
+ key: "category",
15907
15998
  operation: "=",
15908
- value: CompanyRole.PROGRAMME_DEVELOPER.toString(),
15999
+ value: InvestmentOwnershipType.NATIONAL.toString(),
16000
+ },
16001
+ {
16002
+ key: "amount",
16003
+ operation: ">",
16004
+ value: 0,
15909
16005
  },
15910
16006
  ];
15911
16007
  if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.PROGRAMME_DEVELOPER) {
15912
16008
  filterAnd.push({
15913
- key: "companyId",
15914
- operation: "!=",
16009
+ key: "toCompanyId",
16010
+ operation: "=",
15915
16011
  value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId,
15916
16012
  });
15917
16013
  }
15918
- for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
15919
- c = _a[_i];
15920
- filterAnd.push({
15921
- key: "companyId",
15922
- operation: "!=",
15923
- value: c,
16014
+ else if (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ||
16015
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) &&
16016
+ (data === null || data === void 0 ? void 0 : data.programmeId)) {
16017
+ filterOr_1 = [];
16018
+ data.companyId.map(function (id) {
16019
+ return filterOr_1.push({
16020
+ key: "toCompanyId",
16021
+ operation: "=",
16022
+ value: id,
16023
+ });
15924
16024
  });
16025
+ optionalFilters.filterOr = filterOr_1;
15925
16026
  }
15926
- return [4 /*yield*/, post("national/organisation/queryNames", {
16027
+ return [4 /*yield*/, post("national/programme/investmentQuery", __assign({ page: 1, size: 100, filterAnd: filterAnd }, optionalFilters))];
16028
+ case 2:
16029
+ response = _b.sent();
16030
+ if (response.data) {
16031
+ setNationalInvestmentList(response === null || response === void 0 ? void 0 : response.data);
16032
+ investmentData_1 = {};
16033
+ for (_i = 0, _a = response === null || response === void 0 ? void 0 : response.data; _i < _a.length; _i++) {
16034
+ investment = _a[_i];
16035
+ investmentData_1[investment.requestId] = investment;
16036
+ }
16037
+ setInvestmentNames(investmentData_1);
16038
+ console.log(investmentData_1);
16039
+ }
16040
+ return [3 /*break*/, 5];
16041
+ case 3:
16042
+ error_3 = _b.sent();
16043
+ console.log("Error in getting national Investments list", error_3);
16044
+ return [3 /*break*/, 5];
16045
+ case 4:
16046
+ setLoadingInvestment(false);
16047
+ return [7 /*endfinally*/];
16048
+ case 5: return [2 /*return*/];
16049
+ }
16050
+ });
16051
+ }); };
16052
+ var getUserOrganization = function () { return __awaiter(void 0, void 0, void 0, function () {
16053
+ var response, error_4;
16054
+ return __generator(this, function (_a) {
16055
+ switch (_a.label) {
16056
+ case 0:
16057
+ _a.trys.push([0, 2, , 3]);
16058
+ return [4 /*yield*/, post("national/organisation/query", {
15927
16059
  page: 1,
15928
16060
  size: 100,
15929
- filterAnd: filterAnd,
16061
+ filterAnd: [
16062
+ { key: "companyId", operation: "=", value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId },
16063
+ ],
15930
16064
  })];
16065
+ case 1:
16066
+ response = _a.sent();
16067
+ console.log("getUserOrganization", response.data[0]);
16068
+ setUserOrganization(response.data[0]);
16069
+ setMinistrySectoralScope(response.data[0].sectoralScope);
16070
+ return [3 /*break*/, 3];
15931
16071
  case 2:
15932
- response = _b.sent();
16072
+ error_4 = _a.sent();
16073
+ console.log("Error in getting user organization", error_4);
16074
+ return [3 /*break*/, 3];
16075
+ case 3: return [2 /*return*/];
16076
+ }
16077
+ });
16078
+ }); };
16079
+ var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
16080
+ var filterAnd, filterOr, _i, _a, c, filters, response, companyName, _b, _c, company, error_5;
16081
+ return __generator(this, function (_d) {
16082
+ switch (_d.label) {
16083
+ case 0:
16084
+ setLoadingList(true);
16085
+ _d.label = 1;
16086
+ case 1:
16087
+ _d.trys.push([1, 3, 4, 5]);
16088
+ filterAnd = [];
16089
+ filterOr = [];
16090
+ filterAnd = [
16091
+ {
16092
+ key: "companyRole",
16093
+ operation: "=",
16094
+ value: CompanyRole.PROGRAMME_DEVELOPER.toString(),
16095
+ },
16096
+ ];
16097
+ // if (userInfoState?.companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
16098
+ // filterAnd.push({
16099
+ // key: "companyId",
16100
+ // operation: "!=",
16101
+ // value: userInfoState?.companyId,
16102
+ // });
16103
+ // }
16104
+ if (data === null || data === void 0 ? void 0 : data.companyId) {
16105
+ for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
16106
+ c = _a[_i];
16107
+ filterOr.push({
16108
+ key: "companyId",
16109
+ operation: "=",
16110
+ value: c,
16111
+ });
16112
+ }
16113
+ }
16114
+ filters = void 0;
16115
+ if (filterOr.length) {
16116
+ filters.filterOr = filterOr;
16117
+ }
16118
+ return [4 /*yield*/, post("national/organisation/queryNames", __assign({ page: 1, size: 100, filterAnd: filterAnd }, filters))];
16119
+ case 2:
16120
+ response = _d.sent();
15933
16121
  if (response.data) {
15934
16122
  setOrganisationList(response === null || response === void 0 ? void 0 : response.data);
16123
+ companyName = {};
16124
+ for (_b = 0, _c = response === null || response === void 0 ? void 0 : response.data; _b < _c.length; _b++) {
16125
+ company = _c[_b];
16126
+ companyName[Number(company.companyId)] = company.name;
16127
+ }
16128
+ setCompanyNames(companyName);
16129
+ console.log(companyName);
15935
16130
  }
15936
16131
  return [3 /*break*/, 5];
15937
16132
  case 3:
15938
- error_2 = _b.sent();
15939
- console.log("Error in getting organization list", error_2);
16133
+ error_5 = _d.sent();
16134
+ console.log("Error in getting organization list", error_5);
15940
16135
  return [3 /*break*/, 5];
15941
16136
  case 4:
15942
16137
  setLoadingList(false);
@@ -15951,52 +16146,72 @@ var InvestmentCreationComponent = function (props) {
15951
16146
  return;
15952
16147
  }
15953
16148
  if (state === null || state === void 0 ? void 0 : state.record) {
16149
+ console.log("condition 1 data", state === null || state === void 0 ? void 0 : state.record);
15954
16150
  setData(state === null || state === void 0 ? void 0 : state.record);
15955
16151
  }
15956
16152
  else {
16153
+ console.log("condition 2 data", { ownership: true });
15957
16154
  setData({ ownership: true });
15958
16155
  }
15959
16156
  }, []);
15960
16157
  useEffect(function () {
15961
- if (data) {
15962
- var keys = Object.keys(data);
15963
- if (keys[0] !== "ownership") {
15964
- getOrganisationsDetails();
15965
- }
15966
- }
16158
+ // if (data) {
16159
+ // const keys = Object.keys(data);
16160
+ // if (keys[0] !== "ownership") {
16161
+ // getOrganisationsDetails();
16162
+ // }
16163
+ // }
16164
+ getNationalInvestmentDetails();
16165
+ getOrganisationsDetails();
15967
16166
  getGovernmentDetails();
16167
+ getAllProjectData();
16168
+ getUserOrganization();
15968
16169
  }, [data]);
15969
- if (!data) {
16170
+ if (!data && allProjectData.length == 0) {
15970
16171
  return React.createElement(Loading, null);
15971
16172
  }
15972
16173
  console.log("data", data);
15973
- var companyName = {};
16174
+ console.log("data", data);
15974
16175
  if (data && Object.keys(data)[0] !== "ownership") {
15975
- for (var _i = 0, _l = data === null || data === void 0 ? void 0 : data.company; _i < _l.length; _i++) {
15976
- var company = _l[_i];
15977
- companyName[company === null || company === void 0 ? void 0 : company.companyId] = company;
15978
- }
16176
+ // for (const company of data!?.company) {
16177
+ // companyName[company?.companyId] = company;
16178
+ // }
15979
16179
  if (!data.proponentPercentage) {
15980
16180
  data.proponentPercentage = [100];
15981
16181
  }
15982
16182
  }
15983
16183
  var nextOne = function (val) {
16184
+ console.log("step 1 values", val);
16185
+ if (val.typeCreation == InvestmentCreationType.EXISTING) {
16186
+ val.toCompanyId = investmentData.toCompanyId;
16187
+ }
15984
16188
  setCurrent(current + 1);
15985
16189
  setStepOneData(val);
16190
+ if (data === null || data === void 0 ? void 0 : data.programmeId)
16191
+ setSelectedProgramme(data.programmeId);
16192
+ if (prevInvestor && prevInvestor != val.toCompanyId && !(data === null || data === void 0 ? void 0 : data.programmeId)) {
16193
+ formTwo.resetFields();
16194
+ setCurrentPercTotal(0);
16195
+ setProjectData(undefined);
16196
+ }
15986
16197
  };
15987
16198
  var prevOne = function () {
15988
16199
  setCurrent(current - 1);
16200
+ setPrevInvestor(stepOneData.toCompanyId);
16201
+ // formTwo.resetFields();
16202
+ // setCurrentPercTotal(0);
16203
+ // setProjectData(undefined);
15989
16204
  };
15990
16205
  var submitInvestment = function (val) { return __awaiter(void 0, void 0, void 0, function () {
15991
- var payload, response, error_3;
16206
+ var payload, response, error_6;
15992
16207
  return __generator(this, function (_a) {
15993
16208
  switch (_a.label) {
15994
16209
  case 0:
15995
16210
  console.log(val);
15996
16211
  console.log(stepOneData);
16212
+ console.log("OwnershipType", investmentOwnershipType);
15997
16213
  setLoading(true);
15998
16214
  payload = stepOneData;
15999
- payload.programmeId = data.programmeId;
16000
16215
  payload.amount = parseFloat(payload.amount);
16001
16216
  if (payload.interestRate) {
16002
16217
  payload.interestRate = parseFloat(payload.interestRate);
@@ -16013,16 +16228,32 @@ var InvestmentCreationComponent = function (props) {
16013
16228
  .startOf("day")
16014
16229
  .unix();
16015
16230
  }
16016
- payload.instrument = [payload.instrument];
16017
- payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
16018
- payload.percentage = val.percentage;
16019
16231
  payload.toCompanyId = Number(payload.toCompanyId);
16020
16232
  _a.label = 1;
16021
16233
  case 1:
16022
- _a.trys.push([1, 3, 4, 5]);
16234
+ _a.trys.push([1, 6, 7, 8]);
16235
+ response = void 0;
16236
+ if (!(investmentOwnershipType == InvestmentOwnershipType.PROJECT)) return [3 /*break*/, 3];
16237
+ if (typeCreation == InvestmentCreationType.EXISTING) {
16238
+ payload.nationalInvestmentId = investmentData.requestId;
16239
+ }
16240
+ else {
16241
+ payload.instrument = [payload.instrument];
16242
+ }
16243
+ payload.programmeId = projectData === null || projectData === void 0 ? void 0 : projectData.programmeId;
16244
+ payload.fromCompanyIds = projectData === null || projectData === void 0 ? void 0 : projectData.companyId.map(function (e) { return Number(e); });
16245
+ payload.percentage = val.percentage;
16023
16246
  return [4 /*yield*/, post("national/programme/addInvestment", payload)];
16024
16247
  case 2:
16025
16248
  response = _a.sent();
16249
+ return [3 /*break*/, 5];
16250
+ case 3:
16251
+ payload.instrument = [payload.instrument];
16252
+ return [4 /*yield*/, post("national/organisation/addInvestment", payload)];
16253
+ case 4:
16254
+ response = _a.sent();
16255
+ _a.label = 5;
16256
+ case 5:
16026
16257
  console.log("investment creation -> ", response);
16027
16258
  if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
16028
16259
  message.open({
@@ -16032,22 +16263,24 @@ var InvestmentCreationComponent = function (props) {
16032
16263
  style: { textAlign: "right", marginRight: 15, marginTop: 10 },
16033
16264
  });
16034
16265
  }
16035
- onNavigateToProgrammeView(data.programmeId);
16036
- return [3 /*break*/, 5];
16037
- case 3:
16038
- error_3 = _a.sent();
16039
- console.log("Error in investment creation - ", error_3);
16266
+ (data === null || data === void 0 ? void 0 : data.programmeId)
16267
+ ? onNavigateToProgrammeView(data === null || data === void 0 ? void 0 : data.programmeId)
16268
+ : onNavigateToInvestmentManagementView();
16269
+ return [3 /*break*/, 8];
16270
+ case 6:
16271
+ error_6 = _a.sent();
16272
+ console.log("Error in investment creation - ", error_6);
16040
16273
  message.open({
16041
16274
  type: "error",
16042
- content: error_3 === null || error_3 === void 0 ? void 0 : error_3.message,
16275
+ content: error_6 === null || error_6 === void 0 ? void 0 : error_6.message,
16043
16276
  duration: 4,
16044
16277
  style: { textAlign: "right", marginRight: 15, marginTop: 10 },
16045
16278
  });
16046
- return [3 /*break*/, 5];
16047
- case 4:
16279
+ return [3 /*break*/, 8];
16280
+ case 7:
16048
16281
  setLoading(false);
16049
16282
  return [7 /*endfinally*/];
16050
- case 5: return [2 /*return*/];
16283
+ case 8: return [2 /*return*/];
16051
16284
  }
16052
16285
  });
16053
16286
  }); };
@@ -16061,6 +16294,14 @@ var InvestmentCreationComponent = function (props) {
16061
16294
  var onChangeTypeCreation = function (e) {
16062
16295
  console.log("radio checked", e.target.value);
16063
16296
  setTypeCreation(e.target.value);
16297
+ formOne.resetFields();
16298
+ formTwo.resetFields();
16299
+ setCurrentPercTotal(0);
16300
+ setProjectData(undefined);
16301
+ };
16302
+ var onChangeInvestmentOwnershipType = function (e) {
16303
+ console.log("investment ownership type radio checked", e.target.value);
16304
+ setInvestmentOwnershipType(e.target.value);
16064
16305
  };
16065
16306
  return (React.createElement("div", { className: "add-programme-main-container" },
16066
16307
  React.createElement("div", { className: "title-container" },
@@ -16085,134 +16326,60 @@ var InvestmentCreationComponent = function (props) {
16085
16326
  ] },
16086
16327
  React.createElement(Radio.Group, { size: "large", defaultValue: typeCreation }, Object.values(InvestmentCreationType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16087
16328
  React.createElement(Radio.Button, { className: "condition-radio", value: k, onChange: onChangeTypeCreation }, t("programme:" + k)))); }))))),
16088
- React.createElement(Row, { className: "row", gutter: [16, 16] },
16089
- React.createElement(Col, { xl: 12, md: 24 },
16090
- React.createElement("div", { className: "details-part-one" },
16091
- React.createElement(Form.Item, { label: t("programme:investorName"), name: "toCompanyId", wrapperCol: { span: 24 }, className: "organisation", rules: [
16092
- {
16093
- required: true,
16094
- message: "".concat(t("programme:investorName"), " ").concat(t("isRequired")),
16095
- },
16096
- ] },
16097
- React.createElement(Select, { size: "large", loading: loadingList }, organisationsList.map(function (organisation) { return (React.createElement(Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name)); }))))),
16098
- React.createElement(Col, { xl: 12, md: 24 },
16099
- React.createElement("div", { className: "details-part-two" },
16100
- React.createElement(Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
16101
- {
16102
- required: true,
16103
- message: "",
16104
- },
16105
- {
16106
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16107
- return __generator(this, function (_a) {
16108
- if (String(value).trim() === "" ||
16109
- String(value).trim() === undefined ||
16110
- value === null ||
16111
- value === undefined) {
16112
- throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
16113
- }
16114
- else if (!isNaN(value) &&
16115
- Number(value) > 0) {
16116
- return [2 /*return*/, Promise.resolve()];
16117
- }
16118
- else {
16119
- throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
16120
- }
16121
- });
16122
- }); },
16123
- },
16124
- ] },
16125
- React.createElement(Input, { size: "large" }))))),
16126
- React.createElement(Row, { className: "row", gutter: [16, 16] },
16127
- React.createElement(Col, { xl: 24, md: 24 },
16128
- React.createElement(Form.Item, { label: t("programme:instrument"), name: "instrument",
16129
- //wrapperCol={{ span: 24 }}
16130
- required: true, className: "investment-radio-button", rules: [
16131
- {
16132
- required: true,
16133
- message: "",
16134
- },
16135
- {
16136
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16137
- return __generator(this, function (_a) {
16138
- if (String(value).trim() === "" ||
16139
- String(value).trim() === undefined ||
16140
- value === null ||
16141
- value === undefined) {
16142
- throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
16143
- }
16144
- return [2 /*return*/];
16145
- });
16146
- }); },
16147
- },
16148
- ] },
16149
- React.createElement(Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
16150
- return (React.createElement(Radio, { value: e.value }, e.label));
16151
- }))))),
16152
- instrument &&
16153
- instrument.indexOf(Instrument.LOAN) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16154
- React.createElement(Col, { xl: 8, md: 12 },
16155
- React.createElement("div", { className: "details-part-two" },
16156
- React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16157
- {
16158
- required: true,
16159
- message: "",
16160
- },
16161
- {
16162
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16163
- return __generator(this, function (_a) {
16164
- if (String(value).trim() === "" ||
16165
- String(value).trim() ===
16166
- undefined ||
16167
- value === null ||
16168
- value === undefined) {
16169
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16170
- }
16171
- else if (!isNaN(value)) {
16172
- return [2 /*return*/, Promise.resolve()];
16173
- }
16174
- else {
16175
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16176
- }
16177
- });
16178
- }); },
16179
- },
16180
- ] },
16181
- React.createElement(Input, { size: "large" })))))),
16182
- instrument &&
16183
- (instrument.indexOf(Instrument.CONLOAN) >= 0 ||
16184
- instrument.indexOf(Instrument.NONCONLOAN) >= 0) && (React.createElement("div", { className: "details-part-two" },
16329
+ typeCreation == InvestmentCreationType.NEW && (React.createElement("div", null,
16185
16330
  React.createElement(Row, { className: "row", gutter: [16, 16] },
16186
- React.createElement(Col, { xl: 8, md: 12 },
16187
- React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16188
- {
16189
- required: true,
16190
- message: "",
16191
- },
16192
- {
16193
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16194
- return __generator(this, function (_a) {
16195
- if (String(value).trim() === "" ||
16196
- String(value).trim() ===
16197
- undefined ||
16198
- value === null ||
16199
- value === undefined) {
16200
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16201
- }
16202
- else if (!isNaN(value)) {
16203
- return [2 /*return*/, Promise.resolve()];
16204
- }
16205
- else {
16206
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16207
- }
16208
- });
16209
- }); },
16210
- },
16211
- ] },
16212
- React.createElement(Input, { size: "large" })))),
16331
+ React.createElement(Col, { xl: 12, md: 24 },
16332
+ React.createElement("div", { className: "details-part-one" },
16333
+ React.createElement(Form.Item, { label: t("programme:investorName"), name: "toCompanyId", wrapperCol: { span: 24 }, className: "organisation", rules: [
16334
+ {
16335
+ required: true,
16336
+ message: "".concat(t("programme:investorName"), " ").concat(t("isRequired")),
16337
+ },
16338
+ ] },
16339
+ React.createElement(Select, { size: "large", loading: loadingList }, organisationsList.map(function (organisation) {
16340
+ if (data === null || data === void 0 ? void 0 : data.programmeId) {
16341
+ if (data.companyId
16342
+ .map(function (id) { return Number(id); })
16343
+ .includes(Number(organisation.companyId))) {
16344
+ return (React.createElement(Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name));
16345
+ }
16346
+ }
16347
+ else {
16348
+ return (React.createElement(Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name));
16349
+ }
16350
+ }))))),
16351
+ React.createElement(Col, { xl: 12, md: 24 },
16352
+ React.createElement("div", { className: "details-part-two" },
16353
+ React.createElement(Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
16354
+ {
16355
+ required: true,
16356
+ message: "",
16357
+ },
16358
+ {
16359
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16360
+ return __generator(this, function (_a) {
16361
+ if (String(value).trim() === "" ||
16362
+ String(value).trim() ===
16363
+ undefined ||
16364
+ value === null ||
16365
+ value === undefined) {
16366
+ throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
16367
+ }
16368
+ else if (!isNaN(value) &&
16369
+ Number(value) > 0) {
16370
+ return [2 /*return*/, Promise.resolve()];
16371
+ }
16372
+ else {
16373
+ throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
16374
+ }
16375
+ });
16376
+ }); },
16377
+ },
16378
+ ] },
16379
+ React.createElement(Input, { size: "large" }))))),
16213
16380
  React.createElement(Row, { className: "row", gutter: [16, 16] },
16214
- React.createElement(Col, { xl: 8, md: 12 },
16215
- React.createElement(Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
16381
+ React.createElement(Col, { xl: 24, md: 24 },
16382
+ React.createElement(Form.Item, { label: t("programme:instrument"), name: "instrument", required: true, className: "investment-radio-button", rules: [
16216
16383
  {
16217
16384
  required: true,
16218
16385
  message: "",
@@ -16221,268 +16388,422 @@ var InvestmentCreationComponent = function (props) {
16221
16388
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16222
16389
  return __generator(this, function (_a) {
16223
16390
  if (String(value).trim() === "" ||
16224
- String(value).trim() ===
16225
- undefined ||
16391
+ String(value).trim() === undefined ||
16226
16392
  value === null ||
16227
16393
  value === undefined) {
16228
- throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
16394
+ throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
16229
16395
  }
16230
16396
  return [2 /*return*/];
16231
16397
  });
16232
16398
  }); },
16233
16399
  },
16234
16400
  ] },
16235
- React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16401
+ React.createElement(Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
16402
+ return (React.createElement(Radio, { value: e.value }, e.label));
16403
+ }))))),
16404
+ instrument &&
16405
+ instrument.indexOf(Instrument.LOAN) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16236
16406
  React.createElement(Col, { xl: 8, md: 12 },
16237
- React.createElement(Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
16238
- {
16239
- required: true,
16240
- message: "",
16241
- },
16242
- {
16243
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16244
- return __generator(this, function (_a) {
16245
- if (String(value).trim() === "" ||
16246
- String(value).trim() ===
16247
- undefined ||
16248
- value === null ||
16249
- value === undefined) {
16250
- throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
16251
- }
16252
- return [2 /*return*/];
16253
- });
16254
- }); },
16255
- },
16256
- ] },
16257
- React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
16258
- return currentDate < moment().startOf("day");
16259
- } })))))),
16260
- instrument &&
16261
- instrument.indexOf(Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
16262
- React.createElement(Row, { className: "row", gutter: [16, 16] },
16407
+ React.createElement("div", { className: "details-part-two" },
16408
+ React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16409
+ {
16410
+ required: true,
16411
+ message: "",
16412
+ },
16413
+ {
16414
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16415
+ return __generator(this, function (_a) {
16416
+ if (String(value).trim() === "" ||
16417
+ String(value).trim() ===
16418
+ undefined ||
16419
+ value === null ||
16420
+ value === undefined) {
16421
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16422
+ }
16423
+ else if (!isNaN(value)) {
16424
+ return [2 /*return*/, Promise.resolve()];
16425
+ }
16426
+ else {
16427
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16428
+ }
16429
+ });
16430
+ }); },
16431
+ },
16432
+ ] },
16433
+ React.createElement(Input, { size: "large" })))))),
16434
+ instrument &&
16435
+ (instrument.indexOf(Instrument.CONLOAN) >= 0 ||
16436
+ instrument.indexOf(Instrument.NONCONLOAN) >=
16437
+ 0) && (React.createElement("div", { className: "details-part-two" },
16438
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16439
+ React.createElement(Col, { xl: 8, md: 12 },
16440
+ React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16441
+ {
16442
+ required: true,
16443
+ message: "",
16444
+ },
16445
+ {
16446
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16447
+ return __generator(this, function (_a) {
16448
+ if (String(value).trim() === "" ||
16449
+ String(value).trim() ===
16450
+ undefined ||
16451
+ value === null ||
16452
+ value === undefined) {
16453
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16454
+ }
16455
+ else if (!isNaN(value)) {
16456
+ return [2 /*return*/, Promise.resolve()];
16457
+ }
16458
+ else {
16459
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16460
+ }
16461
+ });
16462
+ }); },
16463
+ },
16464
+ ] },
16465
+ React.createElement(Input, { size: "large" })))),
16466
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16467
+ React.createElement(Col, { xl: 8, md: 12 },
16468
+ React.createElement(Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
16469
+ {
16470
+ required: true,
16471
+ message: "",
16472
+ },
16473
+ {
16474
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16475
+ return __generator(this, function (_a) {
16476
+ if (String(value).trim() === "" ||
16477
+ String(value).trim() ===
16478
+ undefined ||
16479
+ value === null ||
16480
+ value === undefined) {
16481
+ throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
16482
+ }
16483
+ return [2 /*return*/];
16484
+ });
16485
+ }); },
16486
+ },
16487
+ ] },
16488
+ React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16489
+ React.createElement(Col, { xl: 8, md: 12 },
16490
+ React.createElement(Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
16491
+ {
16492
+ required: true,
16493
+ message: "",
16494
+ },
16495
+ {
16496
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16497
+ return __generator(this, function (_a) {
16498
+ if (String(value).trim() === "" ||
16499
+ String(value).trim() ===
16500
+ undefined ||
16501
+ value === null ||
16502
+ value === undefined) {
16503
+ throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
16504
+ }
16505
+ return [2 /*return*/];
16506
+ });
16507
+ }); },
16508
+ },
16509
+ ] },
16510
+ React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
16511
+ return currentDate <
16512
+ moment().startOf("day");
16513
+ } })))))),
16514
+ instrument &&
16515
+ instrument.indexOf(Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
16516
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16517
+ React.createElement(Col, { xl: 8, md: 12 },
16518
+ React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16519
+ {
16520
+ required: true,
16521
+ message: "",
16522
+ },
16523
+ {
16524
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16525
+ return __generator(this, function (_a) {
16526
+ if (String(value).trim() === "" ||
16527
+ String(value).trim() ===
16528
+ undefined ||
16529
+ value === null ||
16530
+ value === undefined) {
16531
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16532
+ }
16533
+ else if (!isNaN(value)) {
16534
+ return [2 /*return*/, Promise.resolve()];
16535
+ }
16536
+ else {
16537
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16538
+ }
16539
+ });
16540
+ }); },
16541
+ },
16542
+ ] },
16543
+ React.createElement(Input, { size: "large" })))),
16544
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16545
+ React.createElement(Col, { xl: 8, md: 12 },
16546
+ React.createElement(Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
16547
+ {
16548
+ required: true,
16549
+ message: "",
16550
+ },
16551
+ {
16552
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16553
+ return __generator(this, function (_a) {
16554
+ if (String(value).trim() === "" ||
16555
+ String(value).trim() ===
16556
+ undefined ||
16557
+ value === null ||
16558
+ value === undefined) {
16559
+ throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
16560
+ }
16561
+ return [2 /*return*/];
16562
+ });
16563
+ }); },
16564
+ },
16565
+ ] },
16566
+ React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16567
+ React.createElement(Col, { xl: 8, md: 12 },
16568
+ React.createElement(Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
16569
+ {
16570
+ required: true,
16571
+ message: "",
16572
+ },
16573
+ {
16574
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16575
+ return __generator(this, function (_a) {
16576
+ if (String(value).trim() === "" ||
16577
+ String(value).trim() ===
16578
+ undefined ||
16579
+ value === null ||
16580
+ value === undefined) {
16581
+ throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16582
+ }
16583
+ return [2 /*return*/];
16584
+ });
16585
+ }); },
16586
+ },
16587
+ ] },
16588
+ React.createElement(Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16589
+ React.createElement(Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16590
+ instrument &&
16591
+ instrument.indexOf(Instrument.RESULT_BASED) >=
16592
+ 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16593
+ React.createElement(Col, { xl: 12, md: 24 },
16594
+ React.createElement("div", { className: "details-part-two" },
16595
+ React.createElement(Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
16596
+ {
16597
+ required: true,
16598
+ message: "",
16599
+ },
16600
+ {
16601
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16602
+ return __generator(this, function (_a) {
16603
+ if (String(value).trim() === "" ||
16604
+ String(value).trim() ===
16605
+ undefined ||
16606
+ value === null ||
16607
+ value === undefined) {
16608
+ throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
16609
+ }
16610
+ return [2 /*return*/];
16611
+ });
16612
+ }); },
16613
+ },
16614
+ ] },
16615
+ React.createElement(Input, { size: "large" })))),
16616
+ React.createElement(Col, { xl: 12, md: 24 },
16617
+ React.createElement("div", { className: "details-part-two" },
16618
+ React.createElement(Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
16619
+ {
16620
+ required: true,
16621
+ message: "",
16622
+ },
16623
+ {
16624
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16625
+ return __generator(this, function (_a) {
16626
+ if (String(value).trim() === "" ||
16627
+ String(value).trim() ===
16628
+ undefined ||
16629
+ value === null ||
16630
+ value === undefined) {
16631
+ throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
16632
+ }
16633
+ else if (!isNaN(value)) {
16634
+ return [2 /*return*/, Promise.resolve()];
16635
+ }
16636
+ else {
16637
+ throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
16638
+ }
16639
+ });
16640
+ }); },
16641
+ },
16642
+ ] },
16643
+ React.createElement(Input, { size: "large" })))))),
16644
+ instrument &&
16645
+ instrument.indexOf(Instrument.INKIND) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16646
+ React.createElement(Col, { xl: 12, md: 24 },
16647
+ React.createElement("div", { className: "details-part-two" },
16648
+ React.createElement(Form.Item, { label: t("programme:description"), name: "description", rules: [
16649
+ {
16650
+ required: false,
16651
+ message: "",
16652
+ },
16653
+ ] },
16654
+ React.createElement(Input, { size: "large" })))))),
16655
+ instrument &&
16656
+ instrument.indexOf(Instrument.INSURANCE) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16263
16657
  React.createElement(Col, { xl: 8, md: 12 },
16264
- React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16265
- {
16266
- required: true,
16267
- message: "",
16268
- },
16269
- {
16270
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16271
- return __generator(this, function (_a) {
16272
- if (String(value).trim() === "" ||
16273
- String(value).trim() ===
16274
- undefined ||
16275
- value === null ||
16276
- value === undefined) {
16277
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16278
- }
16279
- else if (!isNaN(value)) {
16280
- return [2 /*return*/, Promise.resolve()];
16281
- }
16282
- else {
16283
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16284
- }
16285
- });
16286
- }); },
16287
- },
16288
- ] },
16289
- React.createElement(Input, { size: "large" })))),
16658
+ React.createElement("div", { className: "details-part-two" },
16659
+ React.createElement(Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
16660
+ {
16661
+ required: true,
16662
+ message: "",
16663
+ },
16664
+ {
16665
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16666
+ return __generator(this, function (_a) {
16667
+ if (String(value).trim() === "" ||
16668
+ String(value).trim() ===
16669
+ undefined ||
16670
+ value === null ||
16671
+ value === undefined) {
16672
+ throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16673
+ }
16674
+ return [2 /*return*/];
16675
+ });
16676
+ }); },
16677
+ },
16678
+ ] },
16679
+ React.createElement(Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16680
+ React.createElement(Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16681
+ instrument &&
16682
+ instrument.indexOf(Instrument.OTHER) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16683
+ React.createElement(Col, { xl: 12, md: 24 },
16684
+ React.createElement("div", { className: "details-part-two" },
16685
+ React.createElement(Form.Item, { label: t("programme:comments"), name: "comments", rules: [
16686
+ {
16687
+ required: true,
16688
+ message: "",
16689
+ },
16690
+ {
16691
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16692
+ return __generator(this, function (_a) {
16693
+ if (String(value).trim() === "" ||
16694
+ String(value).trim() ===
16695
+ undefined ||
16696
+ value === null ||
16697
+ value === undefined) {
16698
+ throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
16699
+ }
16700
+ return [2 /*return*/];
16701
+ });
16702
+ }); },
16703
+ },
16704
+ ] },
16705
+ React.createElement(Input, { size: "large" })))))),
16290
16706
  React.createElement(Row, { className: "row", gutter: [16, 16] },
16291
16707
  React.createElement(Col, { xl: 8, md: 12 },
16292
- React.createElement(Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
16708
+ React.createElement(Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
16293
16709
  {
16294
- required: true,
16295
- message: "",
16296
- },
16297
- {
16298
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16299
- return __generator(this, function (_a) {
16300
- if (String(value).trim() === "" ||
16301
- String(value).trim() ===
16302
- undefined ||
16303
- value === null ||
16304
- value === undefined) {
16305
- throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
16306
- }
16307
- return [2 /*return*/];
16308
- });
16309
- }); },
16710
+ required: false,
16310
16711
  },
16311
16712
  ] },
16312
- React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16713
+ React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16714
+ React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16715
+ return deselectOnClick(e, "type");
16716
+ } }, t("programme:" + k)))); })))),
16313
16717
  React.createElement(Col, { xl: 8, md: 12 },
16314
- React.createElement(Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
16315
- {
16316
- required: true,
16317
- message: "",
16318
- },
16319
- {
16320
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16321
- return __generator(this, function (_a) {
16322
- if (String(value).trim() === "" ||
16323
- String(value).trim() ===
16324
- undefined ||
16325
- value === null ||
16326
- value === undefined) {
16327
- throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16328
- }
16329
- return [2 /*return*/];
16330
- });
16331
- }); },
16332
- },
16333
- ] },
16334
- React.createElement(Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16335
- React.createElement(Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16336
- instrument &&
16337
- instrument.indexOf(Instrument.RESULT_BASED) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16338
- React.createElement(Col, { xl: 12, md: 24 },
16339
- React.createElement("div", { className: "details-part-two" },
16340
- React.createElement(Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
16341
- {
16342
- required: true,
16343
- message: "",
16344
- },
16345
- {
16346
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16347
- return __generator(this, function (_a) {
16348
- if (String(value).trim() === "" ||
16349
- String(value).trim() ===
16350
- undefined ||
16351
- value === null ||
16352
- value === undefined) {
16353
- throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
16354
- }
16355
- return [2 /*return*/];
16356
- });
16357
- }); },
16358
- },
16359
- ] },
16360
- React.createElement(Input, { size: "large" })))),
16361
- React.createElement(Col, { xl: 12, md: 24 },
16362
- React.createElement("div", { className: "details-part-two" },
16363
- React.createElement(Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
16364
- {
16365
- required: true,
16366
- message: "",
16367
- },
16368
- {
16369
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16370
- return __generator(this, function (_a) {
16371
- if (String(value).trim() === "" ||
16372
- String(value).trim() ===
16373
- undefined ||
16374
- value === null ||
16375
- value === undefined) {
16376
- throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
16377
- }
16378
- else if (!isNaN(value)) {
16379
- return [2 /*return*/, Promise.resolve()];
16380
- }
16381
- else {
16382
- throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
16383
- }
16384
- });
16385
- }); },
16386
- },
16387
- ] },
16388
- React.createElement(Input, { size: "large" })))))),
16389
- instrument &&
16390
- instrument.indexOf(Instrument.INKIND) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16391
- React.createElement(Col, { xl: 12, md: 24 },
16392
- React.createElement("div", { className: "details-part-two" },
16393
- React.createElement(Form.Item, { label: t("programme:description"), name: "description", rules: [
16718
+ React.createElement(Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
16394
16719
  {
16395
16720
  required: false,
16396
- message: "",
16397
16721
  },
16398
16722
  ] },
16399
- React.createElement(Input, { size: "large" })))))),
16400
- instrument &&
16401
- instrument.indexOf(Instrument.INSURANCE) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16402
- React.createElement(Col, { xl: 8, md: 12 },
16403
- React.createElement("div", { className: "details-part-two" },
16404
- React.createElement(Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
16405
- {
16406
- required: true,
16407
- message: "",
16408
- },
16723
+ React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16724
+ React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16725
+ return deselectOnClick(e, "level");
16726
+ } }, t("programme:" + k)))); })))),
16727
+ React.createElement(Col, { xl: 8, md: 12 },
16728
+ React.createElement(Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
16409
16729
  {
16410
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16411
- return __generator(this, function (_a) {
16412
- if (String(value).trim() === "" ||
16413
- String(value).trim() ===
16414
- undefined ||
16415
- value === null ||
16416
- value === undefined) {
16417
- throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16418
- }
16419
- return [2 /*return*/];
16420
- });
16421
- }); },
16730
+ required: false,
16422
16731
  },
16423
16732
  ] },
16424
- React.createElement(Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16425
- React.createElement(Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16426
- instrument &&
16427
- instrument.indexOf(Instrument.OTHER) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
16428
- React.createElement(Col, { xl: 12, md: 24 },
16429
- React.createElement("div", { className: "details-part-two" },
16430
- React.createElement(Form.Item, { label: t("programme:comments"), name: "comments", rules: [
16431
- {
16432
- required: true,
16433
- message: "",
16434
- },
16435
- {
16436
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16437
- return __generator(this, function (_a) {
16438
- if (String(value).trim() === "" ||
16439
- String(value).trim() ===
16440
- undefined ||
16441
- value === null ||
16442
- value === undefined) {
16443
- throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
16444
- }
16445
- return [2 /*return*/];
16733
+ React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16734
+ React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16735
+ return deselectOnClick(e, "stream");
16736
+ } }, t("programme:" + k)))); }))))),
16737
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16738
+ React.createElement(Col, { xl: 12, md: 24 },
16739
+ React.createElement(Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
16740
+ React.createElement(Select, { size: "large" }, Object.values(ESGType).map(function (esg) { return (React.createElement(Select.Option, { value: esg }, esg)); }))))))),
16741
+ typeCreation == InvestmentCreationType.EXISTING && (React.createElement("div", null,
16742
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16743
+ React.createElement(Col, { xl: 12, md: 24 },
16744
+ React.createElement("div", { className: "details-part-one" },
16745
+ React.createElement(Form.Item, { label: t("programme:existingInvestmentSource"), name: "existinngInvestmentId", wrapperCol: { span: 24 }, rules: [
16746
+ {
16747
+ required: true,
16748
+ message: "".concat(t("programme:existingInvestmentSource"), " ").concat(t("isRequired")),
16749
+ },
16750
+ ] },
16751
+ React.createElement(Select, { size: "large", loading: loadingInvestment, onChange: setSelectedInvestment }, nationalInvestmentList.map(function (investment) { return (React.createElement(Select.Option, { key: investment.requestId, value: investment.requestId }, investment.investmentName)); })))))),
16752
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16753
+ React.createElement(Col, { xl: 12, md: 24 },
16754
+ React.createElement("div", { className: "details-part-two" },
16755
+ React.createElement(Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
16756
+ {
16757
+ required: true,
16758
+ message: "",
16759
+ },
16760
+ {
16761
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16762
+ return __generator(this, function (_a) {
16763
+ if (String(value).trim() === "" ||
16764
+ String(value).trim() ===
16765
+ undefined ||
16766
+ value === null ||
16767
+ value === undefined) {
16768
+ throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
16769
+ }
16770
+ else if (!isNaN(value) &&
16771
+ Number(value) > 0) {
16772
+ return [2 /*return*/, Promise.resolve()];
16773
+ }
16774
+ else {
16775
+ throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
16776
+ }
16777
+ });
16778
+ }); },
16779
+ },
16780
+ function (_a) {
16781
+ var getFieldValue = _a.getFieldValue;
16782
+ return ({
16783
+ validator: function (rule, v) {
16784
+ if (getFieldValue("amount") &&
16785
+ investmentData &&
16786
+ investmentData.amount <
16787
+ parseFloat(getFieldValue("amount"))) {
16788
+ // eslint-disable-next-line prefer-promise-reject-errors
16789
+ return Promise.reject("Amount > Available");
16790
+ }
16791
+ return Promise.resolve();
16792
+ },
16446
16793
  });
16447
- }); },
16448
- },
16449
- ] },
16450
- React.createElement(Input, { size: "large" })))))),
16451
- React.createElement(Row, { className: "row", gutter: [16, 16] },
16452
- React.createElement(Col, { xl: 8, md: 12 },
16453
- React.createElement(Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
16454
- {
16455
- required: false,
16456
- },
16457
- ] },
16458
- React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16459
- React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16460
- return deselectOnClick(e, "type");
16461
- } }, t("programme:" + k)))); })))),
16462
- React.createElement(Col, { xl: 8, md: 12 },
16463
- React.createElement(Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
16464
- {
16465
- required: false,
16466
- },
16467
- ] },
16468
- React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16469
- React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16470
- return deselectOnClick(e, "level");
16471
- } }, t("programme:" + k)))); })))),
16472
- React.createElement(Col, { xl: 8, md: 12 },
16473
- React.createElement(Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
16474
- {
16475
- required: false,
16476
- },
16477
- ] },
16478
- React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16479
- React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16480
- return deselectOnClick(e, "stream");
16481
- } }, t("programme:" + k)))); }))))),
16482
- React.createElement(Row, { className: "row", gutter: [16, 16] },
16483
- React.createElement(Col, { xl: 12, md: 24 },
16484
- React.createElement(Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
16485
- React.createElement(Select, { size: "large" }, Object.values(ESGType).map(function (esg) { return (React.createElement(Select.Option, { value: esg }, esg)); }))))),
16794
+ },
16795
+ ] },
16796
+ React.createElement(Input, { size: "large" })))),
16797
+ React.createElement(Col, { xl: 12, md: 24 },
16798
+ React.createElement("div", { className: "details-part-two" },
16799
+ React.createElement(Form.Item, { label: " ", name: "sourceAmount" },
16800
+ React.createElement("div", null,
16801
+ "/",
16802
+ React.createElement(InputNumber, { size: "large", width: "100%", formatter: function (value) {
16803
+ return "$".concat(addCommSep(value));
16804
+ }, disabled: true, value: investmentData
16805
+ ? investmentData.amount
16806
+ : 0 })))))))),
16486
16807
  React.createElement(Form.Item, null,
16487
16808
  React.createElement("div", { className: "steps-actions" },
16488
16809
  React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: nextOne }, t("programme:next")))))))),
@@ -16492,73 +16813,164 @@ var InvestmentCreationComponent = function (props) {
16492
16813
  React.createElement("div", { className: "step-count" }, "02"),
16493
16814
  React.createElement("div", { className: "title" }, t("programme:ownership")))),
16494
16815
  description: current === 1 && (React.createElement("div", null,
16495
- React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 && (React.createElement("div", { className: "programme-sought-form" },
16496
- 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 :
16497
- data.companyId.map(function (companyId, index) {
16498
- return (React.createElement(Row, { className: "row", gutter: [16, 16] },
16499
- React.createElement(Col, { xl: 8, md: 15 },
16500
- React.createElement("div", { className: "label" },
16501
- companyName[companyId].name,
16502
- React.createElement("span", { className: "required-mark" }, "*"))),
16503
- React.createElement(Col, { xl: 8, md: 9 },
16504
- React.createElement(Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
16505
- {
16506
- pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
16507
- message: "Percentage Should be a positive number",
16508
- },
16816
+ React.createElement("div", { className: "investment-sought-form-container" },
16817
+ React.createElement("div", { className: "investment-sought-form" },
16818
+ React.createElement(Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true },
16819
+ React.createElement(Row, { className: "row", gutter: [4, 4] },
16820
+ React.createElement(Col, { xl: 8, md: 12 },
16821
+ React.createElement(Form.Item, { label: t("programme:typeCreation"), wrapperCol: { span: 13 }, className: "role-group", name: "investmentOwnershipType", rules: [
16509
16822
  {
16510
- required: true,
16511
- message: "Required field",
16512
- },
16513
- function (_a) {
16514
- var getFieldValue = _a.getFieldValue;
16515
- return ({
16516
- validator: function (rule, v) {
16517
- if (getFieldValue([
16518
- "percentage",
16519
- index,
16520
- ]) &&
16521
- parseFloat(getFieldValue([
16522
- "percentage",
16523
- index,
16524
- ])) >
16525
- data.proponentPercentage[index]) {
16526
- // eslint-disable-next-line prefer-promise-reject-errors
16527
- return Promise.reject("Amount > Available");
16528
- }
16529
- return Promise.resolve();
16530
- },
16531
- });
16823
+ required: false,
16532
16824
  },
16533
16825
  ] },
16534
- React.createElement(InputNumber, { placeholder: "", controls: false, disabled: govData.companyId == companyId,
16535
- // disabled={userInfoState?.companyId === Number(companyId)}
16536
- onKeyPress: function (event) {
16537
- if (!/[0-9\.]/.test(event.key)) {
16538
- event.preventDefault();
16539
- }
16540
- } })),
16541
- React.createElement("div", { className: "inline separator" }, "/"),
16542
- React.createElement(Form.Item, { className: "inline" },
16543
- React.createElement(InputNumber, { placeholder: String(data === null || data === void 0 ? void 0 : data.proponentPercentage[index]), disabled: true })))));
16544
- }),
16545
- React.createElement(Row, { className: "row", gutter: [16, 16] },
16546
- React.createElement(Col, { xl: 8, md: 15 },
16547
- React.createElement("div", { className: "label" }, t("programme:total"))),
16548
- React.createElement(Col, { xl: 8, md: 9 },
16549
- React.createElement(Form.Item, { className: "inline", name: ["total"] },
16550
- React.createElement(InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
16551
- if (!/[0-9\.]/.test(event.key)) {
16552
- event.preventDefault();
16826
+ React.createElement(Radio.Group, { size: "large", defaultValue: typeCreation ==
16827
+ InvestmentCreationType.EXISTING
16828
+ ? InvestmentOwnershipType.PROJECT
16829
+ : investmentOwnershipType }, Object.values(InvestmentOwnershipType).map(function (k, index) {
16830
+ if (!(typeCreation ==
16831
+ InvestmentCreationType.EXISTING &&
16832
+ k == InvestmentOwnershipType.NATIONAL) &&
16833
+ !(k ==
16834
+ InvestmentOwnershipType.NATIONAL &&
16835
+ (data === null || data === void 0 ? void 0 : data.programmeId))) {
16836
+ return (React.createElement("div", { className: "condition-radio-container" },
16837
+ React.createElement(Tooltip, { title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
16838
+ CompanyRole.PROGRAMME_DEVELOPER &&
16839
+ stepOneData.toCompanyId !=
16840
+ userInfoState.companyId &&
16841
+ k ==
16842
+ InvestmentOwnershipType.NATIONAL
16843
+ ? "This action is unauthorized due to the selected investor name."
16844
+ : "", color: TooltipColor, key: TooltipColor },
16845
+ React.createElement(Radio.Button, { className: "condition-radio", value: k, onChange: onChangeInvestmentOwnershipType, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
16846
+ CompanyRole.PROGRAMME_DEVELOPER &&
16847
+ stepOneData.toCompanyId !=
16848
+ userInfoState.companyId &&
16849
+ k ==
16850
+ InvestmentOwnershipType.NATIONAL }, t("programme:" + k)))));
16553
16851
  }
16554
- } })),
16555
- React.createElement("div", { className: "inline separator" }, "/"),
16556
- React.createElement(Form.Item, { className: "inline" },
16557
- React.createElement(InputNumber, { disabled: true, placeholder: "100" })))),
16558
- React.createElement(Form.Item, null,
16559
- React.createElement("div", { className: "steps-actions" },
16560
- React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
16561
- React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back")))))))))),
16852
+ })))))))),
16853
+ React.createElement("div", { className: "programme-sought-form-container ownership-container" },
16854
+ React.createElement("div", { className: "programme-sought-form" },
16855
+ 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 },
16856
+ allProjectData.length > 0 &&
16857
+ investmentOwnershipType ==
16858
+ InvestmentOwnershipType.PROJECT && (React.createElement("div", null,
16859
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16860
+ React.createElement(Col, { xl: 12, md: 24 },
16861
+ React.createElement("div", { className: "details-part-one" },
16862
+ React.createElement(Form.Item, { label: t("programme:title"), name: "projectId", wrapperCol: { span: 24 }, initialValue: (data === null || data === void 0 ? void 0 : data.programmeId) != undefined
16863
+ ? allProjectData[0].programmeId
16864
+ : null, rules: [
16865
+ {
16866
+ required: true,
16867
+ message: "".concat(t("programme:title"), " ").concat(t("isRequired")),
16868
+ },
16869
+ ] },
16870
+ React.createElement(Select, { size: "large", loading: loadingProgData,
16871
+ // defaultValue={
16872
+ // allProjectData.length == 1
16873
+ // ? allProjectData[0].programmeId
16874
+ // : null
16875
+ // }
16876
+ disabled: allProjectData.length == 1 &&
16877
+ (data === null || data === void 0 ? void 0 : data.programmeId) != undefined, onChange: setSelectedProgramme }, allProjectData.map(function (project) {
16878
+ if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
16879
+ CompanyRole.PROGRAMME_DEVELOPER &&
16880
+ Number(stepOneData.toCompanyId) !=
16881
+ userInfoState.companyId) {
16882
+ if (project.companyId
16883
+ .map(function (id) { return Number(id); })
16884
+ .includes(userInfoState.companyId)) {
16885
+ return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
16886
+ }
16887
+ }
16888
+ else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
16889
+ CompanyRole.MINISTRY) {
16890
+ if (ministrySectoralScope.includes(project.sectoralScope)) {
16891
+ return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
16892
+ }
16893
+ }
16894
+ else {
16895
+ return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
16896
+ }
16897
+ })))))), projectData === null || projectData === void 0 ? void 0 :
16898
+ projectData.companyId.map(function (companyId, index) {
16899
+ if (formTwo.getFieldValue("percentage") &&
16900
+ formTwo.getFieldValue("percentage")[index] &&
16901
+ companyId == stepOneData.toCompanyId) {
16902
+ formTwo.getFieldValue("percentage")[index] = 0;
16903
+ }
16904
+ return (React.createElement(Row, { className: "row", gutter: [16, 16] },
16905
+ React.createElement(Col, { xl: 8, md: 15 },
16906
+ React.createElement("div", { className: "label" },
16907
+ govData.companyId == companyId
16908
+ ? govData.name
16909
+ : companyNames[Number(companyId)],
16910
+ React.createElement("span", { className: "required-mark" }, "*"))),
16911
+ React.createElement(Col, { xl: 8, md: 9 },
16912
+ React.createElement(Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
16913
+ {
16914
+ pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
16915
+ message: "Percentage Should be a positive number",
16916
+ },
16917
+ {
16918
+ required: true,
16919
+ message: "Required field",
16920
+ },
16921
+ function (_a) {
16922
+ var getFieldValue = _a.getFieldValue;
16923
+ return ({
16924
+ validator: function (rule, v) {
16925
+ if (getFieldValue([
16926
+ "percentage",
16927
+ index,
16928
+ ]) &&
16929
+ parseFloat(getFieldValue([
16930
+ "percentage",
16931
+ index,
16932
+ ])) >
16933
+ projectData
16934
+ .proponentPercentage[index]) {
16935
+ // eslint-disable-next-line prefer-promise-reject-errors
16936
+ return Promise.reject("Amount > Available");
16937
+ }
16938
+ return Promise.resolve();
16939
+ },
16940
+ });
16941
+ },
16942
+ ] },
16943
+ React.createElement(InputNumber, { placeholder: "", controls: false, disabled: govData.companyId ==
16944
+ companyId ||
16945
+ companyId ==
16946
+ stepOneData.toCompanyId, value: 0,
16947
+ // disabled={userInfoState?.companyId === Number(companyId)}
16948
+ onKeyPress: function (event) {
16949
+ if (!/[0-9\.]/.test(event.key)) {
16950
+ event.preventDefault();
16951
+ }
16952
+ } })),
16953
+ React.createElement("div", { className: "inline separator" }, "/"),
16954
+ React.createElement(Form.Item, { className: "inline" },
16955
+ React.createElement(InputNumber, { placeholder: String(projectData === null || projectData === void 0 ? void 0 : projectData.proponentPercentage[index]), disabled: true })))));
16956
+ }),
16957
+ React.createElement(Row, { className: "row", gutter: [16, 16] },
16958
+ React.createElement(Col, { xl: 8, md: 15 },
16959
+ React.createElement("div", { className: "label" }, t("programme:total"))),
16960
+ React.createElement(Col, { xl: 8, md: 9 },
16961
+ React.createElement(Form.Item, { className: "inline", name: ["total"] },
16962
+ React.createElement(InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
16963
+ if (!/[0-9\.]/.test(event.key)) {
16964
+ event.preventDefault();
16965
+ }
16966
+ } })),
16967
+ React.createElement("div", { className: "inline separator" }, "/"),
16968
+ React.createElement(Form.Item, { className: "inline" },
16969
+ React.createElement(InputNumber, { disabled: true, placeholder: "100" })))))),
16970
+ React.createElement(Form.Item, null,
16971
+ React.createElement("div", { className: "steps-actions" },
16972
+ React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
16973
+ React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back"))))))))),
16562
16974
  },
16563
16975
  ] })))));
16564
16976
  };
@@ -17059,7 +17471,10 @@ var InvestmentManagementComponent = function (props) {
17059
17471
  sorter: true,
17060
17472
  align: "left",
17061
17473
  render: function (item) {
17062
- return React.createElement("span", { className: "clickable" }, item);
17474
+ if (item) {
17475
+ return React.createElement("span", { className: "clickable" }, item);
17476
+ }
17477
+ return React.createElement("span", null, "-");
17063
17478
  },
17064
17479
  onCell: function (record, rowIndex) {
17065
17480
  return {
@@ -17117,6 +17532,12 @@ var InvestmentManagementComponent = function (props) {
17117
17532
  key: "programmeSector",
17118
17533
  sorter: true,
17119
17534
  align: "left",
17535
+ render: function (item) {
17536
+ if (item) {
17537
+ return React.createElement("span", null, item);
17538
+ }
17539
+ return React.createElement("span", null, "-");
17540
+ },
17120
17541
  },
17121
17542
  {
17122
17543
  title: t("programme:investor"),
@@ -17200,7 +17621,11 @@ var InvestmentManagementComponent = function (props) {
17200
17621
  React.createElement("div", { className: "title-bar" },
17201
17622
  React.createElement("div", { className: "body-title" }, t("programme:investmentTitle")),
17202
17623
  React.createElement("div", { className: "body-sub-title" }, t("programme:investmentDesc"))),
17203
- React.createElement("div", { className: "actions" }, enableAddOwnership && (React.createElement("div", { className: "action-bar" },
17624
+ React.createElement("div", { className: "actions" }, enableAddOwnership &&
17625
+ ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.MINISTRY ||
17626
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.GOVERNMENT ||
17627
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.PROGRAMME_DEVELOPER) &&
17628
+ userInfoState.userRole != Role.ViewOnly && (React.createElement("div", { className: "action-bar" },
17204
17629
  React.createElement(Button, { type: "primary", size: "large", block: true, icon: React.createElement(PlusOutlined, null), onClick: onClickAddOwnership }, t("programme:addOwnership")))))),
17205
17630
  React.createElement("div", { className: "content-card" },
17206
17631
  React.createElement(Row, null,
@@ -17247,7 +17672,7 @@ var InvestmentManagementComponent = function (props) {
17247
17672
  return handleTableChange(val, sorter);
17248
17673
  }, locale: {
17249
17674
  emptyText: (React.createElement(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE, description: tableData.length === 0
17250
- ? t("creditTransfer:noTransfer")
17675
+ ? t("programme:noInvestmentData")
17251
17676
  : null })),
17252
17677
  } }))))),
17253
17678
  popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
@@ -35106,5 +35531,5 @@ var GHGDashboardComponent = function (props) {
35106
35531
  React.createElement(Row, { gutter: [40, 40], className: "statics-card-row" }, row.map(function (item, j) { return getWidgetJSX(item); })))); }))));
35107
35532
  };
35108
35533
 
35109
- export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, ConnectionContextProvider, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, Emission, EmissionGas, EmissionSector, EmissionSubSectors, EnergyGenerationUnits, FormElementType, GHGDashboardComponent, GHGEmissionsComponent, GHGProjectionsComponent, GhgStatCardTypes, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentCreationType, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, ManagerBGColor, ManagerColor, MapComponent, MapTypes, MapboxComponent, MinBGColor, MinColor, MitigationSubTypes, MitigationTypes, MrvDashboardComponent, MrvStatsCardsTypes, NdcActionBody, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, NdcDetailsComponent, OrganisationStatus, ProfileIcon, ProgrammeCertify, ProgrammeCreationComponent, ProgrammeDocuments, ProgrammeEntity, ProgrammeIssueForm, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeRetireForm, ProgrammeRevokeForm, ProgrammeStageLegend, ProgrammeStageMRV, ProgrammeStageR, ProgrammeStageUnified, ProgrammeTransfer, ProgrammeTransferForm, Projection, ProjectionTypes$1 as ProjectionTypes, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, SettingsContext, SettingsContextProvider, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SupportCreationComponent, SupportManagementComponent, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserContext, UserInformationContextProvider, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound$1 as addCommSepRound, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal$1 as getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList, useConnection, useSettingsContext, useUserContext };
35534
+ export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, ConnectionContextProvider, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, Emission, EmissionGas, EmissionSector, EmissionSubSectors, EnergyGenerationUnits, FormElementType, GHGDashboardComponent, GHGEmissionsComponent, GHGProjectionsComponent, GhgStatCardTypes, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentCreationType, InvestmentLevel, InvestmentManagementComponent, InvestmentOwnershipType, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, ManagerBGColor, ManagerColor, MapComponent, MapTypes, MapboxComponent, MinBGColor, MinColor, MitigationSubTypes, MitigationTypes, MrvDashboardComponent, MrvStatsCardsTypes, NdcActionBody, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, NdcDetailsComponent, OrganisationStatus, ProfileIcon, ProgrammeCertify, ProgrammeCreationComponent, ProgrammeDocuments, ProgrammeEntity, ProgrammeIssueForm, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeRetireForm, ProgrammeRevokeForm, ProgrammeStageLegend, ProgrammeStageMRV, ProgrammeStageR, ProgrammeStageUnified, ProgrammeTransfer, ProgrammeTransferForm, Projection, ProjectionTypes$1 as ProjectionTypes, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, SettingsContext, SettingsContextProvider, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SupportCreationComponent, SupportManagementComponent, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserContext, UserInformationContextProvider, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound$1 as addCommSepRound, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal$1 as getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList, useConnection, useSettingsContext, useUserContext };
35110
35535
  //# sourceMappingURL=index.js.map