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