@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/cjs/index.js CHANGED
@@ -2047,7 +2047,7 @@ exports.NdcActionStatus = void 0;
2047
2047
  NdcActionStatus["PENDING"] = "Pending";
2048
2048
  NdcActionStatus["APPROVED"] = "Approved";
2049
2049
  })(exports.NdcActionStatus || (exports.NdcActionStatus = {}));
2050
- var getNdcActionStatusEnumVal$1 = function (value) {
2050
+ var getNdcActionStatusEnumVal = function (value) {
2051
2051
  var index = Object.keys(exports.NdcActionStatus).indexOf(value);
2052
2052
  if (index < 0) {
2053
2053
  return value;
@@ -2055,7 +2055,7 @@ var getNdcActionStatusEnumVal$1 = function (value) {
2055
2055
  return Object.values(exports.NdcActionStatus)[index];
2056
2056
  };
2057
2057
  var getNdcStatusTagType = function (status) {
2058
- switch (getNdcActionStatusEnumVal$1(status)) {
2058
+ switch (getNdcActionStatusEnumVal(status)) {
2059
2059
  case exports.NdcActionStatus.PENDING:
2060
2060
  return "processing";
2061
2061
  case exports.NdcActionStatus.APPROVED:
@@ -21725,7 +21725,7 @@ var NdcActionViewComponent = function (props) {
21725
21725
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
21726
21726
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
21727
21727
  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 },
21728
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
21728
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))),
21729
21729
  (reportData === null || reportData === void 0 ? void 0 : reportData.txTime) && (React.createElement("div", { className: "time" },
21730
21730
  moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
21731
21731
  " ~ " + reportVersion))));
@@ -21882,13 +21882,15 @@ var NdcActionViewComponent = function (props) {
21882
21882
  ((_b = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.agricultureProperties) === null || _b === void 0 ? void 0 : _b.landAreaUnit);
21883
21883
  }
21884
21884
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === exports.MitigationTypes.AGRICULTURE &&
21885
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === exports.MitigationSubTypes.SOIL_ENRICHMENT_BIOCHAR &&
21885
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21886
+ exports.MitigationSubTypes.SOIL_ENRICHMENT_BIOCHAR &&
21886
21887
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties)) {
21887
21888
  mitigationDetails[t("ndcAction:viewMitigationWeight")] =
21888
- addCommSep((_c = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _c === void 0 ? void 0 : _c.weight) + 't';
21889
+ addCommSep((_c = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _c === void 0 ? void 0 : _c.weight) + "t";
21889
21890
  }
21890
21891
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === exports.MitigationTypes.SOLAR &&
21891
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === exports.MitigationSubTypes.SOLAR_PHOTOVOLTAICS_PV &&
21892
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21893
+ exports.MitigationSubTypes.SOLAR_PHOTOVOLTAICS_PV &&
21892
21894
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.solarProperties)) {
21893
21895
  mitigationDetails[t("ndcAction:viewMitigationEnergyGeneration")] =
21894
21896
  addCommSep((_d = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.solarProperties) === null || _d === void 0 ? void 0 : _d.energyGeneration) +
@@ -21897,15 +21899,17 @@ var NdcActionViewComponent = function (props) {
21897
21899
  (_f = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.solarProperties) === null || _f === void 0 ? void 0 : _f.consumerGroup;
21898
21900
  }
21899
21901
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === exports.MitigationTypes.SOLAR &&
21900
- ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === exports.MitigationSubTypes.SOLAR_WATER_PUMPING_OFF_GRID ||
21901
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === exports.MitigationSubTypes.SOLAR_WATER_PUMPING_ON_GRID) &&
21902
+ ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21903
+ exports.MitigationSubTypes.SOLAR_WATER_PUMPING_OFF_GRID ||
21904
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21905
+ exports.MitigationSubTypes.SOLAR_WATER_PUMPING_ON_GRID) &&
21902
21906
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties)) {
21903
21907
  mitigationDetails[t("ndcAction:viewMitigationEnergyGeneration")] =
21904
- addCommSep((_g = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _g === void 0 ? void 0 : _g.energyGeneration) +
21905
- ((_h = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _h === void 0 ? void 0 : _h.energyGenerationUnit);
21908
+ 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);
21906
21909
  }
21907
21910
  if ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.typeOfMitigation) === exports.MitigationTypes.EE_HOUSEHOLDS &&
21908
- (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) === exports.MitigationSubTypes.STOVES_HOUSES_IN_NAMIBIA &&
21911
+ (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.subTypeOfMitigation) ===
21912
+ exports.MitigationSubTypes.STOVES_HOUSES_IN_NAMIBIA &&
21909
21913
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties)) {
21910
21914
  mitigationDetails[t("ndcAction:viewMitigationNoOfDays")] =
21911
21915
  (_j = ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.creditCalculationProperties) === null || _j === void 0 ? void 0 : _j.numberOfDays;
@@ -22088,23 +22092,24 @@ var NdcActionViewComponent = function (props) {
22088
22092
  : "empty" }, t("programme:monitoringReport")),
22089
22093
  (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
22090
22094
  moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
22091
- " ~ " + monitoringReportversion))),
22095
+ " ~ " + monitoringReportversion)))),
22096
+ React.createElement(antd.Row, null,
22092
22097
  React.createElement("div", { className: "icon" }, !(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
22093
22098
  ? t("programme:notAuthToUploadDoc")
22094
22099
  : uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId)
22095
22100
  ? !canUploadMonitorReport &&
22096
22101
  t("programme:programmeNotAuth")
22097
22102
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
22098
- React.createElement(icons.FileAddOutlined, null))))),
22099
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(antd.Row, null,
22100
- React.createElement("div", { className: "icon" },
22101
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22102
- exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22103
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22104
- exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22105
- React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
22106
- 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 },
22107
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))))),
22103
+ React.createElement(icons.FileAddOutlined, null)))),
22104
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(React.Fragment, null,
22105
+ React.createElement("div", { className: "icon" },
22106
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22107
+ exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22108
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
22109
+ exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22110
+ React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
22111
+ 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 },
22112
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))))))),
22108
22113
  React.createElement("div", { className: "report-details" },
22109
22114
  React.createElement("div", { className: "report-type" },
22110
22115
  React.createElement("div", { className: "name-time-container" },
@@ -22113,23 +22118,24 @@ var NdcActionViewComponent = function (props) {
22113
22118
  : "empty" }, t("programme:verificationReport")),
22114
22119
  (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
22115
22120
  moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
22116
- " ~ " + verificationReportVersion))),
22121
+ " ~ " + verificationReportVersion)))),
22122
+ React.createElement(antd.Row, null,
22117
22123
  React.createElement("div", { className: "icon" }, !(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
22118
22124
  ? t("programme:notAuthToUploadDoc")
22119
22125
  : uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId)
22120
22126
  ? !monitoringReportAccepted &&
22121
22127
  t("programme:monitoringRepNotApproved")
22122
22128
  : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
22123
- React.createElement(icons.FileAddOutlined, null))))),
22124
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(antd.Row, null,
22125
- React.createElement("div", { className: "icon" },
22126
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22127
- exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22128
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22129
- exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22130
- React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
22131
- 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 },
22132
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))))))))))),
22129
+ React.createElement(icons.FileAddOutlined, null)))),
22130
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(React.Fragment, null,
22131
+ React.createElement("div", { className: "icon" },
22132
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22133
+ exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
22134
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
22135
+ exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
22136
+ React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
22137
+ 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 },
22138
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))))))))))))),
22133
22139
  ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.Mitigation ||
22134
22140
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.CrossCutting) && (React.createElement(antd.Row, null,
22135
22141
  React.createElement(antd.Col, { lg: 24, className: "gutter-row" },
@@ -26675,891 +26681,622 @@ var RegistryDashboardComponent = function (props) {
26675
26681
  lastUpdateTransferLocations))))))))) : ("")));
26676
26682
  };
26677
26683
 
26678
- React.createContext(null);
26684
+ var EditableContext = React.createContext(null);
26685
+ var EditableRow = function (_a) {
26686
+ _a.index; var props = __rest(_a, ["index"]);
26687
+ var form = antd.Form.useForm()[0];
26688
+ return (React.createElement(antd.Form, { form: form, component: false },
26689
+ React.createElement(EditableContext.Provider, { value: form },
26690
+ React.createElement("tr", __assign({}, props)))));
26691
+ };
26679
26692
  var EditableCell = function (_a) {
26680
- 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"]);
26681
- return (React.createElement("td", __assign({}, restProps), editing && dataIndex === "nationalPlanObjective" ? (React.createElement(antd.Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
26682
- {
26683
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
26684
- var trimValue;
26685
- return __generator(this, function (_a) {
26686
- trimValue = typeof value === "string" ? value.trim() : value;
26687
- if (!trimValue) {
26688
- throw new Error("".concat(title, " ").concat(t("ndc:isRequired")));
26689
- }
26690
- return [2 /*return*/];
26691
- });
26692
- }); },
26693
- },
26694
- ] },
26695
- React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:nationalPlanObjectivePlaceHolder") }))) : editing && dataIndex === "kpi" ? (React.createElement(antd.Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
26696
- {
26697
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
26698
- var trimValue;
26699
- return __generator(this, function (_a) {
26700
- trimValue = typeof value === "string" ? value.trim() : value;
26701
- if (trimValue) {
26702
- if (isNaN(+trimValue)) {
26703
- throw new Error(t("ndc:kpiInvalidFormat"));
26704
- }
26705
- else if (+trimValue <= 0) {
26706
- throw new Error(t("ndc:kpiGreaterThanZero"));
26707
- }
26708
- else if (trimValue.toString().length > 7) {
26709
- throw new Error(t("ndc:kpiMaxLength"));
26710
- }
26711
- }
26712
- else {
26713
- throw new Error("".concat(title, " ").concat(t("ndc:isRequired")));
26714
- }
26715
- return [2 /*return*/];
26716
- });
26717
- }); },
26718
- },
26719
- ] },
26720
- React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:kpiPlaceHolder") }))) : (children)));
26693
+ 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"]);
26694
+ var _b = React.useState(false), editing = _b[0], setEditing = _b[1];
26695
+ var inputRef = React.useRef(null);
26696
+ var form = React.useContext(EditableContext);
26697
+ React.useEffect(function () {
26698
+ if (editing) {
26699
+ inputRef.current.focus();
26700
+ }
26701
+ }, [editing]);
26702
+ var toggleEdit = function () {
26703
+ var _a;
26704
+ setEditing(!editing);
26705
+ form.setFieldsValue((_a = {}, _a[dataIndex] = record[dataIndex], _a));
26706
+ };
26707
+ var save = function () { return __awaiter(void 0, void 0, void 0, function () {
26708
+ var values, errInfo_1;
26709
+ return __generator(this, function (_a) {
26710
+ switch (_a.label) {
26711
+ case 0:
26712
+ _a.trys.push([0, 2, , 3]);
26713
+ return [4 /*yield*/, form.validateFields()];
26714
+ case 1:
26715
+ values = _a.sent();
26716
+ toggleEdit();
26717
+ handleSave(__assign(__assign({}, record), values));
26718
+ return [3 /*break*/, 3];
26719
+ case 2:
26720
+ errInfo_1 = _a.sent();
26721
+ console.log("Save failed:", errInfo_1);
26722
+ return [3 /*break*/, 3];
26723
+ case 3: return [2 /*return*/];
26724
+ }
26725
+ });
26726
+ }); };
26727
+ var childNode = children;
26728
+ if (editable) {
26729
+ childNode = editing ? (React.createElement(antd.Form.Item, { style: { margin: 0 }, name: dataIndex, rules: [
26730
+ {
26731
+ required: true,
26732
+ message: "".concat(title, " is required."),
26733
+ },
26734
+ ] },
26735
+ React.createElement(antd.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));
26736
+ }
26737
+ return React.createElement("td", __assign({}, restProps), childNode);
26721
26738
  };
