@undp/carbon-library 1.0.281-CARBON-363.0 → 1.0.281-CARBON-359.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, LockOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined } from '@ant-design/icons';
1
+ import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined } from '@ant-design/icons';
2
2
  import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Upload, InputNumber, Tooltip, Select, Modal, Alert, Skeleton, Card, Tag, Checkbox, DatePicker, Popover, List, Typography, Spin, Tabs, Progress } from 'antd';
3
- import React, { useState, useEffect, useRef } from 'react';
3
+ import React, { useState, useEffect, useRef, useContext } from 'react';
4
4
  import { DateTime } from 'luxon';
5
5
  import { Buffer } from 'buffer';
6
6
  import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } from 'react-phone-number-input';
@@ -2027,7 +2027,7 @@ var NdcActionStatus;
2027
2027
  NdcActionStatus["PENDING"] = "Pending";
2028
2028
  NdcActionStatus["APPROVED"] = "Approved";
2029
2029
  })(NdcActionStatus || (NdcActionStatus = {}));
2030
- var getNdcActionStatusEnumVal$1 = function (value) {
2030
+ var getNdcActionStatusEnumVal = function (value) {
2031
2031
  var index = Object.keys(NdcActionStatus).indexOf(value);
2032
2032
  if (index < 0) {
2033
2033
  return value;
@@ -2035,7 +2035,7 @@ var getNdcActionStatusEnumVal$1 = function (value) {
2035
2035
  return Object.values(NdcActionStatus)[index];
2036
2036
  };
2037
2037
  var getNdcStatusTagType = function (status) {
2038
- switch (getNdcActionStatusEnumVal$1(status)) {
2038
+ switch (getNdcActionStatusEnumVal(status)) {
2039
2039
  case NdcActionStatus.PENDING:
2040
2040
  return "processing";
2041
2041
  case NdcActionStatus.APPROVED:
@@ -21705,7 +21705,7 @@ var NdcActionViewComponent = function (props) {
21705
21705
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
21706
21706
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
21707
21707
  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 },
21708
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
21708
+ React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))),
21709
21709
  (reportData === null || reportData === void 0 ? void 0 : reportData.txTime) && (React.createElement("div", { className: "time" },
21710
21710
  moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
21711
21711
  " ~ " + reportVersion))));
@@ -21862,13 +21862,15 @@ var NdcActionViewComponent = function (props) {
21862
21862
  ((_b = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.agricultureProperties) === null || _b === void 0 ? void 0 : _b.landAreaUnit);
21863
21863
  }
21864
21864
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === MitigationTypes.AGRICULTURE &&
21865
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === MitigationSubTypes.SOIL_ENRICHMENT_BIOCHAR &&
21865
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21866
+ MitigationSubTypes.SOIL_ENRICHMENT_BIOCHAR &&
21866
21867
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties)) {
21867
21868
  mitigationDetails[t("ndcAction:viewMitigationWeight")] =
21868
- addCommSep((_c = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _c === void 0 ? void 0 : _c.weight) + 't';
21869
+ addCommSep((_c = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _c === void 0 ? void 0 : _c.weight) + "t";
21869
21870
  }
21870
21871
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === MitigationTypes.SOLAR &&
21871
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === MitigationSubTypes.SOLAR_PHOTOVOLTAICS_PV &&
21872
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21873
+ MitigationSubTypes.SOLAR_PHOTOVOLTAICS_PV &&
21872
21874
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.solarProperties)) {
21873
21875
  mitigationDetails[t("ndcAction:viewMitigationEnergyGeneration")] =
21874
21876
  addCommSep((_d = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.solarProperties) === null || _d === void 0 ? void 0 : _d.energyGeneration) +
@@ -21877,15 +21879,17 @@ var NdcActionViewComponent = function (props) {
21877
21879
  (_f = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.solarProperties) === null || _f === void 0 ? void 0 : _f.consumerGroup;
21878
21880
  }
21879
21881
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === MitigationTypes.SOLAR &&
21880
- ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === MitigationSubTypes.SOLAR_WATER_PUMPING_OFF_GRID ||
21881
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === MitigationSubTypes.SOLAR_WATER_PUMPING_ON_GRID) &&
21882
+ ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21883
+ MitigationSubTypes.SOLAR_WATER_PUMPING_OFF_GRID ||
21884
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21885
+ MitigationSubTypes.SOLAR_WATER_PUMPING_ON_GRID) &&
21882
21886
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties)) {
21883
21887
  mitigationDetails[t("ndcAction:viewMitigationEnergyGeneration")] =
21884
- addCommSep((_g = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _g === void 0 ? void 0 : _g.energyGeneration) +
21885
- ((_h = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _h === void 0 ? void 0 : _h.energyGenerationUnit);
21888
+ addCommSep((_g = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _g === void 0 ? void 0 : _g.energyGeneration) + ((_h = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _h === void 0 ? void 0 : _h.energyGenerationUnit);
21886
21889
  }
21887
21890
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === MitigationTypes.EE_HOUSEHOLDS &&
21888
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === MitigationSubTypes.STOVES_HOUSES_IN_NAMIBIA &&
21891
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21892
+ MitigationSubTypes.STOVES_HOUSES_IN_NAMIBIA &&
21889
21893
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties)) {
21890
21894
  mitigationDetails[t("ndcAction:viewMitigationNoOfDays")] =
21891
21895
  (_j = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _j === void 0 ? void 0 : _j.numberOfDays;
@@ -22068,23 +22072,24 @@ var NdcActionViewComponent = function (props) {
22068
22072
  : "empty" }, t("programme:monitoringReport")),
22069
22073
  (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
22070
22074
  moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
22071
- " ~ " + monitoringReportversion))),
22075
+ " ~ " + monitoringReportversion)))),
22076
+ React.createElement(Row, null,
22072
22077
  React.createElement("div", { className: "icon" }, !(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
22073
22078
  ? t("programme:notAuthToUploadDoc")
22074
22079
  : uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId)
22075
22080
  ? !canUploadMonitorReport &&
22076
22081
  t("programme:programmeNotAuth")
22077
22082
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
22078
- React.createElement(FileAddOutlined, null))))),
22079
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(Row, null,
22080
- React.createElement("div", { className: "icon" },
22081
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22082
- DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22083
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22084
- DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22085
- React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
22086
- linkDocVisible(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) && (React.createElement("a", { href: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
22087
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))))),
22083
+ React.createElement(FileAddOutlined, null)))),
22084
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(React.Fragment, null,
22085
+ React.createElement("div", { className: "icon" },
22086
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22087
+ DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22088
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22089
+ DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22090
+ React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
22091
+ linkDocVisible(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) && (React.createElement("a", { href: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
22092
+ React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))))))),
22088
22093
  React.createElement("div", { className: "report-details" },
22089
22094
  React.createElement("div", { className: "report-type" },
22090
22095
  React.createElement("div", { className: "name-time-container" },
@@ -22093,23 +22098,24 @@ var NdcActionViewComponent = function (props) {
22093
22098
  : "empty" }, t("programme:verificationReport")),
22094
22099
  (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
22095
22100
  moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
22096
- " ~ " + verificationReportVersion))),
22101
+ " ~ " + verificationReportVersion)))),
22102
+ React.createElement(Row, null,
22097
22103
  React.createElement("div", { className: "icon" }, !(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
22098
22104
  ? t("programme:notAuthToUploadDoc")
22099
22105
  : uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId)
22100
22106
  ? !monitoringReportAccepted &&
22101
22107
  t("programme:monitoringRepNotApproved")
22102
22108
  : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
22103
- React.createElement(FileAddOutlined, null))))),
22104
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(Row, null,
22105
- React.createElement("div", { className: "icon" },
22106
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22107
- DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22108
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22109
- DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22110
- React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
22111
- linkDocVisible(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) && (React.createElement("a", { href: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
22112
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))))))))))),
22109
+ React.createElement(FileAddOutlined, null)))),
22110
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(React.Fragment, null,
22111
+ React.createElement("div", { className: "icon" },
22112
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22113
+ DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22114
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22115
+ DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22116
+ React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
22117
+ linkDocVisible(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) && (React.createElement("a", { href: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
22118
+ React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))))))))))))),
22113
22119
  ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.Mitigation ||
22114
22120
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.CrossCutting) && (React.createElement(Row, null,
22115
22121
  React.createElement(Col, { lg: 24, className: "gutter-row" },
@@ -26655,891 +26661,622 @@ var RegistryDashboardComponent = function (props) {
26655
26661
  lastUpdateTransferLocations))))))))) : ("")));
26656
26662
  };
26657
26663
 
