@undp/carbon-library 1.0.162 → 1.0.163-ndc-action-add-table-fixes.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -19464,7 +19464,7 @@ var AddNdcActionComponent = function (props) {
19464
19464
  React.createElement(antd.Steps, { progressDot: true, direction: "vertical", current: current, items: stepItems })))));
19465
19465
  };
19466
19466
 
19467
- var css_248z$d = ".ndc-details-view .card-container {\n margin-bottom: 16px;\n width: 100%;\n border-radius: 10px; }\n .ndc-details-view .card-container .co-benifits-view .title {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n margin-left: 0.5rem; }\n .ndc-details-view .card-container .action-btns {\n margin-top: 25px;\n margin-bottom: -15px;\n justify-content: end; }\n\n.ndc-details-view .fix-height {\n height: 350px; }\n";
19467
+ var css_248z$d = ".ndc-details-view .card-container {\n margin-bottom: 16px;\n width: 100%;\n border-radius: 10px; }\n .ndc-details-view .card-container .co-benifits-view .title {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n margin-left: 0.5rem; }\n .ndc-details-view .card-container .action-btns {\n margin-top: 25px;\n margin-bottom: -15px;\n justify-content: end; }\n\n.ndc-details-view .fix-height {\n height: 350px; }\n\n.title-icon {\n padding-right: 10px; }\n\n.title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.title {\n margin-bottom: 5px; }\n\n.ndc-action-report-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-report-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n margin: 5px 25px;\n font-size: 0.8rem; }\n .ndc-action-report-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%; }\n .ndc-action-report-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-report-body .report-details .report-type .name {\n font-weight: 500;\n color: rgba(58, 53, 65, 0.6); }\n .ndc-action-report-body .report-details .report-type .time {\n color: rgba(58, 53, 65, 0.5);\n width: max-content; }\n .ndc-action-report-body .report-details .report-type .icon {\n display: flex;\n align-items: center;\n width: 30%;\n color: rgba(58, 53, 65, 0.6); }\n .ndc-action-report-body .report-details .report-type .empty {\n font-weight: 500;\n color: rgba(58, 53, 65, 0.6); }\n .ndc-action-report-body .report-details .ant-row {\n margin: 0px 30px auto; }\n .ndc-action-report-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%; }\n .ndc-action-report-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-report-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
19468
19468
  styleInject(css_248z$d);
19469
19469
 
19470
19470
  var css_248z$c = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-value .row {\n display: flex;\n width: 40%;\n align-items: center;\n justify-content: space-between; }\n .info-view .field-value .row .key {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n .info-view .field-value .row .data {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
@@ -19559,15 +19559,19 @@ var NdcActionViewComponent = function (props) {
19559
19559
  var userInfoState = useUserContext().userInfoState;
19560
19560
  var post = useConnection().post;
19561
19561
  var state = useLocation().state;
19562
- var _d = React.useState({}), ndcActionReportDetails = _d[0], setNdcActionReportDetails = _d[1];
19562
+ var _d = React.useState({}); _d[0]; var setNdcActionReportDetails = _d[1];
19563
19563
  var _e = React.useState(false), isLoading = _e[0], setIsLoading = _e[1];
19564
- var _f = React.useState(), ndcActionDetails = _f[0], setNdcActionDetails = _f[1];
19565
- var _g = React.useState(); _g[0]; var setCoBenifitsComponentnDetails = _g[1];
19566
- var _h = React.useState(0), emissionsReductionExpected = _h[0], setEmissionsReductionExpected = _h[1];
19567
- var _j = React.useState(0), emissionsReductionAchieved = _j[0], setEmissionsReductionAchieved = _j[1];
19568
- var _k = React.useState([]), programmeOwnerId = _k[0], setProgrammeOwnerId = _k[1];
19569
- var _l = React.useState(false), canUploadMonitorReport = _l[0], setCanUploadMonitorReport = _l[1];
19570
- var _m = React.useState(false), monitoringReportAccepted = _m[0], setMonitoringReportAccepted = _m[1];
19564
+ var _f = React.useState(), monitoringReportData = _f[0], setMonitoringReportData = _f[1];
19565
+ var _g = React.useState(""), monitoringReportversion = _g[0], setMonitoringReportversion = _g[1];
19566
+ var _h = React.useState(), verificationReportData = _h[0], setVerificationReportData = _h[1];
19567
+ var _j = React.useState(""), verificationReportVersion = _j[0], setVerificationReportversion = _j[1];
19568
+ var _k = React.useState(), ndcActionDetails = _k[0], setNdcActionDetails = _k[1];
19569
+ var _l = React.useState(); _l[0]; var setCoBenifitsComponentnDetails = _l[1];
19570
+ var _m = React.useState(0), emissionsReductionExpected = _m[0], setEmissionsReductionExpected = _m[1];
19571
+ var _o = React.useState(0), emissionsReductionAchieved = _o[0], setEmissionsReductionAchieved = _o[1];
19572
+ var _p = React.useState([]), programmeOwnerId = _p[0], setProgrammeOwnerId = _p[1];
19573
+ var _q = React.useState(false), canUploadMonitorReport = _q[0], setCanUploadMonitorReport = _q[1];
19574
+ var _r = React.useState(false), monitoringReportAccepted = _r[0], setMonitoringReportAccepted = _r[1];
19571
19575
  var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
19572
19576
  var response, error_1;
19573
19577
  var _a, _b, _c;
@@ -19609,13 +19613,16 @@ var NdcActionViewComponent = function (props) {
19609
19613
  }
19610
19614
  });
19611
19615
  }); };
