@undp/carbon-library 1.0.302-CARBON-433.0 → 1.0.302-CARBON-368.0

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/esm/index.js CHANGED
@@ -6678,7 +6678,7 @@ var AddNewCompanyComponent = function (props) {
6678
6678
  String(value).trim() === undefined ||
6679
6679
  value === null ||
6680
6680
  value === undefined) {
6681
- throw new Error("".concat(t("addCompany:nationalSopValue"), " s").concat(t("isRequired")));
6681
+ throw new Error("".concat(t("addCompany:nationalSopValue"), " ").concat(t("isRequired")));
6682
6682
  }
6683
6683
  return [2 /*return*/];
6684
6684
  });
@@ -7855,6 +7855,15 @@ var ProgrammeManagementComponent = function (props) {
7855
7855
  setMinistryLevelFilter(false);
7856
7856
  }
7857
7857
  }
7858
+ else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER) {
7859
+ setDataFilter(v.target.checked
7860
+ ? {
7861
+ key: "certifierId",
7862
+ operation: "ANY",
7863
+ value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId,
7864
+ }
7865
+ : undefined);
7866
+ }
7858
7867
  else {
7859
7868
  setDataFilter(v.target.checked
7860
7869
  ? {
@@ -17685,7 +17694,7 @@ var InvestmentManagementComponent = function (props) {
17685
17694
  return handleTableChange(val, sorter);
17686
17695
  }, locale: {
17687
17696
  emptyText: (React.createElement(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE, description: tableData.length === 0
17688
- ? t("programme:noinvestment")
17697
+ ? t("programme:noInvestmentData")
17689
17698
  : null })),
17690
17699
  } }))))),
17691
17700
  popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
@@ -24200,7 +24209,7 @@ var CreditTransferComponent = function (props) {
24200
24209
  else {
24201
24210
  setMinistryLevelFilter(false);
24202
24211
  }
24203
- } }, t("ndcAction:ministryLevel")))),
24212
+ } }, t("view:ministryLevel")))),
24204
24213
  React.createElement("div", { className: "search-bar" },
24205
24214
  React.createElement(Search, { onPressEnter: onSearch, placeholder: "Search", allowClear: true, onChange: function (e) {
24206
24215
  return e.target.value === ""
@@ -28745,7 +28754,9 @@ var InvestmentBody = function (props) {
28745
28754
  React.createElement("div", { className: "invester" },
28746
28755
  React.createElement("div", { className: "name-and-progress" },
28747
28756
  React.createElement("div", { className: "name" }, investmentData === null || investmentData === void 0 ? void 0 : investmentData.invester),
28748
- React.createElement("div", { className: "progress" }, (investmentData === null || investmentData === void 0 ? void 0 : investmentData.status) === InvestmentStatus.APPROVED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })))),
28757
+ React.createElement("div", { className: "progress" },
28758
+ (investmentData === null || investmentData === void 0 ? void 0 : investmentData.status) === InvestmentStatus.APPROVED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
28759
+ (investmentData === null || investmentData === void 0 ? void 0 : investmentData.status) === InvestmentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
28749
28760
  React.createElement("div", { className: "time" }, moment(parseInt(investmentData === null || investmentData === void 0 ? void 0 : investmentData.createdAt)).format("DD MMMM YYYY @ HH:mm"))),
28750
28761
  React.createElement("div", { className: "amount" },
28751
28762
  "$",
@@ -29215,8 +29226,26 @@ var ProgrammeRetireForm = function (props) {
29215
29226
  var ProgrammeRevokeForm = function (props) {
29216
29227
  var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText, subText = props.subText, showCertifiers = props.showCertifiers, translator = props.translator;
29217
29228
  var t = translator.t;
29229
+ var form = Form.useForm()[0];
29218
29230
  var _a = useState(undefined), popupError = _a[0], setPopupError = _a[1];
29219
29231
  var _b = useState(false), loading = _b[0], setLoading = _b[1];
29232
+ var _c = useState(false), remarks = _c[0], setRemarks = _c[1];
29233
+ var onRemarkValues = function () { return __awaiter(void 0, void 0, void 0, function () {
29234
+ var comment;
29235
+ return __generator(this, function (_a) {
29236
+ comment = form.getFieldValue("comment");
29237
+ if (comment === undefined || comment === "") {
29238
+ setRemarks(false);
29239
+ }
29240
+ else {
29241
+ setRemarks(true);
29242
+ }
29243
+ return [2 /*return*/];
29244
+ });
29245
+ }); };
29246
+ useEffect(function () {
29247
+ onRemarkValues();
29248
+ });
29220
29249
  return (React.createElement("div", { className: "transfer-form" },
29221
29250
  React.createElement(Row, null,
29222
29251
  React.createElement(Col, { span: 24, className: "sub-text" }, subText)),
@@ -29224,7 +29253,7 @@ var ProgrammeRevokeForm = function (props) {
29224
29253
  certifierId: programme.certifierId && programme.certifierId.length === 1
29225
29254
  ? Number(programme.certifierId[0])
29226
29255
  : undefined,
29227
- }, onChange: function () { return setPopupError(undefined); }, onFinish: function (d) { return __awaiter(void 0, void 0, void 0, function () {
29256
+ }, onChange: function () { return setPopupError(undefined); }, onValuesChange: onRemarkValues, form: form, onFinish: function (d) { return __awaiter(void 0, void 0, void 0, function () {
29228
29257
  var res;
29229
29258
  return __generator(this, function (_a) {
29230
29259
  switch (_a.label) {
@@ -29263,7 +29292,7 @@ var ProgrammeRevokeForm = function (props) {
29263
29292
  popupError ? (React.createElement(Alert, { className: "error", message: popupError, type: "error", showIcon: true })) : (""),
29264
29293
  React.createElement(Form.Item, { className: "footer" },
29265
29294
  React.createElement(Button, { htmlType: "button", onClick: onCancel }, t("view:cancel")),
29266
- React.createElement(Button, { className: "mg-left-2", type: "primary", htmlType: "submit", loading: loading }, actionBtnText)))));
29295
+ React.createElement(Button, { className: "mg-left-2", type: "primary", htmlType: "submit", loading: loading, disabled: !remarks }, actionBtnText)))));
29267
29296
  };
29268
29297
 
29269
29298
  var ProgrammeTransferForm = function (props) {