26658
- React.createContext(null);
26664
+ var EditableContext = React.createContext(null);
26665
+ var EditableRow = function (_a) {
26666
+ _a.index; var props = __rest(_a, ["index"]);
26667
+ var form = Form.useForm()[0];
26668
+ return (React.createElement(Form, { form: form, component: false },
26669
+ React.createElement(EditableContext.Provider, { value: form },
26670
+ React.createElement("tr", __assign({}, props)))));
26671
+ };
26659
26672
  var EditableCell = function (_a) {
26660
- var editing = _a.editing, dataIndex = _a.dataIndex, title = _a.title; _a.inputType; var record = _a.record; _a.index; var children = _a.children, onBlurHandler = _a.onBlurHandler, t = _a.t, restProps = __rest(_a, ["editing", "dataIndex", "title", "inputType", "record", "index", "children", "onBlurHandler", "t"]);
26661
- return (React.createElement("td", __assign({}, restProps), editing && dataIndex === "nationalPlanObjective" ? (React.createElement(Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
26662
- {
26663
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
26664
- var trimValue;
26665
- return __generator(this, function (_a) {
26666
- trimValue = typeof value === "string" ? value.trim() : value;
26667
- if (!trimValue) {
26668
- throw new Error("".concat(title, " ").concat(t("ndc:isRequired")));
26669
- }
26670
- return [2 /*return*/];
26671
- });
26672
- }); },
26673
- },
26674
- ] },
26675
- React.createElement(Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:nationalPlanObjectivePlaceHolder") }))) : editing && dataIndex === "kpi" ? (React.createElement(Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
26676
- {
26677
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
26678
- var trimValue;
26679
- return __generator(this, function (_a) {
26680
- trimValue = typeof value === "string" ? value.trim() : value;
26681
- if (trimValue) {
26682
- if (isNaN(+trimValue)) {
26683
- throw new Error(t("ndc:kpiInvalidFormat"));
26684
- }
26685
- else if (+trimValue <= 0) {
26686
- throw new Error(t("ndc:kpiGreaterThanZero"));
26687
- }
26688
- else if (trimValue.toString().length > 7) {
26689
- throw new Error(t("ndc:kpiMaxLength"));
26690
- }
26691
- }
26692
- else {
26693
- throw new Error("".concat(title, " ").concat(t("ndc:isRequired")));
26694
- }
26695
- return [2 /*return*/];
26696
- });
26697
- }); },
26698
- },
26699
- ] },
26700
- React.createElement(Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:kpiPlaceHolder") }))) : (children)));
26673
+ var title = _a.title, editable = _a.editable, children = _a.children, dataIndex = _a.dataIndex, record = _a.record, handleSave = _a.handleSave, restProps = __rest(_a, ["title", "editable", "children", "dataIndex", "record", "handleSave"]);
26674
+ var _b = useState(false), editing = _b[0], setEditing = _b[1];
26675
+ var inputRef = useRef(null);
26676
+ var form = useContext(EditableContext);
26677
+ useEffect(function () {
26678
+ if (editing) {
26679
+ inputRef.current.focus();
26680
+ }
26681
+ }, [editing]);
26682
+ var toggleEdit = function () {
26683
+ var _a;
26684
+ setEditing(!editing);
26685
+ form.setFieldsValue((_a = {}, _a[dataIndex] = record[dataIndex], _a));
26686
+ };
26687
+ var save = function () { return __awaiter(void 0, void 0, void 0, function () {
26688
+ var values, errInfo_1;
26689
+ return __generator(this, function (_a) {
26690
+ switch (_a.label) {
26691
+ case 0:
26692
+ _a.trys.push([0, 2, , 3]);
26693
+ return [4 /*yield*/, form.validateFields()];
26694
+ case 1:
26695
+ values = _a.sent();
26696
+ toggleEdit();
26697
+ handleSave(__assign(__assign({}, record), values));
26698
+ return [3 /*break*/, 3];
26699
+ case 2:
26700
+ errInfo_1 = _a.sent();
26701
+ console.log("Save failed:", errInfo_1);
26702
+ return [3 /*break*/, 3];
26703
+ case 3: return [2 /*return*/];
26704
+ }
26705
+ });
26706
+ }); };
26707
+ var childNode = children;
26708
+ if (editable) {
26709
+ childNode = editing ? (React.createElement(Form.Item, { style: { margin: 0 }, name: dataIndex, rules: [
26710
+ {
26711
+ required: true,
26712
+ message: "".concat(title, " is required."),
26713
+ },
26714
+ ] },
26715
+ React.createElement(Input, { ref: inputRef, onPressEnter: save, onBlur: save }))) : (React.createElement("div", { className: "editable-cell-value-wrap", style: { paddingRight: 24, minWidth: "100px", minHeight: "20px" }, onClick: toggleEdit }, children));
26716
+ }
26717
+ return React.createElement("td", __assign({}, restProps), childNode);
26701
26718
  };
26702
26719
 
26703
- var css_248z$4 = ".ndc-steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: center; }\n .ndc-steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .ndc-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 .ndc-steps-actions .mg-left-1 {\n margin-left: 1rem; }\n\n.ndc-details .ant-input-number-input-wrap {\n margin-right: 10px; }\n\n.ndc-details tbody {\n vertical-align: top; }\n\n.ndc-details td .ant-space-item {\n margin-top: 5px; }\n\n.ndc-details .btn-danger {\n color: #ff4d4f !important;\n border-color: #ff8183 !important; }\n";
26720
+ var css_248z$4 = ".ndc-steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: center; }\n .ndc-steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .ndc-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 .ndc-steps-actions .mg-left-1 {\n margin-left: 1rem; }\n";
26704
26721
  styleInject(css_248z$4);
26705
26722
 
26706
- var NdcDetailsActionType;
26707
- (function (NdcDetailsActionType) {
26708
- NdcDetailsActionType["MainAction"] = "MainAction";
26709
- NdcDetailsActionType["SubAction"] = "SubAction";
26710
- })(NdcDetailsActionType || (NdcDetailsActionType = {}));
26711
- var NdcDetailsActionStatus;
26712
- (function (NdcDetailsActionStatus) {
26713
- NdcDetailsActionStatus["New"] = "New";
26714
- NdcDetailsActionStatus["Pending"] = "Pending";
26715
- NdcDetailsActionStatus["Approved"] = "Approved";
26716
- NdcDetailsActionStatus["Rejected"] = "Rejected";
26717
- })(NdcDetailsActionStatus || (NdcDetailsActionStatus = {}));
26718
- var getNdcActionStatusEnumVal = function (value) {
26719
- var index = Object.keys(NdcDetailsActionStatus).indexOf(value);
26720
- if (index < 0) {
26721
- return value;
26722
- }
26723
- return Object.values(NdcDetailsActionStatus)[index];
26724
- };
26725
- var getNdcActionStatusTagType = function (status) {
26726
- switch (getNdcActionStatusEnumVal(status)) {
26727
- case NdcDetailsActionStatus.Rejected:
26728
- return "error";
26729
- case NdcDetailsActionStatus.Pending:
26730
- return "processing";
26731
- case NdcDetailsActionStatus.Approved:
26732
- return "success";
26733
- default:
26734
- return "default";
26735
- }
26736
- };
26737
-
26723
+ var NdcActionType;
26724
+ (function (NdcActionType) {
26725
+ NdcActionType[NdcActionType["main"] = 0] = "main";
26726
+ NdcActionType[NdcActionType["sub"] = 1] = "sub";
26727
+ })(NdcActionType || (NdcActionType = {}));
26738
26728
  var NdcDetailsComponent = function (props) {
26739
- var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext;
26729
+ var t = props.t; props.useConnection; var useUserContext = props.useUserContext;
26740
26730
  var RangePicker = DatePicker.RangePicker;
26741
- var _a = useState([]), ndcActionsList = _a[0], setNdcActionsList = _a[1];
26742
- var _b = useState(false), loading = _b[0], setLoading = _b[1];
26731
+ var _a = useState([]), ndcDetailsData = _a[0], setNdcDetailsData = _a[1];
26732
+ var _b = useState(false), loading = _b[0]; _b[1];
26733
+ var periodItemsRef = useRef([]);
26743
26734
  var _c = useState([]), periodItems = _c[0], setPeriodItems = _c[1];
26744
- var _d = useState({}), selectedPeriod = _d[0], setSelectedPeriod = _d[1];
26745
- var selectedDateRangeRef = useRef({});
26735
+ var _d = useState("add_new"), selectedTab = _d[0], setSelectedTab = _d[1];
26736
+ var selectedPeriod = useRef({});
26737
+ var addedNdcDetailId = useRef(0);
26738
+ var selectedNdcDetail = useRef({});
26746
26739
  var _e = useState(0), tableKey = _e[0], setTableKey = _e[1];
26747
- var _f = useConnection(), get = _f.get, post = _f.post, put = _f.put;
26748
- var _g = useState([]), ministryOrgList = _g[0], setMinistryOrgList = _g[1];
26749
- var _h = useState({}), actionInfo = _h[0], setActionInfo = _h[1];
26750
- var _j = useState(false), openConfirmationModal = _j[0], setOpenConfirmationModal = _j[1];
26751
- var form = Form.useForm()[0];
26752
- var _k = useState(null), editingKey = _k[0], setEditingKey = _k[1];
26753
- var _l = useState(0), nextAvailableActionId = _l[0], setNextAvailableActionId = _l[1];
26754
- var _m = useState([]), expandedRowKeys = _m[0], setExpandedRowKeys = _m[1];
26755
- var _o = useState([]), subNdcActionsForPeriod = _o[0], setSubNdcActionsForPeriod = _o[1];
26756
- var _p = useState(1), currentPage = _p[0], setCurrentPage = _p[1];
26757
- var _q = useState(10), pageSize = _q[0], setPageSize = _q[1];
26758
- var isEditing = function (record) { return record.id === editingKey; };
26759
- var isMainActionInEditMode = function () {
26760
- if (editingKey) {
26761
- var action = ndcActionsList.find(function (item) { return item.id === editingKey; });
26762
- if (action && action.actionType === NdcDetailsActionType.MainAction) {
26763
- return true;
26764
- }
26765
- }
26766
- return false;
26767
- };
26768
26740
  var userInfoState = useUserContext().userInfoState;
26769
- useEffect(function () {
26770
- if (expandedRowKeys && expandedRowKeys.length > 0) {
26771
- var expandedKey = expandedRowKeys[0];
26772
- setNdcSubActionsForMainAction(expandedKey);
26773
- }
26774
- }, ndcActionsList);
26775
- var loginMinistry = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
26776
- ? process.env.REACT_APP_GOVERNMENT_MINISTRY
26777
- ? process.env.REACT_APP_GOVERNMENT_MINISTRY
26778
- : "Ministry Of Environment"
26779
- : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY
26780
- ? userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyName
26781
- : undefined;
26782
- var isGovernmentUser = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT &&
26783
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== Role.ViewOnly;
26784
- var isMainNdcActionsEditable = !selectedPeriod.finalized &&
26785
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT &&
26786
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== Role.ViewOnly;
26787
- var isSubNdcActionsEditable = function (record) {
26788
- return (!selectedPeriod.finalized &&
26789
- record.status !== NdcDetailsActionStatus.Approved &&
26790
- ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ||
26791
- ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY &&
26792
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyName) === record.ministryName)) &&
26741
+ var isAddRangeVisible = function () {
26742
+ return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY ||
26743
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT) &&
26793
26744
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== Role.ViewOnly);
26794
26745
  };
26795
- var checkSubNdcActionCreatePermission = function () {
26796
- return (!selectedPeriod.finalized &&
26797
- ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ||
26798
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) &&
26746
+ var isAddNdcActionVisible = function () {
26747
+ return ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT &&
26799
26748
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== Role.ViewOnly);
26800
26749
  };
26801
- var isNdcActionEditable = function (record) {
26802
- if (record.actionType === NdcDetailsActionType.MainAction) {
26803
- return isMainNdcActionsEditable;
26804
- }
26805
- else if (record.actionType === NdcDetailsActionType.SubAction) {
26806
- return isSubNdcActionsEditable(record);
26807
- }
26808
- };
26809
- var ndcMainDetailsForPeriod = selectedPeriod.key !== "add_new"
26810
- ? ndcActionsList.filter(function (ndcDetail) {
26811
- return (ndcDetail.periodId === parseInt(selectedPeriod.key) &&
26812
- ndcDetail.actionType === NdcDetailsActionType.MainAction);
26813
- })
26814
- : [];
26815
- var setNdcSubActionsForMainAction = function (mainActionId) {
26816
- var subNdcDetails = ndcActionsList.filter(function (ndcDetail) {
26817
- return (ndcDetail.parentActionId === mainActionId &&
26818
- ndcDetail.actionType === NdcDetailsActionType.SubAction);
26819
- });
26820
- var emptySubNdcRow = {
26821
- id: nextAvailableActionId,
26822
- actionType: NdcDetailsActionType.SubAction,
26823
- nationalPlanObjective: "",
26824
- kpi: "",
26825
- ministryName: loginMinistry,
26826
- status: NdcDetailsActionStatus.New,
26827
- parentActionId: mainActionId,
26828
- };
26829
- if (checkSubNdcActionCreatePermission()) {
26830
- subNdcDetails = __spreadArray(__spreadArray([], subNdcDetails, true), [emptySubNdcRow], false);
26831
- setEditingKey(nextAvailableActionId);
26832
- setNextAvailableActionId(function (value) { return value + 1; });
26833
- form.setFieldsValue({
26834
- nationalPlanObjective: "",
26835
- kpi: "",
26836
- });
26837
- }
26838
- setSubNdcActionsForPeriod(subNdcDetails);
26839
- };
26840
26750
  var inRange = function (num, min, max) {
26841
26751
  return num >= min && num <= max;
26842
26752
  };
