@undp/carbon-library 1.0.293-CARBON-347.0 → 1.0.293-CARBON-429.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +507 -926
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Definitions/Enums/investment.enum.d.ts +0 -4
- package/dist/esm/index.js +497 -916
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Definitions/Enums/investment.enum.d.ts +0 -4
- package/dist/index.d.ts +1 -5
- package/dist/locales/i18n/programme/en.json +3 -5
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -1298,11 +1298,6 @@ exports.InvestmentCreationType = void 0;
|
|
1298
1298
|
InvestmentCreationType["EXISTING"] = "Existing";
|
1299
1299
|
InvestmentCreationType["NEW"] = "New";
|
1300
1300
|
})(exports.InvestmentCreationType || (exports.InvestmentCreationType = {}));
|
1301
|
-
exports.InvestmentOwnershipType = void 0;
|
1302
|
-
(function (InvestmentOwnershipType) {
|
1303
|
-
InvestmentOwnershipType["PROJECT"] = "Project";
|
1304
|
-
InvestmentOwnershipType["NATIONAL"] = "National";
|
1305
|
-
})(exports.InvestmentOwnershipType || (exports.InvestmentOwnershipType = {}));
|
1306
1301
|
exports.InvestmentStream = void 0;
|
1307
1302
|
(function (InvestmentStream) {
|
1308
1303
|
InvestmentStream["CLIMATE_FINANCE"] = "ClimateFinance";
|
@@ -15835,7 +15830,7 @@ var UserManagementComponent = function (props) {
|
|
15835
15830
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openDeleteConfirmationModal, errorMsg: errorMsg, loading: loading })));
|
15836
15831
|
};
|
15837
15832
|
|
15838
|
-
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.
|
15833
|
+
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";
|
15839
15834
|
styleInject(css_248z$m);
|
15840
15835
|
|
15841
15836
|
var Loading = function () {
|
@@ -15855,34 +15850,22 @@ var InsurancePayback;
|
|
15855
15850
|
|
15856
15851
|
var RangePicker$3 = antd.DatePicker.RangePicker;
|
15857
15852
|
var InvestmentCreationComponent = function (props) {
|
15858
|
-
var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView
|
15853
|
+
var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
15859
15854
|
var state = useLocation().state;
|
15860
15855
|
var _a = React.useState(), data = _a[0], setData = _a[1];
|
15861
|
-
var _b = React.useState({}), companyNames = _b[0], setCompanyNames = _b[1];
|
15862
|
-
var _c = React.useState({}); _c[0]; var setUserOrganization = _c[1];
|
15863
|
-
var _d = React.useState({}), investmentNames = _d[0], setInvestmentNames = _d[1];
|
15864
|
-
var _e = React.useState(), projectData = _e[0], setProjectData = _e[1];
|
15865
|
-
var _f = React.useState(), investmentData = _f[0], setInvestmentData = _f[1];
|
15866
|
-
var _g = React.useState([]), allProjectData = _g[0], setAllProjectData = _g[1];
|
15867
15856
|
var formOne = antd.Form.useForm()[0];
|
15868
15857
|
var formTwo = antd.Form.useForm()[0];
|
15869
15858
|
var post = useConnection().post;
|
15870
|
-
var
|
15871
|
-
var
|
15872
|
-
var
|
15873
|
-
var
|
15874
|
-
var
|
15875
|
-
var
|
15876
|
-
var
|
15877
|
-
var
|
15878
|
-
var
|
15879
|
-
var _s = React.useState([]), nationalInvestmentList = _s[0], setNationalInvestmentList = _s[1];
|
15880
|
-
var _t = React.useState([]), instrument = _t[0], setInstrument = _t[1];
|
15881
|
-
var _u = React.useState(), stepOneData = _u[0], setStepOneData = _u[1];
|
15882
|
-
var _v = React.useState(), govData = _v[0], setGovData = _v[1];
|
15859
|
+
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
15860
|
+
var _c = React.useState("New"), typeCreation = _c[0], setTypeCreation = _c[1];
|
15861
|
+
var _d = React.useState(false), loadingList = _d[0], setLoadingList = _d[1];
|
15862
|
+
var _e = React.useState(0), current = _e[0], setCurrent = _e[1];
|
15863
|
+
var _f = React.useState(0), currentPercTotal = _f[0], setCurrentPercTotal = _f[1];
|
15864
|
+
var _g = React.useState([]), organisationsList = _g[0], setOrganisationList = _g[1];
|
15865
|
+
var _h = React.useState([]), instrument = _h[0], setInstrument = _h[1];
|
15866
|
+
var _j = React.useState(), stepOneData = _j[0], setStepOneData = _j[1];
|
15867
|
+
var _k = React.useState(), govData = _k[0], setGovData = _k[1];
|
15883
15868
|
var userInfoState = useUserContext().userInfoState;
|
15884
|
-
var _w = React.useState([]), ministrySectoralScope = _w[0], setMinistrySectoralScope = _w[1];
|
15885
|
-
var _x = React.useState({}), prevInvestor = _x[0], setPrevInvestor = _x[1];
|
15886
15869
|
var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
|
15887
15870
|
label: addSpaces(Object.values(exports.Instrument)[index]),
|
15888
15871
|
value: Object.values(exports.Instrument)[index],
|
@@ -15934,225 +15917,52 @@ var InvestmentCreationComponent = function (props) {
|
|
15934
15917
|
}
|
15935
15918
|
});
|
15936
15919
|
}); };
|
15937
|
-
var
|
15938
|
-
var response, error_2;
|
15939
|
-
return __generator(this, function (_a) {
|
15940
|
-
switch (_a.label) {
|
15941
|
-
case 0:
|
15942
|
-
setLoadingProgData(true);
|
15943
|
-
_a.label = 1;
|
15944
|
-
case 1:
|
15945
|
-
_a.trys.push([1, 5, 6, 7]);
|
15946
|
-
if (!data) return [3 /*break*/, 4];
|
15947
|
-
if (!!(data === null || data === void 0 ? void 0 : data.programmeId)) return [3 /*break*/, 3];
|
15948
|
-
console.log("data non existing", data);
|
15949
|
-
console.log("getting all Project data");
|
15950
|
-
return [4 /*yield*/, post("national/programme/query", {
|
15951
|
-
page: 1,
|
15952
|
-
size: 100,
|
15953
|
-
filterAnd: [
|
15954
|
-
{
|
15955
|
-
key: "currentStage",
|
15956
|
-
operation: "!=",
|
15957
|
-
value: exports.ProgrammeStageUnified.Rejected,
|
15958
|
-
},
|
15959
|
-
],
|
15960
|
-
})];
|
15961
|
-
case 2:
|
15962
|
-
response = _a.sent();
|
15963
|
-
if (response.data) {
|
15964
|
-
setAllProjectData(response === null || response === void 0 ? void 0 : response.data);
|
15965
|
-
console.log("all Project data", response === null || response === void 0 ? void 0 : response.data);
|
15966
|
-
}
|
15967
|
-
return [3 /*break*/, 4];
|
15968
|
-
case 3:
|
15969
|
-
console.log("setting current Project data");
|
15970
|
-
setAllProjectData([data]);
|
15971
|
-
_a.label = 4;
|
15972
|
-
case 4: return [3 /*break*/, 7];
|
15973
|
-
case 5:
|
15974
|
-
error_2 = _a.sent();
|
15975
|
-
console.log("Error in getting all programme data", error_2);
|
15976
|
-
return [3 /*break*/, 7];
|
15977
|
-
case 6:
|
15978
|
-
setLoadingProgData(false);
|
15979
|
-
return [7 /*endfinally*/];
|
15980
|
-
case 7: return [2 /*return*/];
|
15981
|
-
}
|
15982
|
-
});
|
15983
|
-
}); };
|
15984
|
-
var setSelectedProgramme = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
15985
|
-
var _i, allProjectData_1, obj;
|
15986
|
-
return __generator(this, function (_a) {
|
15987
|
-
console.log("setSelectedProgramme", value);
|
15988
|
-
for (_i = 0, allProjectData_1 = allProjectData; _i < allProjectData_1.length; _i++) {
|
15989
|
-
obj = allProjectData_1[_i];
|
15990
|
-
if (obj.programmeId == value) {
|
15991
|
-
setProjectData(obj);
|
15992
|
-
break;
|
15993
|
-
}
|
15994
|
-
}
|
15995
|
-
return [2 /*return*/];
|
15996
|
-
});
|
15997
|
-
}); };
|
15998
|
-
var setSelectedInvestment = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
15999
|
-
return __generator(this, function (_a) {
|
16000
|
-
console.log("setSelectedInvestment", value);
|
16001
|
-
setInvestmentData(investmentNames[value]);
|
16002
|
-
return [2 /*return*/];
|
16003
|
-
});
|
16004
|
-
}); };
|
16005
|
-
var getNationalInvestmentDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
16006
|
-
var optionalFilters, filterAnd, filterOr_1, response, investmentData_1, _i, _a, investment, error_3;
|
15920
|
+
var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15921
|
+
var filterAnd, _i, _a, c, response, error_2;
|
16007
15922
|
return __generator(this, function (_b) {
|
16008
15923
|
switch (_b.label) {
|
16009
15924
|
case 0:
|
16010
|
-
|
15925
|
+
setLoadingList(true);
|
16011
15926
|
_b.label = 1;
|
16012
15927
|
case 1:
|
16013
15928
|
_b.trys.push([1, 3, 4, 5]);
|
16014
|
-
optionalFilters = {};
|
16015
15929
|
filterAnd = [];
|
16016
15930
|
filterAnd = [
|
16017
15931
|
{
|
16018
|
-
key: "
|
15932
|
+
key: "companyRole",
|
16019
15933
|
operation: "=",
|
16020
|
-
value: exports.
|
16021
|
-
},
|
16022
|
-
{
|
16023
|
-
key: "amount",
|
16024
|
-
operation: ">",
|
16025
|
-
value: 0,
|
15934
|
+
value: exports.CompanyRole.PROGRAMME_DEVELOPER.toString(),
|
16026
15935
|
},
|
16027
15936
|
];
|
16028
15937
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.PROGRAMME_DEVELOPER) {
|
16029
15938
|
filterAnd.push({
|
16030
|
-
key: "
|
16031
|
-
operation: "
|
15939
|
+
key: "companyId",
|
15940
|
+
operation: "!=",
|
16032
15941
|
value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId,
|
16033
15942
|
});
|
16034
15943
|
}
|
16035
|
-
|
16036
|
-
|
16037
|
-
(
|
16038
|
-
|
16039
|
-
|
16040
|
-
|
16041
|
-
key: "toCompanyId",
|
16042
|
-
operation: "=",
|
16043
|
-
value: id,
|
16044
|
-
});
|
15944
|
+
for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
|
15945
|
+
c = _a[_i];
|
15946
|
+
filterAnd.push({
|
15947
|
+
key: "companyId",
|
15948
|
+
operation: "!=",
|
15949
|
+
value: c,
|
16045
15950
|
});
|
16046
|
-
optionalFilters.filterOr = filterOr_1;
|
16047
15951
|
}
|
16048
|
-
return [4 /*yield*/, post("national/
|
16049
|
-
case 2:
|
16050
|
-
response = _b.sent();
|
16051
|
-
if (response.data) {
|
16052
|
-
setNationalInvestmentList(response === null || response === void 0 ? void 0 : response.data);
|
16053
|
-
investmentData_1 = {};
|
16054
|
-
for (_i = 0, _a = response === null || response === void 0 ? void 0 : response.data; _i < _a.length; _i++) {
|
16055
|
-
investment = _a[_i];
|
16056
|
-
investmentData_1[investment.requestId] = investment;
|
16057
|
-
}
|
16058
|
-
setInvestmentNames(investmentData_1);
|
16059
|
-
console.log(investmentData_1);
|
16060
|
-
}
|
16061
|
-
return [3 /*break*/, 5];
|
16062
|
-
case 3:
|
16063
|
-
error_3 = _b.sent();
|
16064
|
-
console.log("Error in getting national Investments list", error_3);
|
16065
|
-
return [3 /*break*/, 5];
|
16066
|
-
case 4:
|
16067
|
-
setLoadingInvestment(false);
|
16068
|
-
return [7 /*endfinally*/];
|
16069
|
-
case 5: return [2 /*return*/];
|
16070
|
-
}
|
16071
|
-
});
|
16072
|
-
}); };
|
16073
|
-
var getUserOrganization = function () { return __awaiter(void 0, void 0, void 0, function () {
|
16074
|
-
var response, error_4;
|
16075
|
-
return __generator(this, function (_a) {
|
16076
|
-
switch (_a.label) {
|
16077
|
-
case 0:
|
16078
|
-
_a.trys.push([0, 2, , 3]);
|
16079
|
-
return [4 /*yield*/, post("national/organisation/query", {
|
15952
|
+
return [4 /*yield*/, post("national/organisation/queryNames", {
|
16080
15953
|
page: 1,
|
16081
15954
|
size: 100,
|
16082
|
-
filterAnd:
|
16083
|
-
{ key: "companyId", operation: "=", value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId },
|
16084
|
-
],
|
15955
|
+
filterAnd: filterAnd,
|
16085
15956
|
})];
|
16086
|
-
case 1:
|
16087
|
-
response = _a.sent();
|
16088
|
-
console.log("getUserOrganization", response.data[0]);
|
16089
|
-
setUserOrganization(response.data[0]);
|
16090
|
-
setMinistrySectoralScope(response.data[0].sectoralScope);
|
16091
|
-
return [3 /*break*/, 3];
|
16092
|
-
case 2:
|
16093
|
-
error_4 = _a.sent();
|
16094
|
-
console.log("Error in getting user organization", error_4);
|
16095
|
-
return [3 /*break*/, 3];
|
16096
|
-
case 3: return [2 /*return*/];
|
16097
|
-
}
|
16098
|
-
});
|
16099
|
-
}); };
|
16100
|
-
var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
16101
|
-
var filterAnd, filterOr, _i, _a, c, filters, response, companyName, _b, _c, company, error_5;
|
16102
|
-
return __generator(this, function (_d) {
|
16103
|
-
switch (_d.label) {
|
16104
|
-
case 0:
|
16105
|
-
setLoadingList(true);
|
16106
|
-
_d.label = 1;
|
16107
|
-
case 1:
|
16108
|
-
_d.trys.push([1, 3, 4, 5]);
|
16109
|
-
filterAnd = [];
|
16110
|
-
filterOr = [];
|
16111
|
-
filterAnd = [
|
16112
|
-
{
|
16113
|
-
key: "companyRole",
|
16114
|
-
operation: "=",
|
16115
|
-
value: exports.CompanyRole.PROGRAMME_DEVELOPER.toString(),
|
16116
|
-
},
|
16117
|
-
];
|
16118
|
-
// if (userInfoState?.companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
|
16119
|
-
// filterAnd.push({
|
16120
|
-
// key: "companyId",
|
16121
|
-
// operation: "!=",
|
16122
|
-
// value: userInfoState?.companyId,
|
16123
|
-
// });
|
16124
|
-
// }
|
16125
|
-
if (data === null || data === void 0 ? void 0 : data.companyId) {
|
16126
|
-
for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
|
16127
|
-
c = _a[_i];
|
16128
|
-
filterOr.push({
|
16129
|
-
key: "companyId",
|
16130
|
-
operation: "=",
|
16131
|
-
value: c,
|
16132
|
-
});
|
16133
|
-
}
|
16134
|
-
}
|
16135
|
-
filters = void 0;
|
16136
|
-
if (filterOr.length) {
|
16137
|
-
filters.filterOr = filterOr;
|
16138
|
-
}
|
16139
|
-
return [4 /*yield*/, post("national/organisation/queryNames", __assign({ page: 1, size: 100, filterAnd: filterAnd }, filters))];
|
16140
15957
|
case 2:
|
16141
|
-
response =
|
15958
|
+
response = _b.sent();
|
16142
15959
|
if (response.data) {
|
16143
15960
|
setOrganisationList(response === null || response === void 0 ? void 0 : response.data);
|
16144
|
-
companyName = {};
|
16145
|
-
for (_b = 0, _c = response === null || response === void 0 ? void 0 : response.data; _b < _c.length; _b++) {
|
16146
|
-
company = _c[_b];
|
16147
|
-
companyName[Number(company.companyId)] = company.name;
|
16148
|
-
}
|
16149
|
-
setCompanyNames(companyName);
|
16150
|
-
console.log(companyName);
|
16151
15961
|
}
|
16152
15962
|
return [3 /*break*/, 5];
|
16153
15963
|
case 3:
|
16154
|
-
|
16155
|
-
console.log("Error in getting organization list",
|
15964
|
+
error_2 = _b.sent();
|
15965
|
+
console.log("Error in getting organization list", error_2);
|
16156
15966
|
return [3 /*break*/, 5];
|
16157
15967
|
case 4:
|
16158
15968
|
setLoadingList(false);
|
@@ -16167,72 +15977,52 @@ var InvestmentCreationComponent = function (props) {
|
|
16167
15977
|
return;
|
16168
15978
|
}
|
16169
15979
|
if (state === null || state === void 0 ? void 0 : state.record) {
|
16170
|
-
console.log("condition 1 data", state === null || state === void 0 ? void 0 : state.record);
|
16171
15980
|
setData(state === null || state === void 0 ? void 0 : state.record);
|
16172
15981
|
}
|
16173
15982
|
else {
|
16174
|
-
console.log("condition 2 data", { ownership: true });
|
16175
15983
|
setData({ ownership: true });
|
16176
15984
|
}
|
16177
15985
|
}, []);
|
16178
15986
|
React.useEffect(function () {
|
16179
|
-
|
16180
|
-
|
16181
|
-
|
16182
|
-
|
16183
|
-
|
16184
|
-
|
16185
|
-
getNationalInvestmentDetails();
|
16186
|
-
getOrganisationsDetails();
|
15987
|
+
if (data) {
|
15988
|
+
var keys = Object.keys(data);
|
15989
|
+
if (keys[0] !== "ownership") {
|
15990
|
+
getOrganisationsDetails();
|
15991
|
+
}
|
15992
|
+
}
|
16187
15993
|
getGovernmentDetails();
|
16188
|
-
getAllProjectData();
|
16189
|
-
getUserOrganization();
|
16190
15994
|
}, [data]);
|
16191
|
-
if (!data
|
15995
|
+
if (!data) {
|
16192
15996
|
return React.createElement(Loading, null);
|
16193
15997
|
}
|
16194
15998
|
console.log("data", data);
|
16195
|
-
|
15999
|
+
var companyName = {};
|
16196
16000
|
if (data && Object.keys(data)[0] !== "ownership") {
|
16197
|
-
|
16198
|
-
|
16199
|
-
|
16001
|
+
for (var _i = 0, _l = data === null || data === void 0 ? void 0 : data.company; _i < _l.length; _i++) {
|
16002
|
+
var company = _l[_i];
|
16003
|
+
companyName[company === null || company === void 0 ? void 0 : company.companyId] = company;
|
16004
|
+
}
|
16200
16005
|
if (!data.proponentPercentage) {
|
16201
16006
|
data.proponentPercentage = [100];
|
16202
16007
|
}
|
16203
16008
|
}
|
16204
16009
|
var nextOne = function (val) {
|
16205
|
-
console.log("step 1 values", val);
|
16206
|
-
if (val.typeCreation == exports.InvestmentCreationType.EXISTING) {
|
16207
|
-
val.toCompanyId = investmentData.toCompanyId;
|
16208
|
-
}
|
16209
16010
|
setCurrent(current + 1);
|
16210
16011
|
setStepOneData(val);
|
16211
|
-
if (data === null || data === void 0 ? void 0 : data.programmeId)
|
16212
|
-
setSelectedProgramme(data.programmeId);
|
16213
|
-
if (prevInvestor && prevInvestor != val.toCompanyId && !(data === null || data === void 0 ? void 0 : data.programmeId)) {
|
16214
|
-
formTwo.resetFields();
|
16215
|
-
setCurrentPercTotal(0);
|
16216
|
-
setProjectData(undefined);
|
16217
|
-
}
|
16218
16012
|
};
|
16219
16013
|
var prevOne = function () {
|
16220
16014
|
setCurrent(current - 1);
|
16221
|
-
setPrevInvestor(stepOneData.toCompanyId);
|
16222
|
-
// formTwo.resetFields();
|
16223
|
-
// setCurrentPercTotal(0);
|
16224
|
-
// setProjectData(undefined);
|
16225
16015
|
};
|
16226
16016
|
var submitInvestment = function (val) { return __awaiter(void 0, void 0, void 0, function () {
|
16227
|
-
var payload, response,
|
16017
|
+
var payload, response, error_3;
|
16228
16018
|
return __generator(this, function (_a) {
|
16229
16019
|
switch (_a.label) {
|
16230
16020
|
case 0:
|
16231
16021
|
console.log(val);
|
16232
16022
|
console.log(stepOneData);
|
16233
|
-
console.log("OwnershipType", investmentOwnershipType);
|
16234
16023
|
setLoading(true);
|
16235
16024
|
payload = stepOneData;
|
16025
|
+
payload.programmeId = data.programmeId;
|
16236
16026
|
payload.amount = parseFloat(payload.amount);
|
16237
16027
|
if (payload.interestRate) {
|
16238
16028
|
payload.interestRate = parseFloat(payload.interestRate);
|
@@ -16249,32 +16039,16 @@ var InvestmentCreationComponent = function (props) {
|
|
16249
16039
|
.startOf("day")
|
16250
16040
|
.unix();
|
16251
16041
|
}
|
16042
|
+
payload.instrument = [payload.instrument];
|
16043
|
+
payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
|
16044
|
+
payload.percentage = val.percentage;
|
16252
16045
|
payload.toCompanyId = Number(payload.toCompanyId);
|
16253
16046
|
_a.label = 1;
|
16254
16047
|
case 1:
|
16255
|
-
_a.trys.push([1,
|
16256
|
-
response = void 0;
|
16257
|
-
if (!(investmentOwnershipType == exports.InvestmentOwnershipType.PROJECT)) return [3 /*break*/, 3];
|
16258
|
-
if (typeCreation == exports.InvestmentCreationType.EXISTING) {
|
16259
|
-
payload.nationalInvestmentId = investmentData.requestId;
|
16260
|
-
}
|
16261
|
-
else {
|
16262
|
-
payload.instrument = [payload.instrument];
|
16263
|
-
}
|
16264
|
-
payload.programmeId = projectData === null || projectData === void 0 ? void 0 : projectData.programmeId;
|
16265
|
-
payload.fromCompanyIds = projectData === null || projectData === void 0 ? void 0 : projectData.companyId.map(function (e) { return Number(e); });
|
16266
|
-
payload.percentage = val.percentage;
|
16048
|
+
_a.trys.push([1, 3, 4, 5]);
|
16267
16049
|
return [4 /*yield*/, post("national/programme/addInvestment", payload)];
|
16268
16050
|
case 2:
|
16269
16051
|
response = _a.sent();
|
16270
|
-
return [3 /*break*/, 5];
|
16271
|
-
case 3:
|
16272
|
-
payload.instrument = [payload.instrument];
|
16273
|
-
return [4 /*yield*/, post("national/organisation/addInvestment", payload)];
|
16274
|
-
case 4:
|
16275
|
-
response = _a.sent();
|
16276
|
-
_a.label = 5;
|
16277
|
-
case 5:
|
16278
16052
|
console.log("investment creation -> ", response);
|
16279
16053
|
if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
|
16280
16054
|
antd.message.open({
|
@@ -16284,24 +16058,22 @@ var InvestmentCreationComponent = function (props) {
|
|
16284
16058
|
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
16285
16059
|
});
|
16286
16060
|
}
|
16287
|
-
(data
|
16288
|
-
|
16289
|
-
|
16290
|
-
|
16291
|
-
|
16292
|
-
error_6 = _a.sent();
|
16293
|
-
console.log("Error in investment creation - ", error_6);
|
16061
|
+
onNavigateToProgrammeView(data.programmeId);
|
16062
|
+
return [3 /*break*/, 5];
|
16063
|
+
case 3:
|
16064
|
+
error_3 = _a.sent();
|
16065
|
+
console.log("Error in investment creation - ", error_3);
|
16294
16066
|
antd.message.open({
|
16295
16067
|
type: "error",
|
16296
|
-
content:
|
16068
|
+
content: error_3 === null || error_3 === void 0 ? void 0 : error_3.message,
|
16297
16069
|
duration: 4,
|
16298
16070
|
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
16299
16071
|
});
|
16300
|
-
return [3 /*break*/,
|
16301
|
-
case
|
16072
|
+
return [3 /*break*/, 5];
|
16073
|
+
case 4:
|
16302
16074
|
setLoading(false);
|
16303
16075
|
return [7 /*endfinally*/];
|
16304
|
-
case
|
16076
|
+
case 5: return [2 /*return*/];
|
16305
16077
|
}
|
16306
16078
|
});
|
16307
16079
|
}); };
|
@@ -16315,14 +16087,6 @@ var InvestmentCreationComponent = function (props) {
|
|
16315
16087
|
var onChangeTypeCreation = function (e) {
|
16316
16088
|
console.log("radio checked", e.target.value);
|
16317
16089
|
setTypeCreation(e.target.value);
|
16318
|
-
formOne.resetFields();
|
16319
|
-
formTwo.resetFields();
|
16320
|
-
setCurrentPercTotal(0);
|
16321
|
-
setProjectData(undefined);
|
16322
|
-
};
|
16323
|
-
var onChangeInvestmentOwnershipType = function (e) {
|
16324
|
-
console.log("investment ownership type radio checked", e.target.value);
|
16325
|
-
setInvestmentOwnershipType(e.target.value);
|
16326
16090
|
};
|
16327
16091
|
return (React.createElement("div", { className: "add-programme-main-container" },
|
16328
16092
|
React.createElement("div", { className: "title-container" },
|
@@ -16347,60 +16111,323 @@ var InvestmentCreationComponent = function (props) {
|
|
16347
16111
|
] },
|
16348
16112
|
React.createElement(antd.Radio.Group, { size: "large", defaultValue: typeCreation }, Object.values(exports.InvestmentCreationType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16349
16113
|
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onChange: onChangeTypeCreation }, t("programme:" + k)))); }))))),
|
16350
|
-
|
16351
|
-
React.createElement(antd.
|
16352
|
-
React.createElement(
|
16353
|
-
React.createElement("
|
16354
|
-
|
16355
|
-
|
16356
|
-
|
16357
|
-
|
16358
|
-
|
16359
|
-
|
16360
|
-
|
16361
|
-
|
16362
|
-
|
16363
|
-
|
16364
|
-
|
16365
|
-
|
16114
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16115
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16116
|
+
React.createElement("div", { className: "details-part-one" },
|
16117
|
+
React.createElement(antd.Form.Item, { label: t("programme:investorName"), name: "toCompanyId", wrapperCol: { span: 24 }, className: "organisation", rules: [
|
16118
|
+
{
|
16119
|
+
required: true,
|
16120
|
+
message: "".concat(t("programme:investorName"), " ").concat(t("isRequired")),
|
16121
|
+
},
|
16122
|
+
] },
|
16123
|
+
React.createElement(antd.Select, { size: "large", loading: loadingList }, organisationsList.map(function (organisation) { return (React.createElement(antd.Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name)); }))))),
|
16124
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16125
|
+
React.createElement("div", { className: "details-part-two" },
|
16126
|
+
React.createElement(antd.Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
|
16127
|
+
{
|
16128
|
+
required: true,
|
16129
|
+
message: "",
|
16130
|
+
},
|
16131
|
+
{
|
16132
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16133
|
+
return __generator(this, function (_a) {
|
16134
|
+
if (String(value).trim() === "" ||
|
16135
|
+
String(value).trim() === undefined ||
|
16136
|
+
value === null ||
|
16137
|
+
value === undefined) {
|
16138
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
|
16139
|
+
}
|
16140
|
+
else if (!isNaN(value) &&
|
16141
|
+
Number(value) > 0) {
|
16142
|
+
return [2 /*return*/, Promise.resolve()];
|
16143
|
+
}
|
16144
|
+
else {
|
16145
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
|
16146
|
+
}
|
16147
|
+
});
|
16148
|
+
}); },
|
16149
|
+
},
|
16150
|
+
] },
|
16151
|
+
React.createElement(antd.Input, { size: "large" }))))),
|
16152
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16153
|
+
React.createElement(antd.Col, { xl: 24, md: 24 },
|
16154
|
+
React.createElement(antd.Form.Item, { label: t("programme:instrument"), name: "instrument",
|
16155
|
+
//wrapperCol={{ span: 24 }}
|
16156
|
+
required: true, className: "investment-radio-button", 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() === undefined ||
|
16166
|
+
value === null ||
|
16167
|
+
value === undefined) {
|
16168
|
+
throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
|
16366
16169
|
}
|
16367
|
-
|
16368
|
-
|
16369
|
-
|
16370
|
-
|
16371
|
-
|
16372
|
-
|
16373
|
-
|
16374
|
-
|
16375
|
-
|
16376
|
-
|
16377
|
-
|
16378
|
-
|
16379
|
-
|
16380
|
-
|
16381
|
-
|
16382
|
-
|
16383
|
-
|
16384
|
-
|
16385
|
-
|
16386
|
-
|
16387
|
-
|
16388
|
-
|
16389
|
-
|
16390
|
-
|
16391
|
-
|
16392
|
-
|
16393
|
-
|
16394
|
-
|
16395
|
-
|
16396
|
-
}
|
16397
|
-
|
16398
|
-
|
16399
|
-
|
16400
|
-
|
16170
|
+
return [2 /*return*/];
|
16171
|
+
});
|
16172
|
+
}); },
|
16173
|
+
},
|
16174
|
+
] },
|
16175
|
+
React.createElement(antd.Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
|
16176
|
+
return (React.createElement(antd.Radio, { value: e.value }, e.label));
|
16177
|
+
}))))),
|
16178
|
+
instrument &&
|
16179
|
+
instrument.indexOf(exports.Instrument.LOAN) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16180
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16181
|
+
React.createElement("div", { className: "details-part-two" },
|
16182
|
+
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16183
|
+
{
|
16184
|
+
required: true,
|
16185
|
+
message: "",
|
16186
|
+
},
|
16187
|
+
{
|
16188
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16189
|
+
return __generator(this, function (_a) {
|
16190
|
+
if (String(value).trim() === "" ||
|
16191
|
+
String(value).trim() ===
|
16192
|
+
undefined ||
|
16193
|
+
value === null ||
|
16194
|
+
value === undefined) {
|
16195
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16196
|
+
}
|
16197
|
+
else if (!isNaN(value)) {
|
16198
|
+
return [2 /*return*/, Promise.resolve()];
|
16199
|
+
}
|
16200
|
+
else {
|
16201
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16202
|
+
}
|
16203
|
+
});
|
16204
|
+
}); },
|
16205
|
+
},
|
16206
|
+
] },
|
16207
|
+
React.createElement(antd.Input, { size: "large" })))))),
|
16208
|
+
instrument &&
|
16209
|
+
(instrument.indexOf(exports.Instrument.CONLOAN) >= 0 ||
|
16210
|
+
instrument.indexOf(exports.Instrument.NONCONLOAN) >= 0) && (React.createElement("div", { className: "details-part-two" },
|
16211
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16212
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16213
|
+
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16214
|
+
{
|
16215
|
+
required: true,
|
16216
|
+
message: "",
|
16217
|
+
},
|
16218
|
+
{
|
16219
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16220
|
+
return __generator(this, function (_a) {
|
16221
|
+
if (String(value).trim() === "" ||
|
16222
|
+
String(value).trim() ===
|
16223
|
+
undefined ||
|
16224
|
+
value === null ||
|
16225
|
+
value === undefined) {
|
16226
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16227
|
+
}
|
16228
|
+
else if (!isNaN(value)) {
|
16229
|
+
return [2 /*return*/, Promise.resolve()];
|
16230
|
+
}
|
16231
|
+
else {
|
16232
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16233
|
+
}
|
16234
|
+
});
|
16235
|
+
}); },
|
16236
|
+
},
|
16237
|
+
] },
|
16238
|
+
React.createElement(antd.Input, { size: "large" })))),
|
16239
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16240
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16241
|
+
React.createElement(antd.Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
|
16242
|
+
{
|
16243
|
+
required: true,
|
16244
|
+
message: "",
|
16245
|
+
},
|
16246
|
+
{
|
16247
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16248
|
+
return __generator(this, function (_a) {
|
16249
|
+
if (String(value).trim() === "" ||
|
16250
|
+
String(value).trim() ===
|
16251
|
+
undefined ||
|
16252
|
+
value === null ||
|
16253
|
+
value === undefined) {
|
16254
|
+
throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
|
16255
|
+
}
|
16256
|
+
return [2 /*return*/];
|
16257
|
+
});
|
16258
|
+
}); },
|
16259
|
+
},
|
16260
|
+
] },
|
16261
|
+
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16262
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16263
|
+
React.createElement(antd.Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
|
16264
|
+
{
|
16265
|
+
required: true,
|
16266
|
+
message: "",
|
16267
|
+
},
|
16268
|
+
{
|
16269
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16270
|
+
return __generator(this, function (_a) {
|
16271
|
+
if (String(value).trim() === "" ||
|
16272
|
+
String(value).trim() ===
|
16273
|
+
undefined ||
|
16274
|
+
value === null ||
|
16275
|
+
value === undefined) {
|
16276
|
+
throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
|
16277
|
+
}
|
16278
|
+
return [2 /*return*/];
|
16279
|
+
});
|
16280
|
+
}); },
|
16281
|
+
},
|
16282
|
+
] },
|
16283
|
+
React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
|
16284
|
+
return currentDate < moment().startOf("day");
|
16285
|
+
} })))))),
|
16286
|
+
instrument &&
|
16287
|
+
instrument.indexOf(exports.Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
|
16288
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16289
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16290
|
+
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16291
|
+
{
|
16292
|
+
required: true,
|
16293
|
+
message: "",
|
16294
|
+
},
|
16295
|
+
{
|
16296
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16297
|
+
return __generator(this, function (_a) {
|
16298
|
+
if (String(value).trim() === "" ||
|
16299
|
+
String(value).trim() ===
|
16300
|
+
undefined ||
|
16301
|
+
value === null ||
|
16302
|
+
value === undefined) {
|
16303
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16304
|
+
}
|
16305
|
+
else if (!isNaN(value)) {
|
16306
|
+
return [2 /*return*/, Promise.resolve()];
|
16307
|
+
}
|
16308
|
+
else {
|
16309
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16310
|
+
}
|
16311
|
+
});
|
16312
|
+
}); },
|
16313
|
+
},
|
16314
|
+
] },
|
16315
|
+
React.createElement(antd.Input, { size: "large" })))),
|
16401
16316
|
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16402
|
-
React.createElement(antd.Col, { xl:
|
16403
|
-
React.createElement(antd.Form.Item, { label: t("programme:
|
16317
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16318
|
+
React.createElement(antd.Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
|
16319
|
+
{
|
16320
|
+
required: true,
|
16321
|
+
message: "",
|
16322
|
+
},
|
16323
|
+
{
|
16324
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16325
|
+
return __generator(this, function (_a) {
|
16326
|
+
if (String(value).trim() === "" ||
|
16327
|
+
String(value).trim() ===
|
16328
|
+
undefined ||
|
16329
|
+
value === null ||
|
16330
|
+
value === undefined) {
|
16331
|
+
throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
|
16332
|
+
}
|
16333
|
+
return [2 /*return*/];
|
16334
|
+
});
|
16335
|
+
}); },
|
16336
|
+
},
|
16337
|
+
] },
|
16338
|
+
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16339
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16340
|
+
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", 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:payback"), " ").concat(t("isRequired")));
|
16354
|
+
}
|
16355
|
+
return [2 /*return*/];
|
16356
|
+
});
|
16357
|
+
}); },
|
16358
|
+
},
|
16359
|
+
] },
|
16360
|
+
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16361
|
+
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16362
|
+
instrument &&
|
16363
|
+
instrument.indexOf(exports.Instrument.RESULT_BASED) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16364
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16365
|
+
React.createElement("div", { className: "details-part-two" },
|
16366
|
+
React.createElement(antd.Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
|
16367
|
+
{
|
16368
|
+
required: true,
|
16369
|
+
message: "",
|
16370
|
+
},
|
16371
|
+
{
|
16372
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16373
|
+
return __generator(this, function (_a) {
|
16374
|
+
if (String(value).trim() === "" ||
|
16375
|
+
String(value).trim() ===
|
16376
|
+
undefined ||
|
16377
|
+
value === null ||
|
16378
|
+
value === undefined) {
|
16379
|
+
throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
|
16380
|
+
}
|
16381
|
+
return [2 /*return*/];
|
16382
|
+
});
|
16383
|
+
}); },
|
16384
|
+
},
|
16385
|
+
] },
|
16386
|
+
React.createElement(antd.Input, { size: "large" })))),
|
16387
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16388
|
+
React.createElement("div", { className: "details-part-two" },
|
16389
|
+
React.createElement(antd.Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
|
16390
|
+
{
|
16391
|
+
required: true,
|
16392
|
+
message: "",
|
16393
|
+
},
|
16394
|
+
{
|
16395
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16396
|
+
return __generator(this, function (_a) {
|
16397
|
+
if (String(value).trim() === "" ||
|
16398
|
+
String(value).trim() ===
|
16399
|
+
undefined ||
|
16400
|
+
value === null ||
|
16401
|
+
value === undefined) {
|
16402
|
+
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
|
16403
|
+
}
|
16404
|
+
else if (!isNaN(value)) {
|
16405
|
+
return [2 /*return*/, Promise.resolve()];
|
16406
|
+
}
|
16407
|
+
else {
|
16408
|
+
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
|
16409
|
+
}
|
16410
|
+
});
|
16411
|
+
}); },
|
16412
|
+
},
|
16413
|
+
] },
|
16414
|
+
React.createElement(antd.Input, { size: "large" })))))),
|
16415
|
+
instrument &&
|
16416
|
+
instrument.indexOf(exports.Instrument.INKIND) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16417
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16418
|
+
React.createElement("div", { className: "details-part-two" },
|
16419
|
+
React.createElement(antd.Form.Item, { label: t("programme:description"), name: "description", rules: [
|
16420
|
+
{
|
16421
|
+
required: false,
|
16422
|
+
message: "",
|
16423
|
+
},
|
16424
|
+
] },
|
16425
|
+
React.createElement(antd.Input, { size: "large" })))))),
|
16426
|
+
instrument &&
|
16427
|
+
instrument.indexOf(exports.Instrument.INSURANCE) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16428
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16429
|
+
React.createElement("div", { className: "details-part-two" },
|
16430
|
+
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
|
16404
16431
|
{
|
16405
16432
|
required: true,
|
16406
16433
|
message: "",
|
@@ -16409,422 +16436,79 @@ var InvestmentCreationComponent = function (props) {
|
|
16409
16436
|
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16410
16437
|
return __generator(this, function (_a) {
|
16411
16438
|
if (String(value).trim() === "" ||
|
16412
|
-
String(value).trim() ===
|
16439
|
+
String(value).trim() ===
|
16440
|
+
undefined ||
|
16413
16441
|
value === null ||
|
16414
16442
|
value === undefined) {
|
16415
|
-
throw new Error("".concat(t("programme:
|
16443
|
+
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16416
16444
|
}
|
16417
16445
|
return [2 /*return*/];
|
16418
16446
|
});
|
16419
16447
|
}); },
|
16420
16448
|
},
|
16421
16449
|
] },
|
16422
|
-
React.createElement(antd.Radio.Group, {
|
16423
|
-
|
16424
|
-
|
16425
|
-
instrument &&
|
16426
|
-
|
16427
|
-
React.createElement(
|
16428
|
-
React.createElement(
|
16429
|
-
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16430
|
-
{
|
16431
|
-
required: true,
|
16432
|
-
message: "",
|
16433
|
-
},
|
16434
|
-
{
|
16435
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16436
|
-
return __generator(this, function (_a) {
|
16437
|
-
if (String(value).trim() === "" ||
|
16438
|
-
String(value).trim() ===
|
16439
|
-
undefined ||
|
16440
|
-
value === null ||
|
16441
|
-
value === undefined) {
|
16442
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16443
|
-
}
|
16444
|
-
else if (!isNaN(value)) {
|
16445
|
-
return [2 /*return*/, Promise.resolve()];
|
16446
|
-
}
|
16447
|
-
else {
|
16448
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16449
|
-
}
|
16450
|
-
});
|
16451
|
-
}); },
|
16452
|
-
},
|
16453
|
-
] },
|
16454
|
-
React.createElement(antd.Input, { size: "large" })))))),
|
16455
|
-
instrument &&
|
16456
|
-
(instrument.indexOf(exports.Instrument.CONLOAN) >= 0 ||
|
16457
|
-
instrument.indexOf(exports.Instrument.NONCONLOAN) >=
|
16458
|
-
0) && (React.createElement("div", { className: "details-part-two" },
|
16459
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16460
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16461
|
-
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16462
|
-
{
|
16463
|
-
required: true,
|
16464
|
-
message: "",
|
16465
|
-
},
|
16466
|
-
{
|
16467
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16468
|
-
return __generator(this, function (_a) {
|
16469
|
-
if (String(value).trim() === "" ||
|
16470
|
-
String(value).trim() ===
|
16471
|
-
undefined ||
|
16472
|
-
value === null ||
|
16473
|
-
value === undefined) {
|
16474
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16475
|
-
}
|
16476
|
-
else if (!isNaN(value)) {
|
16477
|
-
return [2 /*return*/, Promise.resolve()];
|
16478
|
-
}
|
16479
|
-
else {
|
16480
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16481
|
-
}
|
16482
|
-
});
|
16483
|
-
}); },
|
16484
|
-
},
|
16485
|
-
] },
|
16486
|
-
React.createElement(antd.Input, { size: "large" })))),
|
16487
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16488
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16489
|
-
React.createElement(antd.Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
|
16490
|
-
{
|
16491
|
-
required: true,
|
16492
|
-
message: "",
|
16493
|
-
},
|
16494
|
-
{
|
16495
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16496
|
-
return __generator(this, function (_a) {
|
16497
|
-
if (String(value).trim() === "" ||
|
16498
|
-
String(value).trim() ===
|
16499
|
-
undefined ||
|
16500
|
-
value === null ||
|
16501
|
-
value === undefined) {
|
16502
|
-
throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
|
16503
|
-
}
|
16504
|
-
return [2 /*return*/];
|
16505
|
-
});
|
16506
|
-
}); },
|
16507
|
-
},
|
16508
|
-
] },
|
16509
|
-
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16510
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16511
|
-
React.createElement(antd.Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
|
16512
|
-
{
|
16513
|
-
required: true,
|
16514
|
-
message: "",
|
16515
|
-
},
|
16516
|
-
{
|
16517
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16518
|
-
return __generator(this, function (_a) {
|
16519
|
-
if (String(value).trim() === "" ||
|
16520
|
-
String(value).trim() ===
|
16521
|
-
undefined ||
|
16522
|
-
value === null ||
|
16523
|
-
value === undefined) {
|
16524
|
-
throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
|
16525
|
-
}
|
16526
|
-
return [2 /*return*/];
|
16527
|
-
});
|
16528
|
-
}); },
|
16529
|
-
},
|
16530
|
-
] },
|
16531
|
-
React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
|
16532
|
-
return currentDate <
|
16533
|
-
moment().startOf("day");
|
16534
|
-
} })))))),
|
16535
|
-
instrument &&
|
16536
|
-
instrument.indexOf(exports.Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
|
16537
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16538
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16539
|
-
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16540
|
-
{
|
16541
|
-
required: true,
|
16542
|
-
message: "",
|
16543
|
-
},
|
16544
|
-
{
|
16545
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16546
|
-
return __generator(this, function (_a) {
|
16547
|
-
if (String(value).trim() === "" ||
|
16548
|
-
String(value).trim() ===
|
16549
|
-
undefined ||
|
16550
|
-
value === null ||
|
16551
|
-
value === undefined) {
|
16552
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16553
|
-
}
|
16554
|
-
else if (!isNaN(value)) {
|
16555
|
-
return [2 /*return*/, Promise.resolve()];
|
16556
|
-
}
|
16557
|
-
else {
|
16558
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16559
|
-
}
|
16560
|
-
});
|
16561
|
-
}); },
|
16562
|
-
},
|
16563
|
-
] },
|
16564
|
-
React.createElement(antd.Input, { size: "large" })))),
|
16565
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16566
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16567
|
-
React.createElement(antd.Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
|
16568
|
-
{
|
16569
|
-
required: true,
|
16570
|
-
message: "",
|
16571
|
-
},
|
16572
|
-
{
|
16573
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16574
|
-
return __generator(this, function (_a) {
|
16575
|
-
if (String(value).trim() === "" ||
|
16576
|
-
String(value).trim() ===
|
16577
|
-
undefined ||
|
16578
|
-
value === null ||
|
16579
|
-
value === undefined) {
|
16580
|
-
throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
|
16581
|
-
}
|
16582
|
-
return [2 /*return*/];
|
16583
|
-
});
|
16584
|
-
}); },
|
16585
|
-
},
|
16586
|
-
] },
|
16587
|
-
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16588
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16589
|
-
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
|
16590
|
-
{
|
16591
|
-
required: true,
|
16592
|
-
message: "",
|
16593
|
-
},
|
16594
|
-
{
|
16595
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16596
|
-
return __generator(this, function (_a) {
|
16597
|
-
if (String(value).trim() === "" ||
|
16598
|
-
String(value).trim() ===
|
16599
|
-
undefined ||
|
16600
|
-
value === null ||
|
16601
|
-
value === undefined) {
|
16602
|
-
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16603
|
-
}
|
16604
|
-
return [2 /*return*/];
|
16605
|
-
});
|
16606
|
-
}); },
|
16607
|
-
},
|
16608
|
-
] },
|
16609
|
-
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16610
|
-
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16611
|
-
instrument &&
|
16612
|
-
instrument.indexOf(exports.Instrument.RESULT_BASED) >=
|
16613
|
-
0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16614
|
-
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16615
|
-
React.createElement("div", { className: "details-part-two" },
|
16616
|
-
React.createElement(antd.Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
|
16617
|
-
{
|
16618
|
-
required: true,
|
16619
|
-
message: "",
|
16620
|
-
},
|
16621
|
-
{
|
16622
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16623
|
-
return __generator(this, function (_a) {
|
16624
|
-
if (String(value).trim() === "" ||
|
16625
|
-
String(value).trim() ===
|
16626
|
-
undefined ||
|
16627
|
-
value === null ||
|
16628
|
-
value === undefined) {
|
16629
|
-
throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
|
16630
|
-
}
|
16631
|
-
return [2 /*return*/];
|
16632
|
-
});
|
16633
|
-
}); },
|
16634
|
-
},
|
16635
|
-
] },
|
16636
|
-
React.createElement(antd.Input, { size: "large" })))),
|
16637
|
-
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16638
|
-
React.createElement("div", { className: "details-part-two" },
|
16639
|
-
React.createElement(antd.Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
|
16640
|
-
{
|
16641
|
-
required: true,
|
16642
|
-
message: "",
|
16643
|
-
},
|
16644
|
-
{
|
16645
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16646
|
-
return __generator(this, function (_a) {
|
16647
|
-
if (String(value).trim() === "" ||
|
16648
|
-
String(value).trim() ===
|
16649
|
-
undefined ||
|
16650
|
-
value === null ||
|
16651
|
-
value === undefined) {
|
16652
|
-
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
|
16653
|
-
}
|
16654
|
-
else if (!isNaN(value)) {
|
16655
|
-
return [2 /*return*/, Promise.resolve()];
|
16656
|
-
}
|
16657
|
-
else {
|
16658
|
-
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
|
16659
|
-
}
|
16660
|
-
});
|
16661
|
-
}); },
|
16662
|
-
},
|
16663
|
-
] },
|
16664
|
-
React.createElement(antd.Input, { size: "large" })))))),
|
16665
|
-
instrument &&
|
16666
|
-
instrument.indexOf(exports.Instrument.INKIND) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16667
|
-
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16668
|
-
React.createElement("div", { className: "details-part-two" },
|
16669
|
-
React.createElement(antd.Form.Item, { label: t("programme:description"), name: "description", rules: [
|
16670
|
-
{
|
16671
|
-
required: false,
|
16672
|
-
message: "",
|
16673
|
-
},
|
16674
|
-
] },
|
16675
|
-
React.createElement(antd.Input, { size: "large" })))))),
|
16676
|
-
instrument &&
|
16677
|
-
instrument.indexOf(exports.Instrument.INSURANCE) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16678
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16679
|
-
React.createElement("div", { className: "details-part-two" },
|
16680
|
-
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
|
16681
|
-
{
|
16682
|
-
required: true,
|
16683
|
-
message: "",
|
16684
|
-
},
|
16685
|
-
{
|
16686
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16687
|
-
return __generator(this, function (_a) {
|
16688
|
-
if (String(value).trim() === "" ||
|
16689
|
-
String(value).trim() ===
|
16690
|
-
undefined ||
|
16691
|
-
value === null ||
|
16692
|
-
value === undefined) {
|
16693
|
-
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16694
|
-
}
|
16695
|
-
return [2 /*return*/];
|
16696
|
-
});
|
16697
|
-
}); },
|
16698
|
-
},
|
16699
|
-
] },
|
16700
|
-
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16701
|
-
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16702
|
-
instrument &&
|
16703
|
-
instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16704
|
-
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16705
|
-
React.createElement("div", { className: "details-part-two" },
|
16706
|
-
React.createElement(antd.Form.Item, { label: t("programme:comments"), name: "comments", rules: [
|
16707
|
-
{
|
16708
|
-
required: true,
|
16709
|
-
message: "",
|
16710
|
-
},
|
16711
|
-
{
|
16712
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16713
|
-
return __generator(this, function (_a) {
|
16714
|
-
if (String(value).trim() === "" ||
|
16715
|
-
String(value).trim() ===
|
16716
|
-
undefined ||
|
16717
|
-
value === null ||
|
16718
|
-
value === undefined) {
|
16719
|
-
throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
|
16720
|
-
}
|
16721
|
-
return [2 /*return*/];
|
16722
|
-
});
|
16723
|
-
}); },
|
16724
|
-
},
|
16725
|
-
] },
|
16726
|
-
React.createElement(antd.Input, { size: "large" })))))),
|
16727
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16728
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16729
|
-
React.createElement(antd.Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
|
16730
|
-
{
|
16731
|
-
required: false,
|
16732
|
-
},
|
16733
|
-
] },
|
16734
|
-
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16735
|
-
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16736
|
-
return deselectOnClick(e, "type");
|
16737
|
-
} }, t("programme:" + k)))); })))),
|
16738
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16739
|
-
React.createElement(antd.Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
|
16450
|
+
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16451
|
+
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16452
|
+
instrument &&
|
16453
|
+
instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16454
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16455
|
+
React.createElement("div", { className: "details-part-two" },
|
16456
|
+
React.createElement(antd.Form.Item, { label: t("programme:comments"), name: "comments", rules: [
|
16740
16457
|
{
|
16741
|
-
required:
|
16458
|
+
required: true,
|
16459
|
+
message: "",
|
16742
16460
|
},
|
16743
|
-
] },
|
16744
|
-
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16745
|
-
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16746
|
-
return deselectOnClick(e, "level");
|
16747
|
-
} }, t("programme:" + k)))); })))),
|
16748
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16749
|
-
React.createElement(antd.Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
|
16750
16461
|
{
|
16751
|
-
|
16462
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16463
|
+
return __generator(this, function (_a) {
|
16464
|
+
if (String(value).trim() === "" ||
|
16465
|
+
String(value).trim() ===
|
16466
|
+
undefined ||
|
16467
|
+
value === null ||
|
16468
|
+
value === undefined) {
|
16469
|
+
throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
|
16470
|
+
}
|
16471
|
+
return [2 /*return*/];
|
16472
|
+
});
|
16473
|
+
}); },
|
16752
16474
|
},
|
16753
16475
|
] },
|
16754
|
-
React.createElement(antd.
|
16755
|
-
|
16756
|
-
|
16757
|
-
|
16758
|
-
|
16759
|
-
|
16760
|
-
|
16761
|
-
|
16762
|
-
|
16763
|
-
|
16764
|
-
|
16765
|
-
|
16766
|
-
|
16767
|
-
|
16768
|
-
|
16769
|
-
|
16770
|
-
|
16771
|
-
|
16772
|
-
|
16773
|
-
|
16774
|
-
|
16775
|
-
|
16776
|
-
|
16777
|
-
|
16778
|
-
|
16779
|
-
|
16780
|
-
|
16781
|
-
|
16782
|
-
|
16783
|
-
|
16784
|
-
|
16785
|
-
|
16786
|
-
|
16787
|
-
|
16788
|
-
|
16789
|
-
|
16790
|
-
}
|
16791
|
-
else if (!isNaN(value) &&
|
16792
|
-
Number(value) > 0) {
|
16793
|
-
return [2 /*return*/, Promise.resolve()];
|
16794
|
-
}
|
16795
|
-
else {
|
16796
|
-
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
|
16797
|
-
}
|
16798
|
-
});
|
16799
|
-
}); },
|
16800
|
-
},
|
16801
|
-
function (_a) {
|
16802
|
-
var getFieldValue = _a.getFieldValue;
|
16803
|
-
return ({
|
16804
|
-
validator: function (rule, v) {
|
16805
|
-
if (getFieldValue("amount") &&
|
16806
|
-
investmentData &&
|
16807
|
-
investmentData.amount <
|
16808
|
-
parseFloat(getFieldValue("amount"))) {
|
16809
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
16810
|
-
return Promise.reject("Amount > Available");
|
16811
|
-
}
|
16812
|
-
return Promise.resolve();
|
16813
|
-
},
|
16814
|
-
});
|
16815
|
-
},
|
16816
|
-
] },
|
16817
|
-
React.createElement(antd.Input, { size: "large" })))),
|
16818
|
-
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16819
|
-
React.createElement("div", { className: "details-part-two" },
|
16820
|
-
React.createElement(antd.Form.Item, { label: " ", name: "sourceAmount" },
|
16821
|
-
React.createElement("div", null,
|
16822
|
-
"/",
|
16823
|
-
React.createElement(antd.InputNumber, { size: "large", width: "100%", formatter: function (value) {
|
16824
|
-
return "$".concat(addCommSep(value));
|
16825
|
-
}, disabled: true, value: investmentData
|
16826
|
-
? investmentData.amount
|
16827
|
-
: 0 })))))))),
|
16476
|
+
React.createElement(antd.Input, { size: "large" })))))),
|
16477
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16478
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16479
|
+
React.createElement(antd.Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
|
16480
|
+
{
|
16481
|
+
required: false,
|
16482
|
+
},
|
16483
|
+
] },
|
16484
|
+
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16485
|
+
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16486
|
+
return deselectOnClick(e, "type");
|
16487
|
+
} }, t("programme:" + k)))); })))),
|
16488
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16489
|
+
React.createElement(antd.Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
|
16490
|
+
{
|
16491
|
+
required: false,
|
16492
|
+
},
|
16493
|
+
] },
|
16494
|
+
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16495
|
+
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16496
|
+
return deselectOnClick(e, "level");
|
16497
|
+
} }, t("programme:" + k)))); })))),
|
16498
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16499
|
+
React.createElement(antd.Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
|
16500
|
+
{
|
16501
|
+
required: false,
|
16502
|
+
},
|
16503
|
+
] },
|
16504
|
+
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16505
|
+
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16506
|
+
return deselectOnClick(e, "stream");
|
16507
|
+
} }, t("programme:" + k)))); }))))),
|
16508
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16509
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16510
|
+
React.createElement(antd.Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
|
16511
|
+
React.createElement(antd.Select, { size: "large" }, Object.values(exports.ESGType).map(function (esg) { return (React.createElement(antd.Select.Option, { value: esg }, esg)); }))))),
|
16828
16512
|
React.createElement(antd.Form.Item, null,
|
16829
16513
|
React.createElement("div", { className: "steps-actions" },
|
16830
16514
|
React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: nextOne }, t("programme:next")))))))),
|
@@ -16834,164 +16518,73 @@ var InvestmentCreationComponent = function (props) {
|
|
16834
16518
|
React.createElement("div", { className: "step-count" }, "02"),
|
16835
16519
|
React.createElement("div", { className: "title" }, t("programme:ownership")))),
|
16836
16520
|
description: current === 1 && (React.createElement("div", null,
|
16837
|
-
React.createElement("div", { className: "
|
16838
|
-
React.createElement("
|
16839
|
-
|
16840
|
-
React.createElement(antd.Row, { className: "row", gutter: [
|
16841
|
-
React.createElement(antd.Col, { xl: 8, md:
|
16842
|
-
React.createElement(
|
16521
|
+
React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 && (React.createElement("div", { className: "programme-sought-form" },
|
16522
|
+
React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment }, data === null || data === void 0 ? void 0 :
|
16523
|
+
data.companyId.map(function (companyId, index) {
|
16524
|
+
return (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16525
|
+
React.createElement(antd.Col, { xl: 8, md: 15 },
|
16526
|
+
React.createElement("div", { className: "label" },
|
16527
|
+
companyName[companyId].name,
|
16528
|
+
React.createElement("span", { className: "required-mark" }, "*"))),
|
16529
|
+
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16530
|
+
React.createElement(antd.Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16843
16531
|
{
|
16844
|
-
|
16532
|
+
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
16533
|
+
message: "Percentage Should be a positive number",
|
16845
16534
|
},
|
16846
|
-
|
16847
|
-
|
16848
|
-
|
16849
|
-
|
16850
|
-
|
16851
|
-
|
16852
|
-
|
16853
|
-
|
16854
|
-
|
16855
|
-
|
16856
|
-
|
16857
|
-
|
16858
|
-
|
16859
|
-
|
16860
|
-
|
16861
|
-
|
16862
|
-
|
16863
|
-
|
16864
|
-
|
16865
|
-
: "", color: TooltipColor, key: TooltipColor },
|
16866
|
-
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onChange: onChangeInvestmentOwnershipType, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
|
16867
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER &&
|
16868
|
-
stepOneData.toCompanyId !=
|
16869
|
-
userInfoState.companyId &&
|
16870
|
-
k ==
|
16871
|
-
exports.InvestmentOwnershipType.NATIONAL }, t("programme:" + k)))));
|
16872
|
-
}
|
16873
|
-
})))))))),
|
16874
|
-
React.createElement("div", { className: "programme-sought-form-container ownership-container" },
|
16875
|
-
React.createElement("div", { className: "programme-sought-form" },
|
16876
|
-
React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment },
|
16877
|
-
allProjectData.length > 0 &&
|
16878
|
-
investmentOwnershipType ==
|
16879
|
-
exports.InvestmentOwnershipType.PROJECT && (React.createElement("div", null,
|
16880
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16881
|
-
React.createElement(antd.Col, { xl: 12, md: 24 },
|
16882
|
-
React.createElement("div", { className: "details-part-one" },
|
16883
|
-
React.createElement(antd.Form.Item, { label: t("programme:title"), name: "projectId", wrapperCol: { span: 24 }, initialValue: (data === null || data === void 0 ? void 0 : data.programmeId) != undefined
|
16884
|
-
? allProjectData[0].programmeId
|
16885
|
-
: null, rules: [
|
16886
|
-
{
|
16887
|
-
required: true,
|
16888
|
-
message: "".concat(t("programme:title"), " ").concat(t("isRequired")),
|
16889
|
-
},
|
16890
|
-
] },
|
16891
|
-
React.createElement(antd.Select, { size: "large", loading: loadingProgData,
|
16892
|
-
// defaultValue={
|
16893
|
-
// allProjectData.length == 1
|
16894
|
-
// ? allProjectData[0].programmeId
|
16895
|
-
// : null
|
16896
|
-
// }
|
16897
|
-
disabled: allProjectData.length == 1 &&
|
16898
|
-
(data === null || data === void 0 ? void 0 : data.programmeId) != undefined, onChange: setSelectedProgramme }, allProjectData.map(function (project) {
|
16899
|
-
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
|
16900
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER &&
|
16901
|
-
Number(stepOneData.toCompanyId) !=
|
16902
|
-
userInfoState.companyId) {
|
16903
|
-
if (project.companyId
|
16904
|
-
.map(function (id) { return Number(id); })
|
16905
|
-
.includes(userInfoState.companyId)) {
|
16906
|
-
return (React.createElement(antd.Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16907
|
-
}
|
16908
|
-
}
|
16909
|
-
else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
16910
|
-
exports.CompanyRole.MINISTRY) {
|
16911
|
-
if (ministrySectoralScope.includes(project.sectoralScope)) {
|
16912
|
-
return (React.createElement(antd.Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16535
|
+
{
|
16536
|
+
required: true,
|
16537
|
+
message: "Required field",
|
16538
|
+
},
|
16539
|
+
function (_a) {
|
16540
|
+
var getFieldValue = _a.getFieldValue;
|
16541
|
+
return ({
|
16542
|
+
validator: function (rule, v) {
|
16543
|
+
if (getFieldValue([
|
16544
|
+
"percentage",
|
16545
|
+
index,
|
16546
|
+
]) &&
|
16547
|
+
parseFloat(getFieldValue([
|
16548
|
+
"percentage",
|
16549
|
+
index,
|
16550
|
+
])) >
|
16551
|
+
data.proponentPercentage[index]) {
|
16552
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
16553
|
+
return Promise.reject("Amount > Available");
|
16913
16554
|
}
|
16914
|
-
|
16915
|
-
else {
|
16916
|
-
return (React.createElement(antd.Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16917
|
-
}
|
16918
|
-
})))))), projectData === null || projectData === void 0 ? void 0 :
|
16919
|
-
projectData.companyId.map(function (companyId, index) {
|
16920
|
-
if (formTwo.getFieldValue("percentage") &&
|
16921
|
-
formTwo.getFieldValue("percentage")[index] &&
|
16922
|
-
companyId == stepOneData.toCompanyId) {
|
16923
|
-
formTwo.getFieldValue("percentage")[index] = 0;
|
16924
|
-
}
|
16925
|
-
return (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16926
|
-
React.createElement(antd.Col, { xl: 8, md: 15 },
|
16927
|
-
React.createElement("div", { className: "label" },
|
16928
|
-
govData.companyId == companyId
|
16929
|
-
? govData.name
|
16930
|
-
: companyNames[Number(companyId)],
|
16931
|
-
React.createElement("span", { className: "required-mark" }, "*"))),
|
16932
|
-
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16933
|
-
React.createElement(antd.Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16934
|
-
{
|
16935
|
-
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
16936
|
-
message: "Percentage Should be a positive number",
|
16555
|
+
return Promise.resolve();
|
16937
16556
|
},
|
16938
|
-
|
16939
|
-
|
16940
|
-
|
16941
|
-
|
16942
|
-
|
16943
|
-
|
16944
|
-
|
16945
|
-
|
16946
|
-
|
16947
|
-
|
16948
|
-
|
16949
|
-
|
16950
|
-
|
16951
|
-
|
16952
|
-
|
16953
|
-
|
16954
|
-
|
16955
|
-
|
16956
|
-
|
16957
|
-
|
16958
|
-
|
16959
|
-
|
16960
|
-
|
16961
|
-
|
16962
|
-
|
16963
|
-
|
16964
|
-
|
16965
|
-
|
16966
|
-
|
16967
|
-
|
16968
|
-
|
16969
|
-
onKeyPress: function (event) {
|
16970
|
-
if (!/[0-9\.]/.test(event.key)) {
|
16971
|
-
event.preventDefault();
|
16972
|
-
}
|
16973
|
-
} })),
|
16974
|
-
React.createElement("div", { className: "inline separator" }, "/"),
|
16975
|
-
React.createElement(antd.Form.Item, { className: "inline" },
|
16976
|
-
React.createElement(antd.InputNumber, { placeholder: String(projectData === null || projectData === void 0 ? void 0 : projectData.proponentPercentage[index]), disabled: true })))));
|
16977
|
-
}),
|
16978
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16979
|
-
React.createElement(antd.Col, { xl: 8, md: 15 },
|
16980
|
-
React.createElement("div", { className: "label" }, t("programme:total"))),
|
16981
|
-
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16982
|
-
React.createElement(antd.Form.Item, { className: "inline", name: ["total"] },
|
16983
|
-
React.createElement(antd.InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
16984
|
-
if (!/[0-9\.]/.test(event.key)) {
|
16985
|
-
event.preventDefault();
|
16986
|
-
}
|
16987
|
-
} })),
|
16988
|
-
React.createElement("div", { className: "inline separator" }, "/"),
|
16989
|
-
React.createElement(antd.Form.Item, { className: "inline" },
|
16990
|
-
React.createElement(antd.InputNumber, { disabled: true, placeholder: "100" })))))),
|
16991
|
-
React.createElement(antd.Form.Item, null,
|
16992
|
-
React.createElement("div", { className: "steps-actions" },
|
16993
|
-
React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
16994
|
-
React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back"))))))))),
|
16557
|
+
});
|
16558
|
+
},
|
16559
|
+
] },
|
16560
|
+
React.createElement(antd.InputNumber, { placeholder: "", controls: false, disabled: govData.companyId == companyId,
|
16561
|
+
// disabled={userInfoState?.companyId === Number(companyId)}
|
16562
|
+
onKeyPress: function (event) {
|
16563
|
+
if (!/[0-9\.]/.test(event.key)) {
|
16564
|
+
event.preventDefault();
|
16565
|
+
}
|
16566
|
+
} })),
|
16567
|
+
React.createElement("div", { className: "inline separator" }, "/"),
|
16568
|
+
React.createElement(antd.Form.Item, { className: "inline" },
|
16569
|
+
React.createElement(antd.InputNumber, { placeholder: String(data === null || data === void 0 ? void 0 : data.proponentPercentage[index]), disabled: true })))));
|
16570
|
+
}),
|
16571
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16572
|
+
React.createElement(antd.Col, { xl: 8, md: 15 },
|
16573
|
+
React.createElement("div", { className: "label" }, t("programme:total"))),
|
16574
|
+
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16575
|
+
React.createElement(antd.Form.Item, { className: "inline", name: ["total"] },
|
16576
|
+
React.createElement(antd.InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
16577
|
+
if (!/[0-9\.]/.test(event.key)) {
|
16578
|
+
event.preventDefault();
|
16579
|
+
}
|
16580
|
+
} })),
|
16581
|
+
React.createElement("div", { className: "inline separator" }, "/"),
|
16582
|
+
React.createElement(antd.Form.Item, { className: "inline" },
|
16583
|
+
React.createElement(antd.InputNumber, { disabled: true, placeholder: "100" })))),
|
16584
|
+
React.createElement(antd.Form.Item, null,
|
16585
|
+
React.createElement("div", { className: "steps-actions" },
|
16586
|
+
React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
16587
|
+
React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back")))))))))),
|
16995
16588
|
},
|
16996
16589
|
] })))));
|
16997
16590
|
};
|
@@ -17492,10 +17085,7 @@ var InvestmentManagementComponent = function (props) {
|
|
17492
17085
|
sorter: true,
|
17493
17086
|
align: "left",
|
17494
17087
|
render: function (item) {
|
17495
|
-
|
17496
|
-
return React.createElement("span", { className: "clickable" }, item);
|
17497
|
-
}
|
17498
|
-
return React.createElement("span", null, "-");
|
17088
|
+
return React.createElement("span", { className: "clickable" }, item);
|
17499
17089
|
},
|
17500
17090
|
onCell: function (record, rowIndex) {
|
17501
17091
|
return {
|
@@ -17553,12 +17143,6 @@ var InvestmentManagementComponent = function (props) {
|
|
17553
17143
|
key: "programmeSector",
|
17554
17144
|
sorter: true,
|
17555
17145
|
align: "left",
|
17556
|
-
render: function (item) {
|
17557
|
-
if (item) {
|
17558
|
-
return React.createElement("span", null, item);
|
17559
|
-
}
|
17560
|
-
return React.createElement("span", null, "-");
|
17561
|
-
},
|
17562
17146
|
},
|
17563
17147
|
{
|
17564
17148
|
title: t("programme:investor"),
|
@@ -17642,11 +17226,7 @@ var InvestmentManagementComponent = function (props) {
|
|
17642
17226
|
React.createElement("div", { className: "title-bar" },
|
17643
17227
|
React.createElement("div", { className: "body-title" }, t("programme:investmentTitle")),
|
17644
17228
|
React.createElement("div", { className: "body-sub-title" }, t("programme:investmentDesc"))),
|
17645
|
-
React.createElement("div", { className: "actions" }, enableAddOwnership &&
|
17646
|
-
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == exports.CompanyRole.MINISTRY ||
|
17647
|
-
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == exports.CompanyRole.GOVERNMENT ||
|
17648
|
-
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == exports.CompanyRole.PROGRAMME_DEVELOPER) &&
|
17649
|
-
userInfoState.userRole != exports.Role.ViewOnly && (React.createElement("div", { className: "action-bar" },
|
17229
|
+
React.createElement("div", { className: "actions" }, enableAddOwnership && (React.createElement("div", { className: "action-bar" },
|
17650
17230
|
React.createElement(antd.Button, { type: "primary", size: "large", block: true, icon: React.createElement(icons.PlusOutlined, null), onClick: onClickAddOwnership }, t("programme:addOwnership")))))),
|
17651
17231
|
React.createElement("div", { className: "content-card" },
|
17652
17232
|
React.createElement(antd.Row, null,
|
@@ -17693,7 +17273,7 @@ var InvestmentManagementComponent = function (props) {
|
|
17693
17273
|
return handleTableChange(val, sorter);
|
17694
17274
|
}, locale: {
|
17695
17275
|
emptyText: (React.createElement(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE, description: tableData.length === 0
|
17696
|
-
? t("
|
17276
|
+
? t("creditTransfer:noTransfer")
|
17697
17277
|
: null })),
|
17698
17278
|
} }))))),
|
17699
17279
|
popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
|
@@ -30667,7 +30247,7 @@ var TimelineBody = function (props) {
|
|
30667
30247
|
React.createElement("div", { className: "remark-body" }, remark)))));
|
30668
30248
|
};
|
30669
30249
|
|
30670
|
-
var css_248z$2 = ".emission-tab-container .ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.emission-tab-container .anticon-lock {\n margin-right: 0 !important; }\n\n.empty-emission-container {\n padding-top: 5%;\n padding-bottom: 5%; }\n\n.emission-tab-container .add-emission {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .emission-tab-container .add-emission .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .emission-tab-container .add-emission .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .emission-tab-container .add-emission .add-new-year-picker-col {\n padding-left: 5%; }\n .emission-tab-container .add-emission .ant-picker {\n border-radius: 4px !important;\n height: 40px !important;\n width: 80%; }\n .emission-tab-container .add-emission .ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height:
|
30250
|
+
var css_248z$2 = ".emission-tab-container .ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.emission-tab-container .anticon-lock {\n margin-right: 0 !important; }\n\n.empty-emission-container {\n padding-top: 5%;\n padding-bottom: 5%; }\n\n.emission-tab-container .add-emission {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .emission-tab-container .add-emission .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .emission-tab-container .add-emission .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .emission-tab-container .add-emission .add-new-year-picker-col {\n padding-left: 5%; }\n .emission-tab-container .add-emission .ant-picker {\n border-radius: 4px !important;\n height: 40px !important;\n width: 80%; }\n .emission-tab-container .add-emission .ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 40px; }\n .emission-tab-container .add-emission .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n .emission-tab-container .add-emission .ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n .emission-tab-container .add-emission .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .emission-tab-container .add-emission .add-new-upload-file-name-input input {\n height: 40px;\n color: #16b1ff;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .add-new-upload-file-inner-col button {\n height: 40px;\n font-size: 12px;\n width: 120px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .view-download-file-name-input input {\n height: 40px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .view-download-file-inner-col button {\n height: 40px;\n font-size: 12px;\n font-weight: 400;\n width: 135px;\n margin-left: 5px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .emission-tab-container .add-emission .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 18px;\n font-weight: 700;\n color: #28282899; }\n .emission-tab-container .add-emission .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .emission-tab-container .add-emission .total-emission-row span {\n font-size: 18px;\n font-weight: 700;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .emission-tab-container .add-emission .sub-panel-heading .panel-header-col {\n font-size: 14px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 32px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon {\n margin-top: 3px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon svg {\n font-size: 16px;\n color: #16b1ff; }\n .emission-tab-container .add-emission .ant-collapse {\n margin-left: 10px; }\n .emission-tab-container .add-emission .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .emission-tab-container .add-emission .panel-content-row .panel-content-title {\n font-size: 14px;\n font-weight: 400;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-content-input-box-row {\n margin-top: 14px; }\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n height: 40px;\n margin-left: 17%; }\n .emission-tab-container .add-emission .total-co2-land-input-box-row .ant-input-number {\n margin-left: 14% !important; }\n .emission-tab-container .add-emission .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 10px; }\n .emission-tab-container .add-emission .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .ant-input-number-input {\n text-align: center;\n height: 40px; }\n .emission-tab-container .add-emission .view-data-panel .panel-content-input-box-row {\n padding-bottom: 24px; }\n .emission-tab-container .add-emission .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .emission-tab-container .add-emission .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .emission-tab-container .add-emission .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .submit-btn {\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n margin-left: 2%; }\n .emission-tab-container .add-emission .total-co2-land-input-box-row .ant-input-number {\n margin-left: 0% !important; } }\n";
|
30671
30251
|
styleInject(css_248z$2);
|
30672
30252
|
|
30673
30253
|
var EmissionTypes = { co2: 'CO2', ch4: 'CH4', n2o: 'N2O', co2eq: 'CO2-eq' };
|
@@ -31257,13 +30837,13 @@ var GHGEmissionsComponent = function (props) {
|
|
31257
30837
|
var sum = 0;
|
31258
30838
|
for (var key in obj) {
|
31259
30839
|
if (key === gasType) {
|
31260
|
-
sum +=
|
30840
|
+
sum += (typeof obj[key] === "number") ? obj[key] : 0;
|
31261
30841
|
}
|
31262
30842
|
else if (typeof obj[key] === 'object' &&
|
31263
30843
|
key !== 'totalCo2WithLand' &&
|
31264
30844
|
key !== 'totalCo2WithoutLand') {
|
31265
30845
|
var calculatedSum = calculateSumEmissionView(obj[key], gasType);
|
31266
|
-
sum +=
|
30846
|
+
sum += (typeof calculatedSum === "number") ? calculatedSum : 0;
|
31267
30847
|
}
|
31268
30848
|
}
|
31269
30849
|
return sum;
|
@@ -32202,6 +31782,7 @@ var GHGEmissionsComponent = function (props) {
|
|
32202
31782
|
setWasteCo2Eq(sum);
|
32203
31783
|
}
|
32204
31784
|
if (panelHeading === 'other') {
|
31785
|
+
console.log("INSIDE setOtherCo2Eq", formValues.other_indirectN2oEmissions_co2eq, formValues.other_other_co2eq);
|
32205
31786
|
var sum = (formValues.other_indirectN2oEmissions_co2eq || 0) + (formValues.other_other_co2eq || 0);
|
32206
31787
|
setOtherCo2Eq(sum);
|
32207
31788
|
}
|
@@ -32335,13 +31916,13 @@ var GHGEmissionsComponent = function (props) {
|
|
32335
31916
|
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2'))) },
|
32336
31917
|
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2')))))),
|
32337
31918
|
React.createElement(antd.Col, { xl: 6 },
|
32338
|
-
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, '
|
31919
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'ch4'))) },
|
32339
31920
|
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'ch4')))))),
|
32340
31921
|
React.createElement(antd.Col, { xl: 6 },
|
32341
|
-
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, '
|
31922
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'n2o'))) },
|
32342
31923
|
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'n2o')))))),
|
32343
31924
|
React.createElement(antd.Col, { xl: 6 },
|
32344
|
-
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, '
|
31925
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2eq'))) },
|
32345
31926
|
React.createElement("div", { className: "co2eq-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2eq'))))))))));
|
32346
31927
|
};
|
32347
31928
|
var renderPanelContent = function (panelHeading, item, index) { return (React.createElement(antd.Row, { gutter: 16, key: index, className: "panel-content-row" },
|
@@ -32982,7 +32563,7 @@ var GHGEmissionsComponent = function (props) {
|
|
32982
32563
|
React.createElement(DiscardChangesConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: resetForm, onActionCanceled: onResetFormCanceled, openModal: openResetFormModal, errorMsg: errorMsg, loading: loading })));
|
32983
32564
|
};
|
32984
32565
|
|
32985
|
-
var css_248z$1 = ".projection-tab-container .ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.projection-tab-container .anticon-lock {\n margin-right: 0 !important; }\n\n.projection-tab-container .add-projection {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .projection-tab-container .add-projection .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .projection-tab-container .add-projection .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .projection-tab-container .add-projection .add-new-year-picker-col {\n padding-left: 5%; }\n .projection-tab-container .add-projection .ant-picker {\n border-radius: 4px !important;\n height: 40px !important;\n width: 80%; }\n .projection-tab-container .add-projection .ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height:
|
32566
|
+
var css_248z$1 = ".projection-tab-container .ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.projection-tab-container .anticon-lock {\n margin-right: 0 !important; }\n\n.projection-tab-container .add-projection {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .projection-tab-container .add-projection .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .projection-tab-container .add-projection .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .projection-tab-container .add-projection .add-new-year-picker-col {\n padding-left: 5%; }\n .projection-tab-container .add-projection .ant-picker {\n border-radius: 4px !important;\n height: 40px !important;\n width: 80%; }\n .projection-tab-container .add-projection .ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 40px; }\n .projection-tab-container .add-projection .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n .projection-tab-container .add-projection .ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n .projection-tab-container .add-projection .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .projection-tab-container .add-projection .add-new-upload-file-name-input input {\n height: 40px;\n color: #16b1ff;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .add-new-upload-file-inner-col button {\n height: 40px;\n font-size: 12px;\n width: 120px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .view-download-file-name-input input {\n height: 40px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .view-download-file-inner-col button {\n height: 40px;\n font-size: 12px;\n font-weight: 400;\n width: 135px;\n margin-left: 5px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .projection-tab-container .add-projection .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 16px;\n font-weight: 700;\n color: #28282899; }\n .projection-tab-container .add-projection .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .projection-tab-container .add-projection .total-emission-row span {\n font-size: 18px;\n font-weight: 700;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .projection-tab-container .add-projection .sub-panel-heading .panel-header-col {\n font-size: 14px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 32px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon {\n margin-top: 3px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon svg {\n font-size: 16px;\n color: #16b1ff; }\n .projection-tab-container .add-projection .ant-collapse {\n margin-left: 10px; }\n .projection-tab-container .add-projection .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .projection-tab-container .add-projection .panel-content-row .panel-content-title {\n font-size: 14px;\n font-weight: 400;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-content-input-box-row {\n margin-top: 14px; }\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n height: 40px;\n margin-left: 20%; }\n .projection-tab-container .add-projection .total-co2-land-input-box-row .ant-input-number {\n margin-left: 17% !important; }\n .projection-tab-container .add-projection .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 10px; }\n .projection-tab-container .add-projection .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .projection-tab-container .add-projection .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .ant-input-number-input {\n text-align: center;\n height: 40px; }\n .projection-tab-container .add-projection .view-data-panel .panel-content-input-box-row {\n padding-bottom: 24px; }\n .projection-tab-container .add-projection .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .projection-tab-container .add-projection .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .submit-btn {\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n margin-left: 10%; }\n .projection-tab-container .add-projection .total-co2-land-input-box-row .ant-input-number {\n margin-left: 7% !important; } }\n";
|
32986
32567
|
styleInject(css_248z$1);
|
32987
32568
|
|
32988
32569
|
var ProjectionTypes = {
|
@@ -33160,13 +32741,13 @@ var GHGProjectionsComponent = function (props) {
|
|
33160
32741
|
var sum = 0;
|
33161
32742
|
for (var key in obj) {
|
33162
32743
|
if (key === conditionType) {
|
33163
|
-
sum +=
|
32744
|
+
sum += (typeof obj[key] === "number") ? obj[key] : 0;
|
33164
32745
|
}
|
33165
32746
|
else if (typeof obj[key] === 'object' &&
|
33166
32747
|
key !== 'totalCo2WithLand' &&
|
33167
32748
|
key !== 'totalCo2WithoutLand') {
|
33168
32749
|
var calculatedSum = calculateSumEmissionView(obj[key], conditionType);
|
33169
|
-
sum +=
|
32750
|
+
sum += (typeof calculatedSum === "number") ? calculatedSum : 0;
|
33170
32751
|
}
|
33171
32752
|
}
|
33172
32753
|
return sum;
|