@undp/carbon-library 1.0.133 → 1.0.134-CARBON-326.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -19216,6 +19216,11 @@ var CreditTransferComponent = function (props) {
19216
19216
  }); };
19217
19217
  Form.useForm()[0];
19218
19218
  var Search = Input.Search;
19219
+ var ministryLevelPermission = function (sectoralScope) {
19220
+ return ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY &&
19221
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== Role.ViewOnly &&
19222
+ ministrySectoralScope.includes(sectoralScope));
19223
+ };
19219
19224
  var onCheckAllChange = function (e) {
19220
19225
  var nw = e.target.checked ? statusOptions.map(function (el) { return el.value; }) : [];
19221
19226
  setSelectedStatus(nw);
@@ -19476,7 +19481,8 @@ var CreditTransferComponent = function (props) {
19476
19481
  ], renderItem: function (item) { return (React.createElement(List.Item, { onClick: item.click },
19477
19482
  React.createElement(Typography.Text, { className: "action-icon ".concat(item.style) }, item.icon),
19478
19483
  React.createElement("span", null, item.text))); } })) : record.isRetirement &&
19479
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ? (React.createElement(List, { className: "action-menu", size: "small", dataSource: [
19484
+ ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ||
19485
+ ministryLevelPermission(record.programmeSectoralScope)) ? (React.createElement(List, { className: "action-menu", size: "small", dataSource: [
19480
19486
  {
19481
19487
  text: t("creditTransfer:recognise"),
19482
19488
  icon: React.createElement(Icon.Save, null),