26843
- var ClearEditMode = function () {
26844
- var unsavedMainActions = ndcActionsList.filter(function (item) {
26845
- return item.status === NdcDetailsActionStatus.New &&
26846
- item.actionType === NdcDetailsActionType.MainAction;
26847
- });
26848
- if (unsavedMainActions && unsavedMainActions.length) {
26849
- var updatedActions = ndcActionsList.filter(function (item) { return !unsavedMainActions.includes(item); });
26850
- setNdcActionsList(updatedActions);
26851
- }
26852
- setEditingKey(null);
26853
- };
26854
- var handleSave = function (row) { return __awaiter(void 0, void 0, void 0, function () {
26855
- var updatedFields, updatedItem, exception_2;
26856
- return __generator(this, function (_a) {
26857
- switch (_a.label) {
26858
- case 0:
26859
- _a.trys.push([0, 9, , 10]);
26860
- updatedFields = void 0;
26861
- _a.label = 1;
26862
- case 1:
26863
- _a.trys.push([1, 3, , 4]);
26864
- return [4 /*yield*/, form.validateFields()];
26865
- case 2:
26866
- updatedFields = (_a.sent());
26867
- return [3 /*break*/, 4];
26868
- case 3:
26869
- _a.sent();
26870
- return [2 /*return*/];
26871
- case 4:
26872
- if (!updatedFields) {
26873
- ClearEditMode();
26874
- return [2 /*return*/];
26875
- }
26876
- else if (updatedFields.kpi === row.kpi &&
26877
- updatedFields.nationalPlanObjective === row.nationalPlanObjective) {
26878
- ClearEditMode();
26879
- return [2 /*return*/];
26880
- }
26881
- updatedItem = __assign(__assign({}, row), updatedFields);
26882
- if (!(updatedItem.status === NdcDetailsActionStatus.New)) return [3 /*break*/, 6];
26883
- if (isGovernmentUser &&
26884
- updatedItem.actionType === NdcDetailsActionType.SubAction) {
26885
- updatedItem.status = NdcDetailsActionStatus.Approved;
26753
+ function onAddNewSubNdcDetail() {
26754
+ var range = selectedTab.split("-");
26755
+ var ndcDetail = ndcDetailsData.find(function (item) { return item.key === selectedNdcDetail.current.key; });
26756
+ var ndcDetailItemIndex = ndcDetailsData.findIndex(function (item) { return item.key === selectedNdcDetail.current.key; });
26757
+ if (ndcDetail) {
26758
+ addedNdcDetailId.current = addedNdcDetailId.current + 1;
26759
+ var newData = {
26760
+ key: addedNdcDetailId.current,
26761
+ startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
26762
+ endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
26763
+ ndcActionId: ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.key,
26764
+ nationalPlanObj: "",
26765
+ kpi: "",
26766
+ ministry: "",
26767
+ };
26768
+ if (!ndcDetail.subNdcDetails) {
26769
+ ndcDetail.subNdcDetails = [];
26770
+ }
26771
+ ndcDetail.subNdcDetails.push(newData);
26772
+ }
26773
+ ndcDetailsData[ndcDetailItemIndex] = ndcDetail;
26774
+ setNdcDetailsData(ndcDetailsData);
26775
+ setTableKey(function (key) { return key + 1; });
26776
+ }
26777
+ var handleSave = function (row) {
26778
+ setNdcDetailsData(function (prevData) {
26779
+ var newData = JSON.parse(JSON.stringify(prevData));
26780
+ if (row.type === NdcActionType.main) {
26781
+ var index = newData.findIndex(function (item) { return row.key === item.key; });
26782
+ if (index !== -1) {
26783
+ newData[index] = __assign(__assign({}, newData[index]), row);
26784
+ }
26785
+ }
26786
+ else {
26787
+ var parentIndex = newData.findIndex(function (item) { return row.ndcActionId === item.key; });
26788
+ var parentItem = newData[parentIndex];
26789
+ if (parentItem) {
26790
+ if (parentItem.subNdcDetails) {
26791
+ var itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return row.key === item.key; });
26792
+ if (itemIndex === -1) {
26793
+ parentItem.subNdcDetails.push(row);
26794
+ }
26795
+ else {
26796
+ parentItem.subNdcDetails[itemIndex] = __assign({}, row);
26797
+ }
26886
26798
  }
26887
26799
  else {
26888
- updatedItem.status = NdcDetailsActionStatus.Pending;
26800
+ parentItem.subNdcDetails = [row];
26889
26801
  }
26890
- return [4 /*yield*/, post("national/programme/addNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseInt(updatedItem.kpi.toString()) }))];
26891
- case 5:
26892
- _a.sent();
26893
- return [3 /*break*/, 8];
26894
- case 6:
26895
- updatedItem.status = NdcDetailsActionStatus.Pending;
26896
- return [4 /*yield*/, put("national/programme/updateNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseInt(updatedItem.kpi.toString()) }))];
26897
- case 7:
26898
- _a.sent();
26899
- _a.label = 8;
26900
- case 8:
26901
- fetchNdcDetailActions();
26902
- ClearEditMode();
26903
- return [3 /*break*/, 10];
26904
- case 9:
26905
- exception_2 = _a.sent();
26906
- ClearEditMode();
26907
- message.open({
26908
- type: "error",
26909
- content: exception_2.message,
26910
- duration: 3,
26911
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
26912
- });
26913
- return [3 /*break*/, 10];
26914
- case 10: return [2 /*return*/];
26802
+ }
26803
+ newData[parentIndex] = __assign({}, parentItem);
26804
+ setTableKey(function (key) { return key + 1; });
26915
26805
  }
26806
+ return newData;
26916
26807
  });
26917
- }); };
26918
- var actionMenu = function (record) {
26919
- if (record.status === NdcDetailsActionStatus.Pending &&
26920
- isGovernmentUser &&
26921
- !selectedPeriod.finalized) {
26922
- return (React.createElement(List, { className: "action-menu", size: "small", dataSource: [
26923
- {
26924
- text: t("ndc:approve"),
26925
- icon: React.createElement(Icon.BoxArrowInDown, null),
26926
- style: "color-primary",
26927
- click: function () {
26928
- setActionInfo({
26929
- action: "Approve",
26930
- headerText: t("ndc:actionApproveTitle"),
26931
- type: "primary",
26932
- icon: React.createElement(Icon.BoxArrowInDown, null),
26933
- recordId: record.id,
26934
- });
26935
- setOpenConfirmationModal(true);
26936
- },
26937
- },
26938
- {
26939
- text: t("ndc:reject"),
26940
- icon: React.createElement(Icon.XOctagon, null),
26941
- style: "color-error",
26942
- click: function () {
26943
- setActionInfo({
26944
- action: "Reject",
26945
- headerText: t("ndc:rejectApproveTitle"),
26946
- type: "danger",
26947
- icon: React.createElement(Icon.XOctagon, null),
26948
- recordId: record.id,
26949
- });
26950
- setOpenConfirmationModal(true);
26951
- },
26952
- },
26953
- ], renderItem: function (item) { return (React.createElement(List.Item, { onClick: item.click },
26954
- React.createElement(Typography.Text, { className: "action-icon ".concat(item.style) }, item.icon),
26955
- React.createElement("span", null, item.text))); } }));
26808
+ };
26809
+ var getNdcDetailsForPeriod = function () {
26810
+ var range = selectedTab.split("-");
26811
+ if (range.length > 1) {
26812
+ var filteredData = ndcDetailsData.filter(function (item) {
26813
+ return inRange(Number(moment(item.startDate).year()), Number(range[0]), Number(range[1]));
26814
+ });
26815
+ return filteredData;
26816
+ }
26817
+ else {
26818
+ return [];
26819
+ }
26820
+ };
26821
+ var getSubNdcDetails = function (key) {
26822
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
26823
+ var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
26824
+ if (ndcDetail) {
26825
+ if (((_b = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_a = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _a === void 0 ? void 0 : _a.length) - 1]) === null || _b === void 0 ? void 0 : _b.ministry.trim()) !== "" &&
26826
+ ((_d = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_c = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _c === void 0 ? void 0 : _c.length) - 1]) === null || _d === void 0 ? void 0 : _d.ministry) &&
26827
+ ((_f = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_e = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _e === void 0 ? void 0 : _e.length) - 1]) === null || _f === void 0 ? void 0 : _f.nationalPlanObj.trim()) !== "" &&
26828
+ ((_h = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_g = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _g === void 0 ? void 0 : _g.length) - 1]) === null || _h === void 0 ? void 0 : _h.nationalPlanObj) &&
26829
+ String((_k = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_j = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _j === void 0 ? void 0 : _j.length) - 1]) === null || _k === void 0 ? void 0 : _k.kpi).trim() !== "" &&
26830
+ String((_m = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_l = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _l === void 0 ? void 0 : _l.length) - 1]) === null || _m === void 0 ? void 0 : _m.kpi)) {
26831
+ onAddNewSubNdcDetail();
26832
+ }
26833
+ return ndcDetail.subNdcDetails;
26956
26834
  }
26957
26835
  else {
26958
- return null;
26836
+ return [];
26959
26837
  }
26960
26838
  };