19612
- var getProjectReportActions = function (reportData) {
19616
+ var getProjectReportActions = function (reportData, reportVersion) {
19613
19617
  return (React.createElement(antd.Row, null,
19614
19618
  React.createElement("div", { className: "icon" },
19615
19619
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19616
19620
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19617
19621
  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 },
19618
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))));
19622
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
19623
+ (reportData === null || reportData === void 0 ? void 0 : reportData.txTime) && (React.createElement("div", { className: "time" },
19624
+ moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19625
+ " ~ " + reportVersion))));
19619
19626
  };
19620
19627
  var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
19621
19628
  var reportDetails, response, exception_1;
@@ -19663,12 +19670,24 @@ var NdcActionViewComponent = function (props) {
19663
19670
  if ((item === null || item === void 0 ? void 0 : item.status) === exports.DocumentStatus.ACCEPTED) {
19664
19671
  setMonitoringReportAccepted(true);
19665
19672
  }
19673
+ var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
19674
+ var version = versionfull ? versionfull.split(".")[0] : "1";
19675
+ var moniteringVersion = version.startsWith("V") ? version : "V1";
19666
19676
  reportDetails[t("ndcAction:viewMoniteringReport")] =
19667
- getProjectReportActions(item);
19677
+ getProjectReportActions(item, moniteringVersion);
19678
+ setMonitoringReportData(item);
19679
+ setMonitoringReportversion(moniteringVersion);
19668
19680
  }
19669
19681
  else if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("VERIFICATION_REPORT")) {
19682
+ var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
19683
+ var version = versionfull ? versionfull.split(".")[0] : "1";
19684
+ var verificationVersion = version.startsWith("V")
19685
+ ? version
19686
+ : "V1";
19670
19687
  reportDetails[t("ndcAction:viewVerificationReport")] =
19671
- getProjectReportActions(item);
19688
+ getProjectReportActions(item, verificationVersion);
19689
+ setVerificationReportData(item);
19690
+ setVerificationReportversion(verificationVersion);
19672
19691
  }
19673
19692
  });
19674
19693
  }
