@undp/carbon-library 1.0.150-CARBON-320.1 → 1.0.150-CARBON-343.6

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\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";
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";
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";
@@ -19562,19 +19562,15 @@ var NdcActionViewComponent = function (props) {
19562
19562
  var userInfoState = useUserContext().userInfoState;
19563
19563
  var post = useConnection().post;
19564
19564
  var state = useLocation().state;
19565
- var _d = React.useState({}); _d[0]; var setNdcActionReportDetails = _d[1];
19565
+ var _d = React.useState({}), ndcActionReportDetails = _d[0], setNdcActionReportDetails = _d[1];
19566
19566
  var _e = React.useState(false), isLoading = _e[0], setIsLoading = _e[1];
19567
- var _f = React.useState(), monitoringReportData = _f[0], setMonitoringReportData = _f[1];
19568
- var _g = React.useState(""), monitoringReportversion = _g[0], setMonitoringReportversion = _g[1];
19569
- var _h = React.useState(), verificationReportData = _h[0], setVerificationReportData = _h[1];
19570
- var _j = React.useState(""), verificationReportVersion = _j[0], setVerificationReportversion = _j[1];
19571
- var _k = React.useState(), ndcActionDetails = _k[0], setNdcActionDetails = _k[1];
19572
- var _l = React.useState(); _l[0]; var setCoBenifitsComponentnDetails = _l[1];
19573
- var _m = React.useState(0), emissionsReductionExpected = _m[0], setEmissionsReductionExpected = _m[1];
19574
- var _o = React.useState(0), emissionsReductionAchieved = _o[0], setEmissionsReductionAchieved = _o[1];
19575
- var _p = React.useState([]), programmeOwnerId = _p[0], setProgrammeOwnerId = _p[1];
19576
- var _q = React.useState(false), canUploadMonitorReport = _q[0], setCanUploadMonitorReport = _q[1];
19577
- var _r = React.useState(false), monitoringReportAccepted = _r[0], setMonitoringReportAccepted = _r[1];
19567
+ var _f = React.useState(), ndcActionDetails = _f[0], setNdcActionDetails = _f[1];
19568
+ var _g = React.useState(); _g[0]; var setCoBenifitsComponentnDetails = _g[1];
19569
+ var _h = React.useState(0), emissionsReductionExpected = _h[0], setEmissionsReductionExpected = _h[1];
19570
+ var _j = React.useState(0), emissionsReductionAchieved = _j[0], setEmissionsReductionAchieved = _j[1];
19571
+ var _k = React.useState([]), programmeOwnerId = _k[0], setProgrammeOwnerId = _k[1];
19572
+ var _l = React.useState(false), canUploadMonitorReport = _l[0], setCanUploadMonitorReport = _l[1];
19573
+ var _m = React.useState(false), monitoringReportAccepted = _m[0], setMonitoringReportAccepted = _m[1];
19578
19574
  var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
19579
19575
  var response, error_1;
19580
19576
  var _a, _b, _c;
@@ -19616,16 +19612,13 @@ var NdcActionViewComponent = function (props) {
19616
19612
  }
19617
19613
  });
19618
19614
  }); };
19619
- var getProjectReportActions = function (reportData, reportVersion) {
19615
+ var getProjectReportActions = function (reportData) {
19620
19616
  return (React.createElement(antd.Row, null,
19621
19617
  React.createElement("div", { className: "icon" },
19622
19618
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19623
19619
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19624
19620
  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 },
19625
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
19626
- (reportData === null || reportData === void 0 ? void 0 : reportData.txTime) && (React.createElement("div", { className: "time" },
19627
- moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19628
- " ~ " + reportVersion))));
19621
+ React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))));
19629
19622
  };
19630
19623
  var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
19631
19624
  var reportDetails, response, exception_1;
