@undp/carbon-library 1.0.133 → 1.0.134-CARBON-326.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +14 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +14 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -18718,12 +18718,18 @@ var NdcActionViewComponent = function (props) {
|
|
18718
18718
|
});
|
18719
18719
|
}); };
|
18720
18720
|
var getProjectReportActions = function (reportData) {
|
18721
|
+
var versionfull = (reportData === null || reportData === void 0 ? void 0 : reportData.url).split("_")[(reportData === null || reportData === void 0 ? void 0 : reportData.url).split("_").length - 1];
|
18722
|
+
var version = versionfull ? versionfull.split(".")[0] : "1";
|
18723
|
+
var Docversion = version.startsWith("V") ? version : "V1";
|
18721
18724
|
return (React.createElement(antd.Row, null,
|
18722
18725
|
React.createElement("div", { className: "icon" },
|
18723
18726
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
18724
18727
|
(reportData === null || reportData === void 0 ? void 0 : reportData.status) === exports.DocumentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
|
18725
18728
|
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 },
|
18726
|
-
React.createElement(icons.LinkOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))
|
18729
|
+
React.createElement(icons.LinkOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
|
18730
|
+
(reportData === null || reportData === void 0 ? void 0 : reportData.url) !== "" && (React.createElement("div", { className: "time" },
|
18731
|
+
moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
|
18732
|
+
" ~ " + Docversion))));
|
18727
18733
|
};
|
18728
18734
|
var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
|
18729
18735
|
var reportDetails, response, exception_1;
|
@@ -19236,6 +19242,11 @@ var CreditTransferComponent = function (props) {
|
|
19236
19242
|
}); };
|
19237
19243
|
antd.Form.useForm()[0];
|
19238
19244
|
var Search = antd.Input.Search;
|
19245
|
+
var ministryLevelPermission = function (sectoralScope) {
|
19246
|
+
return ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY &&
|
19247
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly &&
|
19248
|
+
ministrySectoralScope.includes(sectoralScope));
|
19249
|
+
};
|
19239
19250
|
var onCheckAllChange = function (e) {
|
19240
19251
|
var nw = e.target.checked ? statusOptions.map(function (el) { return el.value; }) : [];
|
19241
19252
|
setSelectedStatus(nw);
|
@@ -19496,7 +19507,8 @@ var CreditTransferComponent = function (props) {
|
|
19496
19507
|
], renderItem: function (item) { return (React.createElement(antd.List.Item, { onClick: item.click },
|
19497
19508
|
React.createElement(antd.Typography.Text, { className: "action-icon ".concat(item.style) }, item.icon),
|
19498
19509
|
React.createElement("span", null, item.text))); } })) : record.isRetirement &&
|
19499
|
-
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
19510
|
+
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
|
19511
|
+
ministryLevelPermission(record.programmeSectoralScope)) ? (React.createElement(antd.List, { className: "action-menu", size: "small", dataSource: [
|
19500
19512
|
{
|
19501
19513
|
text: t("creditTransfer:recognise"),
|
19502
19514
|
icon: React.createElement(Icon__namespace.Save, null),
|