@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/cjs/index.js +35 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +35 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/locales/i18n/programme/en.json +1 -1
- package/dist/locales/i18n/programme/es.json +1 -2
- package/dist/locales/i18n/programme/fr.json +1 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -6699,7 +6699,7 @@ var AddNewCompanyComponent = function (props) {
|
|
6699
6699
|
String(value).trim() === undefined ||
|
6700
6700
|
value === null ||
|
6701
6701
|
value === undefined) {
|
6702
|
-
throw new Error("".concat(t("addCompany:nationalSopValue"), "
|
6702
|
+
throw new Error("".concat(t("addCompany:nationalSopValue"), " ").concat(t("isRequired")));
|
6703
6703
|
}
|
6704
6704
|
return [2 /*return*/];
|
6705
6705
|
});
|
@@ -7876,6 +7876,15 @@ var ProgrammeManagementComponent = function (props) {
|
|
7876
7876
|
setMinistryLevelFilter(false);
|
7877
7877
|
}
|
7878
7878
|
}
|
7879
|
+
else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER) {
|
7880
|
+
setDataFilter(v.target.checked
|
7881
|
+
? {
|
7882
|
+
key: "certifierId",
|
7883
|
+
operation: "ANY",
|
7884
|
+
value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId,
|
7885
|
+
}
|
7886
|
+
: undefined);
|
7887
|
+
}
|
7879
7888
|
else {
|
7880
7889
|
setDataFilter(v.target.checked
|
7881
7890
|
? {
|
@@ -17706,7 +17715,7 @@ var InvestmentManagementComponent = function (props) {
|
|
17706
17715
|
return handleTableChange(val, sorter);
|
17707
17716
|
}, locale: {
|
17708
17717
|
emptyText: (React.createElement(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE, description: tableData.length === 0
|
17709
|
-
? t("programme:
|
17718
|
+
? t("programme:noInvestmentData")
|
17710
17719
|
: null })),
|
17711
17720
|
} }))))),
|
17712
17721
|
popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
|
@@ -24221,7 +24230,7 @@ var CreditTransferComponent = function (props) {
|
|
24221
24230
|
else {
|
24222
24231
|
setMinistryLevelFilter(false);
|
24223
24232
|
}
|
24224
|
-
} }, t("
|
24233
|
+
} }, t("view:ministryLevel")))),
|
24225
24234
|
React.createElement("div", { className: "search-bar" },
|
24226
24235
|
React.createElement(Search, { onPressEnter: onSearch, placeholder: "Search", allowClear: true, onChange: function (e) {
|
24227
24236
|
return e.target.value === ""
|
@@ -28766,7 +28775,9 @@ var InvestmentBody = function (props) {
|
|
28766
28775
|
React.createElement("div", { className: "invester" },
|
28767
28776
|
React.createElement("div", { className: "name-and-progress" },
|
28768
28777
|
React.createElement("div", { className: "name" }, investmentData === null || investmentData === void 0 ? void 0 : investmentData.invester),
|
28769
|
-
React.createElement("div", { className: "progress" },
|
28778
|
+
React.createElement("div", { className: "progress" },
|
28779
|
+
(investmentData === null || investmentData === void 0 ? void 0 : investmentData.status) === exports.InvestmentStatus.APPROVED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
28780
|
+
(investmentData === null || investmentData === void 0 ? void 0 : investmentData.status) === exports.InvestmentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
28770
28781
|
React.createElement("div", { className: "time" }, moment(parseInt(investmentData === null || investmentData === void 0 ? void 0 : investmentData.createdAt)).format("DD MMMM YYYY @ HH:mm"))),
|
28771
28782
|
React.createElement("div", { className: "amount" },
|
28772
28783
|
"$",
|
@@ -29236,8 +29247,26 @@ var ProgrammeRetireForm = function (props) {
|
|
29236
29247
|
var ProgrammeRevokeForm = function (props) {
|
29237
29248
|
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText, subText = props.subText, showCertifiers = props.showCertifiers, translator = props.translator;
|
29238
29249
|
var t = translator.t;
|
29250
|
+
var form = antd.Form.useForm()[0];
|
29239
29251
|
var _a = React.useState(undefined), popupError = _a[0], setPopupError = _a[1];
|
29240
29252
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
29253
|
+
var _c = React.useState(false), remarks = _c[0], setRemarks = _c[1];
|
29254
|
+
var onRemarkValues = function () { return __awaiter(void 0, void 0, void 0, function () {
|
29255
|
+
var comment;
|
29256
|
+
return __generator(this, function (_a) {
|
29257
|
+
comment = form.getFieldValue("comment");
|
29258
|
+
if (comment === undefined || comment === "") {
|
29259
|
+
setRemarks(false);
|
29260
|
+
}
|
29261
|
+
else {
|
29262
|
+
setRemarks(true);
|
29263
|
+
}
|
29264
|
+
return [2 /*return*/];
|
29265
|
+
});
|
29266
|
+
}); };
|
29267
|
+
React.useEffect(function () {
|
29268
|
+
onRemarkValues();
|
29269
|
+
});
|
29241
29270
|
return (React.createElement("div", { className: "transfer-form" },
|
29242
29271
|
React.createElement(antd.Row, null,
|
29243
29272
|
React.createElement(antd.Col, { span: 24, className: "sub-text" }, subText)),
|
@@ -29245,7 +29274,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
29245
29274
|
certifierId: programme.certifierId && programme.certifierId.length === 1
|
29246
29275
|
? Number(programme.certifierId[0])
|
29247
29276
|
: undefined,
|
29248
|
-
}, onChange: function () { return setPopupError(undefined); }, onFinish: function (d) { return __awaiter(void 0, void 0, void 0, function () {
|
29277
|
+
}, onChange: function () { return setPopupError(undefined); }, onValuesChange: onRemarkValues, form: form, onFinish: function (d) { return __awaiter(void 0, void 0, void 0, function () {
|
29249
29278
|
var res;
|
29250
29279
|
return __generator(this, function (_a) {
|
29251
29280
|
switch (_a.label) {
|
@@ -29284,7 +29313,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
29284
29313
|
popupError ? (React.createElement(antd.Alert, { className: "error", message: popupError, type: "error", showIcon: true })) : (""),
|
29285
29314
|
React.createElement(antd.Form.Item, { className: "footer" },
|
29286
29315
|
React.createElement(antd.Button, { htmlType: "button", onClick: onCancel }, t("view:cancel")),
|
29287
|
-
React.createElement(antd.Button, { className: "mg-left-2", type: "primary", htmlType: "submit", loading: loading }, actionBtnText)))));
|
29316
|
+
React.createElement(antd.Button, { className: "mg-left-2", type: "primary", htmlType: "submit", loading: loading, disabled: !remarks }, actionBtnText)))));
|
29288
29317
|
};
|
29289
29318
|
|
29290
29319
|
var ProgrammeTransferForm = function (props) {
|