@@ -19673,24 +19666,12 @@ var NdcActionViewComponent = function (props) {
19673
19666
  if ((item === null || item === void 0 ? void 0 : item.status) === exports.DocumentStatus.ACCEPTED) {
19674
19667
  setMonitoringReportAccepted(true);
19675
19668
  }
19676
- var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
19677
- var version = versionfull ? versionfull.split(".")[0] : "1";
19678
- var moniteringVersion = version.startsWith("V") ? version : "V1";
19679
19669
  reportDetails[t("ndcAction:viewMoniteringReport")] =
19680
- getProjectReportActions(item, moniteringVersion);
19681
- setMonitoringReportData(item);
19682
- setMonitoringReportversion(moniteringVersion);
19670
+ getProjectReportActions(item);
19683
19671
  }
19684
19672
  else if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("VERIFICATION_REPORT")) {
19685
- var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
19686
- var version = versionfull ? versionfull.split(".")[0] : "1";
19687
- var verificationVersion = version.startsWith("V")
19688
- ? version
19689
- : "V1";
19690
19673
  reportDetails[t("ndcAction:viewVerificationReport")] =
19691
- getProjectReportActions(item, verificationVersion);
19692
- setVerificationReportData(item);
19693
- setVerificationReportversion(verificationVersion);
19674
+ getProjectReportActions(item);
19694
19675
  }
19695
19676
  });
19696
19677
  }
@@ -19944,60 +19925,8 @@ var NdcActionViewComponent = function (props) {
19944
19925
  React.createElement(antd.Col, { lg: 8, md: 24 },
19945
19926
  React.createElement(antd.Skeleton, { loading: isLoading, active: true },
19946
19927
  React.createElement(antd.Card, { className: "card-container fix-height" },
19947
- React.createElement("div", { className: "title" },
19948
- React.createElement("span", { className: "title-icon" }, React.createElement(Icon__namespace.FileEarmarkText, null)),
19949
- React.createElement("span", { className: "title-text" }, t("ndcAction:viewReportsTitle"))),
19950
- React.createElement("div", { className: "ndc-action-report-body" },
19951
- React.createElement("div", { className: "report-details" },
19952
- React.createElement("div", { className: "report-type" },
19953
- React.createElement("div", { className: "name-time-container" },
19954
- React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
19955
- ? "name"
19956
- : "empty" }, t("programme:monitoringReport")),
19957
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
19958
- moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19959
- " ~ " + monitoringReportversion))),
19960
- 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
19961
- ? t("programme:notAuthToUploadDoc")
19962
- : uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId)
19963
- ? !canUploadMonitorReport &&
19964
- t("programme:programmeNotAuth")
19965
- : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
19966
- React.createElement(icons.FileAddOutlined, null))))),
19967
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(antd.Row, null,
19968
- React.createElement("div", { className: "icon" },
19969
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
19970
- exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19971
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
19972
- exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19973
- React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
19974
- 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 },
19975
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))))),
19976
- React.createElement("div", { className: "report-details" },
19977
- React.createElement("div", { className: "report-type" },
19978
- React.createElement("div", { className: "name-time-container" },
19979
- React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
19980
- ? "name"
19981
- : "empty" }, t("programme:verificationReport")),
19982
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
19983
- moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19984
- " ~ " + verificationReportVersion))),
19985
- 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
19986
- ? t("programme:notAuthToUploadDoc")
19987
- : uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId)
19988
- ? !monitoringReportAccepted &&
19989
- t("programme:monitoringRepNotApproved")
19990
- : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
19991
- React.createElement(icons.FileAddOutlined, null))))),
19992
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(antd.Row, null,
19993
- React.createElement("div", { className: "icon" },
19994
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
19995
- exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19996
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
19997
- exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19998
- React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
19999
- 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 },
20000
- React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))))))))))),
19928
+ React.createElement("div", null,
19929
+ React.createElement(InfoView, { data: ndcActionReportDetails, title: t("ndcAction:viewReportsTitle"), icon: React.createElement(Icon__namespace.FileEarmarkText, null) })))))),
20001
19930
  ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.Mitigation ||
