@undp/carbon-library 1.0.150-CARBON-320.1 → 1.0.151-NAM-4.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DocType, DocumentStatus } from "../Definitions";
|
2
2
|
export declare const linkDocVisible: (docStatus: DocumentStatus) => boolean;
|
3
|
-
export declare const uploadDocUserPermission: (userInfoState: any, docType: DocType, programmeOwnerId: any[], ministryLevelPermission?: boolean
|
3
|
+
export declare const uploadDocUserPermission: (userInfoState: any, docType: DocType, programmeOwnerId: any[], ministryLevelPermission?: boolean) => boolean;
|
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";
|
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,19 +19539,15 @@ 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({}), ndcActionReportDetails = _d[0], 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(
|
19554
|
-
var _o = useState(0), emissionsReductionAchieved = _o[0], setEmissionsReductionAchieved = _o[1];
|
19555
|
-
var _p = useState([]), programmeOwnerId = _p[0], setProgrammeOwnerId = _p[1];
|
19556
|
-
var _q = useState(false), canUploadMonitorReport = _q[0], setCanUploadMonitorReport = _q[1];
|
19557
|
-
var _r = useState(false), monitoringReportAccepted = _r[0], setMonitoringReportAccepted = _r[1];
|
19544
|
+
var _f = useState(), ndcActionDetails = _f[0], setNdcActionDetails = _f[1];
|
19545
|
+
var _g = useState(); _g[0]; var setCoBenifitsComponentnDetails = _g[1];
|
19546
|
+
var _h = useState(0), emissionsReductionExpected = _h[0], setEmissionsReductionExpected = _h[1];
|
19547
|
+
var _j = useState(0), emissionsReductionAchieved = _j[0], setEmissionsReductionAchieved = _j[1];
|
19548
|
+
var _k = useState([]), programmeOwnerId = _k[0], setProgrammeOwnerId = _k[1];
|
19549
|
+
var _l = useState(false), canUploadMonitorReport = _l[0], setCanUploadMonitorReport = _l[1];
|
19550
|
+
var _m = useState(false), monitoringReportAccepted = _m[0], setMonitoringReportAccepted = _m[1];
|
19558
19551
|
var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
|
19559
19552
|
var response, error_1;
|
19560
19553
|
var _a, _b, _c;
|
@@ -19596,16 +19589,13 @@ var NdcActionViewComponent = function (props) {
|
|
19596
19589
|
}
|
19597
19590
|
});
|
19598
19591
|
}); };
|
19599
|
-
var getProjectReportActions = function (reportData
|
19592
|
+
var getProjectReportActions = function (reportData) {
|
19600
19593
|
return (React.createElement(Row, null,
|
19601
19594
|
React.createElement("div", { className: "icon" },
|
19602
19595
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
19603
19596
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
19604
19597
|
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 },
|
19605
|
-
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))
|
19606
|
-
(reportData === null || reportData === void 0 ? void 0 : reportData.txTime) && (React.createElement("div", { className: "time" },
|
19607
|
-
moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
|
19608
|
-
" ~ " + reportVersion))));
|
19598
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))));
|
19609
19599
|
};
|
19610
19600
|
var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
|
19611
19601
|
var reportDetails, response, exception_1;
|
@@ -19653,24 +19643,12 @@ var NdcActionViewComponent = function (props) {
|
|
19653
19643
|
if ((item === null || item === void 0 ? void 0 : item.status) === DocumentStatus.ACCEPTED) {
|
19654
19644
|
setMonitoringReportAccepted(true);
|
19655
19645
|
}
|
19656
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
19657
|
-
var version = versionfull ? versionfull.split(".")[0] : "1";
|
19658
|
-
var moniteringVersion = version.startsWith("V") ? version : "V1";
|
19659
19646
|
reportDetails[t("ndcAction:viewMoniteringReport")] =
|
19660
|
-
getProjectReportActions(item
|
19661
|
-
setMonitoringReportData(item);
|
19662
|
-
setMonitoringReportversion(moniteringVersion);
|
19647
|
+
getProjectReportActions(item);
|
19663
19648
|
}
|
19664
19649
|
else if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("VERIFICATION_REPORT")) {
|
19665
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
19666
|
-
var version = versionfull ? versionfull.split(".")[0] : "1";
|
19667
|
-
var verificationVersion = version.startsWith("V")
|
19668
|
-
? version
|
19669
|
-
: "V1";
|
19670
19650
|
reportDetails[t("ndcAction:viewVerificationReport")] =
|
19671
|
-
getProjectReportActions(item
|
19672
|
-
setVerificationReportData(item);
|
19673
|
-
setVerificationReportversion(verificationVersion);
|
19651
|
+
getProjectReportActions(item);
|
19674
19652
|
}
|
19675
19653
|
});
|
19676
19654
|
}
|
@@ -19924,60 +19902,8 @@ var NdcActionViewComponent = function (props) {
|
|
19924
19902
|
React.createElement(Col, { lg: 8, md: 24 },
|
19925
19903
|
React.createElement(Skeleton, { loading: isLoading, active: true },
|
19926
19904
|
React.createElement(Card, { className: "card-container fix-height" },
|
19927
|
-
React.createElement("div",
|
19928
|
-
React.createElement(
|
19929
|
-
React.createElement("span", { className: "title-text" }, t("ndcAction:viewReportsTitle"))),
|
19930
|
-
React.createElement("div", { className: "ndc-action-report-body" },
|
19931
|
-
React.createElement("div", { className: "report-details" },
|
19932
|
-
React.createElement("div", { className: "report-type" },
|
19933
|
-
React.createElement("div", { className: "name-time-container" },
|
19934
|
-
React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
|
19935
|
-
? "name"
|
19936
|
-
: "empty" }, t("programme:monitoringReport")),
|
19937
|
-
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
|
19938
|
-
moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
|
19939
|
-
" ~ " + monitoringReportversion))),
|
19940
|
-
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
|
19941
|
-
? t("programme:notAuthToUploadDoc")
|
19942
|
-
: uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId)
|
19943
|
-
? !canUploadMonitorReport &&
|
19944
|
-
t("programme:programmeNotAuth")
|
19945
|
-
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
19946
|
-
React.createElement(FileAddOutlined, null))))),
|
19947
|
-
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(Row, null,
|
19948
|
-
React.createElement("div", { className: "icon" },
|
19949
|
-
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
|
19950
|
-
DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
19951
|
-
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
|
19952
|
-
DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
19953
|
-
React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
|
19954
|
-
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 },
|
19955
|
-
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))))),
|
19956
|
-
React.createElement("div", { className: "report-details" },
|
19957
|
-
React.createElement("div", { className: "report-type" },
|
19958
|
-
React.createElement("div", { className: "name-time-container" },
|
19959
|
-
React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
|
19960
|
-
? "name"
|
19961
|
-
: "empty" }, t("programme:verificationReport")),
|
19962
|
-
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
|
19963
|
-
moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
|
19964
|
-
" ~ " + verificationReportVersion))),
|
19965
|
-
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
|
19966
|
-
? t("programme:notAuthToUploadDoc")
|
19967
|
-
: uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId)
|
19968
|
-
? !monitoringReportAccepted &&
|
19969
|
-
t("programme:monitoringRepNotApproved")
|
19970
|
-
: t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
|
19971
|
-
React.createElement(FileAddOutlined, null))))),
|
19972
|
-
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(Row, null,
|
19973
|
-
React.createElement("div", { className: "icon" },
|
19974
|
-
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
|
19975
|
-
DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
19976
|
-
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
|
19977
|
-
DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
19978
|
-
React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
|
19979
|
-
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 },
|
19980
|
-
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))))))))))),
|
19905
|
+
React.createElement("div", null,
|
19906
|
+
React.createElement(InfoView, { data: ndcActionReportDetails, title: t("ndcAction:viewReportsTitle"), icon: React.createElement(Icon.FileEarmarkText, null) })))))),
|
19981
19907
|
((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.Mitigation ||
|
19982
19908
|
(ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.CrossCutting) && (React.createElement(Row, null,
|
19983
19909
|
React.createElement(Col, { lg: 24, className: "gutter-row" },
|
@@ -24578,6 +24504,8 @@ var NdcDetailsComponent = function (props) {
|
|
24578
24504
|
var _d = useState("add_new"), selectedTab = _d[0], setSelectedTab = _d[1];
|
24579
24505
|
var selectedPeriod = useRef({});
|
24580
24506
|
var addedNdcDetailId = useRef(0);
|
24507
|
+
var selectedNdcDetail = useRef({});
|
24508
|
+
var _e = useState(0), tableKey = _e[0], setTableKey = _e[1];
|
24581
24509
|
var userInfoState = useUserContext().userInfoState;
|
24582
24510
|
var isAddRangeVisible = function () {
|
24583
24511
|
return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY ||
|
@@ -24588,6 +24516,10 @@ var NdcDetailsComponent = function (props) {
|
|
24588
24516
|
return ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT &&
|
24589
24517
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== Role.ViewOnly);
|
24590
24518
|
};
|
24519
|
+
var isAddSubNdcActionVisible = function () {
|
24520
|
+
return ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY &&
|
24521
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== Role.ViewOnly);
|
24522
|
+
};
|
24591
24523
|
var inRange = function (num, min, max) {
|
24592
24524
|
return num >= min && num <= max;
|
24593
24525
|
};
|
@@ -24610,6 +24542,15 @@ var NdcDetailsComponent = function (props) {
|
|
24610
24542
|
return [];
|
24611
24543
|
}
|
24612
24544
|
};
|
24545
|
+
var getSubNdcDetails = function (key) {
|
24546
|
+
var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
|
24547
|
+
if (ndcDetail) {
|
24548
|
+
return ndcDetail.subNdcDetails;
|
24549
|
+
}
|
24550
|
+
else {
|
24551
|
+
return [];
|
24552
|
+
}
|
24553
|
+
};
|
24613
24554
|
var defaultColumns = [
|
24614
24555
|
{
|
24615
24556
|
title: t("ndc:ndcColumnsNationalPlanObj"),
|
@@ -24626,7 +24567,7 @@ var NdcDetailsComponent = function (props) {
|
|
24626
24567
|
editable: true,
|
24627
24568
|
},
|
24628
24569
|
{
|
24629
|
-
title:
|
24570
|
+
title: "Ministry",
|
24630
24571
|
dataIndex: "ministry",
|
24631
24572
|
key: "ministry",
|
24632
24573
|
align: "left",
|
@@ -24654,10 +24595,33 @@ var NdcDetailsComponent = function (props) {
|
|
24654
24595
|
endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
|
24655
24596
|
nationalPlanObj: t("ndc:enterNewPlanTxt"),
|
24656
24597
|
kpi: 0,
|
24657
|
-
ministry: "Please add the Ministry name"
|
24598
|
+
ministry: "Please add the Ministry name",
|
24658
24599
|
};
|
24659
24600
|
setNdcDetailsData(__spreadArray(__spreadArray([], ndcDetailsData, true), [newData], false));
|
24660
24601
|
}
|
24602
|
+
function onAddNewSubNdcDetail() {
|
24603
|
+
var range = selectedTab.split("-");
|
24604
|
+
var ndcDetail = ndcDetailsData.find(function (item) { return item.key === selectedNdcDetail.current.key; });
|
24605
|
+
var ndcDetailItemIndex = ndcDetailsData.findIndex(function (item) { return item.key === selectedNdcDetail.current.key; });
|
24606
|
+
if (ndcDetail) {
|
24607
|
+
addedNdcDetailId.current = addedNdcDetailId.current + 1;
|
24608
|
+
var newData = {
|
24609
|
+
key: addedNdcDetailId.current,
|
24610
|
+
startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
|
24611
|
+
endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
|
24612
|
+
nationalPlanObj: t("ndc:enterNewPlanTxt"),
|
24613
|
+
kpi: 0,
|
24614
|
+
ministry: "Please add the Ministry name",
|
24615
|
+
};
|
24616
|
+
if (!ndcDetail.subNdcDetails) {
|
24617
|
+
ndcDetail.subNdcDetails = [];
|
24618
|
+
}
|
24619
|
+
ndcDetail.subNdcDetails.push(newData);
|
24620
|
+
}
|
24621
|
+
ndcDetailsData[ndcDetailItemIndex] = ndcDetail;
|
24622
|
+
setNdcDetailsData(ndcDetailsData);
|
24623
|
+
setTableKey(function (key) { return key + 1; });
|
24624
|
+
}
|
24661
24625
|
var components = {
|
24662
24626
|
body: {
|
24663
24627
|
row: EditableRow,
|
@@ -24736,6 +24700,16 @@ var NdcDetailsComponent = function (props) {
|
|
24736
24700
|
React.createElement(Button, { type: "primary", onClick: onAddNewPeriod, htmlType: "submit", loading: loading }, t("ndc:submit")),
|
24737
24701
|
React.createElement(Button, { className: "back-btn", onClick: onCancelPeriod, loading: loading }, t("ndc:back"))))));
|
24738
24702
|
}
|
24703
|
+
function getSubNdcActionContent(record) {
|
24704
|
+
selectedNdcDetail.current = record;
|
24705
|
+
return (React.createElement(Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getSubNdcDetails(record.key), columns: columns, showHeader: false, pagination: false, footer: function () {
|
24706
|
+
return isAddSubNdcActionVisible() && (React.createElement(Row, { justify: "center" },
|
24707
|
+
React.createElement(Button, { onClick: onAddNewSubNdcDetail, type: "default", style: {
|
24708
|
+
marginBottom: 16,
|
24709
|
+
width: "100%",
|
24710
|
+
} }, t("ndc:addSubNdcAction"))));
|
24711
|
+
} }));
|
24712
|
+
}
|
24739
24713
|
var onTabChange = function (key) {
|
24740
24714
|
setSelectedTab(key);
|
24741
24715
|
};
|
@@ -24747,7 +24721,17 @@ var NdcDetailsComponent = function (props) {
|
|
24747
24721
|
endDate: new Date("2020-03-25"),
|
24748
24722
|
nationalPlanObj: "Enhance value addition in key growth opportunities",
|
24749
24723
|
kpi: 25,
|
24750
|
-
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)"
|
24724
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
24725
|
+
subNdcDetails: [
|
24726
|
+
{
|
24727
|
+
key: 6,
|
24728
|
+
startDate: new Date("2019-03-25"),
|
24729
|
+
endDate: new Date("2020-03-25"),
|
24730
|
+
nationalPlanObj: "Enhance value addition in key growth opportunities sub details",
|
24731
|
+
kpi: 25,
|
24732
|
+
ministry: "Ministry of Agriculture, Water and Forestry (MAWF)",
|
24733
|
+
},
|
24734
|
+
],
|
24751
24735
|
},
|
24752
24736
|
{
|
24753
24737
|
key: 2,
|
@@ -24755,7 +24739,7 @@ var NdcDetailsComponent = function (props) {
|
|
24755
24739
|
endDate: new Date("2019-08-25"),
|
24756
24740
|
nationalPlanObj: "Strengthen the private sector to create 10,000 jobs",
|
24757
24741
|
kpi: 10500,
|
24758
|
-
ministry: "Ministry of Tourism (MoT)"
|
24742
|
+
ministry: "Ministry of Tourism (MoT)",
|
24759
24743
|
},
|
24760
24744
|
{
|
24761
24745
|
key: 3,
|
@@ -24763,7 +24747,7 @@ var NdcDetailsComponent = function (props) {
|
|
24763
24747
|
endDate: new Date("2022-03-25"),
|
24764
24748
|
nationalPlanObj: "Consolidate and increase the stock and quality of productive infrastructure by 50%",
|
24765
24749
|
kpi: 48,
|
24766
|
-
ministry: "Ministry of Education, Arts and Culture (MoE)"
|
24750
|
+
ministry: "Ministry of Education, Arts and Culture (MoE)",
|
24767
24751
|
},
|
24768
24752
|
{
|
24769
24753
|
key: 4,
|
@@ -24771,7 +24755,7 @@ var NdcDetailsComponent = function (props) {
|
|
24771
24755
|
endDate: new Date("2022-05-25"),
|
24772
24756
|
nationalPlanObj: "Enhance the productivity and social wellbeing of the population",
|
24773
24757
|
kpi: 20,
|
24774
|
-
ministry: "Ministry of Environment, Forestry and Tourism (MEFT)"
|
24758
|
+
ministry: "Ministry of Environment, Forestry and Tourism (MEFT)",
|
24775
24759
|
},
|
24776
24760
|
{
|
24777
24761
|
key: 5,
|
@@ -24779,7 +24763,7 @@ var NdcDetailsComponent = function (props) {
|
|
24779
24763
|
endDate: new Date("2023-03-25"),
|
24780
24764
|
nationalPlanObj: "Strengthen the role of the state in guiding and facilitating development",
|
24781
24765
|
kpi: 10,
|
24782
|
-
ministry: "Ministry of Tourism (MoT)"
|
24766
|
+
ministry: "Ministry of Tourism (MoT)",
|
24783
24767
|
},
|
24784
24768
|
];
|
24785
24769
|
var initialPeriods = [
|
@@ -24822,7 +24806,11 @@ var NdcDetailsComponent = function (props) {
|
|
24822
24806
|
React.createElement(Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
|
24823
24807
|
selectedTab !== "add_new" && (React.createElement("div", null,
|
24824
24808
|
React.createElement("div", null,
|
24825
|
-
React.createElement(Table, { components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns,
|
24809
|
+
React.createElement(Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
|
24810
|
+
expandedRowRender: function (record) { return getSubNdcActionContent(record); },
|
24811
|
+
indentSize: 0,
|
24812
|
+
defaultExpandedRowKeys: [selectedNdcDetail.current.key],
|
24813
|
+
}, footer: function () {
|
24826
24814
|
return isAddNdcActionVisible() && (React.createElement(Row, { justify: "center" },
|
24827
24815
|
React.createElement(Button, { onClick: onAddNewNdcDetail, type: "default", style: {
|
24828
24816
|
marginBottom: 16,
|
@@ -25484,7 +25472,7 @@ var RejectDocumentationConfirmationModel = function (props) {
|
|
25484
25472
|
React.createElement(Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
|
25485
25473
|
};
|
25486
25474
|
|
25487
|
-
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
|
25475
|
+
var css_248z$2 = ".ndc-action-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%; }\n .ndc-action-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-body .report-details .report-type .name {\n font-weight: 600;\n color: rgba(58, 53, 65, 0.8); }\n .ndc-action-body .report-details .report-type .icon {\n display: flex;\n align-items: center;\n width: 30%; }\n .ndc-action-body .report-details .report-type .empty {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%; }\n .ndc-action-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
|
25488
25476
|
styleInject(css_248z$2);
|
25489
25477
|
|
25490
25478
|
var NdcActionBody = function (props) {
|
@@ -25815,7 +25803,7 @@ var NdcActionBody = function (props) {
|
|
25815
25803
|
React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
|
25816
25804
|
};
|
25817
25805
|
|
25818
|
-
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
|
25806
|
+
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";
|
25819
25807
|
styleInject(css_248z$1);
|
25820
25808
|
|
25821
25809
|
var ProgrammeDocuments = function (props) {
|
@@ -25853,6 +25841,13 @@ var ProgrammeDocuments = function (props) {
|
|
25853
25841
|
var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
|
25854
25842
|
? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
|
25855
25843
|
: 5000000;
|
25844
|
+
var isProjectRejected = programmeStatus && programmeStatus === ProgrammeStageUnified.Rejected;
|
25845
|
+
var uploadImpactAssessmentDocUserPermission = uploadDocUserPermission(userInfoState, DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission);
|
25846
|
+
var impactAssessmentToolTipTitle = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
25847
|
+
? t("programme:notAuthToUploadDoc")
|
25848
|
+
: isProjectRejected
|
25849
|
+
? t("programme:docUploadProgrammeRejected")
|
25850
|
+
: !uploadImpactAssessmentDocUserPermission && t("programme:orgNotAuth");
|
25856
25851
|
var handleDesignDocFileUpload = function () {
|
25857
25852
|
var _a;
|
25858
25853
|
(_a = fileInputRef === null || fileInputRef === void 0 ? void 0 : fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
@@ -25877,8 +25872,8 @@ var ProgrammeDocuments = function (props) {
|
|
25877
25872
|
setDesignDocDate(item === null || item === void 0 ? void 0 : item.txTime);
|
25878
25873
|
setDesignDocStatus(item === null || item === void 0 ? void 0 : item.status);
|
25879
25874
|
setDesignDocId(item === null || item === void 0 ? void 0 : item.id);
|
25880
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split(
|
25881
|
-
var version = versionfull ? versionfull.split(
|
25875
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
25876
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25882
25877
|
setDesignDocversion(version.startsWith("V") ? version : "V1");
|
25883
25878
|
}
|
25884
25879
|
if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("METHODOLOGY")) {
|
@@ -25886,8 +25881,8 @@ var ProgrammeDocuments = function (props) {
|
|
25886
25881
|
setMethodologyDate(item === null || item === void 0 ? void 0 : item.txTime);
|
25887
25882
|
setMethodDocStatus(item === null || item === void 0 ? void 0 : item.status);
|
25888
25883
|
setMethDocId(item === null || item === void 0 ? void 0 : item.id);
|
25889
|
-
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split(
|
25890
|
-
var version = versionfull ? versionfull.split(
|
25884
|
+
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
25885
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25891
25886
|
setMethDocversion(version.startsWith("V") ? version : "V1");
|
25892
25887
|
}
|
25893
25888
|
if ((_c = item === null || item === void 0 ? void 0 : item.url) === null || _c === void 0 ? void 0 : _c.includes("OBJECTION")) {
|
@@ -25904,7 +25899,7 @@ var ProgrammeDocuments = function (props) {
|
|
25904
25899
|
setImpactAssessmentStatus(item === null || item === void 0 ? void 0 : item.status);
|
25905
25900
|
setImpactAssessmentId(item === null || item === void 0 ? void 0 : item.id);
|
25906
25901
|
var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
|
25907
|
-
var version = versionfull ? versionfull.split(
|
25902
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
25908
25903
|
setImpactAssessmentversion(version.startsWith("V") ? version : "V1");
|
25909
25904
|
}
|
25910
25905
|
});
|
@@ -26080,11 +26075,11 @@ var ProgrammeDocuments = function (props) {
|
|
26080
26075
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly ||
|
26081
26076
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER
|
26082
26077
|
? t("programme:notAuthToUploadDoc")
|
26083
|
-
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26084
|
-
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26078
|
+
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26079
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26085
26080
|
? { color: "#3F3A47", cursor: "pointer" }
|
26086
26081
|
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26087
|
-
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26082
|
+
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
26088
26083
|
} })),
|
26089
26084
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26090
26085
|
var selectedFile = e.target.files[0];
|
@@ -26094,11 +26089,11 @@ var ProgrammeDocuments = function (props) {
|
|
26094
26089
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly ||
|
26095
26090
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER
|
26096
26091
|
? t("programme:notAuthToUploadDoc")
|
26097
|
-
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26098
|
-
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26092
|
+
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26093
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26099
26094
|
? { color: "#3F3A47", cursor: "pointer" }
|
26100
26095
|
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26101
|
-
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26096
|
+
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
26102
26097
|
} })),
|
26103
26098
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26104
26099
|
var selectedFile = e.target.files[0];
|
@@ -26147,13 +26142,13 @@ var ProgrammeDocuments = function (props) {
|
|
26147
26142
|
methodDocStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
26148
26143
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
26149
26144
|
? t("programme:notAuthToUploadDoc")
|
26150
|
-
: !uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26145
|
+
: !uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26151
26146
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
|
26152
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26147
|
+
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26153
26148
|
? { color: "#3F3A47", cursor: "pointer" }
|
26154
26149
|
: { color: "#cacaca" }, onClick: function () {
|
26155
26150
|
return designDocStatus === DocumentStatus.ACCEPTED &&
|
26156
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26151
|
+
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
|
26157
26152
|
handleMethodologyFileUpload();
|
26158
26153
|
} })),
|
26159
26154
|
React.createElement("input", { type: "file", ref: fileInputRefMeth, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
@@ -26164,16 +26159,16 @@ var ProgrammeDocuments = function (props) {
|
|
26164
26159
|
} }))))) : (React.createElement(React.Fragment, null,
|
26165
26160
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
26166
26161
|
? t("programme:notAuthToUploadDoc")
|
26167
|
-
: uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26162
|
+
: uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26168
26163
|
? designDocStatus !== DocumentStatus.ACCEPTED &&
|
26169
26164
|
t("programme:designDocNotApproved")
|
26170
26165
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
26171
26166
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
|
26172
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26167
|
+
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
26173
26168
|
? { color: "#3F3A47", cursor: "pointer" }
|
26174
26169
|
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26175
26170
|
return designDocStatus === DocumentStatus.ACCEPTED &&
|
26176
|
-
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission
|
26171
|
+
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
|
26177
26172
|
handleMethodologyFileUpload();
|
26178
26173
|
} })),
|
26179
26174
|
React.createElement("input", { type: "file", ref: fileInputRefMeth, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
@@ -26196,7 +26191,8 @@ var ProgrammeDocuments = function (props) {
|
|
26196
26191
|
React.createElement(Col, { span: 18, className: "field-key" },
|
26197
26192
|
React.createElement("div", { className: "label-container" },
|
26198
26193
|
React.createElement("div", { className: impactAssessmentUrl !== "" ? "label-uploaded" : "label" }, t("programme:environmentalImpactAssessment")),
|
26199
|
-
impactAssessmentStatus === DocumentStatus.PENDING &&
|
26194
|
+
impactAssessmentStatus === DocumentStatus.PENDING &&
|
26195
|
+
(ministryLevelPermission || companyRolePermission) && (React.createElement(React.Fragment, null,
|
26200
26196
|
React.createElement(LikeOutlined, { onClick: function () {
|
26201
26197
|
return docAction(impactAssessmentId, DocumentStatus.ACCEPTED);
|
26202
26198
|
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
@@ -26221,26 +26217,28 @@ var ProgrammeDocuments = function (props) {
|
|
26221
26217
|
linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
26222
26218
|
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
26223
26219
|
impactAssessmentStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
26224
|
-
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title:
|
26225
|
-
|
26226
|
-
|
26227
|
-
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission, programmeStatus)
|
26220
|
+
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
26221
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
26222
|
+
!isProjectRejected
|
26228
26223
|
? { color: "#3F3A47", cursor: "pointer" }
|
26229
26224
|
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26230
|
-
return
|
26225
|
+
return uploadImpactAssessmentDocUserPermission &&
|
26226
|
+
!isProjectRejected &&
|
26227
|
+
handleImpactAssessmentFileUpload();
|
26231
26228
|
} })),
|
26232
26229
|
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26233
26230
|
var selectedFile = e.target.files[0];
|
26234
26231
|
e.target.value = null;
|
26235
26232
|
onUploadDocument(selectedFile, DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT);
|
26236
26233
|
} }))))) : (React.createElement(React.Fragment, null,
|
26237
|
-
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title:
|
26238
|
-
|
26239
|
-
|
26240
|
-
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission, programmeStatus)
|
26234
|
+
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
26235
|
+
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
26236
|
+
!isProjectRejected
|
26241
26237
|
? { color: "#3F3A47", cursor: "pointer" }
|
26242
26238
|
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
26243
|
-
return
|
26239
|
+
return uploadImpactAssessmentDocUserPermission &&
|
26240
|
+
!isProjectRejected &&
|
26241
|
+
handleImpactAssessmentFileUpload();
|
26244
26242
|
} })),
|
26245
26243
|
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
26246
26244
|
var selectedFile = e.target.files[0];
|