26722
26739
 
26723
- 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";
26740
+ 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";
26724
26741
  styleInject(css_248z$4);
26725
26742
 
26726
- var NdcDetailsActionType;
26727
- (function (NdcDetailsActionType) {
26728
- NdcDetailsActionType["MainAction"] = "MainAction";
26729
- NdcDetailsActionType["SubAction"] = "SubAction";
26730
- })(NdcDetailsActionType || (NdcDetailsActionType = {}));
26731
- var NdcDetailsActionStatus;
26732
- (function (NdcDetailsActionStatus) {
26733
- NdcDetailsActionStatus["New"] = "New";
26734
- NdcDetailsActionStatus["Pending"] = "Pending";
26735
- NdcDetailsActionStatus["Approved"] = "Approved";
26736
- NdcDetailsActionStatus["Rejected"] = "Rejected";
26737
- })(NdcDetailsActionStatus || (NdcDetailsActionStatus = {}));
26738
- var getNdcActionStatusEnumVal = function (value) {
26739
- var index = Object.keys(NdcDetailsActionStatus).indexOf(value);
26740
- if (index < 0) {
26741
- return value;
26742
- }
26743
- return Object.values(NdcDetailsActionStatus)[index];
26744
- };
26745
- var getNdcActionStatusTagType = function (status) {
26746
- switch (getNdcActionStatusEnumVal(status)) {
26747
- case NdcDetailsActionStatus.Rejected:
26748
- return "error";
26749
- case NdcDetailsActionStatus.Pending:
26750
- return "processing";
26751
- case NdcDetailsActionStatus.Approved:
26752
- return "success";
26753
- default:
26754
- return "default";
26755
- }
26756
- };
26757
-
26743
+ var NdcActionType;
26744
+ (function (NdcActionType) {
26745
+ NdcActionType[NdcActionType["main"] = 0] = "main";
26746
+ NdcActionType[NdcActionType["sub"] = 1] = "sub";
26747
+ })(NdcActionType || (NdcActionType = {}));
26758
26748
  var NdcDetailsComponent = function (props) {
26759
- var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext;
26749
+ var t = props.t; props.useConnection; var useUserContext = props.useUserContext;
26760
26750
  var RangePicker = antd.DatePicker.RangePicker;
26761
- var _a = React.useState([]), ndcActionsList = _a[0], setNdcActionsList = _a[1];
26762
- var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
26751
+ var _a = React.useState([]), ndcDetailsData = _a[0], setNdcDetailsData = _a[1];
26752
+ var _b = React.useState(false), loading = _b[0]; _b[1];
26753
+ var periodItemsRef = React.useRef([]);
26763
26754
  var _c = React.useState([]), periodItems = _c[0], setPeriodItems = _c[1];
26764
- var _d = React.useState({}), selectedPeriod = _d[0], setSelectedPeriod = _d[1];
26765
- var selectedDateRangeRef = React.useRef({});
26755
+ var _d = React.useState("add_new"), selectedTab = _d[0], setSelectedTab = _d[1];
26756
+ var selectedPeriod = React.useRef({});
26757
+ var addedNdcDetailId = React.useRef(0);
26758
+ var selectedNdcDetail = React.useRef({});
26766
26759
  var _e = React.useState(0), tableKey = _e[0], setTableKey = _e[1];
26767
- var _f = useConnection(), get = _f.get, post = _f.post, put = _f.put;
26768
- var _g = React.useState([]), ministryOrgList = _g[0], setMinistryOrgList = _g[1];
26769
- var _h = React.useState({}), actionInfo = _h[0], setActionInfo = _h[1];
26770
- var _j = React.useState(false), openConfirmationModal = _j[0], setOpenConfirmationModal = _j[1];
26771
- var form = antd.Form.useForm()[0];
26772
- var _k = React.useState(null), editingKey = _k[0], setEditingKey = _k[1];
26773
- var _l = React.useState(0), nextAvailableActionId = _l[0], setNextAvailableActionId = _l[1];
26774
- var _m = React.useState([]), expandedRowKeys = _m[0], setExpandedRowKeys = _m[1];
26775
- var _o = React.useState([]), subNdcActionsForPeriod = _o[0], setSubNdcActionsForPeriod = _o[1];
26776
- var _p = React.useState(1), currentPage = _p[0], setCurrentPage = _p[1];
26777
- var _q = React.useState(10), pageSize = _q[0], setPageSize = _q[1];
26778
- var isEditing = function (record) { return record.id === editingKey; };
26779
- var isMainActionInEditMode = function () {
26780
- if (editingKey) {
26781
- var action = ndcActionsList.find(function (item) { return item.id === editingKey; });
26782
- if (action && action.actionType === NdcDetailsActionType.MainAction) {
26783
- return true;
26784
- }
26785
- }
26786
- return false;
26787
- };
26788
26760
  var userInfoState = useUserContext().userInfoState;
26789
- React.useEffect(function () {
26790
- if (expandedRowKeys && expandedRowKeys.length > 0) {
26791
- var expandedKey = expandedRowKeys[0];
26792
- setNdcSubActionsForMainAction(expandedKey);
26793
- }
26794
- }, ndcActionsList);
26795
- var loginMinistry = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26796
- ? process.env.REACT_APP_GOVERNMENT_MINISTRY
26797
- ? process.env.REACT_APP_GOVERNMENT_MINISTRY
26798
- : "Ministry Of Environment"
26799
- : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY
26800
- ? userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyName
26801
- : undefined;
26802
- var isGovernmentUser = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT &&
26803
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly;
26804
- var isMainNdcActionsEditable = !selectedPeriod.finalized &&
26805
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT &&
26806
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly;
26807
- var isSubNdcActionsEditable = function (record) {
26808
- return (!selectedPeriod.finalized &&
26809
- record.status !== NdcDetailsActionStatus.Approved &&
26810
- ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
26811
- ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY &&
26812
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyName) === record.ministryName)) &&
26761
+ var isAddRangeVisible = function () {
26762
+ return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY ||
26763
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT) &&
26813
26764
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly);
26814
26765
  };
26815
- var checkSubNdcActionCreatePermission = function () {
26816
- return (!selectedPeriod.finalized &&
26817
- ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
26818
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) &&
26766
+ var isAddNdcActionVisible = function () {
26767
+ return ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT &&
26819
26768
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly);
26820
26769
  };
26821
- var isNdcActionEditable = function (record) {
26822
- if (record.actionType === NdcDetailsActionType.MainAction) {
26823
- return isMainNdcActionsEditable;
26824
- }
26825
- else if (record.actionType === NdcDetailsActionType.SubAction) {
26826
- return isSubNdcActionsEditable(record);
26827
- }
26828
- };
26829
- var ndcMainDetailsForPeriod = selectedPeriod.key !== "add_new"
26830
- ? ndcActionsList.filter(function (ndcDetail) {
26831
- return (ndcDetail.periodId === parseInt(selectedPeriod.key) &&
26832
- ndcDetail.actionType === NdcDetailsActionType.MainAction);
26833
- })
26834
- : [];
26835
- var setNdcSubActionsForMainAction = function (mainActionId) {
26836
- var subNdcDetails = ndcActionsList.filter(function (ndcDetail) {
26837
- return (ndcDetail.parentActionId === mainActionId &&
26838
- ndcDetail.actionType === NdcDetailsActionType.SubAction);
26839
- });
26840
- var emptySubNdcRow = {
26841
- id: nextAvailableActionId,
26842
- actionType: NdcDetailsActionType.SubAction,
26843
- nationalPlanObjective: "",
26844
- kpi: "",
26845
- ministryName: loginMinistry,
26846
- status: NdcDetailsActionStatus.New,
26847
- parentActionId: mainActionId,
26848
- };
26849
- if (checkSubNdcActionCreatePermission()) {
26850
- subNdcDetails = __spreadArray(__spreadArray([], subNdcDetails, true), [emptySubNdcRow], false);
26851
- setEditingKey(nextAvailableActionId);
26852
- setNextAvailableActionId(function (value) { return value + 1; });
26853
- form.setFieldsValue({
26854
- nationalPlanObjective: "",
26855
- kpi: "",
26856
- });
26857
- }
26858
- setSubNdcActionsForPeriod(subNdcDetails);
26859
- };
26860
26770
  var inRange = function (num, min, max) {
26861
26771
  return num >= min && num <= max;
26862
26772
  };