@@ -19922,8 +19941,60 @@ var NdcActionViewComponent = function (props) {
19922
19941
  React.createElement(antd.Col, { lg: 8, md: 24 },
19923
19942
  React.createElement(antd.Skeleton, { loading: isLoading, active: true },
19924
19943
  React.createElement(antd.Card, { className: "card-container fix-height" },
19925
- React.createElement("div", null,
19926
- React.createElement(InfoView, { data: ndcActionReportDetails, title: t("ndcAction:viewReportsTitle"), icon: React.createElement(Icon__namespace.FileEarmarkText, null) })))))),
19944
+ React.createElement("div", { className: "title" },
19945
+ React.createElement("span", { className: "title-icon" }, React.createElement(Icon__namespace.FileEarmarkText, null)),
19946
+ React.createElement("span", { className: "title-text" }, t("ndcAction:viewReportsTitle"))),
19947
+ React.createElement("div", { className: "ndc-action-report-body" },
19948
+ React.createElement("div", { className: "report-details" },
19949
+ React.createElement("div", { className: "report-type" },
19950
+ React.createElement("div", { className: "name-time-container" },
19951
+ React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
19952
+ ? "name"
19953
+ : "empty" }, t("programme:monitoringReport")),
19954
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
19955
+ moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19956
+ " ~ " + monitoringReportversion))),
19957
+ 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
19958
+ ? t("programme:notAuthToUploadDoc")
19959
+ : uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId)
19960
+ ? !canUploadMonitorReport &&
19961
+ t("programme:programmeNotAuth")
19962
+ : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
19963
+ React.createElement(icons.FileAddOutlined, null))))),
19964
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(antd.Row, null,
19965
+ React.createElement("div", { className: "icon" },
19966
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
19967
+ exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19968
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
19969
+ exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19970
+ React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
19971
+ 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 },
19972
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))))),
19973
+ React.createElement("div", { className: "report-details" },
19974
+ React.createElement("div", { className: "report-type" },
19975
+ React.createElement("div", { className: "name-time-container" },
19976
+ React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
19977
+ ? "name"
19978
+ : "empty" }, t("programme:verificationReport")),
19979
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
19980
+ moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19981
+ " ~ " + verificationReportVersion))),
19982
+ 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
19983
+ ? t("programme:notAuthToUploadDoc")
19984
+ : uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId)
19985
+ ? !monitoringReportAccepted &&
19986
+ t("programme:monitoringRepNotApproved")
19987
+ : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
19988
+ React.createElement(icons.FileAddOutlined, null))))),
19989
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(antd.Row, null,
19990
+ React.createElement("div", { className: "icon" },
19991
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
19992
+ exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19993
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
19994
+ exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19995
+ React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
19996
+ 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 },
19997
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))))))))))),
19927
19998
  ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.Mitigation ||
