@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/cjs/index.js CHANGED
@@ -19236,6 +19236,11 @@ var CreditTransferComponent = function (props) {
19236
19236
  }); };
19237
19237
  antd.Form.useForm()[0];
19238
19238
  var Search = antd.Input.Search;
19239
+ var ministryLevelPermission = function (sectoralScope) {
19240
+ return ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY &&
19241
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly &&
19242
+ ministrySectoralScope.includes(sectoralScope));
19243
+ };
19239
19244
  var onCheckAllChange = function (e) {
19240
19245
  var nw = e.target.checked ? statusOptions.map(function (el) { return el.value; }) : [];
19241
19246
  setSelectedStatus(nw);
@@ -19496,7 +19501,8 @@ var CreditTransferComponent = function (props) {
19496
19501
  ], renderItem: function (item) { return (React.createElement(antd.List.Item, { onClick: item.click },
19497
19502
  React.createElement(antd.Typography.Text, { className: "action-icon ".concat(item.style) }, item.icon),
19498
19503
  React.createElement("span", null, item.text))); } })) : record.isRetirement &&
19499
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ? (React.createElement(antd.List, { className: "action-menu", size: "small", dataSource: [
19504
+ ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
19505
+ ministryLevelPermission(record.programmeSectoralScope)) ? (React.createElement(antd.List, { className: "action-menu", size: "small", dataSource: [
19500
19506
  {
19501
19507
  text: t("creditTransfer:recognise"),
19502
19508
  icon: React.createElement(Icon__namespace.Save, null),