@undp/carbon-library 1.0.122 → 1.0.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +135 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Definitions/Enums/document.type.d.ts +2 -1
- package/dist/cjs/types/Utils/DocumentValidator.d.ts +1 -1
- package/dist/esm/index.js +135 -20
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Definitions/Enums/document.type.d.ts +2 -1
- package/dist/esm/types/Utils/DocumentValidator.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -4447,6 +4447,7 @@ exports.DocType = void 0;
|
|
|
4447
4447
|
DocType["METHODOLOGY_DOCUMENT"] = "1";
|
|
4448
4448
|
DocType["MONITORING_REPORT"] = "2";
|
|
4449
4449
|
DocType["VERIFICATION_REPORT"] = "3";
|
|
4450
|
+
DocType["ENVIRONMENTAL_IMPACT_ASSESSMENT"] = "7";
|
|
4450
4451
|
})(exports.DocType || (exports.DocType = {}));
|
|
4451
4452
|
|
|
4452
4453
|
exports.DocumentStatus = void 0;
|
|
@@ -11843,8 +11844,19 @@ var allowedFileTypes = [
|
|
|
11843
11844
|
"image/png",
|
|
11844
11845
|
"image/jpeg"
|
|
11845
11846
|
];
|
|
11846
|
-
var
|
|
11847
|
-
|
|
11847
|
+
var environmentalImpactAssessmentAllowedTypes = [
|
|
11848
|
+
"application/pdf",
|
|
11849
|
+
"application/msword",
|
|
11850
|
+
"image/png",
|
|
11851
|
+
"image/jpeg"
|
|
11852
|
+
];
|
|
11853
|
+
var isValidateFileType = function (fileType, docType) {
|
|
11854
|
+
if (docType === exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT) {
|
|
11855
|
+
return environmentalImpactAssessmentAllowedTypes.includes(fileType);
|
|
11856
|
+
}
|
|
11857
|
+
else {
|
|
11858
|
+
return allowedFileTypes.includes(fileType);
|
|
11859
|
+
}
|
|
11848
11860
|
};
|
|
11849
11861
|
|
|
11850
11862
|
var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
|
|
@@ -12133,10 +12145,10 @@ var ProgrammeCreationComponent = function (props) {
|
|
|
12133
12145
|
setCurrent(current - 1);
|
|
12134
12146
|
};
|
|
12135
12147
|
var onFinishStepOne = function (values) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12136
|
-
var programmeDetails, ownershipPercentage, totalPercentage, proponentPercentages, proponentTxIds, logoBase64, propTaxIds, duplicateIds;
|
|
12137
|
-
var _a, _b;
|
|
12138
|
-
return __generator(this, function (
|
|
12139
|
-
switch (
|
|
12148
|
+
var programmeDetails, ownershipPercentage, totalPercentage, proponentPercentages, proponentTxIds, logoBase64, environmentalImpactAssessmentData, propTaxIds, duplicateIds;
|
|
12149
|
+
var _a, _b, _c, _d;
|
|
12150
|
+
return __generator(this, function (_e) {
|
|
12151
|
+
switch (_e.label) {
|
|
12140
12152
|
case 0:
|
|
12141
12153
|
setLoading(true);
|
|
12142
12154
|
ownershipPercentage = values === null || values === void 0 ? void 0 : values.ownershipPercentage;
|
|
@@ -12150,9 +12162,16 @@ var ProgrammeCreationComponent = function (props) {
|
|
|
12150
12162
|
if (!(((_a = values === null || values === void 0 ? void 0 : values.designDocument) === null || _a === void 0 ? void 0 : _a.length) > 0)) return [3 /*break*/, 2];
|
|
12151
12163
|
return [4 /*yield*/, getBase64((_b = values === null || values === void 0 ? void 0 : values.designDocument[0]) === null || _b === void 0 ? void 0 : _b.originFileObj)];
|
|
12152
12164
|
case 1:
|
|
12153
|
-
logoBase64 =
|
|
12154
|
-
|
|
12165
|
+
logoBase64 = _e.sent();
|
|
12166
|
+
_e.label = 2;
|
|
12155
12167
|
case 2:
|
|
12168
|
+
environmentalImpactAssessmentData = "";
|
|
12169
|
+
if (!(((_c = values === null || values === void 0 ? void 0 : values.environmentalImpactAssessment) === null || _c === void 0 ? void 0 : _c.length) > 0)) return [3 /*break*/, 4];
|
|
12170
|
+
return [4 /*yield*/, getBase64((_d = values === null || values === void 0 ? void 0 : values.environmentalImpactAssessment[0]) === null || _d === void 0 ? void 0 : _d.originFileObj)];
|
|
12171
|
+
case 3:
|
|
12172
|
+
environmentalImpactAssessmentData = _e.sent();
|
|
12173
|
+
_e.label = 4;
|
|
12174
|
+
case 4:
|
|
12156
12175
|
propTaxIds = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT &&
|
|
12157
12176
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY
|
|
12158
12177
|
? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds;
|
|
@@ -12197,6 +12216,9 @@ var ProgrammeCreationComponent = function (props) {
|
|
|
12197
12216
|
if ((logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.length) > 0) {
|
|
12198
12217
|
programmeDetails.designDocument = logoBase64;
|
|
12199
12218
|
}
|
|
12219
|
+
if ((environmentalImpactAssessmentData === null || environmentalImpactAssessmentData === void 0 ? void 0 : environmentalImpactAssessmentData.length) > 0) {
|
|
12220
|
+
programmeDetails.environmentalImpactAssessment = environmentalImpactAssessmentData;
|
|
12221
|
+
}
|
|
12200
12222
|
setLoading(false);
|
|
12201
12223
|
console.log(programmeDetails);
|
|
12202
12224
|
nextOne(programmeDetails);
|
|
@@ -12586,7 +12608,30 @@ var ProgrammeCreationComponent = function (props) {
|
|
|
12586
12608
|
}); },
|
|
12587
12609
|
},
|
|
12588
12610
|
] },
|
|
12589
|
-
React.createElement(antd.Input, { size: "large" }))
|
|
12611
|
+
React.createElement(antd.Input, { size: "large" })),
|
|
12612
|
+
React.createElement(antd.Form.Item, { label: t("addProgramme:environmentalImpactAssessment"), name: "environmentalImpactAssessment", valuePropName: "fileList", getValueFromEvent: normFile, required: false, rules: [
|
|
12613
|
+
{
|
|
12614
|
+
validator: function (rule, file) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12615
|
+
var _a, _b;
|
|
12616
|
+
return __generator(this, function (_c) {
|
|
12617
|
+
if ((file === null || file === void 0 ? void 0 : file.length) > 0) {
|
|
12618
|
+
if (!isValidateFileType((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT)) {
|
|
12619
|
+
throw new Error("".concat(t("addProgramme:invalidFileFormat")));
|
|
12620
|
+
}
|
|
12621
|
+
else if (((_b = file[0]) === null || _b === void 0 ? void 0 : _b.size) > maximumImageSize) {
|
|
12622
|
+
// default size format of files would be in bytes -> 1MB = 1000000bytes
|
|
12623
|
+
throw new Error("".concat(t("common:maxSizeVal")));
|
|
12624
|
+
}
|
|
12625
|
+
}
|
|
12626
|
+
return [2 /*return*/];
|
|
12627
|
+
});
|
|
12628
|
+
}); },
|
|
12629
|
+
},
|
|
12630
|
+
] },
|
|
12631
|
+
React.createElement(antd.Upload, { accept: ".doc, .docx, .pdf, .png, .jpg", beforeUpload: function (file) {
|
|
12632
|
+
return false;
|
|
12633
|
+
}, className: "design-upload-section", name: "design", action: "/upload.do", listType: "picture", multiple: false, maxCount: 1 },
|
|
12634
|
+
React.createElement(antd.Button, { className: "upload-doc", size: "large", icon: React.createElement(icons.UploadOutlined, null) }, "Upload"))))),
|
|
12590
12635
|
React.createElement(antd.Col, { xl: 12, md: 24 },
|
|
12591
12636
|
React.createElement("div", { className: "details-part-two" },
|
|
12592
12637
|
React.createElement(antd.Form.Item, { label: t("addProgramme:externalId"), name: "externalId", rules: [
|
|
@@ -24430,6 +24475,7 @@ var ProgrammeDocuments = function (props) {
|
|
|
24430
24475
|
var _a = useConnection(); _a.delete; var post = _a.post;
|
|
24431
24476
|
var fileInputRef = React.useRef(null);
|
|
24432
24477
|
var fileInputRefMeth = React.useRef(null);
|
|
24478
|
+
var fileInputRefImpactAssessment = React.useRef(null);
|
|
24433
24479
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
|
24434
24480
|
var _c = React.useState(""), designDocUrl = _c[0], setDesignDocUrl = _c[1];
|
|
24435
24481
|
var _d = React.useState(""), noObjectionDocUrl = _d[0], setNoObjectionDocUrl = _d[1];
|
|
@@ -24447,6 +24493,10 @@ var ProgrammeDocuments = function (props) {
|
|
|
24447
24493
|
var _r = React.useState(false), openRejectDocConfirmationModal = _r[0], setOpenRejectDocConfirmationModal = _r[1];
|
|
24448
24494
|
var _s = React.useState({}), actionInfo = _s[0], setActionInfo = _s[1];
|
|
24449
24495
|
var _t = React.useState({}), rejectDocData = _t[0], setRejectDocData = _t[1];
|
|
24496
|
+
var _u = React.useState(""), impactAssessmentUrl = _u[0], setImpactAssessmentUrl = _u[1];
|
|
24497
|
+
var _v = React.useState(""), impactAssessmentDate = _v[0], setImpactAssessmentDate = _v[1];
|
|
24498
|
+
var _w = React.useState(""), impactAssessmentStatus = _w[0], setImpactAssessmentStatus = _w[1];
|
|
24499
|
+
var _x = React.useState(""), impactAssessmentId = _x[0], setImpactAssessmentId = _x[1];
|
|
24450
24500
|
var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
|
|
24451
24501
|
? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
|
|
24452
24502
|
: 5000000;
|
|
@@ -24458,13 +24508,17 @@ var ProgrammeDocuments = function (props) {
|
|
|
24458
24508
|
var _a;
|
|
24459
24509
|
(_a = fileInputRefMeth === null || fileInputRefMeth === void 0 ? void 0 : fileInputRefMeth.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
24460
24510
|
};
|
|
24511
|
+
var handleImpactAssessmentFileUpload = function () {
|
|
24512
|
+
var _a;
|
|
24513
|
+
(_a = fileInputRefImpactAssessment === null || fileInputRefImpactAssessment === void 0 ? void 0 : fileInputRefImpactAssessment.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
24514
|
+
};
|
|
24461
24515
|
React.useEffect(function () {
|
|
24462
24516
|
setDocData(data);
|
|
24463
24517
|
}, [data]);
|
|
24464
24518
|
React.useEffect(function () {
|
|
24465
24519
|
if (docData === null || docData === void 0 ? void 0 : docData.length) {
|
|
24466
24520
|
docData === null || docData === void 0 ? void 0 : docData.map(function (item) {
|
|
24467
|
-
var _a, _b, _c, _d;
|
|
24521
|
+
var _a, _b, _c, _d, _e;
|
|
24468
24522
|
if ((_a = item === null || item === void 0 ? void 0 : item.url) === null || _a === void 0 ? void 0 : _a.includes("DESIGN")) {
|
|
24469
24523
|
setDesignDocUrl(item === null || item === void 0 ? void 0 : item.url);
|
|
24470
24524
|
setDesignDocDate(item === null || item === void 0 ? void 0 : item.txTime);
|
|
@@ -24485,6 +24539,12 @@ var ProgrammeDocuments = function (props) {
|
|
|
24485
24539
|
setAuthorisationDocUrl(item === null || item === void 0 ? void 0 : item.url);
|
|
24486
24540
|
setAuthorisationDocDate(item === null || item === void 0 ? void 0 : item.txTime);
|
|
24487
24541
|
}
|
|
24542
|
+
if ((_e = item === null || item === void 0 ? void 0 : item.url) === null || _e === void 0 ? void 0 : _e.includes("ENVIRONMENTAL_IMPACT_ASSESSMENT")) {
|
|
24543
|
+
setImpactAssessmentUrl(item === null || item === void 0 ? void 0 : item.url);
|
|
24544
|
+
setImpactAssessmentDate(item === null || item === void 0 ? void 0 : item.txTime);
|
|
24545
|
+
setImpactAssessmentStatus(item === null || item === void 0 ? void 0 : item.status);
|
|
24546
|
+
setImpactAssessmentId(item === null || item === void 0 ? void 0 : item.id);
|
|
24547
|
+
}
|
|
24488
24548
|
});
|
|
24489
24549
|
}
|
|
24490
24550
|
}, [docData]);
|
|
@@ -24517,7 +24577,7 @@ var ProgrammeDocuments = function (props) {
|
|
|
24517
24577
|
_a.label = 2;
|
|
24518
24578
|
case 2:
|
|
24519
24579
|
_a.trys.push([2, 6, 7, 8]);
|
|
24520
|
-
if (!isValidateFileType(file === null || file === void 0 ? void 0 : file.type)) return [3 /*break*/, 4];
|
|
24580
|
+
if (!isValidateFileType(file === null || file === void 0 ? void 0 : file.type, type)) return [3 /*break*/, 4];
|
|
24521
24581
|
return [4 /*yield*/, post("national/programme/addDocument", {
|
|
24522
24582
|
type: type,
|
|
24523
24583
|
data: logoBase64,
|
|
@@ -24626,7 +24686,7 @@ var ProgrammeDocuments = function (props) {
|
|
|
24626
24686
|
React.createElement("span", { className: "title-text" }, title)),
|
|
24627
24687
|
React.createElement("div", null,
|
|
24628
24688
|
React.createElement(antd.Row, { className: "field", key: "Design Document" },
|
|
24629
|
-
React.createElement(antd.Col, { span:
|
|
24689
|
+
React.createElement(antd.Col, { span: 18, className: "field-key" },
|
|
24630
24690
|
React.createElement("div", { className: "label-container" },
|
|
24631
24691
|
React.createElement("div", { className: designDocUrl !== "" ? "label-uploaded" : "label" }, t("programme:designDoc")),
|
|
24632
24692
|
designDocPending &&
|
|
@@ -24649,7 +24709,7 @@ var ProgrammeDocuments = function (props) {
|
|
|
24649
24709
|
designDocStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
|
24650
24710
|
React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
|
24651
24711
|
designDocUrl !== "" && (React.createElement("div", { className: "time" }, moment(parseInt(designDocDate)).format("DD MMMM YYYY @ HH:mm")))),
|
|
24652
|
-
React.createElement(antd.Col, { span:
|
|
24712
|
+
React.createElement(antd.Col, { span: 6, className: "field-value" }, designDocUrl !== "" ? (React.createElement("div", { className: "link" },
|
|
24653
24713
|
linkDocVisible(designDocStatus) && (React.createElement("a", { href: designDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
|
24654
24714
|
React.createElement(icons.LinkOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
|
24655
24715
|
designDocStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
|
@@ -24682,15 +24742,15 @@ var ProgrammeDocuments = function (props) {
|
|
|
24682
24742
|
onUploadDocument(selectedFile, exports.DocType.DESIGN_DOCUMENT);
|
|
24683
24743
|
} }))))),
|
|
24684
24744
|
noObjectionDocUrl !== "" && (React.createElement(antd.Row, { className: "field", key: "Objection Document" },
|
|
24685
|
-
React.createElement(antd.Col, { span:
|
|
24745
|
+
React.createElement(antd.Col, { span: 18, className: "field-key" },
|
|
24686
24746
|
React.createElement("div", { className: "label-uploaded" }, t("programme:objectionLett")),
|
|
24687
24747
|
React.createElement("div", { className: "time" }, moment(parseInt(noObjectionDate)).format("DD MMMM YYYY @ HH:mm"))),
|
|
24688
|
-
React.createElement(antd.Col, { span:
|
|
24748
|
+
React.createElement(antd.Col, { span: 6, className: "field-value" },
|
|
24689
24749
|
React.createElement("div", { className: "link" },
|
|
24690
24750
|
React.createElement("a", { href: noObjectionDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
|
24691
24751
|
React.createElement(icons.LinkOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))))),
|
|
24692
24752
|
React.createElement(antd.Row, { className: "field", key: "Methodology Document" },
|
|
24693
|
-
React.createElement(antd.Col, { span:
|
|
24753
|
+
React.createElement(antd.Col, { span: 18, className: "field-key" },
|
|
24694
24754
|
React.createElement("div", { className: "label-container" },
|
|
24695
24755
|
React.createElement("div", { className: methodologyDocUrl !== "" ? "label-uploaded" : "label" }, t("programme:methDoc")),
|
|
24696
24756
|
methodDocStatus === exports.DocumentStatus.PENDING &&
|
|
@@ -24713,7 +24773,7 @@ var ProgrammeDocuments = function (props) {
|
|
|
24713
24773
|
methodDocStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
|
24714
24774
|
React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
|
24715
24775
|
methodologyDocUrl !== "" && (React.createElement("div", { className: "time" }, moment(parseInt(methodologyDate)).format("DD MMMM YYYY @ HH:mm")))),
|
|
24716
|
-
React.createElement(antd.Col, { span:
|
|
24776
|
+
React.createElement(antd.Col, { span: 6, className: "field-value" }, methodologyDocUrl !== "" ? (React.createElement("div", { className: "link" },
|
|
24717
24777
|
linkDocVisible(methodDocStatus) && (React.createElement("a", { href: methodologyDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
|
24718
24778
|
React.createElement(icons.LinkOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
|
24719
24779
|
methodDocStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
|
@@ -24755,13 +24815,68 @@ var ProgrammeDocuments = function (props) {
|
|
|
24755
24815
|
onUploadDocument(selectedFile, exports.DocType.METHODOLOGY_DOCUMENT);
|
|
24756
24816
|
} }))))),
|
|
24757
24817
|
authorisationDocUrl !== "" && (React.createElement(antd.Row, { className: "field", key: "Authorisation Document" },
|
|
24758
|
-
React.createElement(antd.Col, { span:
|
|
24818
|
+
React.createElement(antd.Col, { span: 18, className: "field-key" },
|
|
24759
24819
|
React.createElement("div", { className: "label-uploaded" }, t("programme:authLetterLabel")),
|
|
24760
24820
|
React.createElement("div", { className: "time" }, moment(parseInt(authorisationDocDate)).format("DD MMMM YYYY @ HH:mm"))),
|
|
24761
|
-
React.createElement(antd.Col, { span:
|
|
24821
|
+
React.createElement(antd.Col, { span: 6, className: "field-value" },
|
|
24762
24822
|
React.createElement("div", { className: "link" },
|
|
24763
24823
|
React.createElement("a", { href: authorisationDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
|
24764
|
-
React.createElement(icons.LinkOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))))))
|
|
24824
|
+
React.createElement(icons.LinkOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))))),
|
|
24825
|
+
React.createElement(antd.Row, { className: "field", key: "Environmental Impact Assessment" },
|
|
24826
|
+
React.createElement(antd.Col, { span: 18, className: "field-key" },
|
|
24827
|
+
React.createElement("div", { className: "label-container" },
|
|
24828
|
+
React.createElement("div", { className: impactAssessmentUrl !== "" ? "label-uploaded" : "label" }, t("programme:environmentalImpactAssessment")),
|
|
24829
|
+
impactAssessmentStatus === exports.DocumentStatus.PENDING && (ministryLevelPermission || companyRolePermission) && (React.createElement(React.Fragment, null,
|
|
24830
|
+
React.createElement(icons.LikeOutlined, { onClick: function () {
|
|
24831
|
+
return docAction(impactAssessmentId, exports.DocumentStatus.ACCEPTED);
|
|
24832
|
+
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
|
24833
|
+
React.createElement(icons.DislikeOutlined, { onClick: function () {
|
|
24834
|
+
setRejectDocData({ id: impactAssessmentId });
|
|
24835
|
+
setActionInfo({
|
|
24836
|
+
action: "Reject",
|
|
24837
|
+
headerText: "".concat(t("programme:rejectDocHeader")),
|
|
24838
|
+
text: "".concat(t("programme:rejectDocBody")),
|
|
24839
|
+
type: "reject",
|
|
24840
|
+
icon: React.createElement(icons.DislikeOutlined, null),
|
|
24841
|
+
});
|
|
24842
|
+
setOpenRejectDocConfirmationModal(true);
|
|
24843
|
+
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
|
|
24844
|
+
impactAssessmentStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
|
24845
|
+
impactAssessmentStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
|
24846
|
+
React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
|
24847
|
+
impactAssessmentUrl !== "" && (React.createElement("div", { className: "time" }, moment(parseInt(impactAssessmentDate)).format("DD MMMM YYYY @ HH:mm")))),
|
|
24848
|
+
React.createElement(antd.Col, { span: 6, className: "field-value" }, impactAssessmentUrl !== "" ? (React.createElement("div", { className: "link" },
|
|
24849
|
+
linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
|
24850
|
+
React.createElement(icons.LinkOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
|
24851
|
+
impactAssessmentStatus !== exports.DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
|
24852
|
+
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly ||
|
|
24853
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER
|
|
24854
|
+
? t("programme:notAuthToUploadDoc")
|
|
24855
|
+
: !uploadDocUserPermission(userInfoState, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
|
24856
|
+
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission)
|
|
24857
|
+
? { color: "#3F3A47", cursor: "pointer" }
|
|
24858
|
+
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
|
24859
|
+
return uploadDocUserPermission(userInfoState, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission) && handleImpactAssessmentFileUpload();
|
|
24860
|
+
} })),
|
|
24861
|
+
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
|
24862
|
+
var selectedFile = e.target.files[0];
|
|
24863
|
+
e.target.value = null;
|
|
24864
|
+
onUploadDocument(selectedFile, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT);
|
|
24865
|
+
} }))))) : (React.createElement(React.Fragment, null,
|
|
24866
|
+
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly ||
|
|
24867
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER
|
|
24868
|
+
? t("programme:notAuthToUploadDoc")
|
|
24869
|
+
: !uploadDocUserPermission(userInfoState, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
|
24870
|
+
React.createElement(icons.FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission)
|
|
24871
|
+
? { color: "#3F3A47", cursor: "pointer" }
|
|
24872
|
+
: { color: "#cacaca", cursor: "default" }, onClick: function () {
|
|
24873
|
+
return uploadDocUserPermission(userInfoState, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT, programmeOwnerId, ministryLevelPermission) && handleImpactAssessmentFileUpload();
|
|
24874
|
+
} })),
|
|
24875
|
+
React.createElement("input", { type: "file", ref: fileInputRefImpactAssessment, style: { display: "none" }, accept: ".doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
|
24876
|
+
var selectedFile = e.target.files[0];
|
|
24877
|
+
e.target.value = null;
|
|
24878
|
+
onUploadDocument(selectedFile, exports.DocType.ENVIRONMENTAL_IMPACT_ASSESSMENT);
|
|
24879
|
+
} }))))))),
|
|
24765
24880
|
React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
|
|
24766
24881
|
};
|
|
24767
24882
|
|