@undp/carbon-library 1.0.78 → 1.0.80
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +319 -199
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/InfoView/info.view.d.ts +3 -4
- package/dist/cjs/types/Components/index.d.ts +1 -0
- package/dist/cjs/types/Definitions/Definitions/ndcAction.definitions.d.ts +1 -0
- package/dist/cjs/types/Definitions/Enums/enablementTypes.enum.d.ts +10 -0
- package/dist/cjs/types/Definitions/Enums/instrument.enum.d.ts +1 -0
- package/dist/esm/index.js +320 -201
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/InfoView/info.view.d.ts +3 -4
- package/dist/esm/types/Components/index.d.ts +1 -0
- package/dist/esm/types/Definitions/Definitions/ndcAction.definitions.d.ts +1 -0
- package/dist/esm/types/Definitions/Enums/enablementTypes.enum.d.ts +10 -0
- package/dist/esm/types/Definitions/Enums/instrument.enum.d.ts +1 -0
- package/dist/index.d.ts +10 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -1021,6 +1021,7 @@ exports.Instrument = void 0;
|
|
1021
1021
|
Instrument["GRANT"] = "Grant";
|
1022
1022
|
Instrument["EQUITY"] = "Equity";
|
1023
1023
|
Instrument["GUARANTEE"] = "Guarantee";
|
1024
|
+
Instrument["INKIND"] = "In-Kind";
|
1024
1025
|
Instrument["OTHER"] = "Other";
|
1025
1026
|
})(exports.Instrument || (exports.Instrument = {}));
|
1026
1027
|
|
@@ -5808,13 +5809,13 @@ var ProgrammeManagementComponent = function (props) {
|
|
5808
5809
|
var css_248z$g = ".programme-view {\n padding: 0px 50px; }\n .programme-view .ant-steps-item-tail::after {\n background-color: #ffff !important;\n background-color: #ffff !important;\n border-left: 1px dashed #d9d9d9;\n border-style: dashed;\n border-width: 1px;\n border-color: #d9d9d9; }\n .programme-view .action-btns {\n justify-content: center !important; }\n .programme-view .action-btns button:first-child {\n margin-right: 15px;\n margin-left: 10px; }\n .programme-view .action-btns button:last-child {\n margin-right: 15px; }\n .programme-view .title-bar {\n display: flex;\n justify-content: space-between; }\n .programme-view .ant-steps-vertical > .ant-steps-item > .ant-steps-item-container > .ant-steps-item-tail {\n left: 13px; }\n .programme-view .apexcharts-legend-series {\n padding-bottom: 5px; }\n .programme-view .card-container {\n margin-bottom: 20px;\n width: 100%;\n border-radius: 10px; }\n .programme-view .card-container .action-btns {\n margin-top: 25px;\n margin-bottom: -15px;\n justify-content: end; }\n .programme-view .programme-logo {\n width: 100px;\n height: 100px;\n border-radius: 100%;\n background-color: rgba(254, 241, 173, 0.5);\n font-size: 50px;\n color: #ffa070;\n text-align: center;\n padding: 12px;\n margin: auto; }\n .programme-view .centered-card {\n display: flex;\n justify-content: center;\n text-align: center;\n flex-direction: column;\n width: 100%; }\n .programme-view .separator {\n border-bottom: 1px solid #f0f0f0;\n width: 100%; }\n .programme-view .cert-info {\n text-align: center;\n padding: 20px 15px 20px 15px; }\n .programme-view .cert-info img {\n height: 60px; }\n .programme-view .cert-content {\n display: flex;\n flex-wrap: wrap; }\n .programme-view .cert-logo {\n width: 60px;\n height: 60px;\n border-radius: 100%;\n background-color: rgba(254, 241, 173, 0.5);\n font-size: 30px;\n color: #ffa070;\n text-align: center;\n padding: 6px;\n margin: 0 auto; }\n .programme-view .cert-name {\n color: rgba(58, 53, 65, 0.8);\n margin-top: 14px;\n font-weight: 600; }\n .programme-view .cert-date {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 400;\n font-size: 0.8rem; }\n .programme-view .company-info {\n padding: 25px 10px 30px 10px;\n min-width: 200px; }\n .programme-view .company-info img {\n height: 90px; }\n .programme-view .company-info .progress-bar {\n width: calc(max(200px, 60%));\n font-size: 0.8rem;\n color: rgba(58, 53, 65, 0.6);\n margin: 15px auto 0px; }\n .programme-view .company-info .ant-progress-success-bg,\n .programme-view .company-info .ant-progress-bg {\n background-color: #16b1ff; }\n .programme-view .programme-name {\n color: rgba(58, 53, 65, 0.8);\n margin-top: 14px;\n font-weight: 600; }\n .programme-view .file-name {\n cursor: pointer;\n color: rgba(58, 53, 65, 0.6); }\n .programme-view .file-name:hover {\n color: #16b1ff; }\n\n.info-view .content {\n padding: 15px 0px;\n margin-left: -8px; }\n\n.info-view .map-content {\n padding: 15px 0px; }\n\n.info-view .ant-steps-item-subtitle {\n display: block;\n margin-left: 0px;\n font-size: 0.8rem;\n color: rgba(58, 53, 65, 0.3);\n margin-top: -12px;\n font-weight: 500; }\n\n.info-view .ant-steps-item-process\n> .ant-steps-item-container\n> .ant-steps-item-content\n> .ant-steps-item-title {\n color: rgba(58, 53, 65, 0.8);\n font-size: 0.8rem;\n font-weight: 600; }\n\n.info-view .ant-steps-item-process\n> .ant-steps-item-container\n> .ant-steps-item-content\n> .ant-steps-item-description {\n font-size: 0.8rem;\n font-weight: 500;\n color: rgba(58, 53, 65, 0.6); }\n\n.info-view .step-icon {\n border-radius: 100%;\n margin-right: 10px;\n padding: 0.5rem 0.5rem 0.3rem 0.5rem;\n font-size: 0.8rem; }\n\n.info-view .created-step {\n color: #ff8f56;\n background-color: rgba(254, 241, 173, 0.5);\n font-size: 1rem;\n padding: 0.4rem 0.4rem 0.2rem 0.4rem; }\n\n.info-view .auth-step {\n color: #16b1ff;\n background-color: rgba(185, 226, 244, 0.5); }\n\n.info-view .reject-step {\n color: #ff9900;\n background-color: rgba(254, 179, 159, 0.3); }\n\n.info-view .issue-step {\n color: #4f9d83;\n background-color: rgba(128, 255, 0, 0.12); }\n\n.info-view .cert-step {\n color: #4f9d83;\n background-color: rgba(128, 255, 0, 0.12); }\n\n.info-view .revoke-step {\n color: rgba(255, 0, 199, 0.56);\n background-color: rgba(255, 159, 222, 0.5); }\n\n.info-view .transfer-step {\n background-color: rgba(215, 223, 226, 0.5);\n color: #949599; }\n\n.info-view .retire-step {\n color: #ff4d4f;\n background-color: rgba(255, 211, 211, 0.5);\n padding: 0.5rem 0.5rem 0.3rem 0.5rem; }\n\n.info-view .freeze-step {\n color: #976ed7;\n background-color: rgba(183, 164, 254, 0.3); }\n\n.info-view .region-list {\n padding-top: 20px; }\n\n.loc-tag {\n padding: 10px 20px 0px 0px;\n color: rgba(58, 53, 65, 0.6); }\n\n.loc-icon {\n margin-right: 5px;\n font-size: 1rem; }\n\n.loc-text {\n line-height: 1.2rem;\n vertical-align: top; }\n\n.apexcharts-datalabels-group {\n font-family: \"Inter\" !important;\n color: rgba(58, 53, 65, 0.8) !important; }\n\n.remark {\n font-size: 0.8rem; }\n\n.footer-btn {\n margin: 39px 20px 0px 20px;\n display: flex;\n justify-content: center;\n column-gap: 30px; }\n .footer-btn button {\n text-transform: uppercase; }\n\n.retire-form .ant-radio-group {\n text-align: left; }\n\n.only-head .title {\n margin-bottom: 0px !important; }\n .only-head .title .link {\n font-size: 1.2rem;\n line-height: 0.5rem;\n cursor: pointer;\n color: rgba(58, 53, 65, 0.8); }\n\n.mapboxgl-popup-tip {\n border-bottom-color: #16b1ff !important;\n border-top-color: #16b1ff !important; }\n\n.mapboxgl-popup-content {\n background-color: #16b1ff;\n color: white;\n font-family: \"Inter\";\n font-weight: 500;\n min-width: 60px;\n height: 30px;\n padding: 5px 20px; }\n";
|
5809
5810
|
styleInject(css_248z$g);
|
5810
5811
|
|
5812
|
+
var css_248z$f = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-value .row {\n display: flex;\n width: 40%;\n align-items: center;\n justify-content: space-between; }\n .info-view .field-value .row .key {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n .info-view .field-value .row .data {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
|
5813
|
+
styleInject(css_248z$f);
|
5814
|
+
|
5811
5815
|
var dateTimeFormat = 'dd LLLL yyyy @ HH:mm';
|
5812
5816
|
var dateFormat = 'dd LLLL yyyy';
|
5813
5817
|
var creditUnit = 'ITMO';
|
5814
5818
|
|
5815
|
-
var css_248z$f = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
|
5816
|
-
styleInject(css_248z$f);
|
5817
|
-
|
5818
5819
|
var InfoView = function (props) {
|
5819
5820
|
var title = props.title, data = props.data, icon = props.icon, hiddenColumns = props.hiddenColumns;
|
5820
5821
|
return (React.createElement("div", { className: "info-view" },
|
@@ -5822,14 +5823,20 @@ var InfoView = function (props) {
|
|
5822
5823
|
React.createElement("span", { className: "title-icon" }, icon),
|
5823
5824
|
React.createElement("span", { className: "title-text" }, title)),
|
5824
5825
|
React.createElement("div", null, Object.keys(data).map(function (k) {
|
5826
|
+
var _a;
|
5825
5827
|
if (hiddenColumns.indexOf(k) < 0) {
|
5826
5828
|
return (React.createElement(antd.Row, { className: "field", key: k },
|
5827
5829
|
React.createElement(antd.Col, { span: 12, className: "field-key" }, k),
|
5828
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, data[k]
|
5830
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, k.includes("GHG Emissions") ? (((_a = Object.values(data[k])) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (Object.entries(data[k]).map(function (_a) {
|
5831
|
+
var key = _a[0]; _a[1];
|
5832
|
+
return (React.createElement("div", { className: "row" },
|
5833
|
+
React.createElement("div", { className: "key" }, key),
|
5834
|
+
React.createElement("div", { className: "data" }, data[k][key])));
|
5835
|
+
})) : (React.createElement("div", null, "-"))) : (React.createElement("span", null, data[k] instanceof luxon.DateTime
|
5829
5836
|
? data[k].toFormat(dateFormat)
|
5830
|
-
: data[k] ===
|
5831
|
-
?
|
5832
|
-
: data[k])));
|
5837
|
+
: data[k] === "" || !data[k] || data[k] === "NaN"
|
5838
|
+
? "-"
|
5839
|
+
: data[k])))));
|
5833
5840
|
}
|
5834
5841
|
else {
|
5835
5842
|
return null;
|
@@ -13555,17 +13562,17 @@ var ProgrammeCreationComponent = function (props) {
|
|
13555
13562
|
var _j = React.useState(0), current = _j[0], setCurrent = _j[1];
|
13556
13563
|
var _k = React.useState(false), isUpdate = _k[0]; _k[1];
|
13557
13564
|
var _l = React.useState(), includedInNDC = _l[0], setIncludedInNDC = _l[1];
|
13558
|
-
var _m = React.useState(),
|
13559
|
-
var _o = React.useState([]),
|
13560
|
-
var _p = React.useState(
|
13561
|
-
var _q = React.useState(
|
13562
|
-
var _r = React.useState(
|
13563
|
-
var _s = React.useState()
|
13564
|
-
var _t = React.useState(),
|
13565
|
-
var _u = React.useState(
|
13566
|
-
var _v = React.useState(
|
13567
|
-
var _w = React.useState([])
|
13568
|
-
var _x = React.useState([]),
|
13565
|
+
var _m = React.useState([]), countries = _m[0], setCountries = _m[1];
|
13566
|
+
var _o = React.useState([]), organisationsList = _o[0], setOrganisationList = _o[1];
|
13567
|
+
var _p = React.useState(""), userOrgTaxId = _p[0], setUserOrgTaxId = _p[1];
|
13568
|
+
var _q = React.useState([]), regionsList = _q[0], setRegionsList = _q[1];
|
13569
|
+
var _r = React.useState(); _r[0]; var setProgrammeDetailsObj = _r[1];
|
13570
|
+
var _s = React.useState(), selectedOrgs = _s[0], setSelectedOrgs = _s[1];
|
13571
|
+
var _t = React.useState(false), ownershipPercentageValidation = _t[0], setOwnershipPercentageValidation = _t[1];
|
13572
|
+
var _u = React.useState(""), selectedSector = _u[0], setSelectedSector = _u[1];
|
13573
|
+
var _v = React.useState([]); _v[0]; var setMinistrySectoralScope = _v[1];
|
13574
|
+
var _w = React.useState([]), availableSecoralScope = _w[0], setAvailableSectoralScope = _w[1];
|
13575
|
+
var _x = React.useState([]), selectableSectoralScope = _x[0], setSelectableSectoralScope = _x[1];
|
13569
13576
|
var _y = React.useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
|
13570
13577
|
var initialOrganisationOwnershipValues = [
|
13571
13578
|
{
|
@@ -13851,12 +13858,11 @@ var ProgrammeCreationComponent = function (props) {
|
|
13851
13858
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY
|
13852
13859
|
? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds,
|
13853
13860
|
proponentPercentage: proponentPercentages,
|
13854
|
-
programmeProperties: __assign(__assign(
|
13861
|
+
programmeProperties: __assign(__assign({ buyerCountryEligibility: values === null || values === void 0 ? void 0 : values.buyerCountryEligibility, geographicalLocation: values === null || values === void 0 ? void 0 : values.geographicalLocation, greenHouseGasses: values === null || values === void 0 ? void 0 : values.greenHouseGasses }, ((values === null || values === void 0 ? void 0 : values.ndcScope) !== undefined &&
|
13855
13862
|
(values === null || values === void 0 ? void 0 : values.ndcScope) !== null && {
|
13856
13863
|
ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
|
13857
13864
|
})), (includedInNDC !== undefined &&
|
13858
|
-
includedInNDC !== null && { includedInNdc: includedInNDC })),
|
13859
|
-
includedInNAP !== null && { includedInNap: includedInNAP })),
|
13865
|
+
includedInNDC !== null && { includedInNdc: includedInNDC })),
|
13860
13866
|
};
|
13861
13867
|
if ((logoUrls === null || logoUrls === void 0 ? void 0 : logoUrls.length) > 0) {
|
13862
13868
|
programmeDetails.designDocument = logoUrls[1];
|
@@ -13966,14 +13972,6 @@ var ProgrammeCreationComponent = function (props) {
|
|
13966
13972
|
setIncludedInNDC(value);
|
13967
13973
|
}
|
13968
13974
|
};
|
13969
|
-
var onClickIncludedInNAPScope = function (value) {
|
13970
|
-
if (value === includedInNAP) {
|
13971
|
-
setIncludedInNAP(undefined);
|
13972
|
-
}
|
13973
|
-
else {
|
13974
|
-
setIncludedInNAP(value);
|
13975
|
-
}
|
13976
|
-
};
|
13977
13975
|
var onChangeGeoLocation = function (values) {
|
13978
13976
|
if (values.includes("National")) {
|
13979
13977
|
var buyerCountryValues = regionsList;
|
@@ -13981,15 +13979,6 @@ var ProgrammeCreationComponent = function (props) {
|
|
13981
13979
|
formOne.setFieldValue("geographicalLocation", __spreadArray([], newBuyerValues, true));
|
13982
13980
|
}
|
13983
13981
|
};
|
13984
|
-
var onInCludedNAPChange = function (event) {
|
13985
|
-
var _a, _b;
|
13986
|
-
if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
|
13987
|
-
setIncludedInNAP(true);
|
13988
|
-
}
|
13989
|
-
else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
|
13990
|
-
setIncludedInNAP(false);
|
13991
|
-
}
|
13992
|
-
};
|
13993
13982
|
var onInCludedNDCChange = function (event) {
|
13994
13983
|
var _a, _b;
|
13995
13984
|
if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNDC") {
|
@@ -14019,8 +14008,29 @@ var ProgrammeCreationComponent = function (props) {
|
|
14019
14008
|
setSelectedSector(String(val));
|
14020
14009
|
};
|
14021
14010
|
React.useEffect(function () {
|
14022
|
-
|
14023
|
-
|
14011
|
+
if (selectedSector !== "" &&
|
14012
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
|
14013
|
+
formOne.setFieldValue("sectoralScope", "");
|
14014
|
+
if (selectedSector === String(exports.Sector.Health) ||
|
14015
|
+
selectedSector === String(exports.Sector.Education) ||
|
14016
|
+
selectedSector === String(exports.Sector.Hospitality)) {
|
14017
|
+
setSelectableSectoralScope(availableSecoralScope);
|
14018
|
+
}
|
14019
|
+
else {
|
14020
|
+
var sScopes_1 = [];
|
14021
|
+
availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (sectoralScope) {
|
14022
|
+
var _a;
|
14023
|
+
if ((_a = sectoralScopes[selectedSector]) === null || _a === void 0 ? void 0 : _a.includes(sectoralScope === null || sectoralScope === void 0 ? void 0 : sectoralScope.key)) {
|
14024
|
+
sScopes_1.push(sectoralScope);
|
14025
|
+
}
|
14026
|
+
});
|
14027
|
+
setSelectableSectoralScope(__spreadArray([], sScopes_1, true));
|
14028
|
+
}
|
14029
|
+
}
|
14030
|
+
else if (selectedSector !== "") {
|
14031
|
+
formOne.setFieldValue("sectoralScope", "");
|
14032
|
+
}
|
14033
|
+
}, [selectedSector]);
|
14024
14034
|
return (React.createElement("div", { className: "add-programme-main-container" },
|
14025
14035
|
React.createElement("div", { className: "title-container" },
|
14026
14036
|
React.createElement("div", { className: "main" }, isUpdate
|
@@ -14262,7 +14272,7 @@ var ProgrammeCreationComponent = function (props) {
|
|
14262
14272
|
] },
|
14263
14273
|
React.createElement(antd.Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
14264
14274
|
exports.CompanyRole.MINISTRY
|
14265
|
-
?
|
14275
|
+
? selectableSectoralScope === null || selectableSectoralScope === void 0 ? void 0 : selectableSectoralScope.map(function (item) { return (React.createElement(antd.Select.Option, { key: item.value, value: item.value }, item.key)); })
|
14266
14276
|
: selectedSectoralScopes === null || selectedSectoralScopes === void 0 ? void 0 : selectedSectoralScopes.map(function (val) {
|
14267
14277
|
if (val in exports.SectoralScope) {
|
14268
14278
|
var key = val;
|
@@ -14334,24 +14344,6 @@ var ProgrammeCreationComponent = function (props) {
|
|
14334
14344
|
React.createElement("div", { className: "yes-no-radio-container" },
|
14335
14345
|
React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
|
14336
14346
|
return onClickIncludedInNDCScope(false);
|
14337
|
-
} }, t("addProgramme:no"))))))),
|
14338
|
-
React.createElement(antd.Col, { md: 24, xl: 12, className: "in-nap-col" },
|
14339
|
-
React.createElement(antd.Row, { className: "in-nap-row" },
|
14340
|
-
React.createElement(antd.Col, { md: 16, lg: 18, xl: 18 },
|
14341
|
-
React.createElement("div", { className: "included-label" },
|
14342
|
-
React.createElement("div", null, t("addProgramme:inNAP")),
|
14343
|
-
React.createElement("div", { className: "info-container" },
|
14344
|
-
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNAPToolTip"), overlayClassName: "custom-tooltip" },
|
14345
|
-
React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
|
14346
|
-
React.createElement(antd.Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
|
14347
|
-
React.createElement(antd.Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
|
14348
|
-
React.createElement("div", { className: "yes-no-radio-container" },
|
14349
|
-
React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
|
14350
|
-
return onClickIncludedInNAPScope(true);
|
14351
|
-
} }, t("addProgramme:yes"))),
|
14352
|
-
React.createElement("div", { className: "yes-no-radio-container" },
|
14353
|
-
React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
|
14354
|
-
return onClickIncludedInNAPScope(false);
|
14355
14347
|
} }, t("addProgramme:no")))))))),
|
14356
14348
|
React.createElement("div", { className: "steps-actions" },
|
14357
14349
|
React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t("addProgramme:next"))))))),
|
@@ -15902,6 +15894,17 @@ var InvestmentCreationComponent = function (props) {
|
|
15902
15894
|
},
|
15903
15895
|
] },
|
15904
15896
|
React.createElement(antd.Input, { size: "large" })))))),
|
15897
|
+
instrument &&
|
15898
|
+
instrument.indexOf(exports.Instrument.INKIND) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15899
|
+
React.createElement(antd.Col, { xl: 12, md: 24 },
|
15900
|
+
React.createElement("div", { className: "details-part-two" },
|
15901
|
+
React.createElement(antd.Form.Item, { label: t("programme:description"), name: "description", rules: [
|
15902
|
+
{
|
15903
|
+
required: false,
|
15904
|
+
message: "",
|
15905
|
+
},
|
15906
|
+
] },
|
15907
|
+
React.createElement(antd.Input, { size: "large" })))))),
|
15905
15908
|
instrument &&
|
15906
15909
|
instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15907
15910
|
React.createElement(antd.Col, { xl: 12, md: 24 },
|
@@ -17057,28 +17060,51 @@ var NdcActionManagementComponent = function (props) {
|
|
17057
17060
|
} })))))));
|
17058
17061
|
};
|
17059
17062
|
|
17060
|
-
var css_248z$5 = ".ndc-action-details-container Input {\n height: 40px; }\n\n.ndc-action-details-container .ant-select-selection-item {\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-dropdown {\n font-family: \"Inter\";\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-selector {\n color: #949599 !important; }\n\n.ndc-action-details-container .label-heading {\n font-family:
|
17063
|
+
var css_248z$5 = ".ndc-action-details-container Input {\n height: 40px; }\n\n.ndc-action-details-container .in-nap-col {\n width: 100%; }\n\n.ndc-action-details-container .included-nap-col {\n width: 40%;\n display: flex; }\n .ndc-action-details-container .included-nap-col .in-nap-row {\n width: 100%;\n align-items: center; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-label {\n display: flex;\n flex-direction: row;\n width: fit-content;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n color: rgba(58, 53, 65, 0.5); }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-label .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 30px;\n align-items: center;\n justify-content: flex-end; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val {\n width: 100%; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-radio-container {\n width: 43%;\n text-align: center; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-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 border-radius: 4px; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .ant-radio-button-wrapper::before {\n background-color: transparent;\n border-radius: 4px; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n color: #8c8c8c; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .anticon {\n margin-right: 0.5rem; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-radio {\n width: 100%; }\n .ndc-action-details-container .included-nap-col .in-nap-row .included-val .yes-no-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.ndc-action-details-container .row-custom-1 {\n display: flex;\n margin-bottom: 2px; }\n\n.ndc-action-details-container .row-custom {\n display: flex;\n width: 200px;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem; }\n .ndc-action-details-container .row-custom .ant-input-number {\n height: 35px;\n display: flex;\n align-items: center;\n justify-content: center; }\n\n.ndc-action-details-container .enablement-type-item {\n display: flex;\n width: 100%; }\n .ndc-action-details-container .enablement-type-item .ant-form-item-row {\n display: flex;\n width: 100%; }\n .ndc-action-details-container .enablement-type-item .ant-checkbox-wrapper {\n color: rgba(58, 53, 65, 0.5);\n font-size: 14px; }\n .ndc-action-details-container .enablement-type-item .type-checkbox-grp {\n display: flex;\n width: 100%; }\n .ndc-action-details-container .enablement-type-item .type-checkbox-grp .grp-row {\n display: flex;\n width: 100%; }\n\n.ndc-action-details-container .ant-select-selection-item {\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-dropdown {\n font-family: \"Inter\";\n color: #949599 !important; }\n\n.ndc-action-details-container .ant-select-selector {\n color: #949599 !important; }\n\n.ndc-action-details-container .label-heading {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 14px;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.5);\n margin-bottom: 5px; }\n\n.ndc-action-details-container .steps-actions {\n display: flex;\n flex-direction: row-reverse; }\n .ndc-action-details-container .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n\n.ndc-action-details-container .upload-doc {\n height: 40px !important;\n margin-right: 240px; }\n\n.ndc-action-details-container .ant-upload-list-item {\n border-radius: 5px !important;\n height: 40px !important; }\n\n.ndc-action-details-container .design-upload-section {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: start;\n width: 100%; }\n .ndc-action-details-container .design-upload-section .icon-color {\n color: #16b1ff !important; }\n .ndc-action-details-container .design-upload-section .ant-upload {\n width: 20%; }\n .ndc-action-details-container .design-upload-section .ant-upload-list {\n align-items: center;\n justify-content: center;\n width: 75%; }\n .ndc-action-details-container .design-upload-section .ant-upload-list .ant-upload-list-item {\n margin-top: 0; }\n";
|
17061
17064
|
styleInject(css_248z$5);
|
17062
17065
|
|
17066
|
+
var EnablementTypes;
|
17067
|
+
(function (EnablementTypes) {
|
17068
|
+
EnablementTypes["CapacityBuilding"] = "Capacity Building";
|
17069
|
+
EnablementTypes["InstitutionalArrangement"] = "Institutional Arrangement";
|
17070
|
+
EnablementTypes["StakeholderFramework"] = "Stakeholder Framework";
|
17071
|
+
EnablementTypes["TechnologyTransfer"] = "Technology Transfer";
|
17072
|
+
})(EnablementTypes || (EnablementTypes = {}));
|
17073
|
+
var enablementTypesAndValues = [
|
17074
|
+
{ type: EnablementTypes.CapacityBuilding.valueOf(), col: 4 },
|
17075
|
+
{
|
17076
|
+
type: EnablementTypes.InstitutionalArrangement.valueOf(),
|
17077
|
+
col: 5,
|
17078
|
+
},
|
17079
|
+
{ type: EnablementTypes.StakeholderFramework.valueOf(), col: 5 },
|
17080
|
+
{ type: EnablementTypes.TechnologyTransfer.valueOf(), col: 4 },
|
17081
|
+
];
|
17082
|
+
|
17063
17083
|
var NdcActionDetails = function (props) {
|
17064
17084
|
var isBackBtnVisible = props.isBackBtnVisible, onFormSubmit = props.onFormSubmit, ndcActionDetails = props.ndcActionDetails, translator = props.translator, programmeDetails = props.programmeDetails, onClickedBackBtn = props.onClickedBackBtn;
|
17085
|
+
translator.setDefaultNamespace("ndcAction");
|
17086
|
+
var t = translator.t;
|
17065
17087
|
var _a = React.useState(), ndcActionType = _a[0], setNdcActionType = _a[1];
|
17066
17088
|
var _b = React.useState(), mitigationType = _b[0], setmitigationType = _b[1];
|
17067
17089
|
var _c = React.useState(""), sector = _c[0], setSector = _c[1];
|
17068
17090
|
var _d = React.useState(ndcActionTypeList), ndcActionTypeListFiltered = _d[0]; _d[1];
|
17091
|
+
var _e = React.useState([]), checkedOptionsGhgReduced = _e[0], setCheckedOptionsGhgReduced = _e[1];
|
17092
|
+
var _f = React.useState([]), checkedOptionsGhgAvoided = _f[0], setCheckedOptionsGhgAvoided = _f[1];
|
17093
|
+
var _g = React.useState(), inputNumberValueGhgAvoidedGas = _g[0], setInputNumberValueGhgAvoidedGas = _g[1];
|
17094
|
+
var _h = React.useState(), inputNumberValueGhgReducedGas = _h[0], setInputNumberValueGhgReducedGas = _h[1];
|
17095
|
+
var _j = React.useState(), includedInNAP = _j[0], setIncludedInNAP = _j[1];
|
17069
17096
|
var form = antd.Form.useForm()[0];
|
17070
|
-
translator.setDefaultNamespace('ndcAction');
|
17071
|
-
var t = translator.t;
|
17072
17097
|
var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
|
17073
17098
|
? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
|
17074
17099
|
: 5000000;
|
17100
|
+
var ghgEmissionsGas = ["CO2", "CH4", "N20", "HFCs", "PFCs", "SF6"];
|
17075
17101
|
React.useEffect(function () {
|
17076
17102
|
if (programmeDetails) {
|
17077
17103
|
setSector(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector);
|
17078
17104
|
}
|
17079
17105
|
}, [programmeDetails]);
|
17080
17106
|
React.useEffect(function () {
|
17081
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
17107
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
17082
17108
|
if (ndcActionDetails) {
|
17083
17109
|
if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) {
|
17084
17110
|
setNdcActionType(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action);
|
@@ -17086,6 +17112,15 @@ var NdcActionDetails = function (props) {
|
|
17086
17112
|
if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) {
|
17087
17113
|
setmitigationType(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation);
|
17088
17114
|
}
|
17115
|
+
if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.includedInNAP) {
|
17116
|
+
setIncludedInNAP(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.includedInNAP);
|
17117
|
+
}
|
17118
|
+
if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgAvoidedGas) {
|
17119
|
+
setInputNumberValueGhgAvoidedGas(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgAvoidedGas);
|
17120
|
+
}
|
17121
|
+
if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgReducedGas) {
|
17122
|
+
setInputNumberValueGhgReducedGas(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.inputNumberValueGhgReducedGas);
|
17123
|
+
}
|
17089
17124
|
form.setFieldsValue({
|
17090
17125
|
ndcActionType: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action,
|
17091
17126
|
mitigationType: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation,
|
@@ -17098,8 +17133,9 @@ var NdcActionDetails = function (props) {
|
|
17098
17133
|
nationalPlanObjectives: (_g = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _g === void 0 ? void 0 : _g.nationalPlanObjectives,
|
17099
17134
|
nationalPlanCoverage: (_h = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _h === void 0 ? void 0 : _h.nationalPlanCoverage,
|
17100
17135
|
EnablementTitle: (_j = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementProperties) === null || _j === void 0 ? void 0 : _j.title,
|
17136
|
+
EnablementType: (_k = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementProperties) === null || _k === void 0 ? void 0 : _k.type,
|
17101
17137
|
EnablementReport: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.enablementReportData,
|
17102
|
-
userEstimatedCredits: (
|
17138
|
+
userEstimatedCredits: (_l = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.ndcFinancing) === null || _l === void 0 ? void 0 : _l.userEstimatedCredits,
|
17103
17139
|
methodologyEstimatedCredits: 0,
|
17104
17140
|
});
|
17105
17141
|
}
|
@@ -17213,9 +17249,9 @@ var NdcActionDetails = function (props) {
|
|
17213
17249
|
case 0:
|
17214
17250
|
ndcActionDetailObj = {};
|
17215
17251
|
ndcActionDetailObj.action = ndcActionFormvalues.ndcActionType;
|
17216
|
-
ndcActionDetailObj.methodology = t("ndcAction:goldStandard");
|
17217
17252
|
if (ndcActionFormvalues.ndcActionType === exports.NdcActionTypes.Mitigation ||
|
17218
17253
|
ndcActionFormvalues.ndcActionType === exports.NdcActionTypes.CrossCutting) {
|
17254
|
+
ndcActionDetailObj.methodology = t("ndcAction:goldStandard");
|
17219
17255
|
ndcActionDetailObj.typeOfMitigation = ndcActionFormvalues.mitigationType;
|
17220
17256
|
if (ndcActionFormvalues.mitigationType === exports.MitigationTypes.AGRICULTURE) {
|
17221
17257
|
ndcActionDetailObj.agricultureProperties = {
|
@@ -17263,11 +17299,29 @@ var NdcActionDetails = function (props) {
|
|
17263
17299
|
nationalPlanObjectives: ndcActionFormvalues.nationalPlanObjectives,
|
17264
17300
|
nationalPlanCoverage: ndcActionFormvalues.nationalPlanCoverage,
|
17265
17301
|
};
|
17302
|
+
if (includedInNAP === true || includedInNAP === false) {
|
17303
|
+
ndcActionDetailObj.adaptationProperties.includedInNAP = includedInNAP;
|
17304
|
+
}
|
17305
|
+
if (inputNumberValueGhgAvoidedGas !== null ||
|
17306
|
+
inputNumberValueGhgAvoidedGas !== undefined) {
|
17307
|
+
ndcActionDetailObj.adaptationProperties.ghgEmissionsAvoided =
|
17308
|
+
inputNumberValueGhgAvoidedGas;
|
17309
|
+
}
|
17310
|
+
if (inputNumberValueGhgReducedGas !== null ||
|
17311
|
+
inputNumberValueGhgReducedGas !== undefined) {
|
17312
|
+
ndcActionDetailObj.adaptationProperties.ghgEmissionsReduced =
|
17313
|
+
inputNumberValueGhgReducedGas;
|
17314
|
+
}
|
17266
17315
|
}
|
17267
17316
|
if (!(ndcActionFormvalues.ndcActionType === exports.NdcActionTypes.Enablement)) return [3 /*break*/, 3];
|
17268
17317
|
ndcActionDetailObj.enablementProperties = {
|
17269
17318
|
title: ndcActionFormvalues.EnablementTitle,
|
17270
17319
|
};
|
17320
|
+
if (ndcActionFormvalues.EnablementType &&
|
17321
|
+
ndcActionFormvalues.EnablementType.length > 0) {
|
17322
|
+
ndcActionDetailObj.enablementProperties.type =
|
17323
|
+
ndcActionFormvalues.EnablementType;
|
17324
|
+
}
|
17271
17325
|
if (!(ndcActionFormvalues.EnablementReport &&
|
17272
17326
|
ndcActionFormvalues.EnablementReport.length > 0)) return [3 /*break*/, 2];
|
17273
17327
|
return [4 /*yield*/, getBase64((_a = ndcActionFormvalues.EnablementReport[0]) === null || _a === void 0 ? void 0 : _a.originFileObj)];
|
@@ -17299,6 +17353,23 @@ var NdcActionDetails = function (props) {
|
|
17299
17353
|
}
|
17300
17354
|
return e === null || e === void 0 ? void 0 : e.fileList;
|
17301
17355
|
};
|
17356
|
+
var onClickIncludedInNAPScope = function (value) {
|
17357
|
+
if (value === includedInNAP) {
|
17358
|
+
setIncludedInNAP(undefined);
|
17359
|
+
}
|
17360
|
+
else {
|
17361
|
+
setIncludedInNAP(value);
|
17362
|
+
}
|
17363
|
+
};
|
17364
|
+
var onInCludedNAPChange = function (event) {
|
17365
|
+
var _a, _b;
|
17366
|
+
if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
|
17367
|
+
setIncludedInNAP(true);
|
17368
|
+
}
|
17369
|
+
else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
|
17370
|
+
setIncludedInNAP(false);
|
17371
|
+
}
|
17372
|
+
};
|
17302
17373
|
return (React.createElement("div", { className: "ndc-action-details-container" },
|
17303
17374
|
React.createElement(antd.Form, { name: "ndcActionDetails", layout: "vertical", requiredMark: true, onFinish: onNdcActionDetailsFormSubmit, form: form },
|
17304
17375
|
React.createElement(antd.Row, { justify: "start", align: "middle" },
|
@@ -17312,40 +17383,42 @@ var NdcActionDetails = function (props) {
|
|
17312
17383
|
React.createElement(antd.Select, { size: "large", onChange: handleNdcActionChange, style: {
|
17313
17384
|
width: "249px",
|
17314
17385
|
borderRadius: "4px",
|
17315
|
-
}, dropdownStyle: { color: "red" }, options: ndcActionTypeListFiltered }))),
|
17316
|
-
React.createElement(antd.Col, { style: { marginLeft: "38px" } },
|
17317
|
-
React.createElement(antd.Form.Item, { label: t("ndcAction:methodology"), name: "methodology" },
|
17318
|
-
React.createElement("span", { style: {
|
17319
|
-
display: "inline-block",
|
17320
|
-
border: "1px solid #D9D9D9",
|
17321
|
-
width: "154px",
|
17322
|
-
height: "38px",
|
17323
|
-
borderRadius: "4px",
|
17324
|
-
padding: "7px 8px",
|
17325
|
-
fontSize: "14px",
|
17326
|
-
backgroundColor: "#F0F0F0",
|
17327
|
-
color: "#8C8C8C",
|
17328
|
-
} },
|
17329
|
-
" ",
|
17330
|
-
t("ndcAction:goldStandard"))))),
|
17386
|
+
}, dropdownStyle: { color: "red" }, options: ndcActionTypeListFiltered })))),
|
17331
17387
|
ndcActionType === exports.NdcActionTypes.CrossCutting && (React.createElement(antd.Row, null,
|
17332
17388
|
React.createElement("label", { className: "label-heading" }, t("ndcAction:mitigation")))),
|
17333
17389
|
(ndcActionType === exports.NdcActionTypes.Mitigation ||
|
17334
|
-
ndcActionType === exports.NdcActionTypes.CrossCutting) && (React.createElement(
|
17335
|
-
React.createElement(antd.
|
17336
|
-
|
17337
|
-
|
17338
|
-
|
17339
|
-
|
17340
|
-
|
17341
|
-
|
17342
|
-
|
17343
|
-
|
17344
|
-
|
17345
|
-
|
17346
|
-
|
17347
|
-
|
17348
|
-
|
17390
|
+
ndcActionType === exports.NdcActionTypes.CrossCutting) && (React.createElement(React.Fragment, null,
|
17391
|
+
React.createElement(antd.Row, { justify: "start", align: "middle" },
|
17392
|
+
React.createElement(antd.Col, null,
|
17393
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:mitigationType"), name: "mitigationType", rules: [
|
17394
|
+
{
|
17395
|
+
required: true,
|
17396
|
+
message: "".concat(t("ndcAction:mitigationType"), " ").concat(t("ndcAction:isRequired")),
|
17397
|
+
},
|
17398
|
+
] },
|
17399
|
+
React.createElement(antd.Select, { size: "large", onChange: handleMitigationTypeChange, style: {
|
17400
|
+
width: "249px",
|
17401
|
+
borderRadius: "4px",
|
17402
|
+
}, options: (programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Health ||
|
17403
|
+
(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Education ||
|
17404
|
+
(programmeDetails === null || programmeDetails === void 0 ? void 0 : programmeDetails.sector) === exports.Sector.Hospitality
|
17405
|
+
? mitigationTypeList
|
17406
|
+
: sectorMitigationTypesListMapped[sector] }))),
|
17407
|
+
React.createElement(antd.Col, { style: { marginLeft: "38px" } },
|
17408
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:methodology"), name: "methodology" },
|
17409
|
+
React.createElement("span", { style: {
|
17410
|
+
display: "inline-block",
|
17411
|
+
border: "1px solid #D9D9D9",
|
17412
|
+
width: "154px",
|
17413
|
+
height: "38px",
|
17414
|
+
borderRadius: "4px",
|
17415
|
+
padding: "7px 8px",
|
17416
|
+
fontSize: "14px",
|
17417
|
+
backgroundColor: "#F0F0F0",
|
17418
|
+
color: "#8C8C8C",
|
17419
|
+
} },
|
17420
|
+
" ",
|
17421
|
+
t("ndcAction:goldStandard"))))))),
|
17349
17422
|
(ndcActionType === exports.NdcActionTypes.Mitigation ||
|
17350
17423
|
ndcActionType === exports.NdcActionTypes.CrossCutting) &&
|
17351
17424
|
mitigationType === exports.MitigationTypes.SOLAR && (React.createElement(React.Fragment, null,
|
@@ -17431,11 +17504,26 @@ var NdcActionDetails = function (props) {
|
|
17431
17504
|
(ndcActionType === exports.NdcActionTypes.Adaptation ||
|
17432
17505
|
ndcActionType === exports.NdcActionTypes.CrossCutting) && (React.createElement(React.Fragment, null,
|
17433
17506
|
React.createElement(antd.Row, { justify: "start", align: "middle" },
|
17434
|
-
React.createElement(antd.
|
17435
|
-
React.createElement(antd.
|
17436
|
-
|
17437
|
-
|
17438
|
-
|
17507
|
+
React.createElement(antd.Col, null,
|
17508
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:implementingAgency"), name: "implementingAgency" },
|
17509
|
+
React.createElement(antd.Select, { style: { width: 442 }, size: "large", options: implementingAgencyList.map(function (item) { return ({
|
17510
|
+
value: item,
|
17511
|
+
label: item,
|
17512
|
+
}); }) }))),
|
17513
|
+
React.createElement(antd.Col, { style: { marginLeft: "38px" }, className: "included-nap-col" },
|
17514
|
+
React.createElement(antd.Row, { className: "in-nap-row" },
|
17515
|
+
React.createElement(antd.Col, { span: 9 },
|
17516
|
+
React.createElement("div", { className: "included-label" },
|
17517
|
+
React.createElement("div", null, t("ndcAction:inNAP")),
|
17518
|
+
React.createElement("div", { className: "info-container" },
|
17519
|
+
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("ndcAction:inNAPToolTip"), overlayClassName: "custom-tooltip" },
|
17520
|
+
React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
|
17521
|
+
React.createElement(antd.Col, { span: 8, className: "included-val" },
|
17522
|
+
React.createElement(antd.Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
|
17523
|
+
React.createElement("div", { className: "yes-no-radio-container" },
|
17524
|
+
React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNAPScope(true); } }, t("ndcAction:yes"))),
|
17525
|
+
React.createElement("div", { className: "yes-no-radio-container" },
|
17526
|
+
React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNAPScope(false); } }, t("ndcAction:no")))))))),
|
17439
17527
|
React.createElement(antd.Row, { justify: "start", align: "middle" },
|
17440
17528
|
React.createElement(antd.Col, null,
|
17441
17529
|
React.createElement(antd.Form.Item, { label: t("ndcAction:nationalPlanObjectives"), name: "nationalPlanObjectives" },
|
@@ -17448,10 +17536,111 @@ var NdcActionDetails = function (props) {
|
|
17448
17536
|
React.createElement(antd.Select, { style: { width: 442 }, size: "large", options: nationalPlanCoverageList.map(function (item) { return ({
|
17449
17537
|
value: item,
|
17450
17538
|
label: item,
|
17451
|
-
}); }) }))))
|
17539
|
+
}); }) })))),
|
17540
|
+
React.createElement(antd.Row, { justify: "start", align: "middle" },
|
17541
|
+
React.createElement(antd.Col, null,
|
17542
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:ghgEmiReduced"), name: "ghgEmissionsReduced", style: { width: 442 }, rules: [
|
17543
|
+
{
|
17544
|
+
required: true,
|
17545
|
+
validateTrigger: "onBlur",
|
17546
|
+
validator: function (rule, value) {
|
17547
|
+
if (!value || value.length === 0) {
|
17548
|
+
return Promise.reject("".concat(t("ndcAction:ghgEmiReduced"), " ").concat(t("ndcAction:isRequired")));
|
17549
|
+
}
|
17550
|
+
var isMissingValue = false;
|
17551
|
+
value === null || value === void 0 ? void 0 : value.map(function (item) {
|
17552
|
+
if (inputNumberValueGhgReducedGas === undefined ||
|
17553
|
+
!inputNumberValueGhgReducedGas[item]) {
|
17554
|
+
isMissingValue = true;
|
17555
|
+
}
|
17556
|
+
});
|
17557
|
+
if (isMissingValue) {
|
17558
|
+
return Promise.reject("".concat(t("ndcAction:value"), " ").concat(t("ndcAction:isRequired")));
|
17559
|
+
}
|
17560
|
+
return Promise.resolve();
|
17561
|
+
},
|
17562
|
+
},
|
17563
|
+
] },
|
17564
|
+
React.createElement(antd.Checkbox.Group, null, ghgEmissionsGas.map(function (option, i) { return (React.createElement("div", { key: option, className: "row-custom" },
|
17565
|
+
React.createElement(antd.Checkbox, { value: option, checked: checkedOptionsGhgReduced.includes(option), onChange: function (e) {
|
17566
|
+
var _a, _b;
|
17567
|
+
if ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked) {
|
17568
|
+
setCheckedOptionsGhgReduced(__spreadArray(__spreadArray([], checkedOptionsGhgReduced, true), [
|
17569
|
+
option,
|
17570
|
+
], false));
|
17571
|
+
}
|
17572
|
+
else if (!((_b = e === null || e === void 0 ? void 0 : e.target) === null || _b === void 0 ? void 0 : _b.checked)) {
|
17573
|
+
var reducedGasAndVal = inputNumberValueGhgReducedGas;
|
17574
|
+
if (reducedGasAndVal &&
|
17575
|
+
reducedGasAndVal[option]) {
|
17576
|
+
delete reducedGasAndVal[option];
|
17577
|
+
}
|
17578
|
+
setInputNumberValueGhgReducedGas(reducedGasAndVal);
|
17579
|
+
setCheckedOptionsGhgReduced(__spreadArray([], checkedOptionsGhgReduced.filter(function (value) { return value !== option; }), true));
|
17580
|
+
}
|
17581
|
+
} }, option),
|
17582
|
+
React.createElement(antd.InputNumber, { value: inputNumberValueGhgReducedGas &&
|
17583
|
+
inputNumberValueGhgReducedGas[option]
|
17584
|
+
? inputNumberValueGhgReducedGas[option]
|
17585
|
+
: null, size: "small", min: 0, disabled: !checkedOptionsGhgReduced.includes(option), onChange: function (e) {
|
17586
|
+
var _a;
|
17587
|
+
setInputNumberValueGhgReducedGas(__assign(__assign({}, inputNumberValueGhgReducedGas), (_a = {}, _a[option] = e, _a)));
|
17588
|
+
} }))); })))),
|
17589
|
+
React.createElement(antd.Col, { style: { marginLeft: "38px" } },
|
17590
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:ghgEmiAvoided"), name: "ghgEmissionsAvoided", style: { width: 442 }, rules: [
|
17591
|
+
{
|
17592
|
+
required: true,
|
17593
|
+
validateTrigger: "onBlur",
|
17594
|
+
validator: function (rule, value) {
|
17595
|
+
if (!value || value.length === 0) {
|
17596
|
+
return Promise.reject("".concat(t("ndcAction:ghgEmiAvoided"), " ").concat(t("ndcAction:isRequired")));
|
17597
|
+
}
|
17598
|
+
var isMissingValue = false;
|
17599
|
+
value === null || value === void 0 ? void 0 : value.map(function (item) {
|
17600
|
+
if (inputNumberValueGhgAvoidedGas === undefined ||
|
17601
|
+
!inputNumberValueGhgAvoidedGas[item]) {
|
17602
|
+
isMissingValue = true;
|
17603
|
+
}
|
17604
|
+
});
|
17605
|
+
if (isMissingValue) {
|
17606
|
+
return Promise.reject("".concat(t("ndcAction:value"), " ").concat(t("ndcAction:isRequired")));
|
17607
|
+
}
|
17608
|
+
return Promise.resolve();
|
17609
|
+
},
|
17610
|
+
},
|
17611
|
+
] },
|
17612
|
+
React.createElement(antd.Checkbox.Group, null, ghgEmissionsGas.map(function (option, i) { return (React.createElement("div", { key: option, className: "row-custom" },
|
17613
|
+
React.createElement(antd.Checkbox, { value: option, checked: checkedOptionsGhgAvoided.includes(option), onChange: function (e) {
|
17614
|
+
var _a, _b;
|
17615
|
+
if ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked) {
|
17616
|
+
setCheckedOptionsGhgAvoided(__spreadArray(__spreadArray([], checkedOptionsGhgAvoided, true), [
|
17617
|
+
option,
|
17618
|
+
], false));
|
17619
|
+
}
|
17620
|
+
else if (!((_b = e === null || e === void 0 ? void 0 : e.target) === null || _b === void 0 ? void 0 : _b.checked)) {
|
17621
|
+
var avaoidedGasAndVal = inputNumberValueGhgAvoidedGas;
|
17622
|
+
if (avaoidedGasAndVal &&
|
17623
|
+
avaoidedGasAndVal[option]) {
|
17624
|
+
delete avaoidedGasAndVal[option];
|
17625
|
+
}
|
17626
|
+
setInputNumberValueGhgAvoidedGas(avaoidedGasAndVal);
|
17627
|
+
setCheckedOptionsGhgAvoided(__spreadArray([], checkedOptionsGhgAvoided.filter(function (value) { return value !== option; }), true));
|
17628
|
+
}
|
17629
|
+
} }, option),
|
17630
|
+
React.createElement(antd.InputNumber, { value: inputNumberValueGhgAvoidedGas &&
|
17631
|
+
inputNumberValueGhgAvoidedGas[option]
|
17632
|
+
? inputNumberValueGhgAvoidedGas[option]
|
17633
|
+
: null, size: "small", min: 0, disabled: !checkedOptionsGhgAvoided.includes(option), onChange: function (e) {
|
17634
|
+
var _a;
|
17635
|
+
setInputNumberValueGhgAvoidedGas(__assign(__assign({}, inputNumberValueGhgAvoidedGas), (_a = {}, _a[option] = e, _a)));
|
17636
|
+
} }))); }))))))),
|
17452
17637
|
ndcActionType === exports.NdcActionTypes.Enablement && (React.createElement(React.Fragment, null,
|
17453
17638
|
React.createElement(antd.Form.Item, { label: t("ndcAction:title"), name: "EnablementTitle" },
|
17454
17639
|
React.createElement(antd.Input, { style: { width: 442 } })),
|
17640
|
+
React.createElement(antd.Form.Item, { label: t("ndcAction:type"), name: "EnablementType", className: "enablement-type-item" },
|
17641
|
+
React.createElement(antd.Checkbox.Group, { className: "type-checkbox-grp" },
|
17642
|
+
React.createElement(antd.Row, { className: "grp-row" }, enablementTypesAndValues === null || enablementTypesAndValues === void 0 ? void 0 : enablementTypesAndValues.map(function (type) { return (React.createElement(antd.Col, { lg: type.col, md: type.col + 1 },
|
17643
|
+
React.createElement(antd.Checkbox, { value: type.type, style: { lineHeight: "32px" } }, type.type))); })))),
|
17455
17644
|
React.createElement(antd.Row, { justify: "space-between", align: "middle" },
|
17456
17645
|
React.createElement(antd.Form.Item, { label: t("ndcAction:report"), name: "EnablementReport", valuePropName: "fileList", getValueFromEvent: normFile, required: false, rules: [
|
17457
17646
|
{
|
@@ -19825,7 +20014,6 @@ var AddNdcActionComponent = function (props) {
|
|
19825
20014
|
if (ndcActionDetailsObj.enablementReportData) {
|
19826
20015
|
delete ndcActionDetailsObj.enablementReportData;
|
19827
20016
|
}
|
19828
|
-
ndcActionDetailsObj.methodology = t("ndcAction:goldStandard");
|
19829
20017
|
return [4 /*yield*/, post("national/programme/addNDCAction", ndcActionDetailsObj)];
|
19830
20018
|
case 2:
|
19831
20019
|
response = _a.sent();
|
@@ -19998,21 +20186,21 @@ styleInject(css_248z$2);
|
|
19998
20186
|
var NdcActionViewComponent = function (props) {
|
19999
20187
|
var _a;
|
20000
20188
|
var _b, _c;
|
20001
|
-
var useUserContext = props.useUserContext
|
20002
|
-
|
20189
|
+
var useUserContext = props.useUserContext; props.linkDocVisible; props.uploadDocUserPermission; var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages;
|
20190
|
+
translator.setDefaultNamespace("ndcAction");
|
20191
|
+
var t = translator.t;
|
20192
|
+
useUserContext().userInfoState;
|
20003
20193
|
var post = useConnection().post;
|
20004
20194
|
var state = useLocation().state;
|
20005
|
-
var _d = React.useState({}), ndcActionReportDetails = _d[0]
|
20195
|
+
var _d = React.useState({}), ndcActionReportDetails = _d[0]; _d[1];
|
20006
20196
|
var _e = React.useState(false), isLoading = _e[0], setIsLoading = _e[1];
|
20007
20197
|
var _f = React.useState(), ndcActionDetails = _f[0], setNdcActionDetails = _f[1];
|
20008
20198
|
var _g = React.useState(); _g[0]; var setCoBenifitsComponentnDetails = _g[1];
|
20009
20199
|
var _h = React.useState(0), emissionsReductionExpected = _h[0], setEmissionsReductionExpected = _h[1];
|
20010
20200
|
var _j = React.useState(0), emissionsReductionAchieved = _j[0], setEmissionsReductionAchieved = _j[1];
|
20011
|
-
var _k = React.useState([])
|
20012
|
-
var _l = React.useState(false)
|
20013
|
-
var _m = React.useState(false)
|
20014
|
-
translator.setDefaultNamespace("ndcAction");
|
20015
|
-
var t = translator.t;
|
20201
|
+
var _k = React.useState([]); _k[0]; var setProgrammeOwnerId = _k[1];
|
20202
|
+
var _l = React.useState(false); _l[0]; var setCanUploadMonitorReport = _l[1];
|
20203
|
+
var _m = React.useState(false); _m[0]; _m[1];
|
20016
20204
|
var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
|
20017
20205
|
var response, error_1;
|
20018
20206
|
var _a, _b, _c;
|
@@ -20055,92 +20243,11 @@ var NdcActionViewComponent = function (props) {
|
|
20055
20243
|
}
|
20056
20244
|
});
|
20057
20245
|
}); };
|
20058
|
-
|
20059
|
-
|
20060
|
-
|
20061
|
-
|
20062
|
-
|
20063
|
-
React.createElement("div", { className: "link mg-left-1" }, (reportData === null || reportData === void 0 ? void 0 : reportData.url) && linkDocVisible(reportData === null || reportData === void 0 ? void 0 : reportData.status) && (React.createElement("a", { href: reportData === null || reportData === void 0 ? void 0 : reportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
|
20064
|
-
React.createElement(icons.LinkOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))));
|
20065
|
-
};
|
20066
|
-
var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
|
20067
|
-
var reportDetails, response, exception_1;
|
20068
|
-
var _a;
|
20069
|
-
var _b;
|
20070
|
-
return __generator(this, function (_c) {
|
20071
|
-
switch (_c.label) {
|
20072
|
-
case 0:
|
20073
|
-
setIsLoading(true);
|
20074
|
-
reportDetails = (_a = {},
|
20075
|
-
_a[t("ndcAction:viewMoniteringReport")] = (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
|
20076
|
-
? t("programme:notAuthToUploadDoc")
|
20077
|
-
: uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId)
|
20078
|
-
? !canUploadMonitorReport && t("programme:programmeNotAuth")
|
20079
|
-
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
20080
|
-
React.createElement(icons.FileAddOutlined, null))),
|
20081
|
-
_a[t("ndcAction:viewVerificationReport")] = (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
|
20082
|
-
? t("programme:notAuthToUploadDoc")
|
20083
|
-
: uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId)
|
20084
|
-
? !monitoringReportAccepted &&
|
20085
|
-
t("programme:monitoringRepNotApproved")
|
20086
|
-
: t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
|
20087
|
-
React.createElement(icons.FileAddOutlined, null))),
|
20088
|
-
_a);
|
20089
|
-
_c.label = 1;
|
20090
|
-
case 1:
|
20091
|
-
_c.trys.push([1, 3, 4, 5]);
|
20092
|
-
return [4 /*yield*/, post("national/programme/queryDocs", {
|
20093
|
-
page: 1,
|
20094
|
-
size: 100,
|
20095
|
-
filterAnd: [
|
20096
|
-
{
|
20097
|
-
key: "actionId",
|
20098
|
-
operation: "=",
|
20099
|
-
value: ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.id,
|
20100
|
-
},
|
20101
|
-
],
|
20102
|
-
})];
|
20103
|
-
case 2:
|
20104
|
-
response = _c.sent();
|
20105
|
-
if (((_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
20106
|
-
response.data.map(function (item) {
|
20107
|
-
var _a, _b;
|
20108
|
-
if ((_a = item === null || item === void 0 ? void 0 : item.url) === null || _a === void 0 ? void 0 : _a.includes("MONITORING_REPORT")) {
|
20109
|
-
if ((item === null || item === void 0 ? void 0 : item.status) === exports.DocumentStatus.ACCEPTED) {
|
20110
|
-
setMonitoringReportAccepted(true);
|
20111
|
-
}
|
20112
|
-
reportDetails[t("ndcAction:viewMoniteringReport")] =
|
20113
|
-
getProjectReportActions(item);
|
20114
|
-
}
|
20115
|
-
else if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("VERIFICATION_REPORT")) {
|
20116
|
-
reportDetails[t("ndcAction:viewVerificationReport")] =
|
20117
|
-
getProjectReportActions(item);
|
20118
|
-
}
|
20119
|
-
});
|
20120
|
-
}
|
20121
|
-
return [3 /*break*/, 5];
|
20122
|
-
case 3:
|
20123
|
-
exception_1 = _c.sent();
|
20124
|
-
antd.message.open({
|
20125
|
-
type: "error",
|
20126
|
-
content: exception_1.message,
|
20127
|
-
duration: 3,
|
20128
|
-
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
20129
|
-
});
|
20130
|
-
return [3 /*break*/, 5];
|
20131
|
-
case 4:
|
20132
|
-
setNdcActionReportDetails(reportDetails);
|
20133
|
-
setIsLoading(false);
|
20134
|
-
return [7 /*endfinally*/];
|
20135
|
-
case 5: return [2 /*return*/];
|
20136
|
-
}
|
20137
|
-
});
|
20138
|
-
}); };
|
20139
|
-
React.useEffect(function () {
|
20140
|
-
if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.id) {
|
20141
|
-
getProjectReports();
|
20142
|
-
}
|
20143
|
-
}, [ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.id, programmeOwnerId]);
|
20246
|
+
// useEffect(() => {
|
20247
|
+
// if (ndcActionDetails?.id) {
|
20248
|
+
// getProjectReports();
|
20249
|
+
// }
|
20250
|
+
// }, [ndcActionDetails?.id, programmeOwnerId]);
|
20144
20251
|
React.useEffect(function () {
|
20145
20252
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
20146
20253
|
if (!state) {
|
@@ -20215,16 +20322,28 @@ var NdcActionViewComponent = function (props) {
|
|
20215
20322
|
return mitigationDetails;
|
20216
20323
|
};
|
20217
20324
|
var getNdcActionAdaptationDetails = function () {
|
20325
|
+
var _a, _b, _c, _d;
|
20218
20326
|
var adaptationDetails = {};
|
20219
20327
|
if (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) {
|
20220
20328
|
adaptationDetails[t("ndcAction:viewAdaptationImplementingAgency")] =
|
20221
20329
|
ndcActionDetails.adaptationProperties.implementingAgency;
|
20222
20330
|
adaptationDetails[t("ndcAction:viewAdaptationNationalPlanObjectives")] =
|
20223
20331
|
ndcActionDetails.adaptationProperties.nationalPlanObjectives;
|
20332
|
+
adaptationDetails[t("ndcAction:viewAdaptationNationalPlanCoverage")] =
|
20333
|
+
ndcActionDetails.adaptationProperties.nationalPlanCoverage;
|
20334
|
+
adaptationDetails[t("ndcAction:viewIncludedInNAP")] = ((_a = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _a === void 0 ? void 0 : _a.includedInNAP)
|
20335
|
+
? "Yes"
|
20336
|
+
: ((_b = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _b === void 0 ? void 0 : _b.includedInNAP) === false
|
20337
|
+
? "No"
|
20338
|
+
: "-";
|
20224
20339
|
adaptationDetails[t("ndcAction:viewGhgEmissionsAvoided")] =
|
20225
|
-
ndcActionDetails.adaptationProperties.ghgEmissionsAvoided
|
20340
|
+
((_c = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _c === void 0 ? void 0 : _c.ghgEmissionsAvoided)
|
20341
|
+
? ndcActionDetails.adaptationProperties.ghgEmissionsAvoided
|
20342
|
+
: {};
|
20226
20343
|
adaptationDetails[t("ndcAction:viewGhgEmissionsReduced")] =
|
20227
|
-
ndcActionDetails.adaptationProperties.ghgEmissionsReduced
|
20344
|
+
((_d = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.adaptationProperties) === null || _d === void 0 ? void 0 : _d.ghgEmissionsReduced)
|
20345
|
+
? ndcActionDetails.adaptationProperties.ghgEmissionsReduced
|
20346
|
+
: {};
|
20228
20347
|
}
|
20229
20348
|
return adaptationDetails;
|
20230
20349
|
};
|
@@ -20641,6 +20760,7 @@ exports.BaseEntity = BaseEntity;
|
|
20641
20760
|
exports.Company = Company;
|
20642
20761
|
exports.CompanyManagementComponent = CompanyManagementComponent;
|
20643
20762
|
exports.CompanyProfileComponent = CompanyProfileComponent;
|
20763
|
+
exports.InfoView = InfoView;
|
20644
20764
|
exports.InvestmentCreationComponent = InvestmentCreationComponent;
|
20645
20765
|
exports.InvestmentManagementComponent = InvestmentManagementComponent;
|
20646
20766
|
exports.LegendItem = LegendItem;
|