26863
- var ClearEditMode = function () {
26864
- var unsavedMainActions = ndcActionsList.filter(function (item) {
26865
- return item.status === NdcDetailsActionStatus.New &&
26866
- item.actionType === NdcDetailsActionType.MainAction;
26867
- });
26868
- if (unsavedMainActions && unsavedMainActions.length) {
26869
- var updatedActions = ndcActionsList.filter(function (item) { return !unsavedMainActions.includes(item); });
26870
- setNdcActionsList(updatedActions);
26871
- }
26872
- setEditingKey(null);
26873
- };
26874
- var handleSave = function (row) { return __awaiter(void 0, void 0, void 0, function () {
26875
- var updatedFields, updatedItem, exception_2;
26876
- return __generator(this, function (_a) {
26877
- switch (_a.label) {
26878
- case 0:
26879
- _a.trys.push([0, 9, , 10]);
26880
- updatedFields = void 0;
26881
- _a.label = 1;
26882
- case 1:
26883
- _a.trys.push([1, 3, , 4]);
26884
- return [4 /*yield*/, form.validateFields()];
26885
- case 2:
26886
- updatedFields = (_a.sent());
26887
- return [3 /*break*/, 4];
26888
- case 3:
26889
- _a.sent();
26890
- return [2 /*return*/];
26891
- case 4:
26892
- if (!updatedFields) {
26893
- ClearEditMode();
26894
- return [2 /*return*/];
26895
- }
26896
- else if (updatedFields.kpi === row.kpi &&
26897
- updatedFields.nationalPlanObjective === row.nationalPlanObjective) {
26898
- ClearEditMode();
26899
- return [2 /*return*/];
26900
- }
26901
- updatedItem = __assign(__assign({}, row), updatedFields);
26902
- if (!(updatedItem.status === NdcDetailsActionStatus.New)) return [3 /*break*/, 6];
26903
- if (isGovernmentUser &&
26904
- updatedItem.actionType === NdcDetailsActionType.SubAction) {
26905
- updatedItem.status = NdcDetailsActionStatus.Approved;
26773
+ function onAddNewSubNdcDetail() {
26774
+ var range = selectedTab.split("-");
26775
+ var ndcDetail = ndcDetailsData.find(function (item) { return item.key === selectedNdcDetail.current.key; });
26776
+ var ndcDetailItemIndex = ndcDetailsData.findIndex(function (item) { return item.key === selectedNdcDetail.current.key; });
26777
+ if (ndcDetail) {
26778
+ addedNdcDetailId.current = addedNdcDetailId.current + 1;
26779
+ var newData = {
26780
+ key: addedNdcDetailId.current,
26781
+ startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
26782
+ endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
26783
+ ndcActionId: ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.key,
26784
+ nationalPlanObj: "",
26785
+ kpi: "",
26786
+ ministry: "",
26787
+ };
26788
+ if (!ndcDetail.subNdcDetails) {
26789
+ ndcDetail.subNdcDetails = [];
26790
+ }
26791
+ ndcDetail.subNdcDetails.push(newData);
26792
+ }
26793
+ ndcDetailsData[ndcDetailItemIndex] = ndcDetail;
26794
+ setNdcDetailsData(ndcDetailsData);
26795
+ setTableKey(function (key) { return key + 1; });
26796
+ }
26797
+ var handleSave = function (row) {
26798
+ setNdcDetailsData(function (prevData) {
26799
+ var newData = JSON.parse(JSON.stringify(prevData));
26800
+ if (row.type === NdcActionType.main) {
26801
+ var index = newData.findIndex(function (item) { return row.key === item.key; });
26802
+ if (index !== -1) {
26803
+ newData[index] = __assign(__assign({}, newData[index]), row);
26804
+ }
26805
+ }
26806
+ else {
26807
+ var parentIndex = newData.findIndex(function (item) { return row.ndcActionId === item.key; });
26808
+ var parentItem = newData[parentIndex];
26809
+ if (parentItem) {
26810
+ if (parentItem.subNdcDetails) {
26811
+ var itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return row.key === item.key; });
26812
+ if (itemIndex === -1) {
26813
+ parentItem.subNdcDetails.push(row);
26814
+ }
26815
+ else {
26816
+ parentItem.subNdcDetails[itemIndex] = __assign({}, row);
26817
+ }
26906
26818
  }
26907
26819
  else {
26908
- updatedItem.status = NdcDetailsActionStatus.Pending;
26820
+ parentItem.subNdcDetails = [row];
26909
26821
  }
26910
- return [4 /*yield*/, post("national/programme/addNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseInt(updatedItem.kpi.toString()) }))];
26911
- case 5:
26912
- _a.sent();
26913
- return [3 /*break*/, 8];
26914
- case 6:
26915
- updatedItem.status = NdcDetailsActionStatus.Pending;
26916
- return [4 /*yield*/, put("national/programme/updateNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseInt(updatedItem.kpi.toString()) }))];
26917
- case 7:
26918
- _a.sent();
26919
- _a.label = 8;
26920
- case 8:
26921
- fetchNdcDetailActions();
26922
- ClearEditMode();
26923
- return [3 /*break*/, 10];
26924
- case 9:
26925
- exception_2 = _a.sent();
26926
- ClearEditMode();
26927
- antd.message.open({
26928
- type: "error",
26929
- content: exception_2.message,
26930
- duration: 3,
26931
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
26932
- });
26933
- return [3 /*break*/, 10];
26934
- case 10: return [2 /*return*/];
26822
+ }
26823
+ newData[parentIndex] = __assign({}, parentItem);
26824
+ setTableKey(function (key) { return key + 1; });
26935
26825
  }
26826
+ return newData;
26936
26827
  });
26937
- }); };
26938
- var actionMenu = function (record) {
26939
- if (record.status === NdcDetailsActionStatus.Pending &&
26940
- isGovernmentUser &&
26941
- !selectedPeriod.finalized) {
26942
- return (React.createElement(antd.List, { className: "action-menu", size: "small", dataSource: [
26943
- {
26944
- text: t("ndc:approve"),
26945
- icon: React.createElement(Icon__namespace.BoxArrowInDown, null),
26946
- style: "color-primary",
26947
- click: function () {
26948
- setActionInfo({
26949
- action: "Approve",
26950
- headerText: t("ndc:actionApproveTitle"),
26951
- type: "primary",
26952
- icon: React.createElement(Icon__namespace.BoxArrowInDown, null),
26953
- recordId: record.id,
26954
- });
26955
- setOpenConfirmationModal(true);
26956
- },
26957
- },
26958
- {
26959
- text: t("ndc:reject"),
26960
- icon: React.createElement(Icon__namespace.XOctagon, null),
26961
- style: "color-error",
26962
- click: function () {
26963
- setActionInfo({
26964
- action: "Reject",
26965
- headerText: t("ndc:rejectApproveTitle"),
26966
- type: "danger",
26967
- icon: React.createElement(Icon__namespace.XOctagon, null),
26968
- recordId: record.id,
26969
- });
26970
- setOpenConfirmationModal(true);
26971
- },
26972
- },
26973
- ], renderItem: function (item) { return (React.createElement(antd.List.Item, { onClick: item.click },
26974
- React.createElement(antd.Typography.Text, { className: "action-icon ".concat(item.style) }, item.icon),
26975
- React.createElement("span", null, item.text))); } }));
26828
+ };
26829
+ var getNdcDetailsForPeriod = function () {
26830
+ var range = selectedTab.split("-");
26831
+ if (range.length > 1) {
26832
+ var filteredData = ndcDetailsData.filter(function (item) {
26833
+ return inRange(Number(moment(item.startDate).year()), Number(range[0]), Number(range[1]));
26834
+ });
26835
+ return filteredData;
26836
+ }
26837
+ else {
26838
+ return [];
26839
+ }
26840
+ };
26841
+ var getSubNdcDetails = function (key) {
26842
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
26843
+ var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
26844
+ if (ndcDetail) {
26845
+ 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()) !== "" &&
26846
+ ((_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) &&
26847
+ ((_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()) !== "" &&
26848
+ ((_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) &&
26849
+ 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() !== "" &&
26850
+ 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)) {
26851
+ onAddNewSubNdcDetail();
26852
+ }
26853
+ return ndcDetail.subNdcDetails;
26976
26854
  }
26977
26855
  else {
26978
- return null;
26856
+ return [];
26979
26857
  }
26980
26858
  };
26981
26859
  var defaultColumns = [
26982
26860
  {
26983
26861
  title: t("ndc:ndcColumnsNationalPlanObj"),
26984
- dataIndex: "nationalPlanObjective",
26985
- key: "nationalPlanObjective",
26862
+ dataIndex: "nationalPlanObj",
26863
+ key: "nationalPlanObj",
26986
26864
  align: "left",
26987
- width: 400,
26988
26865
  editable: true,
26989
- render: function (_, record) { return (React.createElement(antd.Space, { size: "middle" }, record.nationalPlanObjective ? (React.createElement(antd.Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
26990
- React.createElement("span", null, record.nationalPlanObjective))) : (React.createElement(antd.Input, { placeholder: t("ndc:nationalPlanObjectivePlaceHolder") })))); },
26866
+ width: "50%",
26867
+ render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
26868
+ React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add Programmes", className: "ant-input", type: "text" })))); },
26991
26869
  },
26992
26870
  {
26993
26871
  title: t("ndc:ndcColumnsKpi"),
26994
26872
  dataIndex: "kpi",
26995
26873
  key: "kpi",
26996
26874
  align: "left",
26997
- width: 100,
26998
26875
  editable: true,
26999
- render: function (_, record) { return (React.createElement(antd.Space, { size: "middle" }, record.kpi ? (React.createElement(antd.Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
27000
- React.createElement("span", null, record.kpi))) : (React.createElement(antd.Input, { placeholder: "Enter Kpi" })))); },
26876
+ width: "10%",
26877
+ render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
26878
+ React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input", type: "text" })))); },
27001
26879
  },
27002
26880
  {
27003
- title: t("ndc:ndcColumnsMinistry"),
27004
- dataIndex: "ministryName",
27005
- key: "ministryName",
27006
- align: "left",
27007
- width: 300,
27008
- editable: false,
27009
- render: function (_, record) { return (React.createElement(antd.Tooltip, { title: isSubNdcActionsEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
27010
- React.createElement(antd.Select, { disabled: !(isSubNdcActionsEditable(record) && isEditing(record)), defaultValue: record.ministryName ? record.ministryName : loginMinistry, style: { width: 220 }, onChange: function (value, option) {
27011
- record.ministryName = option.label;
27012
- handleSave(record);
27013
- }, options: ministryOrgList }))); },
27014
- },
27015
- {
27016
- title: t("ndc:ndcColumnsStatus"),
27017
- dataIndex: "status",
27018
- key: "status",
26881
+ title: "Government Department",
26882
+ dataIndex: "ministry",
26883
+ key: "ministry",
27019
26884
  align: "left",
27020
- width: 200,
27021
- editable: false,
27022
- render: function (_, record) {
27023
- var menu = actionMenu(record);
27024
- return (React.createElement("div", { onClick: function (event) { return event.stopPropagation(); } },
27025
- record.actionType === NdcDetailsActionType.SubAction &&
27026
- record.status !== NdcDetailsActionStatus.New ? (React.createElement(antd.Tooltip, { title: record.status, color: TooltipColor, key: TooltipColor },
27027
- React.createElement(antd.Tag, { className: "clickable", color: getNdcActionStatusTagType(record.status) }, addSpaces(record.status)))) : (""),
27028
- record.actionType === NdcDetailsActionType.SubAction && menu ? (React.createElement(antd.Popover, { placement: "bottomRight", content: menu, trigger: "click" },
27029
- React.createElement(icons.EllipsisOutlined, { rotate: 90, style: {
27030
- fontWeight: 600,
27031
- fontSize: "1rem",
27032
- cursor: "pointer",
27033
- } }))) : (React.createElement("span", null))));
27034
- },
26885
+ editable: true,
26886
+ width: "40%",
26887
+ render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
26888
+ React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Government Department", className: "ant-input", type: "text" })))); },
27035
26889
  },
27036
26890
  ];
27037
26891
  var columns = defaultColumns.map(function (col) {
27038
26892
  if (!col.editable) {
27039
26893
  return col;
27040
26894
  }
27041
- return __assign(__assign({}, col), { onCell: function (record) {
27042
- return {
27043
- record: record,
27044
- editing: isEditing(record),
27045
- dataIndex: col.dataIndex,
27046
- title: col.title,
27047
- onBlurHandler: function (record) {
27048
- if (isEditing(record)) {
27049
- handleSave(record);
27050
- }
27051
- },
27052
- t: t,
27053
- };
27054
- } });
26895
+ return __assign(__assign({}, col), { onCell: function (record) { return ({
26896
+ record: record,
26897
+ editable: col.editable,
26898
+ dataIndex: col.dataIndex,
26899
+ title: col.title,
26900
+ handleSave: handleSave,
26901
+ }); } });
27055
26902
  });
27056
- function onClickedAddNewNdcDetail() {
27057
- return __awaiter(this, void 0, void 0, function () {
27058
- var periodId, newData_1, lastPage;
27059
- return __generator(this, function (_a) {
27060
- if (selectedPeriod.key !== "add_new") {
27061
- form.setFieldsValue({
27062
- nationalPlanObjective: "",
27063
- kpi: "",
27064
- });
27065
- periodId = parseInt(selectedPeriod.key);
27066
- newData_1 = {
27067
- id: nextAvailableActionId,
27068
- actionType: NdcDetailsActionType.MainAction,
27069
- nationalPlanObjective: "",
27070
- kpi: "",
27071
- ministryName: loginMinistry,
27072
- periodId: periodId,
27073
- status: NdcDetailsActionStatus.New,
27074
- };
27075
- setEditingKey(nextAvailableActionId);
27076
- setNextAvailableActionId(function (value) { return value + 1; });
27077
- setNdcActionsList(function (ndcActionsList) { return __spreadArray(__spreadArray([], ndcActionsList, true), [
27078
- newData_1,
27079
- ], false); });
27080
- setTableKey(function (key) { return key + 1; });
27081
- if (ndcMainDetailsForPeriod.length + 1 > pageSize) {
27082
- lastPage = Math.ceil(ndcMainDetailsForPeriod.length / pageSize);
27083
- setCurrentPage(lastPage);
27084
- }
27085
- }
27086
- return [2 /*return*/];
27087
- });
27088
- });
26903
+ function onAddNewNdcDetail() {
26904
+ var range = selectedTab.split("-");
26905
+ var ndcActionId = ++addedNdcDetailId.current;
26906
+ var newData = {
26907
+ key: ndcActionId,
26908
+ type: NdcActionType.main,
26909
+ startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
26910
+ endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
26911
+ nationalPlanObj: "",
26912
+ kpi: "",
26913
+ ministry: "",
26914
+ subNdcDetails: [
26915
+ {
26916
+ key: ++addedNdcDetailId.current,
26917
+ ndcActionId: ndcActionId,
26918
+ type: NdcActionType.sub,
26919
+ startDate: new Date("2019-03-25"),
26920
+ endDate: new Date("2020-03-25"),
26921
+ nationalPlanObj: "",
26922
+ kpi: "",
26923
+ ministry: "",
26924
+ },
26925
+ ],
26926
+ };
26927
+ setNdcDetailsData(__spreadArray(__spreadArray([], ndcDetailsData, true), [newData], false));
27089
26928
  }
27090
26929
  var components = {
27091
26930
  body: {
26931
+ row: EditableRow,
27092
26932
  cell: EditableCell,
27093
26933
  },
27094
26934
  };
27095
- var onClickedDeletePeriod = function () { return __awaiter(void 0, void 0, void 0, function () {
27096
- return __generator(this, function (_a) {
27097
- setActionInfo({
27098
- action: "Delete",
27099
- headerText: t("ndc:periodDeleteConfirmTitle"),
27100
- type: "danger",
27101
- icon: React.createElement(Icon__namespace.XCircle, null),
27102
- recordId: selectedPeriod.key,
26935
+ //commented because rendering issue
26936
+ function ndcDetailsTableContent() {
26937
+ return (React.createElement("div", null)
26938
+ // <div>
26939
+ // <Button
26940
+ // onClick={onAddNewNdcDetail}
26941
+ // type="primary"
26942
+ // style={{
26943
+ // marginBottom: 16,
26944
+ // }}
26945
+ // >
26946
+ // Add a row
26947
+ // </Button>
26948
+ // <Table
26949
+ // components={components}
26950
+ // rowClassName={() => 'editable-row'}
26951
+ // bordered
26952
+ // dataSource={ndcDetailsData}
26953
+ // columns={columns}
26954
+ // />
26955
+ // </div>
26956
+ );
26957
+ }
26958
+ var onCancelPeriod = function () { };
26959
+ var onAddNewPeriod = function () {
26960
+ if (selectedPeriod &&
26961
+ selectedPeriod.current &&
26962
+ selectedPeriod.current.start &&
26963
+ selectedPeriod.current.end) {
26964
+ var newPeriodItem_1 = {
26965
+ key: "".concat(selectedPeriod.current.start, "-").concat(selectedPeriod.current.end),
26966
+ label: "".concat(selectedPeriod.current.start, "-").concat(selectedPeriod.current.end),
26967
+ start: selectedPeriod.current.start,
26968
+ end: selectedPeriod.current.end,
26969
+ children: ndcDetailsTableContent(),
26970
+ };
26971
+ var existingIndex = periodItemsRef.current.findIndex(function (item) {
26972
+ return inRange(newPeriodItem_1.start, item.start, item.end) ||
26973
+ inRange(newPeriodItem_1.end, item.start, item.end);
27103
26974
  });
27104
- setOpenConfirmationModal(true);
27105
- return [2 /*return*/];
27106
- });
27107
- }); };
27108
- var onClickedFinalizePeriod = function () { return __awaiter(void 0, void 0, void 0, function () {
27109
- var isPendingActionAvailable;
27110
- return __generator(this, function (_a) {
27111
- if (ndcMainDetailsForPeriod.length === 0) {
27112
- antd.message.open({
27113
- type: "error",
27114
- content: t("ndc:finalizeNdcEmptyErrorText"),
27115
- duration: 3,
27116
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27117
- });
27118
- return [2 /*return*/];
26975
+ if (existingIndex === -1) {
26976
+ setPeriodItems(function (items) { return __spreadArray(__spreadArray([], items, true), [newPeriodItem_1], false); });
26977
+ periodItemsRef.current = __spreadArray(__spreadArray([], periodItemsRef.current, true), [newPeriodItem_1], false);
27119
26978
  }
27120
- isPendingActionAvailable = false;
27121
- ndcMainDetailsForPeriod.forEach(function (mainAction) {
27122
- var pendingActions = ndcActionsList.filter(function (action) {
27123
- return (action.status === NdcDetailsActionStatus.Pending &&
27124
- action.actionType === NdcDetailsActionType.SubAction &&
27125
- action.parentActionId === mainAction.id);
27126
- });
27127
- if (pendingActions && pendingActions.length > 0) {
27128
- isPendingActionAvailable = true;
27129
- return;
27130
- }
27131
- });
27132
- if (isPendingActionAvailable) {
26979
+ else {
27133
26980
  antd.message.open({
27134
26981
  type: "error",
27135
- content: t("ndc:finalizeErrorText"),
26982
+ content: t("ndc:rangeAlreadyExists"),
27136
26983
  duration: 3,
27137
26984
  style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27138
26985
  });
27139
26986
  }
27140
- else {
27141
- setActionInfo({
27142
- action: "Finalize",
27143
- headerText: t("ndc:finalizeApproveTitle"),
27144
- text: t("ndc:finalizeApproveSubTitle"),
27145
- type: "primary",
27146
- icon: React.createElement(Icon__namespace.Clipboard2Check, null),
27147
- recordId: selectedPeriod.key,
27148
- });
27149
- setOpenConfirmationModal(true);
27150
- }
27151
- return [2 /*return*/];
27152
- });
27153
- }); };
27154
- var onMainTableRowExpand = function (expanded, record) {
27155
- var keys = [];
27156
- if (expanded) {
27157
- keys.push(record.id);
27158
26987
  }
27159
- setExpandedRowKeys(keys);
27160
- setNdcSubActionsForMainAction(record.id);
27161
26988
  };
27162
- function addNewPeriodContent() {
27163
- return (React.createElement("div", null,
27164
- React.createElement(antd.Row, { justify: "start", align: "middle", gutter: [16, 16] },
27165
- React.createElement(antd.Col, { flex: "340px" },
27166
- React.createElement(RangePicker, { disabledDate: function (current) { return moment(current).year() < 1900; }, onChange: onDateRangeChanged, picker: "year" })),
27167
- React.createElement(antd.Col, { flex: "auto" },
27168
- React.createElement(antd.Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit"))))));
27169
- }
27170
- var onChange = function (page, size) {
27171
- setCurrentPage(page);
27172
- setPageSize(size);
26989
+ React.useEffect(function () {
26990
+ if (periodItems && periodItems.length > 3) {
26991
+ setSelectedTab(periodItems[periodItems.length - 1].key);
26992
+ }
26993
+ }, [periodItems]);
26994
+ var onDateRangeChanged = function (range) {
26995
+ var period = {
26996
+ start: Number(moment(range[0]).year()),
26997
+ end: Number(moment(range[1]).year()),
26998
+ };
26999
+ selectedPeriod.current = period;
27173
27000
  };
27174
- function mainNdcActionTableContent() {
27001
+ function addNewPeriodContent() {
27175
27002
  return (React.createElement("div", null,
27176
27003
  React.createElement(antd.Row, null,
27177
- React.createElement(antd.Col, { span: 24 },
27178
- React.createElement(antd.Form, { form: form, component: false },
27179
- React.createElement(antd.Table, { tableLayout: "fixed", key: tableKey, className: "common-table-class", rowKey: "id", pagination: {
27180
- current: currentPage,
27181
- pageSize: pageSize,
27182
- total: ndcMainDetailsForPeriod.length,
27183
- showQuickJumper: true,
27184
- showSizeChanger: true,
27185
- onChange: onChange,
27186
- }, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, loading: loading, dataSource: ndcMainDetailsForPeriod, columns: columns, expandedRowKeys: expandedRowKeys, onExpand: onMainTableRowExpand, expandable: {
27187
- expandedRowRender: function (record) {
27188
- return subNdcActionTableContent();
27189
- },
27190
- columnWidth: 40,
27191
- }, onRow: function (record, rowIndex) {
27192
- return {
27193
- onClick: function (event) {
27194
- if (record.id &&
27195
- isNdcActionEditable(record) &&
27196
- !isEditing(record)) {
27197
- form.setFieldsValue(__assign({}, record));
27198
- setEditingKey(record.id);
27199
- }
27200
- },
27201
- onMouseLeave: function () {
27202
- if (isEditing(record)) {
27203
- handleSave(record);
27204
- }
27205
- },
27206
- };
27207
- }, footer: function () {
27208
- return isGovernmentUser &&
27209
- !selectedPeriod.finalized && (React.createElement(antd.Row, { justify: "center" },
27210
- React.createElement(antd.Button, { className: "btnAddNewMainAct", disabled: isMainActionInEditMode(), onClick: onClickedAddNewNdcDetail, type: "default" }, t("ndc:addNdcAction"))));
27211
- } })))),
27212
- isGovernmentUser && !selectedPeriod.finalized ? (React.createElement(antd.Row, { justify: "end" },
27213
- React.createElement(antd.Button, { className: "mg-left-1 btn-danger", onClick: onClickedDeletePeriod, htmlType: "submit", disabled: isMainActionInEditMode(), loading: loading }, t("ndc:delete")),
27214
- React.createElement(antd.Button, { className: "mg-left-1 footer-btns", type: "primary", onClick: onClickedFinalizePeriod, disabled: isMainActionInEditMode(), htmlType: "submit", loading: loading }, t("ndc:finalize")))) : ("")));
27215
- }
27216
- function subNdcActionTableContent(record) {
27217
- return (React.createElement(antd.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) {
27218
- return {
27219
- onClick: function (event) {
27220
- if (record.id &&
27221
- isNdcActionEditable(record) &&
27222
- !isEditing(record)) {
27223
- form.setFieldsValue(__assign({}, record));
27224
- setEditingKey(record.id);
27225
- }
27226
- },
27227
- onMouseLeave: function () {
27228
- if (isEditing(record)) {
27229
- handleSave(record);
27230
- }
27231
- },
27232
- };
27233
- }, columns: columns, showHeader: false, pagination: false }));
27004
+ React.createElement(RangePicker, { onChange: onDateRangeChanged, picker: "year" })),
27005
+ React.createElement(antd.Row, { className: "mg-top-1" },
27006
+ React.createElement("div", { className: "ndc-steps-actions" },
27007
+ React.createElement(antd.Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit")),
27008
+ React.createElement(antd.Button, { className: "back-btn", onClick: onCancelPeriod, loading: loading }, t("ndc:back"))))));
27009
+ }
27010
+ function getSubNdcActionContent(record) {
27011
+ selectedNdcDetail.current = record;
27012
+ return (React.createElement(antd.Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getSubNdcDetails(record.key), columns: columns, showHeader: false, pagination: false }));
27234
27013
  }
27235
- var onAddNewPeriod = function () { return __awaiter(void 0, void 0, void 0, function () {
27236
- var periodItem_1, existingIndex, response, addedPeriodItem, updatedPeriodItem_1, exception_3;
27237
- return __generator(this, function (_a) {
27238
- switch (_a.label) {
27239
- case 0:
27240
- _a.trys.push([0, 4, , 5]);
27241
- if (!(selectedDateRangeRef &&
27242
- selectedDateRangeRef.current &&
27243
- selectedDateRangeRef.current.startYear &&
27244
- selectedDateRangeRef.current.endYear)) return [3 /*break*/, 3];
27245
- periodItem_1 = {
27246
- startYear: selectedDateRangeRef.current.startYear,
27247
- endYear: selectedDateRangeRef.current.endYear,
27248
- finalized: false,
27249
- };
27250
- existingIndex = periodItems.findIndex(function (item) {
27251
- return inRange(periodItem_1.startYear, item.startYear, item.endYear) ||
27252
- inRange(periodItem_1.endYear, item.startYear, item.endYear);
27253
- });
27254
- if (!(existingIndex === -1)) return [3 /*break*/, 2];
27255
- return [4 /*yield*/, post("national/programme/addNdcDetailsPeriod", __assign({}, periodItem_1))];
27256
- case 1:
27257
- response = _a.sent();
27258
- if (response && response.data) {
27259
- addedPeriodItem = response.data;
27260
- updatedPeriodItem_1 = __assign(__assign({}, addedPeriodItem), { key: addedPeriodItem.id, label: "".concat(addedPeriodItem.startYear, "-").concat(addedPeriodItem.endYear) });
27261
- setPeriodItems(function (items) { return __spreadArray(__spreadArray([], items, true), [updatedPeriodItem_1], false); });
27262
- setSelectedPeriod(updatedPeriodItem_1);
27263
- }
27264
- return [3 /*break*/, 3];
27265
- case 2:
27266
- antd.message.open({
27267
- type: "error",
27268
- content: t("ndc:rangeAlreadyExists"),
27269
- duration: 3,
27270
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27271
- });
27272
- _a.label = 3;
27273
- case 3: return [3 /*break*/, 5];
27274
- case 4:
27275
- exception_3 = _a.sent();
27276
- antd.message.open({
27277
- type: "error",
27278
- content: exception_3.message,
27279
- duration: 3,
27280
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27281
- });
27282
- return [3 /*break*/, 5];
27283
- case 5: return [2 /*return*/];
27284
- }
27285
- });
27286
- }); };
27287
- var onDateRangeChanged = function (range) {
27288
- if (range) {
27289
- var period = {
27290
- startYear: Number(moment(range[0]).year()),
27291
- endYear: Number(moment(range[1]).year()),
27292
- };
27293
- if (period.startYear === period.endYear) {
27294
- antd.message.open({
27295
- type: "error",
27296
- content: t("ndc:sameStartEndDates"),
27297
- duration: 3,
27298
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27299
- });
27300
- }
27301
- else {
27302
- selectedDateRangeRef.current = period;
27303
- }
27304
- }
27305
- };
27306
27014
  var onTabChange = function (key) {
27307
- var selectedPeriod = periodItems.find(function (item) { return item.key === key; });
27308
- if (selectedPeriod) {
27309
- setSelectedPeriod(selectedPeriod);
27310
- }
27311
- };
27312
- var onActionConfirmed = function () { return __awaiter(void 0, void 0, void 0, function () {
27313
- var actionResponse, exception_4;
27314
- return __generator(this, function (_a) {
27315
- switch (_a.label) {
27316
- case 0:
27317
- setLoading(true);
27318
- _a.label = 1;
27319
- case 1:
27320
- _a.trys.push([1, 10, , 11]);
27321
- if (!(actionInfo.action === "Approve")) return [3 /*break*/, 3];
27322
- return [4 /*yield*/, post("national/programme/approveNdcDetailsAction", {
27323
- id: actionInfo.recordId,
27324
- })];
27325
- case 2:
27326
- actionResponse = _a.sent();
27327
- return [3 /*break*/, 9];
27328
- case 3:
27329
- if (!(actionInfo.action === "Reject")) return [3 /*break*/, 5];
27330
- return [4 /*yield*/, post("national/programme/rejectNdcDetailsAction", {
27331
- id: actionInfo.recordId,
27332
- })];
27333
- case 4:
27334
- actionResponse = _a.sent();
27335
- return [3 /*break*/, 9];
27336
- case 5:
27337
- if (!(actionInfo.action === "Finalize")) return [3 /*break*/, 7];
27338
- return [4 /*yield*/, post("national/programme/finalizeNdcDetailsPeriod", {
27339
- id: selectedPeriod.key,
27340
- })];
27341
- case 6:
27342
- actionResponse = _a.sent();
27343
- return [3 /*break*/, 9];
27344
- case 7:
27345
- if (!(actionInfo.action === "Delete")) return [3 /*break*/, 9];
27346
- return [4 /*yield*/, post("national/programme/deleteNdcDetailsPeriod", {
27347
- id: selectedPeriod.key,
27348
- })];
27349
- case 8:
27350
- actionResponse = _a.sent();
27351
- _a.label = 9;
27352
- case 9: return [3 /*break*/, 11];
27353
- case 10:
27354
- exception_4 = _a.sent();
27355
- antd.message.open({
27356
- type: "error",
27357
- content: exception_4.message,
27358
- duration: 3,
27359
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27360
- });
27361
- return [3 /*break*/, 11];
27362
- case 11:
27363
- if (actionResponse) {
27364
- if (actionInfo.action === "Delete") {
27365
- antd.message.open({
27366
- type: "success",
27367
- content: t("ndc:deletePeriodSuccessMsg"),
27368
- duration: 3,
27369
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27370
- });
27371
- fetchNdcDetailPeriods();
27372
- }
27373
- else if (actionInfo.action === "Finalize") {
27374
- antd.message.open({
27375
- type: "success",
27376
- content: t("ndc:finalizeSuccessMsg"),
27377
- duration: 3,
27378
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27379
- });
27380
- fetchNdcDetailPeriods();
27381
- setExpandedRowKeys([]);
27382
- ClearEditMode();
27383
- }
27384
- else if (actionInfo.action === "Approve") {
27385
- antd.message.open({
27386
- type: "success",
27387
- content: t("ndc:approveSuccessMsg"),
27388
- duration: 3,
27389
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27390
- });
27391
- fetchNdcDetailActions();
27392
- }
27393
- else if (actionInfo.action === "Reject") {
27394
- antd.message.open({
27395
- type: "success",
27396
- content: t("ndc:rejectSuccessMsg"),
27397
- duration: 3,
27398
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27399
- });
27400
- fetchNdcDetailActions();
27401
- }
27402
- }
27403
- setOpenConfirmationModal(false);
27404
- setLoading(false);
27405
- return [2 /*return*/];
27406
- }
27407
- });
27408
- }); };
27409
- var onActionCanceled = function () {
27410
- setOpenConfirmationModal(false);
27015
+ setSelectedTab(key);
27411
27016
  };
27412
- var fetchNdcDetailPeriods = function () { return __awaiter(void 0, void 0, void 0, function () {
27413
- var periods, addNewTab, response, exception_5;
27414
- return __generator(this, function (_a) {
27415
- switch (_a.label) {
27416
- case 0:
27417
- setLoading(true);
27418
- _a.label = 1;
27419
- case 1:
27420
- _a.trys.push([1, 3, 4, 5]);
27421
- periods = [];
27422
- addNewTab = {
27423
- key: "add_new",
27424
- label: "Add New",
27425
- startYear: 0,
27426
- endYear: 0,
27427
- finalized: false,
27428
- deleted: false,
27429
- };
27430
- return [4 /*yield*/, get("national/programme/queryNdcDetailsPeriod")];
27431
- case 2:
27432
- response = _a.sent();
27433
- if (response && response.data) {
27434
- periods = response.data.map(function (period) {
27435
- return __assign(__assign({}, period), { key: period.id, label: period.finalized ? (React.createElement("span", null,
27436
- React.createElement(icons.LockOutlined, null),
27437
- " ",
27438
- period.startYear,
27439
- "-",
27440
- period.endYear,
27441
- " ")) : ("".concat(period.startYear, "-").concat(period.endYear)) });
27442
- });
27443
- }
27444
- if (isGovernmentUser) {
27445
- periods.unshift(addNewTab);
27446
- }
27447
- setPeriodItems(periods);
27448
- if (isGovernmentUser) {
27449
- setSelectedPeriod(addNewTab);
27450
- }
27451
- else {
27452
- setSelectedPeriod(periods[0]);
27453
- }
27454
- setLoading(false);
27455
- return [3 /*break*/, 5];
27456
- case 3:
27457
- exception_5 = _a.sent();
27458
- antd.message.open({
27459
- type: "error",
27460
- content: exception_5.message,
27461
- duration: 3,
27462
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27463
- });
27464
- return [3 /*break*/, 5];
27465
- case 4:
27466
- setLoading(false);
27467
- return [7 /*endfinally*/];
27468
- case 5: return [2 /*return*/];
27469
- }
27470
- });
27471
- }); };
27472
- var fetchNdcDetailActions = function () { return __awaiter(void 0, void 0, void 0, function () {
27473
- var response, maxActionId, exception_6;
27474
- return __generator(this, function (_a) {
27475
- switch (_a.label) {
27476
- case 0:
27477
- setLoading(true);
27478
- _a.label = 1;
27479
- case 1:
27480
- _a.trys.push([1, 3, 4, 5]);
27481
- return [4 /*yield*/, get("national/programme/queryNdcDetailsAction")];
27482
- case 2:
27483
- response = _a.sent();
27484
- if (response && response.data) {
27485
- maxActionId = Math.max.apply(Math, response.data.map(function (item) { return item.id; }));
27486
- setNextAvailableActionId(maxActionId + 1);
27487
- setNdcActionsList(response.data);
27488
- }
27489
- setLoading(false);
27490
- return [3 /*break*/, 5];
27491
- case 3:
27492
- exception_6 = _a.sent();
27493
- antd.message.open({
27494
- type: "error",
27495
- content: exception_6.message,
27496
- duration: 3,
27497
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27498
- });
27499
- return [3 /*break*/, 5];
27500
- case 4:
27501
- setLoading(false);
27502
- return [7 /*endfinally*/];
27503
- case 5: return [2 /*return*/];
27504
- }
27505
- });
27506
- }); };
27507
- var fetchMinistries = function () { return __awaiter(void 0, void 0, void 0, function () {
27508
- var response, ministryOrgDetails, exception_7;
27509
- return __generator(this, function (_a) {
27510
- switch (_a.label) {
27511
- case 0:
27512
- setLoading(true);
27513
- _a.label = 1;
27514
- case 1:
27515
- _a.trys.push([1, 3, 4, 5]);
27516
- return [4 /*yield*/, get("national/organisation/getMinistries")];
27517
- case 2:
27518
- response = _a.sent();
27519
- if (response && response.data) {
27520
- ministryOrgDetails = response.data.map(function (value) {
27521
- return {
27522
- value: value.company_companyId,
27523
- label: value.company_name,
27524
- };
27525
- });
27526
- setMinistryOrgList(ministryOrgDetails);
27527
- }
27528
- setLoading(false);
27529
- return [3 /*break*/, 5];
27530
- case 3:
27531
- exception_7 = _a.sent();
27532
- antd.message.open({
27533
- type: "error",
27534
- content: exception_7.message,
27535
- duration: 3,
27536
- style: { textAlign: "right", marginRight: 15, marginTop: 10 },
27537
- });
27538
- return [3 /*break*/, 5];
27539
- case 4:
27540
- setLoading(false);
27541
- return [7 /*endfinally*/];
27542
- case 5: return [2 /*return*/];
27543
- }
27544
- });
27545
- }); };
27546
27017
  React.useEffect(function () {
27547
- fetchNdcDetailPeriods();
27548
- fetchNdcDetailActions();
27549
- fetchMinistries();
27018
+ var defaultNdcDetails = [
27019
+ {
27020
+ key: 1,
27021
+ type: NdcActionType.main,
27022
+ startDate: new Date("2019-03-25"),
27023
+ endDate: new Date("2020-03-25"),
27024
+ nationalPlanObj: "Enhance value addition in key growth opportunities",
27025
+ kpi: 25,
27026
+ ministry: "Ministry of Environment",
27027
+ subNdcDetails: [
27028
+ {
27029
+ key: 6,
27030
+ ndcActionId: 1,
27031
+ type: NdcActionType.sub,
27032
+ startDate: new Date("2019-03-25"),
27033
+ endDate: new Date("2020-03-25"),
27034
+ nationalPlanObj: "Enhance value addition in key growth opportunities sub details",
27035
+ kpi: 25,
27036
+ ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
27037
+ },
27038
+ {
27039
+ key: 7,
27040
+ ndcActionId: 1,
27041
+ type: NdcActionType.sub,
27042
+ startDate: new Date("2019-03-25"),
27043
+ endDate: new Date("2020-03-25"),
27044
+ nationalPlanObj: "",
27045
+ kpi: "",
27046
+ ministry: "",
27047
+ },
27048
+ ],
27049
+ },
27050
+ {
27051
+ key: 2,
27052
+ type: NdcActionType.main,
27053
+ startDate: new Date("2019-03-25"),
27054
+ endDate: new Date("2019-08-25"),
27055
+ nationalPlanObj: "Strengthen the private sector to create 10,000 jobs",
27056
+ kpi: 10500,
27057
+ ministry: "Ministry of Environment",
27058
+ subNdcDetails: [
27059
+ {
27060
+ key: 8,
27061
+ ndcActionId: 2,
27062
+ type: NdcActionType.sub,
27063
+ startDate: new Date("2019-03-25"),
27064
+ endDate: new Date("2020-03-25"),
27065
+ nationalPlanObj: "",
27066
+ kpi: "",
27067
+ ministry: "",
27068
+ },
27069
+ ],
27070
+ },
27071
+ {
27072
+ key: 12,
27073
+ type: NdcActionType.main,
27074
+ startDate: new Date("2019-03-25"),
27075
+ endDate: new Date("2019-08-25"),
27076
+ nationalPlanObj: "Other",
27077
+ kpi: 10500,
27078
+ ministry: "Ministry of Environment",
27079
+ subNdcDetails: [
27080
+ {
27081
+ key: 8,
27082
+ ndcActionId: 12,
27083
+ type: NdcActionType.sub,
27084
+ startDate: new Date("2019-03-25"),
27085
+ endDate: new Date("2020-03-25"),
27086
+ nationalPlanObj: "",
27087
+ kpi: "",
27088
+ ministry: "",
27089
+ },
27090
+ ],
27091
+ },
27092
+ {
27093
+ key: 3,
27094
+ type: NdcActionType.main,
27095
+ startDate: new Date("2021-03-25"),
27096
+ endDate: new Date("2022-03-25"),
27097
+ nationalPlanObj: "Consolidate and increase the stock and quality of productive infrastructure by 50%",
27098
+ kpi: 48,
27099
+ ministry: "Ministry of Environment",
27100
+ subNdcDetails: [
27101
+ {
27102
+ key: 9,
27103
+ ndcActionId: 3,
27104
+ type: NdcActionType.sub,
27105
+ startDate: new Date("2019-03-25"),
27106
+ endDate: new Date("2020-03-25"),
27107
+ nationalPlanObj: "",
27108
+ kpi: "",
27109
+ ministry: "",
27110
+ },
27111
+ ],
27112
+ },
27113
+ {
27114
+ key: 4,
27115
+ type: NdcActionType.main,
27116
+ startDate: new Date("2022-03-25"),
27117
+ endDate: new Date("2022-05-25"),
27118
+ nationalPlanObj: "Enhance the productivity and social wellbeing of the population",
27119
+ kpi: 20,
27120
+ ministry: "Ministry of Environment",
27121
+ subNdcDetails: [
27122
+ {
27123
+ key: 10,
27124
+ ndcActionId: 4,
27125
+ type: NdcActionType.sub,
27126
+ startDate: new Date("2019-03-25"),
27127
+ endDate: new Date("2020-03-25"),
27128
+ nationalPlanObj: "",
27129
+ kpi: "",
27130
+ ministry: "",
27131
+ },
27132
+ ],
27133
+ },
27134
+ {
27135
+ key: 5,
27136
+ type: NdcActionType.main,
27137
+ startDate: new Date("2022-03-25"),
27138
+ endDate: new Date("2023-03-25"),
27139
+ nationalPlanObj: "Strengthen the role of the state in guiding and facilitating development",
27140
+ kpi: 10,
27141
+ ministry: "Ministry of Environment",
27142
+ subNdcDetails: [
27143
+ {
27144
+ key: 11,
27145
+ ndcActionId: 5,
27146
+ type: NdcActionType.sub,
27147
+ startDate: new Date("2019-03-25"),
27148
+ endDate: new Date("2020-03-25"),
27149
+ nationalPlanObj: "",
27150
+ kpi: "",
27151
+ ministry: "",
27152
+ },
27153
+ ],
27154
+ },
27155
+ {
27156
+ key: 13,
27157
+ type: NdcActionType.main,
27158
+ startDate: new Date("2022-03-25"),
27159
+ endDate: new Date("2023-03-25"),
27160
+ nationalPlanObj: "Convert to solar energy",
27161
+ kpi: 50000,
27162
+ ministry: "Ministry of Environment",
27163
+ subNdcDetails: [
27164
+ {
27165
+ key: 11,
27166
+ ndcActionId: 13,
27167
+ type: NdcActionType.sub,
27168
+ startDate: new Date("2019-03-25"),
27169
+ endDate: new Date("2020-03-25"),
27170
+ nationalPlanObj: "Convert to solar energy",
27171
+ kpi: "3000",
27172
+ ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
27173
+ },
27174
+ {
27175
+ key: 14,
27176
+ ndcActionId: 13,
27177
+ type: NdcActionType.sub,
27178
+ startDate: new Date("2019-03-25"),
27179
+ endDate: new Date("2020-03-25"),
27180
+ nationalPlanObj: "",
27181
+ kpi: "",
27182
+ ministry: "",
27183
+ },
27184
+ ],
27185
+ },
27186
+ {
27187
+ key: 15,
27188
+ type: NdcActionType.main,
27189
+ startDate: new Date("2022-03-25"),
27190
+ endDate: new Date("2023-03-25"),
27191
+ nationalPlanObj: "Strengthen the private sector to create jobs",
27192
+ kpi: 10000,
27193
+ ministry: "Ministry of Environment",
27194
+ subNdcDetails: [
27195
+ {
27196
+ key: 16,
27197
+ ndcActionId: 15,
27198
+ type: NdcActionType.sub,
27199
+ startDate: new Date("2019-03-25"),
27200
+ endDate: new Date("2020-03-25"),
27201
+ nationalPlanObj: "Strengthen the private sector to create jobs",
27202
+ kpi: "7200",
27203
+ ministry: "Ministry of Tourism (MoT)",
27204
+ },
27205
+ {
27206
+ key: 17,
27207
+ ndcActionId: 15,
27208
+ type: NdcActionType.sub,
27209
+ startDate: new Date("2019-03-25"),
27210
+ endDate: new Date("2020-03-25"),
27211
+ nationalPlanObj: "",
27212
+ kpi: "",
27213
+ ministry: "",
27214
+ },
27215
+ ],
27216
+ },
27217
+ {
27218
+ key: 18,
27219
+ type: NdcActionType.main,
27220
+ startDate: new Date("2022-03-25"),
27221
+ endDate: new Date("2023-03-25"),
27222
+ nationalPlanObj: "Other",
27223
+ kpi: "",
27224
+ ministry: "Ministry of Environment",
27225
+ subNdcDetails: [
27226
+ {
27227
+ key: 19,
27228
+ ndcActionId: 18,
27229
+ type: NdcActionType.sub,
27230
+ startDate: new Date("2019-03-25"),
27231
+ endDate: new Date("2020-03-25"),
27232
+ nationalPlanObj: "Strengthen the private sector to create jobs",
27233
+ kpi: "",
27234
+ ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
27235
+ },
27236
+ {
27237
+ key: 20,
27238
+ ndcActionId: 18,
27239
+ type: NdcActionType.sub,
27240
+ startDate: new Date("2019-03-25"),
27241
+ endDate: new Date("2020-03-25"),
27242
+ nationalPlanObj: "",
27243
+ kpi: "",
27244
+ ministry: "",
27245
+ },
27246
+ ],
27247
+ },
27248
+ ];
27249
+ var initialPeriods = [
27250
+ {
27251
+ key: "2019-2020",
27252
+ label: "2019-2020",
27253
+ start: 2019,
27254
+ end: 2020,
27255
+ children: ndcDetailsTableContent(),
27256
+ },
27257
+ {
27258
+ key: "2021-2023",
27259
+ label: "2021-2023",
27260
+ start: 2021,
27261
+ end: 2021,
27262
+ children: ndcDetailsTableContent(),
27263
+ },
27264
+ ];
27265
+ if (isAddRangeVisible()) {
27266
+ initialPeriods.unshift({
27267
+ key: "add_new",
27268
+ label: "Add New",
27269
+ start: 0,
27270
+ end: 0,
27271
+ children: addNewPeriodContent(),
27272
+ });
27273
+ }
27274
+ addedNdcDetailId.current = 20;
27275
+ setPeriodItems(initialPeriods);
27276
+ periodItemsRef.current = initialPeriods;
27277
+ setNdcDetailsData(defaultNdcDetails);
27550
27278
  }, []);
27551
- return (React.createElement("div", { className: "ndc-details content-container" },
27279
+ return (React.createElement("div", { className: "ndc-management content-container" },
27552
27280
  React.createElement("div", { className: "title-bar" },
27553
27281
  React.createElement(antd.Row, { justify: "space-between", align: "middle" },
27554
27282
  React.createElement(antd.Col, { span: 20 },
27555
27283
  React.createElement("div", { className: "body-title" }, t("ndc:ndcTitle")),
27556
27284
  React.createElement("div", { className: "body-sub-title" }, t("ndc:ndcSubTitle"))))),
27557
27285
  React.createElement("div", null,
27558
- React.createElement(antd.Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedPeriod.key, onChange: onTabChange })),
27559
- React.createElement("div", null, selectedPeriod.key === "add_new"
27560
- ? addNewPeriodContent()
27561
- : mainNdcActionTableContent()),
27562
- React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onActionConfirmed, onActionCanceled: onActionCanceled, openModal: openConfirmationModal, errorMsg: "", loading: loading })));
27286
+ React.createElement(antd.Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
27287
+ selectedTab !== "add_new" && (React.createElement("div", null,
27288
+ React.createElement("div", null,
27289
+ React.createElement(antd.Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
27290
+ expandedRowRender: function (record) { return getSubNdcActionContent(record); },
27291
+ indentSize: 0,
27292
+ defaultExpandedRowKeys: [selectedNdcDetail.current.key],
27293
+ }, footer: function () {
27294
+ return isAddNdcActionVisible() && (React.createElement(antd.Row, { justify: "center" },
27295
+ React.createElement(antd.Button, { onClick: onAddNewNdcDetail, type: "default", style: {
27296
+ marginBottom: 16,
27297
+ width: "100%",
27298
+ } }, t("ndc:addNdcAction"))));
27299
+ } }))))));
27563
27300
  };
27564
27301
 
27565
27302
  var ImgWithFallback = function (_a) {
@@ -28334,7 +28071,7 @@ var RejectDocumentationConfirmationModel = function (props) {
28334
28071
  React.createElement(antd.Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
28335
28072
  };
28336
28073
 
28337
- 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";
28074
+ 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";
28338
28075
  styleInject(css_248z$2);
28339
28076
 
28340
28077
  var NdcActionBody = function (props) {
@@ -28600,7 +28337,7 @@ var NdcActionBody = function (props) {
28600
28337
  React.createElement("div", { className: "icon" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) ? (monitoringReportPending ? ((companyRolePermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
28601
28338
  React.createElement(icons.LikeOutlined, { onClick: function () {
28602
28339
  return docAction(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.id, exports.DocumentStatus.ACCEPTED, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.actionId, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.type);
28603
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28340
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: '3px' } }),
28604
28341
  React.createElement(icons.DislikeOutlined, { onClick: function () {
28605
28342
  setRejectDocData({
28606
28343
  id: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.id,
@@ -28615,8 +28352,8 @@ var NdcActionBody = function (props) {
28615
28352
  icon: React.createElement(icons.DislikeOutlined, null),
28616
28353
  });
28617
28354
  setOpenRejectDocConfirmationModal(true);
28618
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } })))) : monitoringReportAccepted ? (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })) : (monitoringReportRejected && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28619
- React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))))) : (React.createElement(React.Fragment, null,
28355
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: '3px' } })))) : monitoringReportAccepted ? (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: '3px' } })) : (monitoringReportRejected && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28356
+ React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70", paddingTop: '3px' } }))))) : (React.createElement(React.Fragment, null,
28620
28357
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
28621
28358
  ? t("programme:notAuthToUploadDoc")
28622
28359
  : uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
@@ -28647,7 +28384,7 @@ var NdcActionBody = function (props) {
28647
28384
  } }))))),
28648
28385
  (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement("div", { className: "report-link" },
28649
28386
  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 },
28650
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
28387
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47", paddingTop: '3px' } })))),
28651
28388
  !monitoringReportAccepted && (React.createElement(React.Fragment, null,
28652
28389
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
28653
28390
  ? t("programme:notAuthToUploadDoc")
@@ -28690,7 +28427,7 @@ var NdcActionBody = function (props) {
28690
28427
  ministryLevelPermission) && (React.createElement(React.Fragment, null,
28691
28428
  React.createElement(icons.LikeOutlined, { onClick: function () {
28692
28429
  return docAction(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.id, exports.DocumentStatus.ACCEPTED, verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.actionId, verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.type);
28693
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28430
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: '3px' } }),
28694
28431
  React.createElement(icons.DislikeOutlined, { onClick: function () {
28695
28432
  setRejectDocData({
28696
28433
  id: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.id,
@@ -28705,8 +28442,8 @@ var NdcActionBody = function (props) {
28705
28442
  icon: React.createElement(icons.DislikeOutlined, null),
28706
28443
  });
28707
28444
  setOpenRejectDocConfirmationModal(true);
28708
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } })))) : verificationReportAccepted ? (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })) : (verifcationReportRejected && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28709
- React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))))) : (React.createElement(React.Fragment, null,
28445
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: '3px' } })))) : verificationReportAccepted ? (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: '3px' } })) : (verifcationReportRejected && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
28446
+ React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70", paddingTop: '3px' } }))))) : (React.createElement(React.Fragment, null,
28710
28447
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
28711
28448
  ? t("programme:notAuthToUploadDoc")
28712
28449
  : uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
@@ -28737,7 +28474,7 @@ var NdcActionBody = function (props) {
28737
28474
  } })))))),