26961
26839
  var defaultColumns = [
26962
26840
  {
26963
26841
  title: t("ndc:ndcColumnsNationalPlanObj"),
26964
- dataIndex: "nationalPlanObjective",
26965
- key: "nationalPlanObjective",
26842
+ dataIndex: "nationalPlanObj",
26843
+ key: "nationalPlanObj",
26966
26844
  align: "left",
26967
- width: 400,
26968
26845
  editable: true,
26969
- render: function (_, record) { return (React.createElement(Space, { size: "middle" }, record.nationalPlanObjective ? (React.createElement(Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
26970
- React.createElement("span", null, record.nationalPlanObjective))) : (React.createElement(Input, { placeholder: t("ndc:nationalPlanObjectivePlaceHolder") })))); },
26846
+ width: "50%",
26847
+ render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
26848
+ React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add Programmes", className: "ant-input", type: "text" })))); },
26971
26849
  },
26972
26850
  {
26973
26851
  title: t("ndc:ndcColumnsKpi"),
26974
26852
  dataIndex: "kpi",
26975
26853
  key: "kpi",
26976
26854
  align: "left",
26977
- width: 100,
26978
26855
  editable: true,
26979
- render: function (_, record) { return (React.createElement(Space, { size: "middle" }, record.kpi ? (React.createElement(Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
26980
- React.createElement("span", null, record.kpi))) : (React.createElement(Input, { placeholder: "Enter Kpi" })))); },
26856
+ width: "10%",
26857
+ render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
26858
+ React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input", type: "text" })))); },
26981
26859
  },
26982
26860
  {
26983
- title: t("ndc:ndcColumnsMinistry"),
26984
- dataIndex: "ministryName",
26985
- key: "ministryName",
26986
- align: "left",
26987
- width: 300,
26988
- editable: false,
26989
- render: function (_, record) { return (React.createElement(Tooltip, { title: isSubNdcActionsEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
26990
- React.createElement(Select, { disabled: !(isSubNdcActionsEditable(record) && isEditing(record)), defaultValue: record.ministryName ? record.ministryName : loginMinistry, style: { width: 220 }, onChange: function (value, option) {
26991
- record.ministryName = option.label;
26992
- handleSave(record);
26993
- }, options: ministryOrgList }))); },
26994
- },
26995
- {
26996
- title: t("ndc:ndcColumnsStatus"),
26997
- dataIndex: "status",
26998
- key: "status",
26861
+ title: "Government Department",
26862
+ dataIndex: "ministry",
26863
+ key: "ministry",
26999
26864
  align: "left",
27000
- width: 200,
27001
- editable: false,
27002
- render: function (_, record) {
27003
- var menu = actionMenu(record);
27004
- return (React.createElement("div", { onClick: function (event) { return event.stopPropagation(); } },
27005
- record.actionType === NdcDetailsActionType.SubAction &&
27006
- record.status !== NdcDetailsActionStatus.New ? (React.createElement(Tooltip, { title: record.status, color: TooltipColor, key: TooltipColor },
27007
- React.createElement(Tag, { className: "clickable", color: getNdcActionStatusTagType(record.status) }, addSpaces(record.status)))) : (""),
27008
- record.actionType === NdcDetailsActionType.SubAction && menu ? (React.createElement(Popover, { placement: "bottomRight", content: menu, trigger: "click" },
27009
- React.createElement(EllipsisOutlined, { rotate: 90, style: {
27010
- fontWeight: 600,
27011
- fontSize: "1rem",
27012
- cursor: "pointer",
27013
- } }))) : (React.createElement("span", null))));
27014
- },
26865
+ editable: true,
26866
+ width: "40%",
26867
+ render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
26868
+ React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Government Department", className: "ant-input", type: "text" })))); },
27015
26869
  },
27016
26870
  ];
27017
26871
  var columns = defaultColumns.map(function (col) {
27018
26872
  if (!col.editable) {
27019
26873
  return col;
27020
26874
  }
27021
- return __assign(__assign({}, col), { onCell: function (record) {
27022
- return {
27023
- record: record,
27024
- editing: isEditing(record),
27025
- dataIndex: col.dataIndex,
27026
- title: col.title,
27027
- onBlurHandler: function (record) {
27028
- if (isEditing(record)) {
27029
- handleSave(record);
27030
- }
27031
- },
27032
- t: t,
27033
- };
27034
- } });
26875
+ return __assign(__assign({}, col), { onCell: function (record) { return ({
26876
+ record: record,
26877
+ editable: col.editable,
26878
+ dataIndex: col.dataIndex,
26879
+ title: col.title,
26880
+ handleSave: handleSave,
26881
+ }); } });
27035
26882
  });
27036
- function onClickedAddNewNdcDetail() {
27037
- return __awaiter(this, void 0, void 0, function () {
27038
- var periodId, newData_1, lastPage;
27039
- return __generator(this, function (_a) {
27040
- if (selectedPeriod.key !== "add_new") {
27041
- form.setFieldsValue({
27042
- nationalPlanObjective: "",
27043
- kpi: "",
27044
- });
27045
- periodId = parseInt(selectedPeriod.key);
27046
- newData_1 = {
27047
- id: nextAvailableActionId,
27048
- actionType: NdcDetailsActionType.MainAction,
27049
- nationalPlanObjective: "",
27050
- kpi: "",
27051
- ministryName: loginMinistry,
27052
- periodId: periodId,
27053
- status: NdcDetailsActionStatus.New,
27054
- };
27055
- setEditingKey(nextAvailableActionId);
27056
- setNextAvailableActionId(function (value) { return value + 1; });
27057
- setNdcActionsList(function (ndcActionsList) { return __spreadArray(__spreadArray([], ndcActionsList, true), [
27058
- newData_1,
27059
- ], false); });
27060
- setTableKey(function (key) { return key + 1; });
27061
- if (ndcMainDetailsForPeriod.length + 1 > pageSize) {
27062
- lastPage = Math.ceil(ndcMainDetailsForPeriod.length / pageSize);
27063
- setCurrentPage(lastPage);
27064
- }
27065
- }
27066
- return [2 /*return*/];
27067
- });
27068
- });
26883
+ function onAddNewNdcDetail() {
26884
+ var range = selectedTab.split("-");
26885
+ var ndcActionId = ++addedNdcDetailId.current;
26886
+ var newData = {
26887
+ key: ndcActionId,
26888
+ type: NdcActionType.main,
26889
+ startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
26890
+ endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
26891
+ nationalPlanObj: "",
26892
+ kpi: "",
26893
+ ministry: "",
26894
+ subNdcDetails: [
26895
+ {
26896
+ key: ++addedNdcDetailId.current,
26897
+ ndcActionId: ndcActionId,
26898
+ type: NdcActionType.sub,
26899
+ startDate: new Date("2019-03-25"),
26900
+ endDate: new Date("2020-03-25"),
26901
+ nationalPlanObj: "",
26902
+ kpi: "",
26903
+ ministry: "",
26904
+ },
26905
+ ],
26906
+ };
26907
+ setNdcDetailsData(__spreadArray(__spreadArray([], ndcDetailsData, true), [newData], false));
27069
26908
  }
27070
26909
  var components = {
27071
26910
  body: {
26911
+ row: EditableRow,
27072
26912
  cell: EditableCell,
27073
26913
  },
27074
26914
  };
27075
- var onClickedDeletePeriod = function () { return __awaiter(void 0, void 0, void 0, function () {
27076
- return __generator(this, function (_a) {
27077
- setActionInfo({
27078
- action: "Delete",
27079
- headerText: t("ndc:periodDeleteConfirmTitle"),
27080
- type: "danger",
27081
- icon: React.createElement(Icon.XCircle, null),
27082
- recordId: selectedPeriod.key,
26915
+ //commented because rendering issue
26916
+ function ndcDetailsTableContent() {
26917
+ return (React.createElement("div", null)
26918
+ // <div>
26919
+ // <Button
26920
+ // onClick={onAddNewNdcDetail}
26921
+ // type="primary"
26922
+ // style={{
26923
+ // marginBottom: 16,
26924
+ // }}
26925
+ // >
26926
+ // Add a row
26927
+ // </Button>
26928
+ // <Table
26929
+ // components={components}
26930
+ // rowClassName={() => 'editable-row'}
26931
+ // bordered
26932
+ // dataSource={ndcDetailsData}
26933
+ // columns={columns}
26934
+ // />
26935
+ // </div>
26936
+ );
26937
+ }
26938
+ var onCancelPeriod = function () { };
26939
+ var onAddNewPeriod = function () {
26940
+ if (selectedPeriod &&
26941
+ selectedPeriod.current &&
26942
+ selectedPeriod.current.start &&
26943
+ selectedPeriod.current.end) {
26944
+ var newPeriodItem_1 = {
26945
+ key: "".concat(selectedPeriod.current.start, "-").concat(selectedPeriod.current.end),
26946
+ label: "".concat(selectedPeriod.current.start, "-").concat(selectedPeriod.current.end),
26947
+ start: selectedPeriod.current.start,
26948
+ end: selectedPeriod.current.end,
26949
+ children: ndcDetailsTableContent(),
26950
+ };
26951
+ var existingIndex = periodItemsRef.current.findIndex(function (item) {
26952
+ return inRange(newPeriodItem_1.start, item.start, item.end) ||
26953
+ inRange(newPeriodItem_1.end, item.start, item.end);
27083
26954
  });
27084
- setOpenConfirmationModal(true);
27085
- return [2 /*return*/];
27086
- });
27087
- }); };
27088
- var onClickedFinalizePeriod = function () { return __awaiter(void 0, void 0, void 0, function () {
27089
- var isPendingActionAvailable;
27090
- return __generator(this, function (_a) {
27091
- if (ndcMainDetailsForPeriod.length === 0) {
27092
- message.open({
27093
- type: "error",
27094
- content: t("ndc:finalizeNdcEmptyErrorText"),
27095
- duration: 3,
27096
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27097
- });
27098
- return [2 /*return*/];
26955
+ if (existingIndex === -1) {
26956
+ setPeriodItems(function (items) { return __spreadArray(__spreadArray([], items, true), [newPeriodItem_1], false); });
26957
+ periodItemsRef.current = __spreadArray(__spreadArray([], periodItemsRef.current, true), [newPeriodItem_1], false);
27099
26958
  }
27100
- isPendingActionAvailable = false;
27101
- ndcMainDetailsForPeriod.forEach(function (mainAction) {
27102
- var pendingActions = ndcActionsList.filter(function (action) {
27103
- return (action.status === NdcDetailsActionStatus.Pending &&
27104
- action.actionType === NdcDetailsActionType.SubAction &&
27105
- action.parentActionId === mainAction.id);
27106
- });
27107
- if (pendingActions && pendingActions.length > 0) {
27108
- isPendingActionAvailable = true;
27109
- return;
27110
- }
27111
- });
27112
- if (isPendingActionAvailable) {
26959
+ else {
27113
26960
  message.open({
27114
26961
  type: "error",
27115
- content: t("ndc:finalizeErrorText"),
26962
+ content: t("ndc:rangeAlreadyExists"),
27116
26963
  duration: 3,
27117
26964
  style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27118
26965
  });
27119
26966
  }
27120
- else {
27121
- setActionInfo({
27122
- action: "Finalize",
27123
- headerText: t("ndc:finalizeApproveTitle"),
27124
- text: t("ndc:finalizeApproveSubTitle"),
27125
- type: "primary",
27126
- icon: React.createElement(Icon.Clipboard2Check, null),
27127
- recordId: selectedPeriod.key,
27128
- });
27129
- setOpenConfirmationModal(true);
27130
- }
27131
- return [2 /*return*/];
27132
- });
27133
- }); };
27134
- var onMainTableRowExpand = function (expanded, record) {
27135
- var keys = [];
27136
- if (expanded) {
27137
- keys.push(record.id);
27138
26967
  }
27139
- setExpandedRowKeys(keys);
27140
- setNdcSubActionsForMainAction(record.id);
27141
26968
  };
27142
- function addNewPeriodContent() {
27143
- return (React.createElement("div", null,
27144
- React.createElement(Row, { justify: "start", align: "middle", gutter: [16, 16] },
27145
- React.createElement(Col, { flex: "340px" },
27146
- React.createElement(RangePicker, { disabledDate: function (current) { return moment(current).year() < 1900; }, onChange: onDateRangeChanged, picker: "year" })),
27147
- React.createElement(Col, { flex: "auto" },
27148
- React.createElement(Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit"))))));
27149
- }
27150
- var onChange = function (page, size) {
27151
- setCurrentPage(page);
27152
- setPageSize(size);
26969
+ useEffect(function () {
26970
+ if (periodItems && periodItems.length > 3) {
26971
+ setSelectedTab(periodItems[periodItems.length - 1].key);
26972
+ }
26973
+ }, [periodItems]);
26974
+ var onDateRangeChanged = function (range) {
26975
+ var period = {
26976
+ start: Number(moment(range[0]).year()),
26977
+ end: Number(moment(range[1]).year()),
26978
+ };
26979
+ selectedPeriod.current = period;
27153
26980
  };
27154
- function mainNdcActionTableContent() {
26981
+ function addNewPeriodContent() {
27155
26982
  return (React.createElement("div", null,
27156
26983
  React.createElement(Row, null,
27157
- React.createElement(Col, { span: 24 },
27158
- React.createElement(Form, { form: form, component: false },
27159
- React.createElement(Table, { tableLayout: "fixed", key: tableKey, className: "common-table-class", rowKey: "id", pagination: {
27160
- current: currentPage,
27161
- pageSize: pageSize,
27162
- total: ndcMainDetailsForPeriod.length,
27163
- showQuickJumper: true,
27164
- showSizeChanger: true,
27165
- onChange: onChange,
27166
- }, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, loading: loading, dataSource: ndcMainDetailsForPeriod, columns: columns, expandedRowKeys: expandedRowKeys, onExpand: onMainTableRowExpand, expandable: {
27167
- expandedRowRender: function (record) {
27168
- return subNdcActionTableContent();
27169
- },
27170
- columnWidth: 40,
27171
- }, onRow: function (record, rowIndex) {
27172
- return {
27173
- onClick: function (event) {
27174
- if (record.id &&
27175
- isNdcActionEditable(record) &&
27176
- !isEditing(record)) {
27177
- form.setFieldsValue(__assign({}, record));
27178
- setEditingKey(record.id);
27179
- }
27180
- },
27181
- onMouseLeave: function () {
27182
- if (isEditing(record)) {
27183
- handleSave(record);
27184
- }
27185
- },
27186
- };
27187
- }, footer: function () {
27188
- return isGovernmentUser &&
27189
- !selectedPeriod.finalized && (React.createElement(Row, { justify: "center" },
27190
- React.createElement(Button, { className: "btnAddNewMainAct", disabled: isMainActionInEditMode(), onClick: onClickedAddNewNdcDetail, type: "default" }, t("ndc:addNdcAction"))));
27191
- } })))),
27192
- isGovernmentUser && !selectedPeriod.finalized ? (React.createElement(Row, { justify: "end" },
27193
- React.createElement(Button, { className: "mg-left-1 btn-danger", onClick: onClickedDeletePeriod, htmlType: "submit", disabled: isMainActionInEditMode(), loading: loading }, t("ndc:delete")),
27194
- React.createElement(Button, { className: "mg-left-1 footer-btns", type: "primary", onClick: onClickedFinalizePeriod, disabled: isMainActionInEditMode(), htmlType: "submit", loading: loading }, t("ndc:finalize")))) : ("")));
27195
- }
27196
- function subNdcActionTableContent(record) {
27197
- return (React.createElement(Table, { tableLayout: "fixed", rowKey: "id", components: components, rowClassName: function () { return "editable-row"; }, className: "common-table-class", bordered: true, dataSource: subNdcActionsForPeriod, loading: loading, onRow: function (record, rowIndex) {
27198
- return {
27199
- onClick: function (event) {
27200
- if (record.id &&
27201
- isNdcActionEditable(record) &&
27202
- !isEditing(record)) {
27203
- form.setFieldsValue(__assign({}, record));
27204
- setEditingKey(record.id);
27205
- }
27206
- },
27207
- onMouseLeave: function () {
27208
- if (isEditing(record)) {
27209
- handleSave(record);
27210
- }
27211
- },
27212
- };
27213
- }, columns: columns, showHeader: false, pagination: false }));
26984
+ React.createElement(RangePicker, { onChange: onDateRangeChanged, picker: "year" })),
26985
+ React.createElement(Row, { className: "mg-top-1" },
26986
+ React.createElement("div", { className: "ndc-steps-actions" },
26987
+ React.createElement(Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit")),
26988
+ React.createElement(Button, { className: "back-btn", onClick: onCancelPeriod, loading: loading }, t("ndc:back"))))));
26989
+ }
26990
+ function getSubNdcActionContent(record) {
26991
+ selectedNdcDetail.current = record;
26992
+ return (React.createElement(Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getSubNdcDetails(record.key), columns: columns, showHeader: false, pagination: false }));
27214
26993
  }
27215
- var onAddNewPeriod = function () { return __awaiter(void 0, void 0, void 0, function () {
27216
- var periodItem_1, existingIndex, response, addedPeriodItem, updatedPeriodItem_1, exception_3;
27217
- return __generator(this, function (_a) {
27218
- switch (_a.label) {
27219
- case 0:
27220
- _a.trys.push([0, 4, , 5]);
27221
- if (!(selectedDateRangeRef &&
27222
- selectedDateRangeRef.current &&
27223
- selectedDateRangeRef.current.startYear &&
27224
- selectedDateRangeRef.current.endYear)) return [3 /*break*/, 3];
27225
- periodItem_1 = {
27226
- startYear: selectedDateRangeRef.current.startYear,
27227
- endYear: selectedDateRangeRef.current.endYear,
27228
- finalized: false,
27229
- };
27230
- existingIndex = periodItems.findIndex(function (item) {
27231
- return inRange(periodItem_1.startYear, item.startYear, item.endYear) ||
27232
- inRange(periodItem_1.endYear, item.startYear, item.endYear);
27233
- });
27234
- if (!(existingIndex === -1)) return [3 /*break*/, 2];
27235
- return [4 /*yield*/, post("national/programme/addNdcDetailsPeriod", __assign({}, periodItem_1))];
27236
- case 1:
27237
- response = _a.sent();
27238
- if (response && response.data) {
27239
- addedPeriodItem = response.data;
27240
- updatedPeriodItem_1 = __assign(__assign({}, addedPeriodItem), { key: addedPeriodItem.id, label: "".concat(addedPeriodItem.startYear, "-").concat(addedPeriodItem.endYear) });
27241
- setPeriodItems(function (items) { return __spreadArray(__spreadArray([], items, true), [updatedPeriodItem_1], false); });
27242
- setSelectedPeriod(updatedPeriodItem_1);
27243
- }
27244
- return [3 /*break*/, 3];
27245
- case 2:
27246
- message.open({
27247
- type: "error",
27248
- content: t("ndc:rangeAlreadyExists"),
27249
- duration: 3,
27250
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27251
- });
27252
- _a.label = 3;
27253
- case 3: return [3 /*break*/, 5];
27254
- case 4:
27255
- exception_3 = _a.sent();
27256
- message.open({
27257
- type: "error",
27258
- content: exception_3.message,
27259
- duration: 3,
27260
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27261
- });
27262
- return [3 /*break*/, 5];
27263
- case 5: return [2 /*return*/];
27264
- }
27265
- });
27266
- }); };
27267
- var onDateRangeChanged = function (range) {
27268
- if (range) {
27269
- var period = {
27270
- startYear: Number(moment(range[0]).year()),
27271
- endYear: Number(moment(range[1]).year()),
27272
- };
27273
- if (period.startYear === period.endYear) {
27274
- message.open({
27275
- type: "error",
27276
- content: t("ndc:sameStartEndDates"),
27277
- duration: 3,
27278
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27279
- });
27280
- }
27281
- else {
27282
- selectedDateRangeRef.current = period;
27283
- }
27284
- }
27285
- };
27286
26994
  var onTabChange = function (key) {
27287
- var selectedPeriod = periodItems.find(function (item) { return item.key === key; });
27288
- if (selectedPeriod) {
27289
- setSelectedPeriod(selectedPeriod);
27290
- }
27291
- };
27292
- var onActionConfirmed = function () { return __awaiter(void 0, void 0, void 0, function () {
27293
- var actionResponse, exception_4;
27294
- return __generator(this, function (_a) {
27295
- switch (_a.label) {
27296
- case 0:
27297
- setLoading(true);
27298
- _a.label = 1;
27299
- case 1:
27300
- _a.trys.push([1, 10, , 11]);
27301
- if (!(actionInfo.action === "Approve")) return [3 /*break*/, 3];
27302
- return [4 /*yield*/, post("national/programme/approveNdcDetailsAction", {
27303
- id: actionInfo.recordId,
27304
- })];
27305
- case 2:
27306
- actionResponse = _a.sent();
27307
- return [3 /*break*/, 9];
27308
- case 3:
27309
- if (!(actionInfo.action === "Reject")) return [3 /*break*/, 5];
27310
- return [4 /*yield*/, post("national/programme/rejectNdcDetailsAction", {
27311
- id: actionInfo.recordId,
27312
- })];
27313
- case 4:
27314
- actionResponse = _a.sent();
27315
- return [3 /*break*/, 9];
27316
- case 5:
27317
- if (!(actionInfo.action === "Finalize")) return [3 /*break*/, 7];
27318
- return [4 /*yield*/, post("national/programme/finalizeNdcDetailsPeriod", {
27319
- id: selectedPeriod.key,
27320
- })];
27321
- case 6:
27322
- actionResponse = _a.sent();
27323
- return [3 /*break*/, 9];
27324
- case 7:
27325
- if (!(actionInfo.action === "Delete")) return [3 /*break*/, 9];
27326
- return [4 /*yield*/, post("national/programme/deleteNdcDetailsPeriod", {
27327
- id: selectedPeriod.key,
27328
- })];
27329
- case 8:
27330
- actionResponse = _a.sent();
27331
- _a.label = 9;
27332
- case 9: return [3 /*break*/, 11];
27333
- case 10:
27334
- exception_4 = _a.sent();
27335
- message.open({
27336
- type: "error",
27337
- content: exception_4.message,
27338
- duration: 3,
27339
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27340
- });
27341
- return [3 /*break*/, 11];
27342
- case 11:
27343
- if (actionResponse) {
27344
- if (actionInfo.action === "Delete") {
27345
- message.open({
27346
- type: "success",
27347
- content: t("ndc:deletePeriodSuccessMsg"),
27348
- duration: 3,
27349
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27350
- });
27351
- fetchNdcDetailPeriods();
27352
- }
27353
- else if (actionInfo.action === "Finalize") {
27354
- message.open({
27355
- type: "success",
27356
- content: t("ndc:finalizeSuccessMsg"),
27357
- duration: 3,
27358
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27359
- });
27360
- fetchNdcDetailPeriods();
27361
- setExpandedRowKeys([]);
27362
- ClearEditMode();
27363
- }
27364
- else if (actionInfo.action === "Approve") {
27365
- message.open({
27366
- type: "success",
27367
- content: t("ndc:approveSuccessMsg"),
27368
- duration: 3,
27369
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27370
- });
27371
- fetchNdcDetailActions();
27372
- }
27373
- else if (actionInfo.action === "Reject") {
27374
- message.open({
27375
- type: "success",
27376
- content: t("ndc:rejectSuccessMsg"),
27377
- duration: 3,
27378
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27379
- });
27380
- fetchNdcDetailActions();
27381
- }
27382
- }
27383
- setOpenConfirmationModal(false);
27384
- setLoading(false);
27385
- return [2 /*return*/];
27386
- }
27387
- });
27388
- }); };
27389
- var onActionCanceled = function () {
27390
- setOpenConfirmationModal(false);
26995
+ setSelectedTab(key);
27391
26996
  };
27392
- var fetchNdcDetailPeriods = function () { return __awaiter(void 0, void 0, void 0, function () {
27393
- var periods, addNewTab, response, exception_5;
27394
- return __generator(this, function (_a) {
27395
- switch (_a.label) {
27396
- case 0:
27397
- setLoading(true);
27398
- _a.label = 1;
27399
- case 1:
27400
- _a.trys.push([1, 3, 4, 5]);
27401
- periods = [];
27402
- addNewTab = {
27403
- key: "add_new",
27404
- label: "Add New",
27405
- startYear: 0,
27406
- endYear: 0,
27407
- finalized: false,
27408
- deleted: false,
27409
- };
27410
- return [4 /*yield*/, get("national/programme/queryNdcDetailsPeriod")];
27411
- case 2:
27412
- response = _a.sent();
27413
- if (response && response.data) {
27414
- periods = response.data.map(function (period) {
27415
- return __assign(__assign({}, period), { key: period.id, label: period.finalized ? (React.createElement("span", null,
27416
- React.createElement(LockOutlined, null),
27417
- " ",
27418
- period.startYear,
27419
- "-",
27420
- period.endYear,
27421
- " ")) : ("".concat(period.startYear, "-").concat(period.endYear)) });
27422
- });
27423
- }
27424
- if (isGovernmentUser) {
27425
- periods.unshift(addNewTab);
27426
- }
27427
- setPeriodItems(periods);
27428
- if (isGovernmentUser) {
27429
- setSelectedPeriod(addNewTab);
27430
- }
27431
- else {
27432
- setSelectedPeriod(periods[0]);
27433
- }
27434
- setLoading(false);
27435
- return [3 /*break*/, 5];
27436
- case 3:
27437
- exception_5 = _a.sent();
27438
- message.open({
27439
- type: "error",
27440
- content: exception_5.message,
27441
- duration: 3,
27442
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27443
- });
27444
- return [3 /*break*/, 5];
27445
- case 4:
27446
- setLoading(false);
27447
- return [7 /*endfinally*/];
27448
- case 5: return [2 /*return*/];
27449
- }
27450
- });
27451
- }); };
27452
- var fetchNdcDetailActions = function () { return __awaiter(void 0, void 0, void 0, function () {
27453
- var response, maxActionId, exception_6;
27454
- return __generator(this, function (_a) {
27455
- switch (_a.label) {
27456
- case 0:
27457
- setLoading(true);
27458
- _a.label = 1;
27459
- case 1:
27460
- _a.trys.push([1, 3, 4, 5]);
27461
- return [4 /*yield*/, get("national/programme/queryNdcDetailsAction")];
27462
- case 2:
27463
- response = _a.sent();
27464
- if (response && response.data) {
27465
- maxActionId = Math.max.apply(Math, response.data.map(function (item) { return item.id; }));
27466
- setNextAvailableActionId(maxActionId + 1);
27467
- setNdcActionsList(response.data);
27468
- }
27469
- setLoading(false);
27470
- return [3 /*break*/, 5];
27471
- case 3:
27472
- exception_6 = _a.sent();
27473
- message.open({
27474
- type: "error",
27475
- content: exception_6.message,
27476
- duration: 3,
27477
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27478
- });
27479
- return [3 /*break*/, 5];
27480
- case 4:
27481
- setLoading(false);
27482
- return [7 /*endfinally*/];
27483
- case 5: return [2 /*return*/];
27484
- }
27485
- });
27486
- }); };
27487
- var fetchMinistries = function () { return __awaiter(void 0, void 0, void 0, function () {
27488
- var response, ministryOrgDetails, exception_7;
27489
- return __generator(this, function (_a) {
27490
- switch (_a.label) {
27491
- case 0:
27492
- setLoading(true);
27493
- _a.label = 1;
27494
- case 1:
27495
- _a.trys.push([1, 3, 4, 5]);
27496
- return [4 /*yield*/, get("national/organisation/getMinistries")];
27497
- case 2:
27498
- response = _a.sent();
27499
- if (response && response.data) {
27500
- ministryOrgDetails = response.data.map(function (value) {
27501
- return {
27502
- value: value.company_companyId,
27503
- label: value.company_name,
27504
- };
27505
- });
27506
- setMinistryOrgList(ministryOrgDetails);
27507
- }
27508
- setLoading(false);
27509
- return [3 /*break*/, 5];
27510
- case 3:
27511
- exception_7 = _a.sent();
27512
- message.open({
27513
- type: "error",
27514
- content: exception_7.message,
27515
- duration: 3,
27516
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27517
- });
27518
- return [3 /*break*/, 5];
27519
- case 4:
27520
- setLoading(false);
27521
- return [7 /*endfinally*/];
27522
- case 5: return [2 /*return*/];
27523
- }
27524
- });
27525
- }); };
27526
26997
  useEffect(function () {
27527
- fetchNdcDetailPeriods();
27528
- fetchNdcDetailActions();
27529
- fetchMinistries();
26998
+ var defaultNdcDetails = [
26999
+ {
27000
+ key: 1,
27001
+ type: NdcActionType.main,
27002
+ startDate: new Date("2019-03-25"),
27003
+ endDate: new Date("2020-03-25"),
27004
+ nationalPlanObj: "Enhance value addition in key growth opportunities",
27005
+ kpi: 25,
27006
+ ministry: "Ministry of Environment",
27007
+ subNdcDetails: [
27008
+ {
27009
+ key: 6,
27010
+ ndcActionId: 1,
27011
+ type: NdcActionType.sub,
27012
+ startDate: new Date("2019-03-25"),
27013
+ endDate: new Date("2020-03-25"),
27014
+ nationalPlanObj: "Enhance value addition in key growth opportunities sub details",
27015
+ kpi: 25,
27016
+ ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
27017
+ },
27018
+ {
27019
+ key: 7,
27020
+ ndcActionId: 1,
27021
+ type: NdcActionType.sub,
27022
+ startDate: new Date("2019-03-25"),
27023
+ endDate: new Date("2020-03-25"),
27024
+ nationalPlanObj: "",
27025
+ kpi: "",
27026
+ ministry: "",
27027
+ },
27028
+ ],
27029
+ },
27030
+ {
27031
+ key: 2,
27032
+ type: NdcActionType.main,
27033
+ startDate: new Date("2019-03-25"),
27034
+ endDate: new Date("2019-08-25"),
27035
+ nationalPlanObj: "Strengthen the private sector to create 10,000 jobs",
27036
+ kpi: 10500,
27037
+ ministry: "Ministry of Environment",
27038
+ subNdcDetails: [
27039
+ {
27040
+ key: 8,
27041
+ ndcActionId: 2,
27042
+ type: NdcActionType.sub,
27043
+ startDate: new Date("2019-03-25"),
27044
+ endDate: new Date("2020-03-25"),
27045
+ nationalPlanObj: "",
27046
+ kpi: "",
27047
+ ministry: "",
27048
+ },
27049
+ ],
27050
+ },
27051
+ {
27052
+ key: 12,
27053
+ type: NdcActionType.main,
27054
+ startDate: new Date("2019-03-25"),
27055
+ endDate: new Date("2019-08-25"),
27056
+ nationalPlanObj: "Other",
27057
+ kpi: 10500,
27058
+ ministry: "Ministry of Environment",
27059
+ subNdcDetails: [
27060
+ {
27061
+ key: 8,
27062
+ ndcActionId: 12,
27063
+ type: NdcActionType.sub,
27064
+ startDate: new Date("2019-03-25"),
27065
+ endDate: new Date("2020-03-25"),
27066
+ nationalPlanObj: "",
27067
+ kpi: "",
27068
+ ministry: "",
27069
+ },
27070
+ ],
27071
+ },
27072
+ {
27073
+ key: 3,
27074
+ type: NdcActionType.main,
27075
+ startDate: new Date("2021-03-25"),
27076
+ endDate: new Date("2022-03-25"),
27077
+ nationalPlanObj: "Consolidate and increase the stock and quality of productive infrastructure by 50%",
27078
+ kpi: 48,
27079
+ ministry: "Ministry of Environment",
27080
+ subNdcDetails: [
27081
+ {
27082
+ key: 9,
27083
+ ndcActionId: 3,
27084
+ type: NdcActionType.sub,
27085
+ startDate: new Date("2019-03-25"),
27086
+ endDate: new Date("2020-03-25"),
27087
+ nationalPlanObj: "",
27088
+ kpi: "",
27089
+ ministry: "",
27090
+ },
27091
+ ],
27092
+ },
27093
+ {
27094
+ key: 4,
27095
+ type: NdcActionType.main,
27096
+ startDate: new Date("2022-03-25"),
27097
+ endDate: new Date("2022-05-25"),
27098
+ nationalPlanObj: "Enhance the productivity and social wellbeing of the population",
27099
+ kpi: 20,
27100
+ ministry: "Ministry of Environment",
27101
+ subNdcDetails: [
27102
+ {
27103
+ key: 10,
27104
+ ndcActionId: 4,
27105
+ type: NdcActionType.sub,
27106
+ startDate: new Date("2019-03-25"),
27107
+ endDate: new Date("2020-03-25"),
27108
+ nationalPlanObj: "",
27109
+ kpi: "",
27110
+ ministry: "",
27111
+ },
27112
+ ],
27113
+ },
27114
+ {
27115
+ key: 5,
27116
+ type: NdcActionType.main,
27117
+ startDate: new Date("2022-03-25"),
27118
+ endDate: new Date("2023-03-25"),
27119
+ nationalPlanObj: "Strengthen the role of the state in guiding and facilitating development",
27120
+ kpi: 10,
27121
+ ministry: "Ministry of Environment",
27122
+ subNdcDetails: [
27123
+ {
27124
+ key: 11,
27125
+ ndcActionId: 5,
27126
+ type: NdcActionType.sub,
27127
+ startDate: new Date("2019-03-25"),
27128
+ endDate: new Date("2020-03-25"),
27129
+ nationalPlanObj: "",
27130
+ kpi: "",
27131
+ ministry: "",
27132
+ },
27133
+ ],
27134
+ },
27135
+ {
27136
+ key: 13,
27137
+ type: NdcActionType.main,
27138
+ startDate: new Date("2022-03-25"),
27139
+ endDate: new Date("2023-03-25"),
27140
+ nationalPlanObj: "Convert to solar energy",
27141
+ kpi: 50000,
27142
+ ministry: "Ministry of Environment",
27143
+ subNdcDetails: [
27144
+ {
27145
+ key: 11,
27146
+ ndcActionId: 13,
27147
+ type: NdcActionType.sub,
27148
+ startDate: new Date("2019-03-25"),
27149
+ endDate: new Date("2020-03-25"),
27150
+ nationalPlanObj: "Convert to solar energy",
27151
+ kpi: "3000",
27152
+ ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
27153
+ },
27154
+ {
27155
+ key: 14,
27156
+ ndcActionId: 13,
27157
+ type: NdcActionType.sub,
27158
+ startDate: new Date("2019-03-25"),
27159
+ endDate: new Date("2020-03-25"),
27160
+ nationalPlanObj: "",
27161
+ kpi: "",
27162
+ ministry: "",
27163
+ },
27164
+ ],
27165
+ },
27166
+ {
27167
+ key: 15,
27168
+ type: NdcActionType.main,
27169
+ startDate: new Date("2022-03-25"),
27170
+ endDate: new Date("2023-03-25"),
27171
+ nationalPlanObj: "Strengthen the private sector to create jobs",
27172
+ kpi: 10000,
27173
+ ministry: "Ministry of Environment",
27174
+ subNdcDetails: [
27175
+ {
27176
+ key: 16,
27177
+ ndcActionId: 15,
27178
+ type: NdcActionType.sub,
27179
+ startDate: new Date("2019-03-25"),
27180
+ endDate: new Date("2020-03-25"),
27181
+ nationalPlanObj: "Strengthen the private sector to create jobs",
27182
+ kpi: "7200",
27183
+ ministry: "Ministry of Tourism (MoT)",
27184
+ },
27185
+ {
27186
+ key: 17,
27187
+ ndcActionId: 15,
27188
+ type: NdcActionType.sub,
27189
+ startDate: new Date("2019-03-25"),
27190
+ endDate: new Date("2020-03-25"),
27191
+ nationalPlanObj: "",
27192
+ kpi: "",
27193
+ ministry: "",
27194
+ },
27195
+ ],
27196
+ },
27197
+ {
27198
+ key: 18,
27199
+ type: NdcActionType.main,
27200
+ startDate: new Date("2022-03-25"),
27201
+ endDate: new Date("2023-03-25"),
27202
+ nationalPlanObj: "Other",
27203
+ kpi: "",
27204
+ ministry: "Ministry of Environment",
27205
+ subNdcDetails: [
27206
+ {
27207
+ key: 19,
27208
+ ndcActionId: 18,
27209
+ type: NdcActionType.sub,
27210
+ startDate: new Date("2019-03-25"),
27211
+ endDate: new Date("2020-03-25"),
27212
+ nationalPlanObj: "Strengthen the private sector to create jobs",
27213
+ kpi: "",
27214
+ ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
27215
+ },
27216
+ {
27217
+ key: 20,
27218
+ ndcActionId: 18,
27219
+ type: NdcActionType.sub,
27220
+ startDate: new Date("2019-03-25"),
27221
+ endDate: new Date("2020-03-25"),
27222
+ nationalPlanObj: "",
27223
+ kpi: "",
27224
+ ministry: "",
27225
+ },
27226
+ ],
27227
+ },
27228
+ ];
27229
+ var initialPeriods = [
27230
+ {
27231
+ key: "2019-2020",
27232
+ label: "2019-2020",
27233
+ start: 2019,
27234
+ end: 2020,
27235
+ children: ndcDetailsTableContent(),
27236
+ },
27237
+ {
27238
+ key: "2021-2023",
27239
+ label: "2021-2023",
27240
+ start: 2021,
27241
+ end: 2021,
27242
+ children: ndcDetailsTableContent(),
27243
+ },
27244
+ ];
27245
+ if (isAddRangeVisible()) {
27246
+ initialPeriods.unshift({
27247
+ key: "add_new",
27248
+ label: "Add New",
27249
+ start: 0,
27250
+ end: 0,
27251
+ children: addNewPeriodContent(),
27252
+ });
27253
+ }
27254
+ addedNdcDetailId.current = 20;
27255
+ setPeriodItems(initialPeriods);
27256
+ periodItemsRef.current = initialPeriods;
27257
+ setNdcDetailsData(defaultNdcDetails);
27530
27258
  }, []);
27531
- return (React.createElement("div", { className: "ndc-details content-container" },
27259
+ return (React.createElement("div", { className: "ndc-management content-container" },
27532
27260
  React.createElement("div", { className: "title-bar" },
27533
27261
  React.createElement(Row, { justify: "space-between", align: "middle" },
27534
27262
  React.createElement(Col, { span: 20 },
27535
27263
  React.createElement("div", { className: "body-title" }, t("ndc:ndcTitle")),
27536
27264
  React.createElement("div", { className: "body-sub-title" }, t("ndc:ndcSubTitle"))))),
27537
27265
  React.createElement("div", null,
27538
- React.createElement(Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedPeriod.key, onChange: onTabChange })),
27539
- React.createElement("div", null, selectedPeriod.key === "add_new"
27540
- ? addNewPeriodContent()
27541
- : mainNdcActionTableContent()),
27542
- React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onActionConfirmed, onActionCanceled: onActionCanceled, openModal: openConfirmationModal, errorMsg: "", loading: loading })));
27266
+ React.createElement(Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
27267
+ selectedTab !== "add_new" && (React.createElement("div", null,
27268
+ React.createElement("div", null,
27269
+ React.createElement(Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
27270
+ expandedRowRender: function (record) { return getSubNdcActionContent(record); },
27271
+ indentSize: 0,
27272
+ defaultExpandedRowKeys: [selectedNdcDetail.current.key],
27273
+ }, footer: function () {
27274
+ return isAddNdcActionVisible() && (React.createElement(Row, { justify: "center" },
27275
+ React.createElement(Button, { onClick: onAddNewNdcDetail, type: "default", style: {
27276
+ marginBottom: 16,
27277
+ width: "100%",
27278
+ } }, t("ndc:addNdcAction"))));
27279
+ } }))))));
27543
27280
  };
27544
27281
 
27545
27282
  var ImgWithFallback = function (_a) {
@@ -28314,7 +28051,7 @@ var RejectDocumentationConfirmationModel = function (props) {
28314
28051
  React.createElement(Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
28315
28052
  };
28316
28053
 
28317
- var css_248z$2 = ".ndc-action-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: flex-start;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%;\n align-items: flex-start; }\n .ndc-action-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-body .report-details .report-type .name {\n font-weight: 600;\n color: rgba(58, 53, 65, 0.8); }\n .ndc-action-body .report-details .report-type .icon {\n display: flex;\n align-items: center;\n width: 30%; }\n .ndc-action-body .report-details .report-type .empty {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%;\n align-items: center;\n justify-content: flex-start;\n gap: 20px; }\n .ndc-action-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
28054
+ var css_248z$2 = ".ndc-action-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: flex-start;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%;\n align-items: flex-start; }\n .ndc-action-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-body .report-details .report-type .name {\n font-weight: 600;\n color: rgba(58, 53, 65, 0.8); }\n .ndc-action-body .report-details .report-type .icon {\n display: flex;\n width: 30%; }\n .ndc-action-body .report-details .report-type .empty {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%;\n justify-content: flex-start;\n gap: 20px;\n align-items: start; }\n .ndc-action-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
28318
28055
  styleInject(css_248z$2);
28319
28056
 
28320
28057
  var NdcActionBody = function (props) {
@@ -28580,7 +28317,7 @@ var NdcActionBody = function (props) {
28580
28317
  React.createElement("div", { className: "icon" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) ? (monitoringReportPending ? ((companyRolePermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
28581
28318
  React.createElement(LikeOutlined, { onClick: function () {
28582
28319
  return docAction(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.id, DocumentStatus.ACCEPTED, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.actionId, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.type);
28583
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28320
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: '3px' } }),
28584
28321
  React.createElement(DislikeOutlined, { onClick: function () {
28585
28322
  setRejectDocData({
28586
28323
  id: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.id,
@@ -28595,8 +28332,8 @@ var NdcActionBody = function (props) {
28595
28332
  icon: React.createElement(DislikeOutlined, null),
28596
28333
  });
28597
28334
  setOpenRejectDocConfirmationModal(true);
28598
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } })))) : monitoringReportAccepted ? (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })) : (monitoringReportRejected && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28599
- React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))))) : (React.createElement(React.Fragment, null,
28335
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: '3px' } })))) : monitoringReportAccepted ? (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: '3px' } })) : (monitoringReportRejected && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28336
+ React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70", paddingTop: '3px' } }))))) : (React.createElement(React.Fragment, null,
28600
28337
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
28601
28338
  ? t("programme:notAuthToUploadDoc")
28602
28339
  : uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
@@ -28627,7 +28364,7 @@ var NdcActionBody = function (props) {
28627
28364
  } }))))),