20002
19931
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.CrossCutting) && (React.createElement(antd.Row, null,
20003
19932
  React.createElement(antd.Col, { lg: 24, className: "gutter-row" },
@@ -24566,7 +24495,7 @@ var EditableCell = function (_a) {
24566
24495
  return [3 /*break*/, 3];
24567
24496
  case 2:
24568
24497
  errInfo_1 = _a.sent();
24569
- console.log('Save failed:', errInfo_1);
24498
+ console.log("Save failed:", errInfo_1);
24570
24499
  return [3 /*break*/, 3];
24571
24500
  case 3: return [2 /*return*/];
24572
24501
  }
@@ -24580,7 +24509,7 @@ var EditableCell = function (_a) {
24580
24509
  message: "".concat(title, " is required."),
24581
24510
  },
24582
24511
  ] },
24583
- React.createElement(antd.Input, { ref: inputRef, onPressEnter: save, onBlur: save }))) : (React.createElement("div", { className: "editable-cell-value-wrap", style: { paddingRight: 24 }, onClick: toggleEdit }, children));
24512
+ 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));
24584
24513
  }
24585
24514
  return React.createElement("td", __assign({}, restProps), childNode);
24586
24515
  };
@@ -24598,6 +24527,8 @@ var NdcDetailsComponent = function (props) {
24598
24527
  var _d = React.useState("add_new"), selectedTab = _d[0], setSelectedTab = _d[1];
24599
24528
  var selectedPeriod = React.useRef({});
24600
24529
  var addedNdcDetailId = React.useRef(0);
24530
+ var selectedNdcDetail = React.useRef({});
24531
+ var _e = React.useState(0), tableKey = _e[0]; _e[1];
24601
24532
  var userInfoState = useUserContext().userInfoState;
24602
24533
  var isAddRangeVisible = function () {
24603
24534
  return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY ||
@@ -24630,6 +24561,15 @@ var NdcDetailsComponent = function (props) {
24630
24561
  return [];
24631
24562
  }
24632
24563
  };
24564
+ var getSubNdcDetails = function (key) {
24565
+ var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
24566
+ if (ndcDetail) {
24567
+ return ndcDetail.subNdcDetails;
24568
+ }
24569
+ else {
24570
+ return [];
24571
+ }
24572
+ };
24633
24573
  var defaultColumns = [
24634
24574
  {
24635
24575
  title: t("ndc:ndcColumnsNationalPlanObj"),
@@ -24637,6 +24577,7 @@ var NdcDetailsComponent = function (props) {
24637
24577
  key: "nationalPlanObj",
24638
24578
  align: "left",
24639
24579
  editable: true,
24580
+ width: 800,
24640
24581
  },
24641
24582
  {
24642
24583
  title: t("ndc:ndcColumnsKpi"),
@@ -24644,9 +24585,10 @@ var NdcDetailsComponent = function (props) {
24644
24585
  key: "kpi",
24645
24586
  align: "left",
24646
24587
  editable: true,
24588
+ width: 100,
24647
24589
  },
24648
24590
  {
24649
- title: 'Ministry',
24591
+ title: "Ministry",
24650
24592
  dataIndex: "ministry",
24651
24593
  key: "ministry",
24652
24594
  align: "left",
@@ -24674,7 +24616,7 @@ var NdcDetailsComponent = function (props) {
24674
24616
  endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
24675
24617
  nationalPlanObj: t("ndc:enterNewPlanTxt"),
24676
24618
  kpi: 0,
24677
- ministry: "Please add the Ministry name"
24619
+ ministry: "Please add the Ministry name",
24678
24620
  };
24679
24621
  setNdcDetailsData(__spreadArray(__spreadArray([], ndcDetailsData, true), [newData], false));
24680
24622
  }
@@ -24756,6 +24698,10 @@ var NdcDetailsComponent = function (props) {
24756
24698
  React.createElement(antd.Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit")),
24757
24699
  React.createElement(antd.Button, { className: "back-btn", onClick: onCancelPeriod, loading: loading }, t("ndc:back"))))));
24758
24700
  }
24701
+ function getSubNdcActionContent(record) {
24702
+ selectedNdcDetail.current = record;
24703
+ return (React.createElement(antd.Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getSubNdcDetails(record.key), columns: columns, showHeader: false, pagination: false }));
24704
+ }
24759
24705
  var onTabChange = function (key) {
24760
24706
  setSelectedTab(key);
24761
24707
  };