28738
28475
  (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement("div", { className: "report-link" },
28739
28476
  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 },
28740
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
28477
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47", paddingTop: '3px' } })))),
28741
28478
  !verificationReportAccepted && monitoringReportAccepted && (React.createElement(React.Fragment, null,
28742
28479
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
28743
28480
  ? t("programme:notAuthToUploadDoc")
@@ -28770,7 +28507,7 @@ var NdcActionBody = function (props) {
28770
28507
  React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
28771
28508
  };
28772
28509
 
28773
- 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";
28510
+ 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";
28774
28511
  styleInject(css_248z$1);
28775
28512
 
28776
28513
  var ProgrammeDocuments = function (props) {
@@ -29017,7 +28754,7 @@ var ProgrammeDocuments = function (props) {
29017
28754
  (designDocActionPermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
29018
28755
  React.createElement(icons.LikeOutlined, { onClick: function () {
29019
28756
  return docAction(designDocId, exports.DocumentStatus.ACCEPTED);
29020
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28757
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: "3px" } }),
29021
28758
  React.createElement(icons.DislikeOutlined, { onClick: function () {
29022
28759
  setRejectDocData({ id: designDocId });
29023
28760
  setActionInfo({
@@ -29028,8 +28765,8 @@ var ProgrammeDocuments = function (props) {
29028
28765
  icon: React.createElement(icons.DislikeOutlined, null),
29029
28766
  });
29030
28767
  setOpenRejectDocConfirmationModal(true);
29031
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
29032
- designDocStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
28768
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: "3px" } }))),
28769
+ designDocStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: "3px" } })),
29033
28770
  designDocStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
29034
28771
  React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
29035
28772
  designDocUrl !== "" && (React.createElement("div", { className: "time" },
@@ -29037,15 +28774,23 @@ var ProgrammeDocuments = function (props) {
29037
28774
  " ~ " + designDocversion))),
29038
28775
  React.createElement(antd.Col, { span: 6, className: "field-value" }, designDocUrl !== "" ? (React.createElement("div", { className: "link" },
29039
28776
  linkDocVisible(designDocStatus) && (React.createElement("a", { href: designDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
29040
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
28777
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))),
29041
28778
  designDocStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
29042
28779
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly ||
29043
28780
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER
29044
28781
  ? t("programme:notAuthToUploadDoc")
29045
28782
  : !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29046
28783
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29047
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29048
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28784
+ ? {
28785
+ color: "#3F3A47",
28786
+ cursor: "pointer",
28787
+ margin: "0px 0px 1.5px 0px",
28788
+ }
28789
+ : {
28790
+ color: "#cacaca",
28791
+ cursor: "default",
28792
+ margin: "0px 0px 1.5px 0px",
28793
+ }, onClick: function () {
29049
28794
  return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
29050
28795
  } })),
29051
28796
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -29058,8 +28803,16 @@ var ProgrammeDocuments = function (props) {
29058
28803
  ? t("programme:notAuthToUploadDoc")
29059
28804
  : !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29060
28805
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29061
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29062
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28806
+ ? {
28807
+ color: "#3F3A47",
28808
+ cursor: "pointer",
28809
+ margin: "0px 0px 1.5px 0px",
28810
+ }
28811
+ : {
28812
+ color: "#cacaca",
28813
+ cursor: "default",
28814
+ margin: "0px 0px 1.5px 0px",
28815
+ }, onClick: function () {
29063
28816
  return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
29064
28817
  } })),