28628
28365
  (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement("div", { className: "report-link" },
28629
28366
  React.createElement("div", { className: "link" }, linkDocVisible(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) && (React.createElement("a", { href: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
28630
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
28367
+ React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47", paddingTop: '3px' } })))),
28631
28368
  !monitoringReportAccepted && (React.createElement(React.Fragment, null,
28632
28369
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
28633
28370
  ? t("programme:notAuthToUploadDoc")
@@ -28670,7 +28407,7 @@ var NdcActionBody = function (props) {
28670
28407
  ministryLevelPermission) && (React.createElement(React.Fragment, null,
28671
28408
  React.createElement(LikeOutlined, { onClick: function () {
28672
28409
  return docAction(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.id, DocumentStatus.ACCEPTED, verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.actionId, verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.type);
28673
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28410
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: '3px' } }),
28674
28411
  React.createElement(DislikeOutlined, { onClick: function () {
28675
28412
  setRejectDocData({
28676
28413
  id: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.id,
@@ -28685,8 +28422,8 @@ var NdcActionBody = function (props) {
28685
28422
  icon: React.createElement(DislikeOutlined, null),
28686
28423
  });
28687
28424
  setOpenRejectDocConfirmationModal(true);
28688
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } })))) : verificationReportAccepted ? (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })) : (verifcationReportRejected && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28689
- React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))))) : (React.createElement(React.Fragment, null,
28425
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: '3px' } })))) : verificationReportAccepted ? (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: '3px' } })) : (verifcationReportRejected && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28426
+ React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70", paddingTop: '3px' } }))))) : (React.createElement(React.Fragment, null,
28690
28427
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
28691
28428
  ? t("programme:notAuthToUploadDoc")
28692
28429
  : uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
@@ -28717,7 +28454,7 @@ var NdcActionBody = function (props) {
28717
28454
  } })))))),