19928
19999
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.CrossCutting) && (React.createElement(antd.Row, null,
19929
20000
  React.createElement(antd.Col, { lg: 24, className: "gutter-row" },
@@ -24544,36 +24615,61 @@ var NdcDetailsComponent = function (props) {
24544
24615
  var inRange = function (num, min, max) {
24545
24616
  return num >= min && num <= max;
24546
24617
  };
24547
- var handleSave = function (row) {
24548
- if (row.type === NdcActionType.main) {
24549
- var newData = __spreadArray([], ndcDetailsData, true);
24550
- var index = newData.findIndex(function (item) { return row.key === item.key; });
24551
- var item = newData[index];
24552
- newData.splice(index, 1, __assign(__assign({}, item), row));
24553
- setNdcDetailsData(newData);
24618
+ function onAddNewSubNdcDetail() {
24619
+ var range = selectedTab.split('-');
24620
+ var ndcDetail = ndcDetailsData.find(function (item) { return item.key === selectedNdcDetail.current.key; });
24621
+ var ndcDetailItemIndex = ndcDetailsData.findIndex(function (item) { return item.key === selectedNdcDetail.current.key; });
24622
+ if (ndcDetail) {
24623
+ addedNdcDetailId.current = addedNdcDetailId.current + 1;
24624
+ var newData = {
24625
+ key: addedNdcDetailId.current,
24626
+ startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
24627
+ endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
24628
+ ndcActionId: ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.key,
24629
+ nationalPlanObj: '',
24630
+ kpi: '',
24631
+ ministry: '',
24632
+ };
24633
+ if (!ndcDetail.subNdcDetails) {
24634
+ ndcDetail.subNdcDetails = [];
24635
+ }
24636
+ ndcDetail.subNdcDetails.push(newData);
24554
24637
  }
24555
- else {
24556
- var newData = __spreadArray([], ndcDetailsData, true);
24557
- var parentIndex = newData.findIndex(function (item) { return row.ndcActionId === item.key; });
24558
- var parentItem = newData[parentIndex];
24559
- if (parentItem) {
24560
- if (parentItem.subNdcDetails) {
24561
- var itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return row.key === item.key; });
24562
- if (itemIndex === -1) {
24563
- parentItem.subNdcDetails.push(row);
24638
+ ndcDetailsData[ndcDetailItemIndex] = ndcDetail;
24639
+ setNdcDetailsData(ndcDetailsData);
24640
+ setTableKey(function (key) { return key + 1; });
24641
+ }
24642
+ var handleSave = function (row) {
24643
+ setNdcDetailsData(function (prevData) {
24644
+ var newData = JSON.parse(JSON.stringify(prevData));
24645
+ if (row.type === NdcActionType.main) {
24646
+ var index = newData.findIndex(function (item) { return row.key === item.key; });
24647
+ if (index !== -1) {
24648
+ newData[index] = __assign(__assign({}, newData[index]), row);
24649
+ }
24650
+ }
24651
+ else {
24652
+ var parentIndex = newData.findIndex(function (item) { return row.ndcActionId === item.key; });
24653
+ var parentItem = newData[parentIndex];
24654
+ if (parentItem) {
24655
+ if (parentItem.subNdcDetails) {
24656
+ var itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return row.key === item.key; });
24657
+ if (itemIndex === -1) {
24658
+ parentItem.subNdcDetails.push(row);
24659
+ }
24660
+ else {
24661
+ parentItem.subNdcDetails[itemIndex] = __assign({}, row);
24662
+ }
24564
24663
  }
24565
24664
  else {
24566
- parentItem.subNdcDetails.splice(itemIndex, 1, __assign({}, row));
24665
+ parentItem.subNdcDetails = [row];
24567
24666
  }
24568
24667
  }
24569
- else {
24570
- parentItem.subNdcDetails = [row];
24571
- }
24668
+ newData[parentIndex] = __assign({}, parentItem);
24669
+ setTableKey(function (key) { return key + 1; });
24572
24670
  }
24573
- newData.splice(parentIndex, 1, __assign({}, parentItem));
24574
- setNdcDetailsData(newData);
24575
- setTableKey(function (key) { return key + 1; });
24576
- }
24671
+ return newData;
24672
+ });
24577
24673
  };
24578
24674
  var getNdcDetailsForPeriod = function () {
24579
24675
  var range = selectedTab.split("-");
@@ -24588,8 +24684,18 @@ var NdcDetailsComponent = function (props) {
24588
24684
  }
24589
24685
  };
24590
24686
  var getSubNdcDetails = function (key) {
24687
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
24591
24688
  var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
24592
24689
  if (ndcDetail) {
24690
+ 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()) !== '' &&
24691
+ ((_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) &&
24692
+ ((_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()) !==
24693
+ '' &&
24694
+ ((_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) &&
24695
+ 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() !== '' &&
24696
+ 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)) {
24697
+ onAddNewSubNdcDetail();
24698
+ }
24593
24699
  return ndcDetail.subNdcDetails;
24594
24700
  }
24595
24701
  else {
@@ -24605,7 +24711,7 @@ var NdcDetailsComponent = function (props) {
24605
24711
  editable: true,
24606
24712
  width: "50%",
24607
24713
  render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
24608
- React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add the National Plan Objective", className: "ant-input", disabled: true, type: "text" })))); },
24714
+ React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add the National Plan Objective", className: "ant-input", type: "text" })))); },
24609
24715
  },
24610
24716
  {
24611
24717
  title: t("ndc:ndcColumnsKpi"),
@@ -24615,7 +24721,7 @@ var NdcDetailsComponent = function (props) {
24615
24721
  editable: true,
24616
24722
  width: "10%",
24617
24723
  render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
24618
- React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input", disabled: true, type: "text" })))); },
24724
+ React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input", type: "text" })))); },
24619
24725
  },
24620
24726
  {
24621
24727
  title: "Ministry",
@@ -24625,7 +24731,7 @@ var NdcDetailsComponent = function (props) {
24625
24731
  editable: true,
24626
24732
  width: "40%",
24627
24733
  render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
24628
- React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Ministry name", className: "ant-input", disabled: true, type: "text" })))); },
24734
+ React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Ministry name", className: "ant-input", type: "text" })))); },
24629
24735
  },
24630
24736
  ];
24631
24737
  var columns = defaultColumns.map(function (col) {
@@ -25689,7 +25795,7 @@ var RejectDocumentationConfirmationModel = function (props) {
25689
25795
  React.createElement(antd.Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
25690
25796
  };
25691
25797
 
25692
- 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: center;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%; }\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 .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";
25798
+ 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: center;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%; }\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";
25693
25799
  styleInject(css_248z$2);
25694
25800
 
25695
25801
  var NdcActionBody = function (props) {
@@ -25907,8 +26013,8 @@ var NdcActionBody = function (props) {
25907
26013
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
25908
26014
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
25909
26015
  uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
25910
- ? { color: "#3F3A47", cursor: "pointer" }
25911
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26016
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26017
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
25912
26018
  if (canUploadMonitorReport &&
25913
26019
  uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
25914
26020
  handleFileUploadMonitor();
@@ -25931,8 +26037,8 @@ var NdcActionBody = function (props) {
25931
26037
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
25932
26038
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
25933
26039
  uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
25934
- ? { color: "#3F3A47", cursor: "pointer" }
25935
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26040
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26041
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
25936
26042
  if (canUploadMonitorReport &&
25937
26043
  uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
25938
26044
  handleFileUploadMonitor();
@@ -25981,8 +26087,8 @@ var NdcActionBody = function (props) {
25981
26087
  : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
25982
26088
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
25983
26089
  uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
25984
- ? { color: "#3F3A47", cursor: "pointer" }
25985
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26090
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26091
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
25986
26092
  if (monitoringReportAccepted &&
25987
26093
  uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
25988
26094
  handleFileUploadVerification();
@@ -26005,8 +26111,8 @@ var NdcActionBody = function (props) {
26005
26111
  : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
26006
26112
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
26007
26113
  uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
26008
- ? { color: "#3F3A47", cursor: "pointer" }
26009
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26114
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26115
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26010
26116
  if (monitoringReportAccepted &&
26011
26117
  uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
26012
26118
  handleFileUploadVerification();
@@ -26020,7 +26126,7 @@ var NdcActionBody = function (props) {
26020
26126
  React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
26021
26127
  };
26022
26128
 
26023
- 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\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
26129
+ 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";
26024
26130
  styleInject(css_248z$1);
26025
26131
 
26026
26132
  var ProgrammeDocuments = function (props) {
@@ -26294,8 +26400,8 @@ var ProgrammeDocuments = function (props) {
26294
26400
  ? t("programme:notAuthToUploadDoc")
26295
26401
  : !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26296
26402
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26297
- ? { color: "#3F3A47", cursor: "pointer" }
26298
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26403
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26404
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26299
26405
  return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
26300
26406
  } })),
26301
26407
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -26308,8 +26414,8 @@ var ProgrammeDocuments = function (props) {
26308
26414
  ? t("programme:notAuthToUploadDoc")
26309
26415
  : !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26310
26416
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26311
- ? { color: "#3F3A47", cursor: "pointer" }
26312
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26417
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26418
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26313
26419
  return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
26314
26420
  } })),
26315
26421
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -26362,8 +26468,8 @@ var ProgrammeDocuments = function (props) {
26362
26468
  : !uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26363
26469
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === exports.DocumentStatus.ACCEPTED &&
26364
26470
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26365
- ? { color: "#3F3A47", cursor: "pointer" }
26366
- : { color: "#cacaca" }, onClick: function () {
26471
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26472
+ : { color: "#cacaca", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26367
26473
  return designDocStatus === exports.DocumentStatus.ACCEPTED &&
26368
26474
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
26369
26475
  handleMethodologyFileUpload();
@@ -26382,8 +26488,8 @@ var ProgrammeDocuments = function (props) {
26382
26488
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26383
26489
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === exports.DocumentStatus.ACCEPTED &&
26384
26490
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26385
- ? { color: "#3F3A47", cursor: "pointer" }
26386
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26491
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26492
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26387
26493
  return designDocStatus === exports.DocumentStatus.ACCEPTED &&
26388
26494
  uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
26389
26495
  handleMethodologyFileUpload();
@@ -26437,8 +26543,8 @@ var ProgrammeDocuments = function (props) {
26437
26543
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
26438
26544
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
26439
26545
  !isProjectRejected
26440
- ? { color: "#3F3A47", cursor: "pointer" }
26441
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26546
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26547
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26442
26548
  return uploadImpactAssessmentDocUserPermission &&
26443
26549
  !isProjectRejected &&
26444
26550
  handleImpactAssessmentFileUpload();
@@ -26451,8 +26557,8 @@ var ProgrammeDocuments = function (props) {
26451
26557
  React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
26452
26558
  React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
26453
26559
  !isProjectRejected
26454
- ? { color: "#3F3A47", cursor: "pointer" }
26455
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26560
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26561
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26456
26562
  return uploadImpactAssessmentDocUserPermission &&
26457
26563
  !isProjectRejected &&
26458
26564
  handleImpactAssessmentFileUpload();