29065
28818
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -29085,7 +28838,7 @@ var ProgrammeDocuments = function (props) {
29085
28838
  (companyRolePermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
29086
28839
  React.createElement(icons.LikeOutlined, { onClick: function () {
29087
28840
  return docAction(methDocId, exports.DocumentStatus.ACCEPTED);
29088
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28841
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: "3px" } }),
29089
28842
  React.createElement(icons.DislikeOutlined, { onClick: function () {
29090
28843
  setRejectDocData({ id: methDocId });
29091
28844
  setActionInfo({
@@ -29096,8 +28849,8 @@ var ProgrammeDocuments = function (props) {
29096
28849
  icon: React.createElement(icons.DislikeOutlined, null),
29097
28850
  });
29098
28851
  setOpenRejectDocConfirmationModal(true);
29099
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
29100
- methodDocStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
28852
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: "3px" } }))),
28853
+ methodDocStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: "3px" } })),
29101
28854
  methodDocStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
29102
28855
  React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
29103
28856
  methodologyDocUrl !== "" && (React.createElement("div", { className: "time" },
@@ -29105,15 +28858,22 @@ var ProgrammeDocuments = function (props) {
29105
28858
  " ~ " + methDocversion))),
29106
28859
  React.createElement(antd.Col, { span: 6, className: "field-value" }, methodologyDocUrl !== "" ? (React.createElement("div", { className: "link" },
29107
28860
  linkDocVisible(methodDocStatus) && (React.createElement("a", { href: methodologyDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
29108
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
28861
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))),
29109
28862
  methodDocStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
29110
28863
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
29111
28864
  ? t("programme:notAuthToUploadDoc")
29112
28865
  : !uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29113
28866
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === exports.DocumentStatus.ACCEPTED &&
29114
28867
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29115
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29116
- : { color: "#cacaca", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28868
+ ? {
28869
+ color: "#3F3A47",
28870
+ cursor: "pointer",
28871
+ margin: "0px 0px 1.5px 0px",
28872
+ }
28873
+ : {
28874
+ color: "#cacaca",
28875
+ margin: "0px 0px 1.5px 0px",
28876
+ }, onClick: function () {
29117
28877
  return designDocStatus === exports.DocumentStatus.ACCEPTED &&
29118
28878
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
29119
28879
  handleMethodologyFileUpload();
@@ -29132,8 +28892,16 @@ var ProgrammeDocuments = function (props) {
29132
28892
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
29133
28893
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === exports.DocumentStatus.ACCEPTED &&
29134
28894
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
29135
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29136
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28895
+ ? {
28896
+ color: "#3F3A47",
28897
+ cursor: "pointer",
28898
+ margin: "0px 0px 1.5px 0px",
28899
+ }
28900
+ : {
28901
+ color: "#cacaca",
28902
+ cursor: "default",
28903
+ margin: "0px 0px 1.5px 0px",
28904
+ }, onClick: function () {
29137
28905
  return designDocStatus === exports.DocumentStatus.ACCEPTED &&
29138
28906
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
29139
28907
  handleMethodologyFileUpload();
@@ -29162,7 +28930,7 @@ var ProgrammeDocuments = function (props) {
29162
28930
  (ministryLevelPermission || companyRolePermission) && (React.createElement(React.Fragment, null,
29163
28931
  React.createElement(icons.LikeOutlined, { onClick: function () {
29164
28932
  return docAction(impactAssessmentId, exports.DocumentStatus.ACCEPTED);
29165
- }, className: "common-progress-icon", style: { color: "#976ED7" } }),
28933
+ }, className: "common-progress-icon", style: { color: "#976ED7", paddingTop: "3px" } }),
29166
28934
  React.createElement(icons.DislikeOutlined, { onClick: function () {
29167
28935
  setRejectDocData({ id: impactAssessmentId });
29168
28936
  setActionInfo({
@@ -29173,8 +28941,8 @@ var ProgrammeDocuments = function (props) {
29173
28941
  icon: React.createElement(icons.DislikeOutlined, null),
29174
28942
  });
29175
28943
  setOpenRejectDocConfirmationModal(true);
29176
- }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
29177
- impactAssessmentStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
28944
+ }, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70", paddingTop: "3px" } }))),
28945
+ impactAssessmentStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380", paddingTop: "3px" } })),
29178
28946
  impactAssessmentStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
29179
28947
  React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
29180
28948
  impactAssessmentUrl !== "" && (React.createElement("div", { className: "time" },
@@ -29182,13 +28950,22 @@ var ProgrammeDocuments = function (props) {
29182
28950
  " ~ " + impactAssessmentversion))),
29183
28951
  React.createElement(antd.Col, { span: 6, className: "field-value" }, impactAssessmentUrl !== "" ? (React.createElement("div", { className: "link" },
29184
28952
  linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
29185
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
28953
+ React.createElement("div", null,
28954
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))),
29186
28955
  impactAssessmentStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
29187
28956
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
29188
28957
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
29189
28958
  !isProjectRejected
29190
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29191
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28959
+ ? {
28960
+ color: "#3F3A47",
28961
+ cursor: "pointer",
28962
+ margin: "0px 0px 1.5px 0px",
28963
+ }
28964
+ : {
28965
+ color: "#cacaca",
28966
+ cursor: "default",
28967
+ margin: "0px 0px 1.5px 0px",
28968
+ }, onClick: function () {
29192
28969
  return uploadImpactAssessmentDocUserPermission &&
29193
28970
  !isProjectRejected &&
29194
28971
  handleImpactAssessmentFileUpload();
@@ -29201,8 +28978,16 @@ var ProgrammeDocuments = function (props) {
29201
28978
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
29202
28979
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
29203
28980
  !isProjectRejected
29204
- ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
29205
- : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
28981
+ ? {
28982
+ color: "#3F3A47",
28983
+ cursor: "pointer",
28984
+ margin: "0px 0px 1.5px 0px",
28985
+ }
28986
+ : {
28987
+ color: "#cacaca",
28988
+ cursor: "default",
28989
+ margin: "0px 0px 1.5px 0px",
28990
+ }, onClick: function () {
29206
28991
  return uploadImpactAssessmentDocUserPermission &&
29207
28992
  !isProjectRejected &&
29208
28993
  handleImpactAssessmentFileUpload();
@@ -29352,7 +29137,7 @@ exports.getCreditStageVal = getCreditStageVal;
29352
29137
  exports.getFinancialFields = getFinancialFields;
29353
29138
  exports.getGeneralFields = getGeneralFields;
29354
29139
  exports.getInvestmentStatusEnumVal = getInvestmentStatusEnumVal;
29355
- exports.getNdcActionStatusEnumVal = getNdcActionStatusEnumVal$1;
29140
+ exports.getNdcActionStatusEnumVal = getNdcActionStatusEnumVal;
29356
29141
  exports.getNdcStatusTagType = getNdcStatusTagType;
29357
29142
  exports.getRetirementTypeString = getRetirementTypeString;
29358
29143
  exports.getStageEnumVal = getStageEnumVal;