@undp/carbon-library 1.0.41-CARBON-329.10 → 1.0.41-CARBON-329.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +461 -89
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/AntComponents/antTableComponents.d.ts +1 -1
- package/dist/cjs/types/Utils/documentsPermission.d.ts +1 -1
- package/dist/esm/index.js +461 -89
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/AntComponents/antTableComponents.d.ts +1 -1
- package/dist/esm/types/Utils/documentsPermission.d.ts +1 -1
- package/package.json +1 -1
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";
|
@@ -19510,11 +19510,8 @@ var linkDocVisible = function (docStatus) {
|
|
19510
19510
|
}
|
19511
19511
|
return visible;
|
19512
19512
|
};
|
19513
|
-
var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId, ministryLevelPermission
|
19513
|
+
var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId, ministryLevelPermission) {
|
19514
19514
|
var permission = false;
|
19515
|
-
if (programmeStatus && programmeStatus === exports.ProgrammeStageUnified.Rejected) {
|
19516
|
-
return false;
|
19517
|
-
}
|
19518
19515
|
if (docType === exports.DocType.DESIGN_DOCUMENT) {
|
19519
19516
|
if (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
|
19520
19517
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY && ministryLevelPermission)) &&
|
@@ -19562,15 +19559,19 @@ var NdcActionViewComponent = function (props) {
|
|
19562
19559
|
var userInfoState = useUserContext().userInfoState;
|
19563
19560
|
var post = useConnection().post;
|
19564
19561
|
var state = useLocation().state;
|
19565
|
-
var _d = React.useState({})
|
19562
|
+
var _d = React.useState({}); _d[0]; var setNdcActionReportDetails = _d[1];
|
19566
19563
|
var _e = React.useState(false), isLoading = _e[0], setIsLoading = _e[1];
|
19567
|
-
var _f = React.useState(),
|
19568
|
-
var _g = React.useState()
|
19569
|
-
var _h = React.useState(
|
19570
|
-
var _j = React.useState(
|
19571
|
-
var _k = React.useState(
|
19572
|
-
var _l = React.useState(
|
19573
|
-
var _m = React.useState(
|
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];
|
19574
19575
|
var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
|
19575
19576
|
var response, error_1;
|
19576
19577
|
var _a, _b, _c;
|
@@ -19612,13 +19613,16 @@ var NdcActionViewComponent = function (props) {
|
|
19612
19613
|
}
|
19613
19614
|
});
|
19614
19615
|
}); };
|
19615
|
-
var getProjectReportActions = function (reportData) {
|
19616
|
+
var getProjectReportActions = function (reportData, reportVersion) {
|
19616
19617
|
return (React.createElement(antd.Row, null,
|
19617
19618
|
React.createElement("div", { className: "icon" },
|
19618
19619
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
19619
19620
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
19620
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 },
|
19621
|
-
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))));
|
19622
19626
|
};
|
19623
19627
|
var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
|
19624
19628
|
var reportDetails, response, exception_1;
|
@@ -19666,12 +19670,24 @@ var NdcActionViewComponent = function (props) {
|
|
19666
19670
|
if ((item === null || item === void 0 ? void 0 : item.status) === exports.DocumentStatus.ACCEPTED) {
|
19667
19671
|
setMonitoringReportAccepted(true);
|
19668
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";
|
19669
19676
|
reportDetails[t("ndcAction:viewMoniteringReport")] =
|
19670
|
-
getProjectReportActions(item);
|
19677
|
+
getProjectReportActions(item, moniteringVersion);
|
19678
|
+
setMonitoringReportData(item);
|
19679
|
+
setMonitoringReportversion(moniteringVersion);
|
19671
19680
|
}
|
19672
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";
|
19673
19687
|
reportDetails[t("ndcAction:viewVerificationReport")] =
|
19674
|
-
getProjectReportActions(item);
|
19688
|
+
getProjectReportActions(item, verificationVersion);
|
19689
|
+
setVerificationReportData(item);
|
19690
|
+
setVerificationReportversion(verificationVersion);
|
19675
19691
|
}
|
19676
19692
|
});
|
19677
19693
|
}
|
@@ -19925,8 +19941,60 @@ var NdcActionViewComponent = function (props) {
|
|
19925
19941
|
React.createElement(antd.Col, { lg: 8, md: 24 },
|
19926
19942
|
React.createElement(antd.Skeleton, { loading: isLoading, active: true },
|
19927
19943
|
React.createElement(antd.Card, { className: "card-container fix-height" },
|
19928
|
-
React.createElement("div",
|
19929
|
-
React.createElement(
|
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" } })))))))))))),
|
19930
19998
|
((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.Mitigation ||
|
19931
19999
|
(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === exports.NdcActionTypes.CrossCutting) && (React.createElement(antd.Row, null,
|
19932
20000
|
React.createElement(antd.Col, { lg: 24, className: "gutter-row" },
|
@@ -24495,7 +24563,7 @@ var EditableCell = function (_a) {
|
|
24495
24563
|
return [3 /*break*/, 3];
|
24496
24564
|
case 2:
|
24497
24565
|
errInfo_1 = _a.sent();
|
24498
|
-
console.log(
|
24566
|
+
console.log("Save failed:", errInfo_1);
|
24499
24567
|
return [3 /*break*/, 3];
|
24500
24568
|
case 3: return [2 /*return*/];
|
24501
24569
|
}
|
@@ -24509,7 +24577,7 @@ var EditableCell = function (_a) {
|
|
24509
24577
|
message: "".concat(title, " is required."),
|
24510
24578
|
},
|
24511
24579
|
] },
|
24512
|
-
React.createElement(antd.Input, { ref: inputRef, onPressEnter: save, onBlur: save }))) : (React.createElement("div", { className: "editable-cell-value-wrap", style: { paddingRight: 24 }, onClick: toggleEdit }, children));
|
24580
|
+
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));
|
24513
24581
|
}
|
24514
24582
|
return React.createElement("td", __assign({}, restProps), childNode);
|
24515
24583
|
};
|
@@ -24517,6 +24585,11 @@ var EditableCell = function (_a) {
|
|
24517
24585
|
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";
|
24518
24586
|
styleInject(css_248z$4);
|
24519
24587
|
|
24588
|
+
var NdcActionType;
|
24589
|
+
(function (NdcActionType) {
|
24590
|
+
NdcActionType[NdcActionType["main"] = 0] = "main";
|
24591
|
+
NdcActionType[NdcActionType["sub"] = 1] = "sub";
|
24592
|
+
})(NdcActionType || (NdcActionType = {}));
|
24520
24593
|
var NdcDetailsComponent = function (props) {
|
24521
24594
|
var t = props.t; props.useConnection; var useUserContext = props.useUserContext;
|
24522
24595
|
var RangePicker = antd.DatePicker.RangePicker;
|
@@ -24527,6 +24600,8 @@ var NdcDetailsComponent = function (props) {
|
|
24527
24600
|
var _d = React.useState("add_new"), selectedTab = _d[0], setSelectedTab = _d[1];
|
24528
24601
|
var selectedPeriod = React.useRef({});
|
24529
24602
|
var addedNdcDetailId = React.useRef(0);
|
24603
|
+
var selectedNdcDetail = React.useRef({});
|
24604
|
+
var _e = React.useState(0), tableKey = _e[0], setTableKey = _e[1];
|
24530
24605
|
var userInfoState = useUserContext().userInfoState;
|
24531
24606
|
var isAddRangeVisible = function () {
|
24532
24607
|
return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY ||
|
@@ -24540,12 +24615,61 @@ var NdcDetailsComponent = function (props) {
|
|
24540
24615
|
var inRange = function (num, min, max) {
|
24541
24616
|
return num >= min && num <= max;
|
24542
24617
|
};
|
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);
|
24637
|
+
}
|
24638
|
+
ndcDetailsData[ndcDetailItemIndex] = ndcDetail;
|
24639
|
+
setNdcDetailsData(ndcDetailsData);
|
24640
|
+
setTableKey(function (key) { return key + 1; });
|
24641
|
+
}
|
24543
24642
|
var handleSave = function (row) {
|
24544
|
-
|
24545
|
-
|
24546
|
-
|
24547
|
-
|
24548
|
-
|
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
|
+
}
|
24663
|
+
}
|
24664
|
+
else {
|
24665
|
+
parentItem.subNdcDetails = [row];
|
24666
|
+
}
|
24667
|
+
}
|
24668
|
+
newData[parentIndex] = __assign({}, parentItem);
|
24669
|
+
setTableKey(function (key) { return key + 1; });
|
24670
|
+
}
|
24671
|
+
return newData;
|
24672
|
+
});
|
24549
24673
|
};
|
24550
24674
|
var getNdcDetailsForPeriod = function () {
|
24551
24675
|
var range = selectedTab.split("-");
|
@@ -24559,6 +24683,25 @@ var NdcDetailsComponent = function (props) {
|
|
24559
24683
|
return [];
|
24560
24684
|
}
|
24561
24685
|
};
|
24686
|
+
var getSubNdcDetails = function (key) {
|
24687
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
24688
|
+
var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
|
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
|
+
}
|
24699
|
+
return ndcDetail.subNdcDetails;
|
24700
|
+
}
|
24701
|
+
else {
|
24702
|
+
return [];
|
24703
|
+
}
|
24704
|
+
};
|
24562
24705
|
var defaultColumns = [
|
24563
24706
|
{
|
24564
24707
|
title: t("ndc:ndcColumnsNationalPlanObj"),
|
@@ -24566,6 +24709,9 @@ var NdcDetailsComponent = function (props) {
|
|
24566
24709
|
key: "nationalPlanObj",
|
24567
24710
|
align: "left",
|
24568
24711
|
editable: true,
|
24712
|
+
width: "50%",
|
24713
|
+
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
|
24714
|
+
React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add the National Plan Objective", className: "ant-input", type: "text" })))); },
|
24569
24715
|
},
|
24570
24716
|
{
|
24571
24717
|
title: t("ndc:ndcColumnsKpi"),
|
@@ -24573,13 +24719,19 @@ var NdcDetailsComponent = function (props) {
|
|
24573
24719
|
key: "kpi",
|
24574
24720
|
align: "left",
|
24575
24721
|
editable: true,
|
24722
|
+
width: "10%",
|
24723
|
+
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
|
24724
|
+
React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input", type: "text" })))); },
|
24576
24725
|
},
|
24577
24726
|
{
|
24578
|
-
title:
|
24727
|
+
title: "Ministry",
|
24579
24728
|
dataIndex: "ministry",
|
24580
24729
|
key: "ministry",
|
24581
24730
|
align: "left",
|
24582
24731
|
editable: true,
|
24732
|
+
width: "40%",
|
24733
|
+
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(antd.Space, { size: "middle" },
|
24734
|
+
React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Ministry name", className: "ant-input", type: "text" })))); },
|
24583
24735
|
},
|
24584
24736
|
];
|
24585
24737
|
var columns = defaultColumns.map(function (col) {
|
@@ -24596,14 +24748,27 @@ var NdcDetailsComponent = function (props) {
|
|
24596
24748
|
});
|
24597
24749
|
function onAddNewNdcDetail() {
|
24598
24750
|
var range = selectedTab.split("-");
|
24599
|
-
|
24751
|
+
var ndcActionId = ++addedNdcDetailId.current;
|
24600
24752
|
var newData = {
|
24601
|
-
key:
|
24753
|
+
key: ndcActionId,
|
24754
|
+
type: NdcActionType.main,
|
24602
24755
|
startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
|
24603
24756
|
endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
|
24604
|
-
nationalPlanObj:
|
24605
|
-
kpi:
|
24606
|
-
ministry: "
|
24757
|
+
nationalPlanObj: "",
|
24758
|
+
kpi: "",
|
24759
|
+
ministry: "",
|
24760
|
+
subNdcDetails: [
|
24761
|
+
{
|
24762
|
+
key: ++addedNdcDetailId.current,
|
24763
|
+
ndcActionId: ndcActionId,
|
24764
|
+
type: NdcActionType.sub,
|
24765
|
+
startDate: new Date("2019-03-25"),
|
24766
|
+
endDate: new Date("2020-03-25"),
|
24767
|
+
nationalPlanObj: "",
|
24768
|
+
kpi: "",
|
24769
|
+
ministry: "",
|
24770
|
+
},
|
24771
|
+
],
|
24607
24772
|
};
|
24608
24773
|
setNdcDetailsData(__spreadArray(__spreadArray([], ndcDetailsData, true), [newData], false));
|
24609
24774
|
}
|
@@ -24685,6 +24850,10 @@ var NdcDetailsComponent = function (props) {
|
|
24685
24850
|
React.createElement(antd.Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit")),
|
24686
24851
|
React.createElement(antd.Button, { className: "back-btn", onClick: onCancelPeriod, loading: loading }, t("ndc:back"))))));
|
24687
24852
|
}
|
24853
|
+
function getSubNdcActionContent(record) {
|
24854
|
+
selectedNdcDetail.current = record;
|
24855
|
+
return (React.createElement(antd.Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getSubNdcDetails(record.key), columns: columns, showHeader: false, pagination: false }));
|
24856
|
+
}
|
24688
24857
|
var onTabChange = function (key) {
|
24689
24858
|
setSelectedTab(key);
|
24690
24859
|
};
|
@@ -24692,43 +24861,232 @@ var NdcDetailsComponent = function (props) {
|
|
24692
24861
|
var defaultNdcDetails = [
|
24693
24862
|
{
|
24694
24863
|
key: 1,
|
24864
|
+
type: NdcActionType.main,
|
24695
24865
|
startDate: new Date("2019-03-25"),
|
24696
24866
|
endDate: new Date("2020-03-25"),
|
24697
24867
|
nationalPlanObj: "Enhance value addition in key growth opportunities",
|
24698
24868
|
kpi: 25,
|
24699
|
-
ministry: "Ministry of
|
24869
|
+
ministry: "Ministry of Environment",
|
24870
|
+
subNdcDetails: [
|
24871
|
+
{
|
24872
|
+
key: 6,
|
24873
|
+
ndcActionId: 1,
|
24874
|
+
type: NdcActionType.sub,
|
24875
|
+
startDate: new Date("2019-03-25"),
|
24876
|
+
endDate: new Date("2020-03-25"),
|
24877
|
+
nationalPlanObj: "Enhance value addition in key growth opportunities sub details",
|
24878
|
+
kpi: 25,
|
24879
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
24880
|
+
},
|
24881
|
+
{
|
24882
|
+
key: 7,
|
24883
|
+
ndcActionId: 1,
|
24884
|
+
type: NdcActionType.sub,
|
24885
|
+
startDate: new Date("2019-03-25"),
|
24886
|
+
endDate: new Date("2020-03-25"),
|
24887
|
+
nationalPlanObj: "",
|
24888
|
+
kpi: "",
|
24889
|
+
ministry: "",
|
24890
|
+
},
|
24891
|
+
],
|
24700
24892
|
},
|
24701
24893
|
{
|
24702
24894
|
key: 2,
|
24895
|
+
type: NdcActionType.main,
|
24703
24896
|
startDate: new Date("2019-03-25"),
|
24704
24897
|
endDate: new Date("2019-08-25"),
|
24705
24898
|
nationalPlanObj: "Strengthen the private sector to create 10,000 jobs",
|
24706
24899
|
kpi: 10500,
|
24707
|
-
ministry: "Ministry of
|
24900
|
+
ministry: "Ministry of Environment",
|
24901
|
+
subNdcDetails: [
|
24902
|
+
{
|
24903
|
+
key: 8,
|
24904
|
+
ndcActionId: 2,
|
24905
|
+
type: NdcActionType.sub,
|
24906
|
+
startDate: new Date("2019-03-25"),
|
24907
|
+
endDate: new Date("2020-03-25"),
|
24908
|
+
nationalPlanObj: "",
|
24909
|
+
kpi: "",
|
24910
|
+
ministry: "",
|
24911
|
+
},
|
24912
|
+
],
|
24913
|
+
},
|
24914
|
+
{
|
24915
|
+
key: 12,
|
24916
|
+
type: NdcActionType.main,
|
24917
|
+
startDate: new Date("2019-03-25"),
|
24918
|
+
endDate: new Date("2019-08-25"),
|
24919
|
+
nationalPlanObj: "Other",
|
24920
|
+
kpi: 10500,
|
24921
|
+
ministry: "Ministry of Environment",
|
24922
|
+
subNdcDetails: [
|
24923
|
+
{
|
24924
|
+
key: 8,
|
24925
|
+
ndcActionId: 12,
|
24926
|
+
type: NdcActionType.sub,
|
24927
|
+
startDate: new Date("2019-03-25"),
|
24928
|
+
endDate: new Date("2020-03-25"),
|
24929
|
+
nationalPlanObj: "",
|
24930
|
+
kpi: "",
|
24931
|
+
ministry: "",
|
24932
|
+
},
|
24933
|
+
],
|
24708
24934
|
},
|
24709
24935
|
{
|
24710
24936
|
key: 3,
|
24937
|
+
type: NdcActionType.main,
|
24711
24938
|
startDate: new Date("2021-03-25"),
|
24712
24939
|
endDate: new Date("2022-03-25"),
|
24713
24940
|
nationalPlanObj: "Consolidate and increase the stock and quality of productive infrastructure by 50%",
|
24714
24941
|
kpi: 48,
|
24715
|
-
ministry: "Ministry of
|
24942
|
+
ministry: "Ministry of Environment",
|
24943
|
+
subNdcDetails: [
|
24944
|
+
{
|
24945
|
+
key: 9,
|
24946
|
+
ndcActionId: 3,
|
24947
|
+
type: NdcActionType.sub,
|
24948
|
+
startDate: new Date("2019-03-25"),
|
24949
|
+
endDate: new Date("2020-03-25"),
|
24950
|
+
nationalPlanObj: "",
|
24951
|
+
kpi: "",
|
24952
|
+
ministry: "",
|
24953
|
+
},
|
24954
|
+
],
|
24716
24955
|
},
|
24717
24956
|
{
|
24718
24957
|
key: 4,
|
24958
|
+
type: NdcActionType.main,
|
24719
24959
|
startDate: new Date("2022-03-25"),
|
24720
24960
|
endDate: new Date("2022-05-25"),
|
24721
24961
|
nationalPlanObj: "Enhance the productivity and social wellbeing of the population",
|
24722
24962
|
kpi: 20,
|
24723
|
-
ministry: "Ministry of Environment,
|
24963
|
+
ministry: "Ministry of Environment",
|
24964
|
+
subNdcDetails: [
|
24965
|
+
{
|
24966
|
+
key: 10,
|
24967
|
+
ndcActionId: 4,
|
24968
|
+
type: NdcActionType.sub,
|
24969
|
+
startDate: new Date("2019-03-25"),
|
24970
|
+
endDate: new Date("2020-03-25"),
|
24971
|
+
nationalPlanObj: "",
|
24972
|
+
kpi: "",
|
24973
|
+
ministry: "",
|
24974
|
+
},
|
24975
|
+
],
|
24724
24976
|
},
|
24725
24977
|
{
|
24726
24978
|
key: 5,
|
24979
|
+
type: NdcActionType.main,
|
24727
24980
|
startDate: new Date("2022-03-25"),
|
24728
24981
|
endDate: new Date("2023-03-25"),
|
24729
24982
|
nationalPlanObj: "Strengthen the role of the state in guiding and facilitating development",
|
24730
24983
|
kpi: 10,
|
24731
|
-
ministry: "Ministry of
|
24984
|
+
ministry: "Ministry of Environment",
|
24985
|
+
subNdcDetails: [
|
24986
|
+
{
|
24987
|
+
key: 11,
|
24988
|
+
ndcActionId: 5,
|
24989
|
+
type: NdcActionType.sub,
|
24990
|
+
startDate: new Date("2019-03-25"),
|
24991
|
+
endDate: new Date("2020-03-25"),
|
24992
|
+
nationalPlanObj: "",
|
24993
|
+
kpi: "",
|
24994
|
+
ministry: "",
|
24995
|
+
},
|
24996
|
+
],
|
24997
|
+
},
|
24998
|
+
{
|
24999
|
+
key: 13,
|
25000
|
+
type: NdcActionType.main,
|
25001
|
+
startDate: new Date("2022-03-25"),
|
25002
|
+
endDate: new Date("2023-03-25"),
|
25003
|
+
nationalPlanObj: "Convert to solar energy",
|
25004
|
+
kpi: 50000,
|
25005
|
+
ministry: "Ministry of Environment",
|
25006
|
+
subNdcDetails: [
|
25007
|
+
{
|
25008
|
+
key: 11,
|
25009
|
+
ndcActionId: 13,
|
25010
|
+
type: NdcActionType.sub,
|
25011
|
+
startDate: new Date("2019-03-25"),
|
25012
|
+
endDate: new Date("2020-03-25"),
|
25013
|
+
nationalPlanObj: "Convert to solar energy",
|
25014
|
+
kpi: "3000",
|
25015
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
25016
|
+
},
|
25017
|
+
{
|
25018
|
+
key: 14,
|
25019
|
+
ndcActionId: 13,
|
25020
|
+
type: NdcActionType.sub,
|
25021
|
+
startDate: new Date("2019-03-25"),
|
25022
|
+
endDate: new Date("2020-03-25"),
|
25023
|
+
nationalPlanObj: "",
|
25024
|
+
kpi: "",
|
25025
|
+
ministry: "",
|
25026
|
+
},
|
25027
|
+
],
|
25028
|
+
},
|
25029
|
+
{
|
25030
|
+
key: 15,
|
25031
|
+
type: NdcActionType.main,
|
25032
|
+
startDate: new Date("2022-03-25"),
|
25033
|
+
endDate: new Date("2023-03-25"),
|
25034
|
+
nationalPlanObj: "Strengthen the private sector to create jobs",
|
25035
|
+
kpi: 10000,
|
25036
|
+
ministry: "Ministry of Environment",
|
25037
|
+
subNdcDetails: [
|
25038
|
+
{
|
25039
|
+
key: 16,
|
25040
|
+
ndcActionId: 15,
|
25041
|
+
type: NdcActionType.sub,
|
25042
|
+
startDate: new Date("2019-03-25"),
|
25043
|
+
endDate: new Date("2020-03-25"),
|
25044
|
+
nationalPlanObj: "Strengthen the private sector to create jobs",
|
25045
|
+
kpi: "7200",
|
25046
|
+
ministry: "Ministry of Tourism (MoT)",
|
25047
|
+
},
|
25048
|
+
{
|
25049
|
+
key: 17,
|
25050
|
+
ndcActionId: 15,
|
25051
|
+
type: NdcActionType.sub,
|
25052
|
+
startDate: new Date("2019-03-25"),
|
25053
|
+
endDate: new Date("2020-03-25"),
|
25054
|
+
nationalPlanObj: "",
|
25055
|
+
kpi: "",
|
25056
|
+
ministry: "",
|
25057
|
+
},
|
25058
|
+
],
|
25059
|
+
},
|
25060
|
+
{
|
25061
|
+
key: 18,
|
25062
|
+
type: NdcActionType.main,
|
25063
|
+
startDate: new Date("2022-03-25"),
|
25064
|
+
endDate: new Date("2023-03-25"),
|
25065
|
+
nationalPlanObj: "Other",
|
25066
|
+
kpi: '',
|
25067
|
+
ministry: "Ministry of Environment",
|
25068
|
+
subNdcDetails: [
|
25069
|
+
{
|
25070
|
+
key: 19,
|
25071
|
+
ndcActionId: 18,
|
25072
|
+
type: NdcActionType.sub,
|
25073
|
+
startDate: new Date("2019-03-25"),
|
25074
|
+
endDate: new Date("2020-03-25"),
|
25075
|
+
nationalPlanObj: "Strengthen the private sector to create jobs",
|
25076
|
+
kpi: "",
|
25077
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
25078
|
+
},
|
25079
|
+
{
|
25080
|
+
key: 20,
|
25081
|
+
ndcActionId: 18,
|
25082
|
+
type: NdcActionType.sub,
|
25083
|
+
startDate: new Date("2019-03-25"),
|
25084
|
+
endDate: new Date("2020-03-25"),
|
25085
|
+
nationalPlanObj: "",
|
25086
|
+
kpi: "",
|
25087
|
+
ministry: "",
|
25088
|
+
},
|
25089
|
+
],
|
24732
25090
|
},
|
24733
25091
|
];
|
24734
25092
|
var initialPeriods = [
|
@@ -24756,7 +25114,7 @@ var NdcDetailsComponent = function (props) {
|
|
24756
25114
|
children: addNewPeriodContent(),
|
24757
25115
|
});
|
24758
25116
|
}
|
24759
|
-
addedNdcDetailId.current =
|
25117
|
+
addedNdcDetailId.current = 20;
|
24760
25118
|
setPeriodItems(initialPeriods);
|
24761
25119
|
periodItemsRef.current = initialPeriods;
|
24762
25120
|
setNdcDetailsData(defaultNdcDetails);
|
@@ -24771,7 +25129,11 @@ var NdcDetailsComponent = function (props) {
|
|
24771
25129
|
React.createElement(antd.Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
|
24772
25130
|
selectedTab !== "add_new" && (React.createElement("div", null,
|
24773
25131
|
React.createElement("div", null,
|
24774
|
-
React.createElement(antd.Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns,
|
25132
|
+
React.createElement(antd.Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
|
25133
|
+
expandedRowRender: function (record) { return getSubNdcActionContent(record); },
|
25134
|
+
indentSize: 0,
|
25135
|
+
defaultExpandedRowKeys: [selectedNdcDetail.current.key],
|
25136
|
+
}, footer: function () {
|
24775
25137
|
return isAddNdcActionVisible() && (React.createElement(antd.Row, { justify: "center" },
|
24776
25138
|
React.createElement(antd.Button, { onClick: onAddNewNdcDetail, type: "default", style: {
|
24777
25139
|
marginBottom: 16,
|
@@ -25479,7 +25841,7 @@ var RejectDocumentationConfirmationModel = function (props) {
|
|
25479
25841
|
React.createElement(antd.Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
|
25480
25842
|
};
|
25481
25843
|
|
25482
|
-
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
|
25844
|
+
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";
|
25483
25845
|
styleInject(css_248z$2);
|
25484
25846
|
|
25485
25847
|
var NdcActionBody = function (props) {
|
@@ -25766,8 +26128,8 @@ var NdcActionBody = function (props) {
|
|
25766
26128
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
25767
26129
|
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
|
25768
26130
|
uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
|
25769
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25770
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26131
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26132
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25771
26133
|
if (canUploadMonitorReport &&
|
25772
26134
|
uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25773
26135
|
handleFileUploadMonitor();
|
@@ -25790,8 +26152,8 @@ var NdcActionBody = function (props) {
|
|
25790
26152
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
25791
26153
|
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
|
25792
26154
|
uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
|
25793
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25794
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26155
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26156
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25795
26157
|
if (canUploadMonitorReport &&
|
25796
26158
|
uploadDocUserPermission(userInfoState, exports.DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25797
26159
|
handleFileUploadMonitor();
|
@@ -25840,8 +26202,8 @@ var NdcActionBody = function (props) {
|
|
25840
26202
|
: t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
|
25841
26203
|
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
|
25842
26204
|
uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
|
25843
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25844
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26205
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26206
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25845
26207
|
if (monitoringReportAccepted &&
|
25846
26208
|
uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25847
26209
|
handleFileUploadVerification();
|
@@ -25864,8 +26226,8 @@ var NdcActionBody = function (props) {
|
|
25864
26226
|
: t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
|
25865
26227
|
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
|
25866
26228
|
uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
|
25867
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25868
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26229
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26230
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25869
26231
|
if (monitoringReportAccepted &&
|
25870
26232
|
uploadDocUserPermission(userInfoState, exports.DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25871
26233
|
handleFileUploadVerification();
|
@@ -25879,7 +26241,7 @@ var NdcActionBody = function (props) {
|
|
25879
26241
|
React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
|
25880
26242
|
};
|
25881
26243
|
|
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";
|
26244
|
+
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";
|
25883
26245
|
styleInject(css_248z$1);
|
25884
26246
|
|
25885
26247
|
var ProgrammeDocuments = function (props) {
|
@@ -25917,6 +26279,13 @@ var ProgrammeDocuments = function (props) {
|
|
25917
26279
|
var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
|
25918
26280
|
? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
|
25919
26281
|
: 5000000;
|
26282
|
+
var isProjectRejected = programmeStatus && programmeStatus === exports.ProgrammeStageUnified.Rejected;
|
26283
|
+
var uploadImpactAssessmentDocUserPermission = uploadDocUserPermission(userInfoState, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission);
|
26284
|
+
var impactAssessmentToolTipTitle = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
|
26285
|
+
? t("programme:notAuthToUploadDoc")
|
26286
|
+
: isProjectRejected
|
26287
|
+
? t("programme:docUploadProgrammeRejected")
|
26288
|
+
: !uploadImpactAssessmentDocUserPermission && t("programme:orgNotAuth");
|
25920
26289
|
var handleDesignDocFileUpload = function () {
|
25921
26290
|
var _a;
|
25922
26291
|
(_a = fileInputRef === null || fileInputRef === void 0 ? void 0 : fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
@@ -25941,8 +26310,8 @@ var ProgrammeDocuments = function (props) {
|
|
25941
26310
|
setDesignDocDate(item === null || item === void 0 ? void 0 : item.txTime);
|
25942
26311
|
setDesignDocStatus(item === null || item === void 0 ? void 0 : item.status);
|
25943
26312
|
setDesignDocId(item === null || item === void 0 ? void 0 : item.id);
|
25944
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split(
|
25945
|
-
var version = versionfull ? versionfull.split(
|
26313
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
26314
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25946
26315
|
setDesignDocversion(version.startsWith("V") ? version : "V1");
|
25947
26316
|
}
|
25948
26317
|
if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("METHODOLOGY")) {
|
@@ -25950,8 +26319,8 @@ var ProgrammeDocuments = function (props) {
|
|
25950
26319
|
setMethodologyDate(item === null || item === void 0 ? void 0 : item.txTime);
|
25951
26320
|
setMethodDocStatus(item === null || item === void 0 ? void 0 : item.status);
|
25952
26321
|
setMethDocId(item === null || item === void 0 ? void 0 : item.id);
|
25953
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split(
|
25954
|
-
var version = versionfull ? versionfull.split(
|
26322
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
26323
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25955
26324
|
setMethDocversion(version.startsWith("V") ? version : "V1");
|
25956
26325
|
}
|
25957
26326
|
if ((_c = item === null || item === void 0 ? void 0 : item.url) === null || _c === void 0 ? void 0 : _c.includes("OBJECTION")) {
|
@@ -25968,7 +26337,7 @@ var ProgrammeDocuments = function (props) {
|
|
25968
26337
|
setImpactAssessmentStatus(item === null || item === void 0 ? void 0 : item.status);
|
25969
26338
|
setImpactAssessmentId(item === null || item === void 0 ? void 0 : item.id);
|
25970
26339
|
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
25971
|
-
var version = versionfull ? versionfull.split(
|
26340
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25972
26341
|
setImpactAssessmentversion(version.startsWith("V") ? version : "V1");
|
25973
26342
|
}
|
25974
26343
|
});
|
@@ -26144,11 +26513,11 @@ var ProgrammeDocuments = function (props) {
|
|
26144
26513
|
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly ||
|
26145
26514
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER
|
26146
26515
|
? t("programme:notAuthToUploadDoc")
|
26147
|
-
: !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26148
|
-
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26149
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26150
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26151
|
-
return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26516
|
+
: !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26517
|
+
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26518
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26519
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26520
|
+
return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
26152
26521
|
} })),
|
26153
26522
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26154
26523
|
var selectedFile = e.target.files[0];
|
@@ -26158,11 +26527,11 @@ var ProgrammeDocuments = function (props) {
|
|
26158
26527
|
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly ||
|
26159
26528
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER
|
26160
26529
|
? t("programme:notAuthToUploadDoc")
|
26161
|
-
: !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26162
|
-
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26163
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26164
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26165
|
-
return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26530
|
+
: !uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26531
|
+
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26532
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26533
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26534
|
+
return uploadDocUserPermission(userInfoState, exports.DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
26166
26535
|
} })),
|
26167
26536
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26168
26537
|
var selectedFile = e.target.files[0];
|
@@ -26211,13 +26580,13 @@ var ProgrammeDocuments = function (props) {
|
|
26211
26580
|
methodDocStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
26212
26581
|
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
|
26213
26582
|
? t("programme:notAuthToUploadDoc")
|
26214
|
-
: !uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26583
|
+
: !uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26215
26584
|
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === exports.DocumentStatus.ACCEPTED &&
|
26216
|
-
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26217
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26218
|
-
: { color: "#cacaca" }, onClick: function () {
|
26585
|
+
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26586
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26587
|
+
: { color: "#cacaca", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26219
26588
|
return designDocStatus === exports.DocumentStatus.ACCEPTED &&
|
26220
|
-
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26589
|
+
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
|
26221
26590
|
handleMethodologyFileUpload();
|
26222
26591
|
} })),
|
26223
26592
|
React.createElement("input", { type: "file", ref: fileInputRefMeth, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
@@ -26228,16 +26597,16 @@ var ProgrammeDocuments = function (props) {
|
|
26228
26597
|
} }))))) : (React.createElement(React.Fragment, null,
|
26229
26598
|
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly
|
26230
26599
|
? t("programme:notAuthToUploadDoc")
|
26231
|
-
: uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26600
|
+
: uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26232
26601
|
? designDocStatus !== exports.DocumentStatus.ACCEPTED &&
|
26233
26602
|
t("programme:designDocNotApproved")
|
26234
26603
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26235
26604
|
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === exports.DocumentStatus.ACCEPTED &&
|
26236
|
-
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26237
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26238
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26605
|
+
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26606
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26607
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26239
26608
|
return designDocStatus === exports.DocumentStatus.ACCEPTED &&
|
26240
|
-
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26609
|
+
uploadDocUserPermission(userInfoState, exports.DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
|
26241
26610
|
handleMethodologyFileUpload();
|
26242
26611
|
} })),
|
26243
26612
|
React.createElement("input", { type: "file", ref: fileInputRefMeth, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
@@ -26260,7 +26629,8 @@ var ProgrammeDocuments = function (props) {
|
|
26260
26629
|
React.createElement(antd.Col, { span: 18, className: "field-key" },
|
26261
26630
|
React.createElement("div", { className: "label-container" },
|
26262
26631
|
React.createElement("div", { className: impactAssessmentUrl !== "" ? "label-uploaded" : "label" }, t("programme:environmentalImpactAssessment")),
|
26263
|
-
impactAssessmentStatus === exports.DocumentStatus.PENDING &&
|
26632
|
+
impactAssessmentStatus === exports.DocumentStatus.PENDING &&
|
26633
|
+
(ministryLevelPermission || companyRolePermission) && (React.createElement(React.Fragment, null,
|
26264
26634
|
React.createElement(icons.LikeOutlined, { onClick: function () {
|
26265
26635
|
return docAction(impactAssessmentId, exports.DocumentStatus.ACCEPTED);
|
26266
26636
|
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
@@ -26285,26 +26655,28 @@ var ProgrammeDocuments = function (props) {
|
|
26285
26655
|
linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
26286
26656
|
React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
26287
26657
|
impactAssessmentStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
26288
|
-
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title:
|
26289
|
-
|
26290
|
-
|
26291
|
-
|
26292
|
-
|
26293
|
-
|
26294
|
-
|
26658
|
+
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
26659
|
+
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
26660
|
+
!isProjectRejected
|
26661
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26662
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26663
|
+
return uploadImpactAssessmentDocUserPermission &&
|
26664
|
+
!isProjectRejected &&
|
26665
|
+
handleImpactAssessmentFileUpload();
|
26295
26666
|
} })),
|
26296
26667
|
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26297
26668
|
var selectedFile = e.target.files[0];
|
26298
26669
|
e.target.value = null;
|
26299
26670
|
onUploadDocument(selectedFile, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT);
|
26300
26671
|
} }))))) : (React.createElement(React.Fragment, null,
|
26301
|
-
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title:
|
26302
|
-
|
26303
|
-
|
26304
|
-
|
26305
|
-
|
26306
|
-
|
26307
|
-
|
26672
|
+
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
26673
|
+
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
26674
|
+
!isProjectRejected
|
26675
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26676
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26677
|
+
return uploadImpactAssessmentDocUserPermission &&
|
26678
|
+
!isProjectRejected &&
|
26679
|
+
handleImpactAssessmentFileUpload();
|
26308
26680
|
} })),
|
26309
26681
|
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26310
26682
|
var selectedFile = e.target.files[0];
|