@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/esm/index.js
CHANGED
@@ -19444,7 +19444,7 @@ var AddNdcActionComponent = function (props) {
|
|
19444
19444
|
React.createElement(Steps, { progressDot: true, direction: "vertical", current: current, items: stepItems })))));
|
19445
19445
|
};
|
19446
19446
|
|
19447
|
-
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";
|
19447
|
+
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";
|
19448
19448
|
styleInject(css_248z$d);
|
19449
19449
|
|
19450
19450
|
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";
|
@@ -19490,11 +19490,8 @@ var linkDocVisible = function (docStatus) {
|
|
19490
19490
|
}
|
19491
19491
|
return visible;
|
19492
19492
|
};
|
19493
|
-
var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId, ministryLevelPermission
|
19493
|
+
var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId, ministryLevelPermission) {
|
19494
19494
|
var permission = false;
|
19495
|
-
if (programmeStatus && programmeStatus === ProgrammeStageUnified.Rejected) {
|
19496
|
-
return false;
|
19497
|
-
}
|
19498
19495
|
if (docType === DocType.DESIGN_DOCUMENT) {
|
19499
19496
|
if (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ||
|
19500
19497
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY && ministryLevelPermission)) &&
|
@@ -19542,15 +19539,19 @@ var NdcActionViewComponent = function (props) {
|
|
19542
19539
|
var userInfoState = useUserContext().userInfoState;
|
19543
19540
|
var post = useConnection().post;
|
19544
19541
|
var state = useLocation().state;
|
19545
|
-
var _d = useState({})
|
19542
|
+
var _d = useState({}); _d[0]; var setNdcActionReportDetails = _d[1];
|
19546
19543
|
var _e = useState(false), isLoading = _e[0], setIsLoading = _e[1];
|
19547
|
-
var _f = useState(),
|
19548
|
-
var _g = useState()
|
19549
|
-
var _h = useState(
|
19550
|
-
var _j = useState(
|
19551
|
-
var _k = useState(
|
19552
|
-
var _l = useState(
|
19553
|
-
var _m = useState(
|
19544
|
+
var _f = useState(), monitoringReportData = _f[0], setMonitoringReportData = _f[1];
|
19545
|
+
var _g = useState(""), monitoringReportversion = _g[0], setMonitoringReportversion = _g[1];
|
19546
|
+
var _h = useState(), verificationReportData = _h[0], setVerificationReportData = _h[1];
|
19547
|
+
var _j = useState(""), verificationReportVersion = _j[0], setVerificationReportversion = _j[1];
|
19548
|
+
var _k = useState(), ndcActionDetails = _k[0], setNdcActionDetails = _k[1];
|
19549
|
+
var _l = useState(); _l[0]; var setCoBenifitsComponentnDetails = _l[1];
|
19550
|
+
var _m = useState(0), emissionsReductionExpected = _m[0], setEmissionsReductionExpected = _m[1];
|
19551
|
+
var _o = useState(0), emissionsReductionAchieved = _o[0], setEmissionsReductionAchieved = _o[1];
|
19552
|
+
var _p = useState([]), programmeOwnerId = _p[0], setProgrammeOwnerId = _p[1];
|
19553
|
+
var _q = useState(false), canUploadMonitorReport = _q[0], setCanUploadMonitorReport = _q[1];
|
19554
|
+
var _r = useState(false), monitoringReportAccepted = _r[0], setMonitoringReportAccepted = _r[1];
|
19554
19555
|
var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
|
19555
19556
|
var response, error_1;
|
19556
19557
|
var _a, _b, _c;
|
@@ -19592,13 +19593,16 @@ var NdcActionViewComponent = function (props) {
|
|
19592
19593
|
}
|
19593
19594
|
});
|
19594
19595
|
}); };
|
19595
|
-
var getProjectReportActions = function (reportData) {
|
19596
|
+
var getProjectReportActions = function (reportData, reportVersion) {
|
19596
19597
|
return (React.createElement(Row, null,
|
19597
19598
|
React.createElement("div", { className: "icon" },
|
19598
19599
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
19599
19600
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
19600
19601
|
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 },
|
19601
|
-
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))
|
19602
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
|
19603
|
+
(reportData === null || reportData === void 0 ? void 0 : reportData.txTime) && (React.createElement("div", { className: "time" },
|
19604
|
+
moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
|
19605
|
+
" ~ " + reportVersion))));
|
19602
19606
|
};
|
19603
19607
|
var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
|
19604
19608
|
var reportDetails, response, exception_1;
|
@@ -19646,12 +19650,24 @@ var NdcActionViewComponent = function (props) {
|
|
19646
19650
|
if ((item === null || item === void 0 ? void 0 : item.status) === DocumentStatus.ACCEPTED) {
|
19647
19651
|
setMonitoringReportAccepted(true);
|
19648
19652
|
}
|
19653
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
19654
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
19655
|
+
var moniteringVersion = version.startsWith("V") ? version : "V1";
|
19649
19656
|
reportDetails[t("ndcAction:viewMoniteringReport")] =
|
19650
|
-
getProjectReportActions(item);
|
19657
|
+
getProjectReportActions(item, moniteringVersion);
|
19658
|
+
setMonitoringReportData(item);
|
19659
|
+
setMonitoringReportversion(moniteringVersion);
|
19651
19660
|
}
|
19652
19661
|
else if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("VERIFICATION_REPORT")) {
|
19662
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
19663
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
19664
|
+
var verificationVersion = version.startsWith("V")
|
19665
|
+
? version
|
19666
|
+
: "V1";
|
19653
19667
|
reportDetails[t("ndcAction:viewVerificationReport")] =
|
19654
|
-
getProjectReportActions(item);
|
19668
|
+
getProjectReportActions(item, verificationVersion);
|
19669
|
+
setVerificationReportData(item);
|
19670
|
+
setVerificationReportversion(verificationVersion);
|
19655
19671
|
}
|
19656
19672
|
});
|
19657
19673
|
}
|
@@ -19905,8 +19921,60 @@ var NdcActionViewComponent = function (props) {
|
|
19905
19921
|
React.createElement(Col, { lg: 8, md: 24 },
|
19906
19922
|
React.createElement(Skeleton, { loading: isLoading, active: true },
|
19907
19923
|
React.createElement(Card, { className: "card-container fix-height" },
|
19908
|
-
React.createElement("div",
|
19909
|
-
React.createElement(
|
19924
|
+
React.createElement("div", { className: "title" },
|
19925
|
+
React.createElement("span", { className: "title-icon" }, React.createElement(Icon.FileEarmarkText, null)),
|
19926
|
+
React.createElement("span", { className: "title-text" }, t("ndcAction:viewReportsTitle"))),
|
19927
|
+
React.createElement("div", { className: "ndc-action-report-body" },
|
19928
|
+
React.createElement("div", { className: "report-details" },
|
19929
|
+
React.createElement("div", { className: "report-type" },
|
19930
|
+
React.createElement("div", { className: "name-time-container" },
|
19931
|
+
React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
|
19932
|
+
? "name"
|
19933
|
+
: "empty" }, t("programme:monitoringReport")),
|
19934
|
+
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
|
19935
|
+
moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
|
19936
|
+
" ~ " + monitoringReportversion))),
|
19937
|
+
React.createElement("div", { className: "icon" }, !(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
19938
|
+
? t("programme:notAuthToUploadDoc")
|
19939
|
+
: uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId)
|
19940
|
+
? !canUploadMonitorReport &&
|
19941
|
+
t("programme:programmeNotAuth")
|
19942
|
+
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
19943
|
+
React.createElement(FileAddOutlined, null))))),
|
19944
|
+
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(Row, null,
|
19945
|
+
React.createElement("div", { className: "icon" },
|
19946
|
+
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
|
19947
|
+
DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
19948
|
+
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
|
19949
|
+
DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
19950
|
+
React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
|
19951
|
+
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 },
|
19952
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))))),
|
19953
|
+
React.createElement("div", { className: "report-details" },
|
19954
|
+
React.createElement("div", { className: "report-type" },
|
19955
|
+
React.createElement("div", { className: "name-time-container" },
|
19956
|
+
React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
|
19957
|
+
? "name"
|
19958
|
+
: "empty" }, t("programme:verificationReport")),
|
19959
|
+
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
|
19960
|
+
moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
|
19961
|
+
" ~ " + verificationReportVersion))),
|
19962
|
+
React.createElement("div", { className: "icon" }, !(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
19963
|
+
? t("programme:notAuthToUploadDoc")
|
19964
|
+
: uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId)
|
19965
|
+
? !monitoringReportAccepted &&
|
19966
|
+
t("programme:monitoringRepNotApproved")
|
19967
|
+
: t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
|
19968
|
+
React.createElement(FileAddOutlined, null))))),
|
19969
|
+
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(Row, null,
|
19970
|
+
React.createElement("div", { className: "icon" },
|
19971
|
+
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
|
19972
|
+
DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
19973
|
+
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
|
19974
|
+
DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
19975
|
+
React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
|
19976
|
+
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 },
|
19977
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))))))))))),
|
19910
19978
|
((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.Mitigation ||
|
19911
19979
|
(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.CrossCutting) && (React.createElement(Row, null,
|
19912
19980
|
React.createElement(Col, { lg: 24, className: "gutter-row" },
|
@@ -24475,7 +24543,7 @@ var EditableCell = function (_a) {
|
|
24475
24543
|
return [3 /*break*/, 3];
|
24476
24544
|
case 2:
|
24477
24545
|
errInfo_1 = _a.sent();
|
24478
|
-
console.log(
|
24546
|
+
console.log("Save failed:", errInfo_1);
|
24479
24547
|
return [3 /*break*/, 3];
|
24480
24548
|
case 3: return [2 /*return*/];
|
24481
24549
|
}
|
@@ -24489,7 +24557,7 @@ var EditableCell = function (_a) {
|
|
24489
24557
|
message: "".concat(title, " is required."),
|
24490
24558
|
},
|
24491
24559
|
] },
|
24492
|
-
React.createElement(Input, { ref: inputRef, onPressEnter: save, onBlur: save }))) : (React.createElement("div", { className: "editable-cell-value-wrap", style: { paddingRight: 24 }, onClick: toggleEdit }, children));
|
24560
|
+
React.createElement(Input, { ref: inputRef, onPressEnter: save, onBlur: save }))) : (React.createElement("div", { className: "editable-cell-value-wrap", style: { paddingRight: 24, minWidth: "100px", minHeight: "20px" }, onClick: toggleEdit }, children));
|
24493
24561
|
}
|
24494
24562
|
return React.createElement("td", __assign({}, restProps), childNode);
|
24495
24563
|
};
|
@@ -24497,6 +24565,11 @@ var EditableCell = function (_a) {
|
|
24497
24565
|
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";
|
24498
24566
|
styleInject(css_248z$4);
|
24499
24567
|
|
24568
|
+
var NdcActionType;
|
24569
|
+
(function (NdcActionType) {
|
24570
|
+
NdcActionType[NdcActionType["main"] = 0] = "main";
|
24571
|
+
NdcActionType[NdcActionType["sub"] = 1] = "sub";
|
24572
|
+
})(NdcActionType || (NdcActionType = {}));
|
24500
24573
|
var NdcDetailsComponent = function (props) {
|
24501
24574
|
var t = props.t; props.useConnection; var useUserContext = props.useUserContext;
|
24502
24575
|
var RangePicker = DatePicker.RangePicker;
|
@@ -24507,6 +24580,8 @@ var NdcDetailsComponent = function (props) {
|
|
24507
24580
|
var _d = useState("add_new"), selectedTab = _d[0], setSelectedTab = _d[1];
|
24508
24581
|
var selectedPeriod = useRef({});
|
24509
24582
|
var addedNdcDetailId = useRef(0);
|
24583
|
+
var selectedNdcDetail = useRef({});
|
24584
|
+
var _e = useState(0), tableKey = _e[0], setTableKey = _e[1];
|
24510
24585
|
var userInfoState = useUserContext().userInfoState;
|
24511
24586
|
var isAddRangeVisible = function () {
|
24512
24587
|
return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY ||
|
@@ -24520,12 +24595,61 @@ var NdcDetailsComponent = function (props) {
|
|
24520
24595
|
var inRange = function (num, min, max) {
|
24521
24596
|
return num >= min && num <= max;
|
24522
24597
|
};
|
24598
|
+
function onAddNewSubNdcDetail() {
|
24599
|
+
var range = selectedTab.split('-');
|
24600
|
+
var ndcDetail = ndcDetailsData.find(function (item) { return item.key === selectedNdcDetail.current.key; });
|
24601
|
+
var ndcDetailItemIndex = ndcDetailsData.findIndex(function (item) { return item.key === selectedNdcDetail.current.key; });
|
24602
|
+
if (ndcDetail) {
|
24603
|
+
addedNdcDetailId.current = addedNdcDetailId.current + 1;
|
24604
|
+
var newData = {
|
24605
|
+
key: addedNdcDetailId.current,
|
24606
|
+
startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
|
24607
|
+
endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
|
24608
|
+
ndcActionId: ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.key,
|
24609
|
+
nationalPlanObj: '',
|
24610
|
+
kpi: '',
|
24611
|
+
ministry: '',
|
24612
|
+
};
|
24613
|
+
if (!ndcDetail.subNdcDetails) {
|
24614
|
+
ndcDetail.subNdcDetails = [];
|
24615
|
+
}
|
24616
|
+
ndcDetail.subNdcDetails.push(newData);
|
24617
|
+
}
|
24618
|
+
ndcDetailsData[ndcDetailItemIndex] = ndcDetail;
|
24619
|
+
setNdcDetailsData(ndcDetailsData);
|
24620
|
+
setTableKey(function (key) { return key + 1; });
|
24621
|
+
}
|
24523
24622
|
var handleSave = function (row) {
|
24524
|
-
|
24525
|
-
|
24526
|
-
|
24527
|
-
|
24528
|
-
|
24623
|
+
setNdcDetailsData(function (prevData) {
|
24624
|
+
var newData = JSON.parse(JSON.stringify(prevData));
|
24625
|
+
if (row.type === NdcActionType.main) {
|
24626
|
+
var index = newData.findIndex(function (item) { return row.key === item.key; });
|
24627
|
+
if (index !== -1) {
|
24628
|
+
newData[index] = __assign(__assign({}, newData[index]), row);
|
24629
|
+
}
|
24630
|
+
}
|
24631
|
+
else {
|
24632
|
+
var parentIndex = newData.findIndex(function (item) { return row.ndcActionId === item.key; });
|
24633
|
+
var parentItem = newData[parentIndex];
|
24634
|
+
if (parentItem) {
|
24635
|
+
if (parentItem.subNdcDetails) {
|
24636
|
+
var itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return row.key === item.key; });
|
24637
|
+
if (itemIndex === -1) {
|
24638
|
+
parentItem.subNdcDetails.push(row);
|
24639
|
+
}
|
24640
|
+
else {
|
24641
|
+
parentItem.subNdcDetails[itemIndex] = __assign({}, row);
|
24642
|
+
}
|
24643
|
+
}
|
24644
|
+
else {
|
24645
|
+
parentItem.subNdcDetails = [row];
|
24646
|
+
}
|
24647
|
+
}
|
24648
|
+
newData[parentIndex] = __assign({}, parentItem);
|
24649
|
+
setTableKey(function (key) { return key + 1; });
|
24650
|
+
}
|
24651
|
+
return newData;
|
24652
|
+
});
|
24529
24653
|
};
|
24530
24654
|
var getNdcDetailsForPeriod = function () {
|
24531
24655
|
var range = selectedTab.split("-");
|
@@ -24539,6 +24663,25 @@ var NdcDetailsComponent = function (props) {
|
|
24539
24663
|
return [];
|
24540
24664
|
}
|
24541
24665
|
};
|
24666
|
+
var getSubNdcDetails = function (key) {
|
24667
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
24668
|
+
var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
|
24669
|
+
if (ndcDetail) {
|
24670
|
+
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()) !== '' &&
|
24671
|
+
((_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) &&
|
24672
|
+
((_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()) !==
|
24673
|
+
'' &&
|
24674
|
+
((_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) &&
|
24675
|
+
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() !== '' &&
|
24676
|
+
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)) {
|
24677
|
+
onAddNewSubNdcDetail();
|
24678
|
+
}
|
24679
|
+
return ndcDetail.subNdcDetails;
|
24680
|
+
}
|
24681
|
+
else {
|
24682
|
+
return [];
|
24683
|
+
}
|
24684
|
+
};
|
24542
24685
|
var defaultColumns = [
|
24543
24686
|
{
|
24544
24687
|
title: t("ndc:ndcColumnsNationalPlanObj"),
|
@@ -24546,6 +24689,9 @@ var NdcDetailsComponent = function (props) {
|
|
24546
24689
|
key: "nationalPlanObj",
|
24547
24690
|
align: "left",
|
24548
24691
|
editable: true,
|
24692
|
+
width: "50%",
|
24693
|
+
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
|
24694
|
+
React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add the National Plan Objective", className: "ant-input", type: "text" })))); },
|
24549
24695
|
},
|
24550
24696
|
{
|
24551
24697
|
title: t("ndc:ndcColumnsKpi"),
|
@@ -24553,13 +24699,19 @@ var NdcDetailsComponent = function (props) {
|
|
24553
24699
|
key: "kpi",
|
24554
24700
|
align: "left",
|
24555
24701
|
editable: true,
|
24702
|
+
width: "10%",
|
24703
|
+
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
|
24704
|
+
React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input", type: "text" })))); },
|
24556
24705
|
},
|
24557
24706
|
{
|
24558
|
-
title:
|
24707
|
+
title: "Ministry",
|
24559
24708
|
dataIndex: "ministry",
|
24560
24709
|
key: "ministry",
|
24561
24710
|
align: "left",
|
24562
24711
|
editable: true,
|
24712
|
+
width: "40%",
|
24713
|
+
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
|
24714
|
+
React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Ministry name", className: "ant-input", type: "text" })))); },
|
24563
24715
|
},
|
24564
24716
|
];
|
24565
24717
|
var columns = defaultColumns.map(function (col) {
|
@@ -24576,14 +24728,27 @@ var NdcDetailsComponent = function (props) {
|
|
24576
24728
|
});
|
24577
24729
|
function onAddNewNdcDetail() {
|
24578
24730
|
var range = selectedTab.split("-");
|
24579
|
-
|
24731
|
+
var ndcActionId = ++addedNdcDetailId.current;
|
24580
24732
|
var newData = {
|
24581
|
-
key:
|
24733
|
+
key: ndcActionId,
|
24734
|
+
type: NdcActionType.main,
|
24582
24735
|
startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
|
24583
24736
|
endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
|
24584
|
-
nationalPlanObj:
|
24585
|
-
kpi:
|
24586
|
-
ministry: "
|
24737
|
+
nationalPlanObj: "",
|
24738
|
+
kpi: "",
|
24739
|
+
ministry: "",
|
24740
|
+
subNdcDetails: [
|
24741
|
+
{
|
24742
|
+
key: ++addedNdcDetailId.current,
|
24743
|
+
ndcActionId: ndcActionId,
|
24744
|
+
type: NdcActionType.sub,
|
24745
|
+
startDate: new Date("2019-03-25"),
|
24746
|
+
endDate: new Date("2020-03-25"),
|
24747
|
+
nationalPlanObj: "",
|
24748
|
+
kpi: "",
|
24749
|
+
ministry: "",
|
24750
|
+
},
|
24751
|
+
],
|
24587
24752
|
};
|
24588
24753
|
setNdcDetailsData(__spreadArray(__spreadArray([], ndcDetailsData, true), [newData], false));
|
24589
24754
|
}
|
@@ -24665,6 +24830,10 @@ var NdcDetailsComponent = function (props) {
|
|
24665
24830
|
React.createElement(Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit")),
|
24666
24831
|
React.createElement(Button, { className: "back-btn", onClick: onCancelPeriod, loading: loading }, t("ndc:back"))))));
|
24667
24832
|
}
|
24833
|
+
function getSubNdcActionContent(record) {
|
24834
|
+
selectedNdcDetail.current = record;
|
24835
|
+
return (React.createElement(Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getSubNdcDetails(record.key), columns: columns, showHeader: false, pagination: false }));
|
24836
|
+
}
|
24668
24837
|
var onTabChange = function (key) {
|
24669
24838
|
setSelectedTab(key);
|
24670
24839
|
};
|
@@ -24672,43 +24841,232 @@ var NdcDetailsComponent = function (props) {
|
|
24672
24841
|
var defaultNdcDetails = [
|
24673
24842
|
{
|
24674
24843
|
key: 1,
|
24844
|
+
type: NdcActionType.main,
|
24675
24845
|
startDate: new Date("2019-03-25"),
|
24676
24846
|
endDate: new Date("2020-03-25"),
|
24677
24847
|
nationalPlanObj: "Enhance value addition in key growth opportunities",
|
24678
24848
|
kpi: 25,
|
24679
|
-
ministry: "Ministry of
|
24849
|
+
ministry: "Ministry of Environment",
|
24850
|
+
subNdcDetails: [
|
24851
|
+
{
|
24852
|
+
key: 6,
|
24853
|
+
ndcActionId: 1,
|
24854
|
+
type: NdcActionType.sub,
|
24855
|
+
startDate: new Date("2019-03-25"),
|
24856
|
+
endDate: new Date("2020-03-25"),
|
24857
|
+
nationalPlanObj: "Enhance value addition in key growth opportunities sub details",
|
24858
|
+
kpi: 25,
|
24859
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
24860
|
+
},
|
24861
|
+
{
|
24862
|
+
key: 7,
|
24863
|
+
ndcActionId: 1,
|
24864
|
+
type: NdcActionType.sub,
|
24865
|
+
startDate: new Date("2019-03-25"),
|
24866
|
+
endDate: new Date("2020-03-25"),
|
24867
|
+
nationalPlanObj: "",
|
24868
|
+
kpi: "",
|
24869
|
+
ministry: "",
|
24870
|
+
},
|
24871
|
+
],
|
24680
24872
|
},
|
24681
24873
|
{
|
24682
24874
|
key: 2,
|
24875
|
+
type: NdcActionType.main,
|
24683
24876
|
startDate: new Date("2019-03-25"),
|
24684
24877
|
endDate: new Date("2019-08-25"),
|
24685
24878
|
nationalPlanObj: "Strengthen the private sector to create 10,000 jobs",
|
24686
24879
|
kpi: 10500,
|
24687
|
-
ministry: "Ministry of
|
24880
|
+
ministry: "Ministry of Environment",
|
24881
|
+
subNdcDetails: [
|
24882
|
+
{
|
24883
|
+
key: 8,
|
24884
|
+
ndcActionId: 2,
|
24885
|
+
type: NdcActionType.sub,
|
24886
|
+
startDate: new Date("2019-03-25"),
|
24887
|
+
endDate: new Date("2020-03-25"),
|
24888
|
+
nationalPlanObj: "",
|
24889
|
+
kpi: "",
|
24890
|
+
ministry: "",
|
24891
|
+
},
|
24892
|
+
],
|
24893
|
+
},
|
24894
|
+
{
|
24895
|
+
key: 12,
|
24896
|
+
type: NdcActionType.main,
|
24897
|
+
startDate: new Date("2019-03-25"),
|
24898
|
+
endDate: new Date("2019-08-25"),
|
24899
|
+
nationalPlanObj: "Other",
|
24900
|
+
kpi: 10500,
|
24901
|
+
ministry: "Ministry of Environment",
|
24902
|
+
subNdcDetails: [
|
24903
|
+
{
|
24904
|
+
key: 8,
|
24905
|
+
ndcActionId: 12,
|
24906
|
+
type: NdcActionType.sub,
|
24907
|
+
startDate: new Date("2019-03-25"),
|
24908
|
+
endDate: new Date("2020-03-25"),
|
24909
|
+
nationalPlanObj: "",
|
24910
|
+
kpi: "",
|
24911
|
+
ministry: "",
|
24912
|
+
},
|
24913
|
+
],
|
24688
24914
|
},
|
24689
24915
|
{
|
24690
24916
|
key: 3,
|
24917
|
+
type: NdcActionType.main,
|
24691
24918
|
startDate: new Date("2021-03-25"),
|
24692
24919
|
endDate: new Date("2022-03-25"),
|
24693
24920
|
nationalPlanObj: "Consolidate and increase the stock and quality of productive infrastructure by 50%",
|
24694
24921
|
kpi: 48,
|
24695
|
-
ministry: "Ministry of
|
24922
|
+
ministry: "Ministry of Environment",
|
24923
|
+
subNdcDetails: [
|
24924
|
+
{
|
24925
|
+
key: 9,
|
24926
|
+
ndcActionId: 3,
|
24927
|
+
type: NdcActionType.sub,
|
24928
|
+
startDate: new Date("2019-03-25"),
|
24929
|
+
endDate: new Date("2020-03-25"),
|
24930
|
+
nationalPlanObj: "",
|
24931
|
+
kpi: "",
|
24932
|
+
ministry: "",
|
24933
|
+
},
|
24934
|
+
],
|
24696
24935
|
},
|
24697
24936
|
{
|
24698
24937
|
key: 4,
|
24938
|
+
type: NdcActionType.main,
|
24699
24939
|
startDate: new Date("2022-03-25"),
|
24700
24940
|
endDate: new Date("2022-05-25"),
|
24701
24941
|
nationalPlanObj: "Enhance the productivity and social wellbeing of the population",
|
24702
24942
|
kpi: 20,
|
24703
|
-
ministry: "Ministry of Environment,
|
24943
|
+
ministry: "Ministry of Environment",
|
24944
|
+
subNdcDetails: [
|
24945
|
+
{
|
24946
|
+
key: 10,
|
24947
|
+
ndcActionId: 4,
|
24948
|
+
type: NdcActionType.sub,
|
24949
|
+
startDate: new Date("2019-03-25"),
|
24950
|
+
endDate: new Date("2020-03-25"),
|
24951
|
+
nationalPlanObj: "",
|
24952
|
+
kpi: "",
|
24953
|
+
ministry: "",
|
24954
|
+
},
|
24955
|
+
],
|
24704
24956
|
},
|
24705
24957
|
{
|
24706
24958
|
key: 5,
|
24959
|
+
type: NdcActionType.main,
|
24707
24960
|
startDate: new Date("2022-03-25"),
|
24708
24961
|
endDate: new Date("2023-03-25"),
|
24709
24962
|
nationalPlanObj: "Strengthen the role of the state in guiding and facilitating development",
|
24710
24963
|
kpi: 10,
|
24711
|
-
ministry: "Ministry of
|
24964
|
+
ministry: "Ministry of Environment",
|
24965
|
+
subNdcDetails: [
|
24966
|
+
{
|
24967
|
+
key: 11,
|
24968
|
+
ndcActionId: 5,
|
24969
|
+
type: NdcActionType.sub,
|
24970
|
+
startDate: new Date("2019-03-25"),
|
24971
|
+
endDate: new Date("2020-03-25"),
|
24972
|
+
nationalPlanObj: "",
|
24973
|
+
kpi: "",
|
24974
|
+
ministry: "",
|
24975
|
+
},
|
24976
|
+
],
|
24977
|
+
},
|
24978
|
+
{
|
24979
|
+
key: 13,
|
24980
|
+
type: NdcActionType.main,
|
24981
|
+
startDate: new Date("2022-03-25"),
|
24982
|
+
endDate: new Date("2023-03-25"),
|
24983
|
+
nationalPlanObj: "Convert to solar energy",
|
24984
|
+
kpi: 50000,
|
24985
|
+
ministry: "Ministry of Environment",
|
24986
|
+
subNdcDetails: [
|
24987
|
+
{
|
24988
|
+
key: 11,
|
24989
|
+
ndcActionId: 13,
|
24990
|
+
type: NdcActionType.sub,
|
24991
|
+
startDate: new Date("2019-03-25"),
|
24992
|
+
endDate: new Date("2020-03-25"),
|
24993
|
+
nationalPlanObj: "Convert to solar energy",
|
24994
|
+
kpi: "3000",
|
24995
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
24996
|
+
},
|
24997
|
+
{
|
24998
|
+
key: 14,
|
24999
|
+
ndcActionId: 13,
|
25000
|
+
type: NdcActionType.sub,
|
25001
|
+
startDate: new Date("2019-03-25"),
|
25002
|
+
endDate: new Date("2020-03-25"),
|
25003
|
+
nationalPlanObj: "",
|
25004
|
+
kpi: "",
|
25005
|
+
ministry: "",
|
25006
|
+
},
|
25007
|
+
],
|
25008
|
+
},
|
25009
|
+
{
|
25010
|
+
key: 15,
|
25011
|
+
type: NdcActionType.main,
|
25012
|
+
startDate: new Date("2022-03-25"),
|
25013
|
+
endDate: new Date("2023-03-25"),
|
25014
|
+
nationalPlanObj: "Strengthen the private sector to create jobs",
|
25015
|
+
kpi: 10000,
|
25016
|
+
ministry: "Ministry of Environment",
|
25017
|
+
subNdcDetails: [
|
25018
|
+
{
|
25019
|
+
key: 16,
|
25020
|
+
ndcActionId: 15,
|
25021
|
+
type: NdcActionType.sub,
|
25022
|
+
startDate: new Date("2019-03-25"),
|
25023
|
+
endDate: new Date("2020-03-25"),
|
25024
|
+
nationalPlanObj: "Strengthen the private sector to create jobs",
|
25025
|
+
kpi: "7200",
|
25026
|
+
ministry: "Ministry of Tourism (MoT)",
|
25027
|
+
},
|
25028
|
+
{
|
25029
|
+
key: 17,
|
25030
|
+
ndcActionId: 15,
|
25031
|
+
type: NdcActionType.sub,
|
25032
|
+
startDate: new Date("2019-03-25"),
|
25033
|
+
endDate: new Date("2020-03-25"),
|
25034
|
+
nationalPlanObj: "",
|
25035
|
+
kpi: "",
|
25036
|
+
ministry: "",
|
25037
|
+
},
|
25038
|
+
],
|
25039
|
+
},
|
25040
|
+
{
|
25041
|
+
key: 18,
|
25042
|
+
type: NdcActionType.main,
|
25043
|
+
startDate: new Date("2022-03-25"),
|
25044
|
+
endDate: new Date("2023-03-25"),
|
25045
|
+
nationalPlanObj: "Other",
|
25046
|
+
kpi: '',
|
25047
|
+
ministry: "Ministry of Environment",
|
25048
|
+
subNdcDetails: [
|
25049
|
+
{
|
25050
|
+
key: 19,
|
25051
|
+
ndcActionId: 18,
|
25052
|
+
type: NdcActionType.sub,
|
25053
|
+
startDate: new Date("2019-03-25"),
|
25054
|
+
endDate: new Date("2020-03-25"),
|
25055
|
+
nationalPlanObj: "Strengthen the private sector to create jobs",
|
25056
|
+
kpi: "",
|
25057
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
25058
|
+
},
|
25059
|
+
{
|
25060
|
+
key: 20,
|
25061
|
+
ndcActionId: 18,
|
25062
|
+
type: NdcActionType.sub,
|
25063
|
+
startDate: new Date("2019-03-25"),
|
25064
|
+
endDate: new Date("2020-03-25"),
|
25065
|
+
nationalPlanObj: "",
|
25066
|
+
kpi: "",
|
25067
|
+
ministry: "",
|
25068
|
+
},
|
25069
|
+
],
|
24712
25070
|
},
|
24713
25071
|
];
|
24714
25072
|
var initialPeriods = [
|
@@ -24736,7 +25094,7 @@ var NdcDetailsComponent = function (props) {
|
|
24736
25094
|
children: addNewPeriodContent(),
|
24737
25095
|
});
|
24738
25096
|
}
|
24739
|
-
addedNdcDetailId.current =
|
25097
|
+
addedNdcDetailId.current = 20;
|
24740
25098
|
setPeriodItems(initialPeriods);
|
24741
25099
|
periodItemsRef.current = initialPeriods;
|
24742
25100
|
setNdcDetailsData(defaultNdcDetails);
|
@@ -24751,7 +25109,11 @@ var NdcDetailsComponent = function (props) {
|
|
24751
25109
|
React.createElement(Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
|
24752
25110
|
selectedTab !== "add_new" && (React.createElement("div", null,
|
24753
25111
|
React.createElement("div", null,
|
24754
|
-
React.createElement(Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns,
|
25112
|
+
React.createElement(Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
|
25113
|
+
expandedRowRender: function (record) { return getSubNdcActionContent(record); },
|
25114
|
+
indentSize: 0,
|
25115
|
+
defaultExpandedRowKeys: [selectedNdcDetail.current.key],
|
25116
|
+
}, footer: function () {
|
24755
25117
|
return isAddNdcActionVisible() && (React.createElement(Row, { justify: "center" },
|
24756
25118
|
React.createElement(Button, { onClick: onAddNewNdcDetail, type: "default", style: {
|
24757
25119
|
marginBottom: 16,
|
@@ -25459,7 +25821,7 @@ var RejectDocumentationConfirmationModel = function (props) {
|
|
25459
25821
|
React.createElement(Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
|
25460
25822
|
};
|
25461
25823
|
|
25462
|
-
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
|
25824
|
+
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";
|
25463
25825
|
styleInject(css_248z$2);
|
25464
25826
|
|
25465
25827
|
var NdcActionBody = function (props) {
|
@@ -25746,8 +26108,8 @@ var NdcActionBody = function (props) {
|
|
25746
26108
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
25747
26109
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
|
25748
26110
|
uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
|
25749
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25750
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26111
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26112
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25751
26113
|
if (canUploadMonitorReport &&
|
25752
26114
|
uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25753
26115
|
handleFileUploadMonitor();
|
@@ -25770,8 +26132,8 @@ var NdcActionBody = function (props) {
|
|
25770
26132
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
25771
26133
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
|
25772
26134
|
uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
|
25773
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25774
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26135
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26136
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25775
26137
|
if (canUploadMonitorReport &&
|
25776
26138
|
uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25777
26139
|
handleFileUploadMonitor();
|
@@ -25820,8 +26182,8 @@ var NdcActionBody = function (props) {
|
|
25820
26182
|
: t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
|
25821
26183
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
|
25822
26184
|
uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
|
25823
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25824
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26185
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26186
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25825
26187
|
if (monitoringReportAccepted &&
|
25826
26188
|
uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25827
26189
|
handleFileUploadVerification();
|
@@ -25844,8 +26206,8 @@ var NdcActionBody = function (props) {
|
|
25844
26206
|
: t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
|
25845
26207
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
|
25846
26208
|
uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
|
25847
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
25848
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26209
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26210
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
25849
26211
|
if (monitoringReportAccepted &&
|
25850
26212
|
uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
|
25851
26213
|
handleFileUploadVerification();
|
@@ -25859,7 +26221,7 @@ var NdcActionBody = function (props) {
|
|
25859
26221
|
React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
|
25860
26222
|
};
|
25861
26223
|
|
25862
|
-
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";
|
26224
|
+
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";
|
25863
26225
|
styleInject(css_248z$1);
|
25864
26226
|
|
25865
26227
|
var ProgrammeDocuments = function (props) {
|
@@ -25897,6 +26259,13 @@ var ProgrammeDocuments = function (props) {
|
|
25897
26259
|
var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
|
25898
26260
|
? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
|
25899
26261
|
: 5000000;
|
26262
|
+
var isProjectRejected = programmeStatus && programmeStatus === ProgrammeStageUnified.Rejected;
|
26263
|
+
var uploadImpactAssessmentDocUserPermission = uploadDocUserPermission(userInfoState, DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission);
|
26264
|
+
var impactAssessmentToolTipTitle = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
26265
|
+
? t("programme:notAuthToUploadDoc")
|
26266
|
+
: isProjectRejected
|
26267
|
+
? t("programme:docUploadProgrammeRejected")
|
26268
|
+
: !uploadImpactAssessmentDocUserPermission && t("programme:orgNotAuth");
|
25900
26269
|
var handleDesignDocFileUpload = function () {
|
25901
26270
|
var _a;
|
25902
26271
|
(_a = fileInputRef === null || fileInputRef === void 0 ? void 0 : fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
@@ -25921,8 +26290,8 @@ var ProgrammeDocuments = function (props) {
|
|
25921
26290
|
setDesignDocDate(item === null || item === void 0 ? void 0 : item.txTime);
|
25922
26291
|
setDesignDocStatus(item === null || item === void 0 ? void 0 : item.status);
|
25923
26292
|
setDesignDocId(item === null || item === void 0 ? void 0 : item.id);
|
25924
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split(
|
25925
|
-
var version = versionfull ? versionfull.split(
|
26293
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
26294
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25926
26295
|
setDesignDocversion(version.startsWith("V") ? version : "V1");
|
25927
26296
|
}
|
25928
26297
|
if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("METHODOLOGY")) {
|
@@ -25930,8 +26299,8 @@ var ProgrammeDocuments = function (props) {
|
|
25930
26299
|
setMethodologyDate(item === null || item === void 0 ? void 0 : item.txTime);
|
25931
26300
|
setMethodDocStatus(item === null || item === void 0 ? void 0 : item.status);
|
25932
26301
|
setMethDocId(item === null || item === void 0 ? void 0 : item.id);
|
25933
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split(
|
25934
|
-
var version = versionfull ? versionfull.split(
|
26302
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
26303
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25935
26304
|
setMethDocversion(version.startsWith("V") ? version : "V1");
|
25936
26305
|
}
|
25937
26306
|
if ((_c = item === null || item === void 0 ? void 0 : item.url) === null || _c === void 0 ? void 0 : _c.includes("OBJECTION")) {
|
@@ -25948,7 +26317,7 @@ var ProgrammeDocuments = function (props) {
|
|
25948
26317
|
setImpactAssessmentStatus(item === null || item === void 0 ? void 0 : item.status);
|
25949
26318
|
setImpactAssessmentId(item === null || item === void 0 ? void 0 : item.id);
|
25950
26319
|
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
25951
|
-
var version = versionfull ? versionfull.split(
|
26320
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25952
26321
|
setImpactAssessmentversion(version.startsWith("V") ? version : "V1");
|
25953
26322
|
}
|
25954
26323
|
});
|
@@ -26124,11 +26493,11 @@ var ProgrammeDocuments = function (props) {
|
|
26124
26493
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly ||
|
26125
26494
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER
|
26126
26495
|
? t("programme:notAuthToUploadDoc")
|
26127
|
-
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26128
|
-
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26129
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26130
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26131
|
-
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26496
|
+
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26497
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26498
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26499
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26500
|
+
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
26132
26501
|
} })),
|
26133
26502
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26134
26503
|
var selectedFile = e.target.files[0];
|
@@ -26138,11 +26507,11 @@ var ProgrammeDocuments = function (props) {
|
|
26138
26507
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly ||
|
26139
26508
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER
|
26140
26509
|
? t("programme:notAuthToUploadDoc")
|
26141
|
-
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26142
|
-
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26143
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26144
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26145
|
-
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26510
|
+
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26511
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26512
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26513
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26514
|
+
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
26146
26515
|
} })),
|
26147
26516
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26148
26517
|
var selectedFile = e.target.files[0];
|
@@ -26191,13 +26560,13 @@ var ProgrammeDocuments = function (props) {
|
|
26191
26560
|
methodDocStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
26192
26561
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
26193
26562
|
? t("programme:notAuthToUploadDoc")
|
26194
|
-
: !uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26563
|
+
: !uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26195
26564
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
|
26196
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26197
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26198
|
-
: { color: "#cacaca" }, onClick: function () {
|
26565
|
+
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26566
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26567
|
+
: { color: "#cacaca", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26199
26568
|
return designDocStatus === DocumentStatus.ACCEPTED &&
|
26200
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26569
|
+
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
|
26201
26570
|
handleMethodologyFileUpload();
|
26202
26571
|
} })),
|
26203
26572
|
React.createElement("input", { type: "file", ref: fileInputRefMeth, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
@@ -26208,16 +26577,16 @@ var ProgrammeDocuments = function (props) {
|
|
26208
26577
|
} }))))) : (React.createElement(React.Fragment, null,
|
26209
26578
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
26210
26579
|
? t("programme:notAuthToUploadDoc")
|
26211
|
-
: uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26580
|
+
: uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26212
26581
|
? designDocStatus !== DocumentStatus.ACCEPTED &&
|
26213
26582
|
t("programme:designDocNotApproved")
|
26214
26583
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26215
26584
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
|
26216
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26217
|
-
? { color: "#3F3A47", cursor: "pointer" }
|
26218
|
-
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26585
|
+
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26586
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26587
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26219
26588
|
return designDocStatus === DocumentStatus.ACCEPTED &&
|
26220
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26589
|
+
uploadDocUserPermission(userInfoState, 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) {
|
@@ -26240,7 +26609,8 @@ var ProgrammeDocuments = function (props) {
|
|
26240
26609
|
React.createElement(Col, { span: 18, className: "field-key" },
|
26241
26610
|
React.createElement("div", { className: "label-container" },
|
26242
26611
|
React.createElement("div", { className: impactAssessmentUrl !== "" ? "label-uploaded" : "label" }, t("programme:environmentalImpactAssessment")),
|
26243
|
-
impactAssessmentStatus === DocumentStatus.PENDING &&
|
26612
|
+
impactAssessmentStatus === DocumentStatus.PENDING &&
|
26613
|
+
(ministryLevelPermission || companyRolePermission) && (React.createElement(React.Fragment, null,
|
26244
26614
|
React.createElement(LikeOutlined, { onClick: function () {
|
26245
26615
|
return docAction(impactAssessmentId, DocumentStatus.ACCEPTED);
|
26246
26616
|
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
@@ -26265,26 +26635,28 @@ var ProgrammeDocuments = function (props) {
|
|
26265
26635
|
linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
26266
26636
|
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
26267
26637
|
impactAssessmentStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
26268
|
-
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title:
|
26269
|
-
|
26270
|
-
|
26271
|
-
|
26272
|
-
|
26273
|
-
|
26274
|
-
|
26638
|
+
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
26639
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
26640
|
+
!isProjectRejected
|
26641
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26642
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26643
|
+
return uploadImpactAssessmentDocUserPermission &&
|
26644
|
+
!isProjectRejected &&
|
26645
|
+
handleImpactAssessmentFileUpload();
|
26275
26646
|
} })),
|
26276
26647
|
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26277
26648
|
var selectedFile = e.target.files[0];
|
26278
26649
|
e.target.value = null;
|
26279
26650
|
onUploadDocument(selectedFile, DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT);
|
26280
26651
|
} }))))) : (React.createElement(React.Fragment, null,
|
26281
|
-
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title:
|
26282
|
-
|
26283
|
-
|
26284
|
-
|
26285
|
-
|
26286
|
-
|
26287
|
-
|
26652
|
+
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
26653
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
26654
|
+
!isProjectRejected
|
26655
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
26656
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
26657
|
+
return uploadImpactAssessmentDocUserPermission &&
|
26658
|
+
!isProjectRejected &&
|
26659
|
+
handleImpactAssessmentFileUpload();
|
26288
26660
|
} })),
|
26289
26661
|
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26290
26662
|
var selectedFile = e.target.files[0];
|