@@ -24767,7 +24713,25 @@ var NdcDetailsComponent = function (props) {
24767
24713
  endDate: new Date("2020-03-25"),
24768
24714
  nationalPlanObj: "Enhance value addition in key growth opportunities",
24769
24715
  kpi: 25,
24770
- ministry: "Ministry of Agriculture, Water and Forestry (MAWF)"
24716
+ ministry: "Ministry of Environment",
24717
+ subNdcDetails: [
24718
+ {
24719
+ key: 6,
24720
+ startDate: new Date("2019-03-25"),
24721
+ endDate: new Date("2020-03-25"),
24722
+ nationalPlanObj: "Enhance value addition in key growth opportunities sub details",
24723
+ kpi: 25,
24724
+ ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
24725
+ },
24726
+ {
24727
+ key: 7,
24728
+ startDate: new Date("2019-03-25"),
24729
+ endDate: new Date("2020-03-25"),
24730
+ nationalPlanObj: "",
24731
+ kpi: "",
24732
+ ministry: "",
24733
+ },
24734
+ ],
24771
24735
  },
24772
24736
  {
24773
24737
  key: 2,
@@ -24775,7 +24739,35 @@ var NdcDetailsComponent = function (props) {
24775
24739
  endDate: new Date("2019-08-25"),
24776
24740
  nationalPlanObj: "Strengthen the private sector to create 10,000 jobs",
24777
24741
  kpi: 10500,
24778
- ministry: "Ministry of Tourism (MoT)"
24742
+ ministry: "Ministry of Environment",
24743
+ subNdcDetails: [
24744
+ {
24745
+ key: 8,
24746
+ startDate: new Date("2019-03-25"),
24747
+ endDate: new Date("2020-03-25"),
24748
+ nationalPlanObj: "",
24749
+ kpi: "",
24750
+ ministry: "",
24751
+ },
24752
+ ],
24753
+ },
24754
+ {
24755
+ key: 12,
24756
+ startDate: new Date("2019-03-25"),
24757
+ endDate: new Date("2019-08-25"),
24758
+ nationalPlanObj: "Other",
24759
+ kpi: 10500,
24760
+ ministry: "Ministry of Environment",
24761
+ subNdcDetails: [
24762
+ {
24763
+ key: 8,
24764
+ startDate: new Date("2019-03-25"),
24765
+ endDate: new Date("2020-03-25"),
24766
+ nationalPlanObj: "",
24767
+ kpi: "",
24768
+ ministry: "",
24769
+ },
24770
+ ],
24779
24771
  },
24780
24772
  {
24781
24773
  key: 3,
@@ -24783,7 +24775,17 @@ var NdcDetailsComponent = function (props) {
24783
24775
  endDate: new Date("2022-03-25"),
24784
24776
  nationalPlanObj: "Consolidate and increase the stock and quality of productive infrastructure by 50%",
24785
24777
  kpi: 48,
24786
- ministry: "Ministry of Education, Arts and Culture (MoE)"
24778
+ ministry: "Ministry of Environment",
24779
+ subNdcDetails: [
24780
+ {
24781
+ key: 9,
24782
+ startDate: new Date("2019-03-25"),
24783
+ endDate: new Date("2020-03-25"),
24784
+ nationalPlanObj: "",
24785
+ kpi: "",
24786
+ ministry: "",
24787
+ },
24788
+ ],
24787
24789
  },
24788
24790
  {
24789
24791
  key: 4,
@@ -24791,7 +24793,17 @@ var NdcDetailsComponent = function (props) {
24791
24793
  endDate: new Date("2022-05-25"),
24792
24794
  nationalPlanObj: "Enhance the productivity and social wellbeing of the population",
24793
24795
  kpi: 20,
24794
- ministry: "Ministry of Environment, Forestry and Tourism (MEFT)"
24796
+ ministry: "Ministry of Environment",
24797
+ subNdcDetails: [
24798
+ {
24799
+ key: 10,
24800
+ startDate: new Date("2019-03-25"),
24801
+ endDate: new Date("2020-03-25"),
24802
+ nationalPlanObj: "",
24803
+ kpi: "",
24804
+ ministry: "",
24805
+ },
24806
+ ],
24795
24807
  },
24796
24808
  {
24797
24809
  key: 5,
@@ -24799,7 +24811,35 @@ var NdcDetailsComponent = function (props) {
24799
24811
  endDate: new Date("2023-03-25"),
24800
24812
  nationalPlanObj: "Strengthen the role of the state in guiding and facilitating development",
24801
24813
  kpi: 10,
24802
- ministry: "Ministry of Tourism (MoT)"
24814
+ ministry: "Ministry of Environment",
24815
+ subNdcDetails: [
24816
+ {
24817
+ key: 11,
24818
+ startDate: new Date("2019-03-25"),
24819
+ endDate: new Date("2020-03-25"),
24820
+ nationalPlanObj: "",
24821
+ kpi: "",
24822
+ ministry: "",
24823
+ },
24824
+ ],
24825
+ },
24826
+ {
24827
+ key: 13,
24828
+ startDate: new Date("2022-03-25"),
24829
+ endDate: new Date("2023-03-25"),
24830
+ nationalPlanObj: "Other",
24831
+ kpi: 10,
24832
+ ministry: "Ministry of Environment",
24833
+ subNdcDetails: [
24834
+ {
24835
+ key: 11,
24836
+ startDate: new Date("2019-03-25"),
24837
+ endDate: new Date("2020-03-25"),
24838
+ nationalPlanObj: "",
24839
+ kpi: "",
24840
+ ministry: "",
24841
+ },
24842
+ ],
24803
24843
  },
24804
24844
  ];
24805
24845
  var initialPeriods = [
@@ -24842,7 +24882,11 @@ var NdcDetailsComponent = function (props) {
24842
24882
  React.createElement(antd.Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
24843
24883
  selectedTab !== "add_new" && (React.createElement("div", null,
24844
24884
  React.createElement("div", null,
24845
- React.createElement(antd.Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, footer: function () {
24885
+ React.createElement(antd.Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
24886
+ expandedRowRender: function (record) { return getSubNdcActionContent(record); },
24887
+ indentSize: 0,
24888
+ defaultExpandedRowKeys: [selectedNdcDetail.current.key],
24889
+ }, footer: function () {
24846
24890
  return isAddNdcActionVisible() && (React.createElement(antd.Row, { justify: "center" },
24847
24891
  React.createElement(antd.Button, { onClick: onAddNewNdcDetail, type: "default", style: {
24848
24892
  marginBottom: 16,
@@ -25504,7 +25548,7 @@ var RejectDocumentationConfirmationModel = function (props) {
25504
25548
  React.createElement(antd.Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
25505
25549
  };
25506
25550
 
25507
- 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";
25551
+ 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";
25508
25552
  styleInject(css_248z$2);
25509
25553
 
25510
25554
  var NdcActionBody = function (props) {
@@ -25835,7 +25879,7 @@ var NdcActionBody = function (props) {
25835
25879
  React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
25836
25880
  };
25837
25881
 
25838
- 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";
25882
+ 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";
25839
25883
  styleInject(css_248z$1);
25840
25884
 
25841
25885
  var ProgrammeDocuments = function (props) {