28718
28455
  (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement("div", { className: "report-link" },
28719
28456
  React.createElement("div", { className: "link" }, linkDocVisible(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) && (React.createElement("a", { href: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
28720
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
28457
+ React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47", paddingTop: '3px' } })))),
28721
28458
  !verificationReportAccepted && monitoringReportAccepted && (React.createElement(React.Fragment, null,
28722
28459
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
28723
28460
  ? t("programme:notAuthToUploadDoc")
@@ -28750,7 +28487,7 @@ var NdcActionBody = function (props) {
28750
28487
  React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
28751
28488
  };
28752
28489
 
28753
- var css_248z$1 = ".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 .info-view .field-key .label-container {\n display: flex;\n flex-direction: row; }\n .info-view .field-key .label {\n width: 70%; }\n .info-view .field-key .label-uploaded {\n color: rgba(58, 53, 65, 0.8);\n width: 70%; }\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 .link {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 20px; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
28490
+ var css_248z$1 = ".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 .info-view .field-key .label-container {\n display: flex;\n flex-direction: row;\n align-items: start; }\n .info-view .field-key .label {\n width: 70%; }\n .info-view .field-key .label-uploaded {\n color: rgba(58, 53, 65, 0.8);\n width: 70%; }\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 .link {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 20px; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
28754
28491
  styleInject(css_248z$1);
28755
28492
 
28756
28493
  var ProgrammeDocuments = function (props) {
@@ -28997,7 +28734,7 @@ var ProgrammeDocuments = function (props) {
28997
28734
  (designDocActionPermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
28998
28735
  React.createElement(LikeOutlined, { onClick: function () {
28999
28736
  return docAction(designDocId, DocumentStatus.ACCEPTED);
29000
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28737
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: "3px" } }),
29001
28738
  React.createElement(DislikeOutlined, { onClick: function () {
29002
28739
  setRejectDocData({ id: designDocId });
29003
28740
  setActionInfo({
@@ -29008,8 +28745,8 @@ var ProgrammeDocuments = function (props) {
29008
28745
  icon: React.createElement(DislikeOutlined, null),
29009
28746
  });
29010
28747
  setOpenRejectDocConfirmationModal(true);
29011
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
29012
- designDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
28748
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: "3px" } }))),
28749
+ designDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: "3px" } })),
29013
28750
  designDocStatus === DocumentStatus.REJECTED && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
29014
28751
  React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
29015
28752
  designDocUrl !== "" && (React.createElement("div", { className: "time" },
@@ -29017,15 +28754,23 @@ var ProgrammeDocuments = function (props) {
29017
28754
  " ~ " + designDocversion))),
29018
28755
  React.createElement(Col, { span: 6, className: "field-value" }, designDocUrl !== "" ? (React.createElement("div", { className: "link" },
29019
28756
  linkDocVisible(designDocStatus) && (React.createElement("a", { href: designDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
29020
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
28757
+ React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))),
29021
28758
  designDocStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
29022
28759
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly ||
29023
28760
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER
29024
28761
  ? t("programme:notAuthToUploadDoc")
29025
28762
  : !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29026
28763
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29027
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29028
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28764
+ ? {
28765
+ color: "#3F3A47",
28766
+ cursor: "pointer",
28767
+ margin: "0px 0px 1.5px 0px",
28768
+ }
28769
+ : {
28770
+ color: "#cacaca",
28771
+ cursor: "default",
28772
+ margin: "0px 0px 1.5px 0px",
28773
+ }, onClick: function () {
29029
28774
  return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
29030
28775
  } })),
29031
28776
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -29038,8 +28783,16 @@ var ProgrammeDocuments = function (props) {
29038
28783
  ? t("programme:notAuthToUploadDoc")
29039
28784
  : !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29040
28785
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29041
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29042
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28786
+ ? {
28787
+ color: "#3F3A47",
28788
+ cursor: "pointer",
28789
+ margin: "0px 0px 1.5px 0px",
28790
+ }
28791
+ : {
28792
+ color: "#cacaca",
28793
+ cursor: "default",
28794
+ margin: "0px 0px 1.5px 0px",
28795
+ }, onClick: function () {
29043
28796
  return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
29044
28797
  } })),
29045
28798
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -29065,7 +28818,7 @@ var ProgrammeDocuments = function (props) {
29065
28818
  (companyRolePermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
29066
28819
  React.createElement(LikeOutlined, { onClick: function () {
29067
28820
  return docAction(methDocId, DocumentStatus.ACCEPTED);
29068
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28821
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: "3px" } }),
29069
28822
  React.createElement(DislikeOutlined, { onClick: function () {
29070
28823
  setRejectDocData({ id: methDocId });
29071
28824
  setActionInfo({
@@ -29076,8 +28829,8 @@ var ProgrammeDocuments = function (props) {
29076
28829
  icon: React.createElement(DislikeOutlined, null),
29077
28830
  });
29078
28831
  setOpenRejectDocConfirmationModal(true);
29079
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
29080
- methodDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
28832
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: "3px" } }))),
28833
+ methodDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: "3px" } })),
29081
28834
  methodDocStatus === DocumentStatus.REJECTED && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
29082
28835
  React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
29083
28836
  methodologyDocUrl !== "" && (React.createElement("div", { className: "time" },
@@ -29085,15 +28838,22 @@ var ProgrammeDocuments = function (props) {
29085
28838
  " ~ " + methDocversion))),
29086
28839
  React.createElement(Col, { span: 6, className: "field-value" }, methodologyDocUrl !== "" ? (React.createElement("div", { className: "link" },
29087
28840
  linkDocVisible(methodDocStatus) && (React.createElement("a", { href: methodologyDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
29088
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
28841
+ React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))),
29089
28842
  methodDocStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
29090
28843
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
29091
28844
  ? t("programme:notAuthToUploadDoc")
29092
28845
  : !uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29093
28846
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
29094
28847
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29095
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29096
- : { color: "#cacaca", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28848
+ ? {
28849
+ color: "#3F3A47",
28850
+ cursor: "pointer",
28851
+ margin: "0px 0px 1.5px 0px",
28852
+ }
28853
+ : {
28854
+ color: "#cacaca",
28855
+ margin: "0px 0px 1.5px 0px",
28856
+ }, onClick: function () {
29097
28857
  return designDocStatus === DocumentStatus.ACCEPTED &&
29098
28858
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
29099
28859
  handleMethodologyFileUpload();
@@ -29112,8 +28872,16 @@ var ProgrammeDocuments = function (props) {
29112
28872
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29113
28873
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
29114
28874
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29115
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29116
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28875
+ ? {
28876
+ color: "#3F3A47",
28877
+ cursor: "pointer",
28878
+ margin: "0px 0px 1.5px 0px",
28879
+ }
28880
+ : {
28881
+ color: "#cacaca",
28882
+ cursor: "default",
28883
+ margin: "0px 0px 1.5px 0px",
28884
+ }, onClick: function () {
29117
28885
  return designDocStatus === DocumentStatus.ACCEPTED &&
29118
28886
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
29119
28887
  handleMethodologyFileUpload();
@@ -29142,7 +28910,7 @@ var ProgrammeDocuments = function (props) {
29142
28910
  (ministryLevelPermission || companyRolePermission) && (React.createElement(React.Fragment, null,
29143
28911
  React.createElement(LikeOutlined, { onClick: function () {
29144
28912
  return docAction(impactAssessmentId, DocumentStatus.ACCEPTED);
29145
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28913
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: "3px" } }),
29146
28914
  React.createElement(DislikeOutlined, { onClick: function () {
29147
28915
  setRejectDocData({ id: impactAssessmentId });
29148
28916
  setActionInfo({
@@ -29153,8 +28921,8 @@ var ProgrammeDocuments = function (props) {
29153
28921
  icon: React.createElement(DislikeOutlined, null),
29154
28922
  });
29155
28923
  setOpenRejectDocConfirmationModal(true);
29156
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
29157
- impactAssessmentStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
28924
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: "3px" } }))),
28925
+ impactAssessmentStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: "3px" } })),
29158
28926
  impactAssessmentStatus === DocumentStatus.REJECTED && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
29159
28927
  React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
29160
28928
  impactAssessmentUrl !== "" && (React.createElement("div", { className: "time" },
@@ -29162,13 +28930,22 @@ var ProgrammeDocuments = function (props) {
29162
28930
  " ~ " + impactAssessmentversion))),
29163
28931
  React.createElement(Col, { span: 6, className: "field-value" }, impactAssessmentUrl !== "" ? (React.createElement("div", { className: "link" },
29164
28932
  linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
29165
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
28933
+ React.createElement("div", null,
28934
+ React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))),
29166
28935
  impactAssessmentStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
29167
28936
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
29168
28937
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
29169
28938
  !isProjectRejected
29170
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29171
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28939
+ ? {
28940
+ color: "#3F3A47",
28941
+ cursor: "pointer",
28942
+ margin: "0px 0px 1.5px 0px",
28943
+ }
28944
+ : {
28945
+ color: "#cacaca",
28946
+ cursor: "default",
28947
+ margin: "0px 0px 1.5px 0px",
28948
+ }, onClick: function () {
29172
28949
  return uploadImpactAssessmentDocUserPermission &&
29173
28950
  !isProjectRejected &&
29174
28951
  handleImpactAssessmentFileUpload();
@@ -29181,8 +28958,16 @@ var ProgrammeDocuments = function (props) {
29181
28958
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
29182
28959
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
29183
28960
  !isProjectRejected
29184
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29185
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28961
+ ? {
28962
+ color: "#3F3A47",
28963
+ cursor: "pointer",
28964
+ margin: "0px 0px 1.5px 0px",
28965
+ }
28966
+ : {
28967
+ color: "#cacaca",
28968
+ cursor: "default",
28969
+ margin: "0px 0px 1.5px 0px",
28970
+ }, onClick: function () {
29186
28971
  return uploadImpactAssessmentDocUserPermission &&
29187
28972
  !isProjectRejected &&
29188
28973
  handleImpactAssessmentFileUpload();
@@ -29249,5 +29034,5 @@ var TimelineBody = function (props) {
29249
29034
  React.createElement("div", { className: "remark-body" }, remark)))));
29250
29035
  };
29251
29036
 
29252
- export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, EnergyGenerationUnits, FormElementType, 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, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SupportCreationComponent, SupportManagementComponent, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, 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 };
29037
+ export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, EnergyGenerationUnits, FormElementType, 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, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SupportCreationComponent, SupportManagementComponent, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
29253
29038
  //# sourceMappingURL=index.js.map