@undp/carbon-library 1.0.302-CARBON-428-bugfix.0 → 1.0.302-CARBON-433.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +68 -23
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +68 -23
- package/dist/esm/index.js.map +1 -1
- package/dist/locales/i18n/programme/en.json +1 -1
- package/dist/locales/i18n/programme/es.json +2 -1
- package/dist/locales/i18n/programme/fr.json +2 -1
- 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
|
? {
|
@@ -16260,7 +16269,7 @@ var InvestmentCreationComponent = function (props) {
|
|
16260
16269
|
.unix();
|
16261
16270
|
}
|
16262
16271
|
payload.instrument = Array.isArray(payload.instrument) ? payload.instrument : [payload.instrument];
|
16263
|
-
|
16272
|
+
payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
|
16264
16273
|
payload.percentage = val.percentage;
|
16265
16274
|
payload.toCompanyId = Number(payload.toCompanyId);
|
16266
16275
|
_a.label = 1;
|
@@ -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:noinvestment")
|
17710
17719
|
: null })),
|
17711
17720
|
} }))))),
|
17712
17721
|
popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
|
@@ -20087,23 +20096,11 @@ var Assessment = function (props) {
|
|
20087
20096
|
changedValues = {};
|
20088
20097
|
if (info.changedFields && info.changedFields.length > 0) {
|
20089
20098
|
info.changedFields.map(function (changedField) { return __awaiter(void 0, void 0, void 0, function () {
|
20090
|
-
var base64Value, values_1;
|
20091
20099
|
return __generator(this, function (_a) {
|
20092
|
-
|
20093
|
-
|
20094
|
-
if (!(changedField.name[0] === "document")) return [3 /*break*/, 2];
|
20095
|
-
return [4 /*yield*/, getBase64(changedField.value[0].originFileObj)];
|
20096
|
-
case 1:
|
20097
|
-
base64Value = _a.sent();
|
20098
|
-
console.log("FEAsibility document : ", base64Value);
|
20099
|
-
values_1 = base64Value;
|
20100
|
-
setCobenefitsAssessmentDetails(function (pre) { return (__assign(__assign({}, pre), { document: values_1 })); });
|
20101
|
-
return [3 /*break*/, 3];
|
20102
|
-
case 2:
|
20103
|
-
changedValues[changedField.name[0]] = changedField.value;
|
20104
|
-
_a.label = 3;
|
20105
|
-
case 3: return [2 /*return*/];
|
20100
|
+
if (changedField.name[0] !== "document") {
|
20101
|
+
changedValues[changedField.name[0]] = changedField.value;
|
20106
20102
|
}
|
20103
|
+
return [2 /*return*/];
|
20107
20104
|
});
|
20108
20105
|
}); });
|
20109
20106
|
setCobenefitsAssessmentDetails(function (pre) { return (__assign(__assign({}, pre), changedValues)); });
|
@@ -20138,6 +20135,34 @@ var Assessment = function (props) {
|
|
20138
20135
|
setIsPersonListedDetailsVisible(false);
|
20139
20136
|
}
|
20140
20137
|
};
|
20138
|
+
var onAssesmentDocument = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
20139
|
+
var base64Value, values_1;
|
20140
|
+
var _a;
|
20141
|
+
return __generator(this, function (_b) {
|
20142
|
+
switch (_b.label) {
|
20143
|
+
case 0:
|
20144
|
+
if (!((e === null || e === void 0 ? void 0 : e.fileList.length) > 0 && ((_a = e === null || e === void 0 ? void 0 : e.fileList[0]) === null || _a === void 0 ? void 0 : _a.name))) return [3 /*break*/, 2];
|
20145
|
+
return [4 /*yield*/, getBase64(e.fileList[0].originFileObj)];
|
20146
|
+
case 1:
|
20147
|
+
base64Value = _b.sent();
|
20148
|
+
values_1 = base64Value;
|
20149
|
+
setCobenefitsAssessmentDetails(function (pre) { return (__assign(__assign({}, pre), { document: values_1 })); });
|
20150
|
+
return [3 /*break*/, 3];
|
20151
|
+
case 2:
|
20152
|
+
setCobenefitsAssessmentDetails(function (pre) {
|
20153
|
+
pre.document; var rest = __rest(pre, ["document"]);
|
20154
|
+
if (Object.keys(rest).length === 0) {
|
20155
|
+
return undefined;
|
20156
|
+
}
|
20157
|
+
else {
|
20158
|
+
return __assign({}, rest);
|
20159
|
+
}
|
20160
|
+
});
|
20161
|
+
_b.label = 3;
|
20162
|
+
case 3: return [2 /*return*/];
|
20163
|
+
}
|
20164
|
+
});
|
20165
|
+
}); };
|
20141
20166
|
var normFile = function (e) {
|
20142
20167
|
if (Array.isArray(e)) {
|
20143
20168
|
return e;
|
@@ -20352,7 +20377,7 @@ var Assessment = function (props) {
|
|
20352
20377
|
] },
|
20353
20378
|
React.createElement(antd.Upload, { accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", beforeUpload: function (file) {
|
20354
20379
|
return false;
|
20355
|
-
}, className: "design-upload-section", name: "document", listType: "picture", multiple: false, maxCount: 1 },
|
20380
|
+
}, className: "design-upload-section", name: "document", listType: "picture", multiple: false, maxCount: 1, onChange: onAssesmentDocument },
|
20356
20381
|
React.createElement(antd.Button, { className: "upload-doc", size: "large", icon: React.createElement(icons.UploadOutlined, null) }, "Upload")))),
|
20357
20382
|
viewOnly && assessmentViewData.document && (React.createElement(antd.Form.Item, { label: t("assessmentDocuments"), name: "assessmentDocuments" },
|
20358
20383
|
React.createElement("a", { href: assessmentViewData.document, target: "_blank", rel: "noopener noreferrer", download: true }, assessmentViewData.document))))))))));
|
@@ -24221,7 +24246,7 @@ var CreditTransferComponent = function (props) {
|
|
24221
24246
|
else {
|
24222
24247
|
setMinistryLevelFilter(false);
|
24223
24248
|
}
|
24224
|
-
} }, t("
|
24249
|
+
} }, t("view:ministryLevel")))),
|
24225
24250
|
React.createElement("div", { className: "search-bar" },
|
24226
24251
|
React.createElement(Search, { onPressEnter: onSearch, placeholder: "Search", allowClear: true, onChange: function (e) {
|
24227
24252
|
return e.target.value === ""
|
@@ -28766,7 +28791,9 @@ var InvestmentBody = function (props) {
|
|
28766
28791
|
React.createElement("div", { className: "invester" },
|
28767
28792
|
React.createElement("div", { className: "name-and-progress" },
|
28768
28793
|
React.createElement("div", { className: "name" }, investmentData === null || investmentData === void 0 ? void 0 : investmentData.invester),
|
28769
|
-
React.createElement("div", { className: "progress" },
|
28794
|
+
React.createElement("div", { className: "progress" },
|
28795
|
+
(investmentData === null || investmentData === void 0 ? void 0 : investmentData.status) === exports.InvestmentStatus.APPROVED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
28796
|
+
(investmentData === null || investmentData === void 0 ? void 0 : investmentData.status) === exports.InvestmentStatus.REJECTED && (React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
28770
28797
|
React.createElement("div", { className: "time" }, moment(parseInt(investmentData === null || investmentData === void 0 ? void 0 : investmentData.createdAt)).format("DD MMMM YYYY @ HH:mm"))),
|
28771
28798
|
React.createElement("div", { className: "amount" },
|
28772
28799
|
"$",
|
@@ -29236,8 +29263,26 @@ var ProgrammeRetireForm = function (props) {
|
|
29236
29263
|
var ProgrammeRevokeForm = function (props) {
|
29237
29264
|
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText, subText = props.subText, showCertifiers = props.showCertifiers, translator = props.translator;
|
29238
29265
|
var t = translator.t;
|
29266
|
+
var form = antd.Form.useForm()[0];
|
29239
29267
|
var _a = React.useState(undefined), popupError = _a[0], setPopupError = _a[1];
|
29240
29268
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
29269
|
+
var _c = React.useState(false), remarks = _c[0], setRemarks = _c[1];
|
29270
|
+
var onRemarkValues = function () { return __awaiter(void 0, void 0, void 0, function () {
|
29271
|
+
var comment;
|
29272
|
+
return __generator(this, function (_a) {
|
29273
|
+
comment = form.getFieldValue("comment");
|
29274
|
+
if (comment === undefined || comment === "") {
|
29275
|
+
setRemarks(false);
|
29276
|
+
}
|
29277
|
+
else {
|
29278
|
+
setRemarks(true);
|
29279
|
+
}
|
29280
|
+
return [2 /*return*/];
|
29281
|
+
});
|
29282
|
+
}); };
|
29283
|
+
React.useEffect(function () {
|
29284
|
+
onRemarkValues();
|
29285
|
+
});
|
29241
29286
|
return (React.createElement("div", { className: "transfer-form" },
|
29242
29287
|
React.createElement(antd.Row, null,
|
29243
29288
|
React.createElement(antd.Col, { span: 24, className: "sub-text" }, subText)),
|
@@ -29245,7 +29290,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
29245
29290
|
certifierId: programme.certifierId && programme.certifierId.length === 1
|
29246
29291
|
? Number(programme.certifierId[0])
|
29247
29292
|
: undefined,
|
29248
|
-
}, onChange: function () { return setPopupError(undefined); }, onFinish: function (d) { return __awaiter(void 0, void 0, void 0, function () {
|
29293
|
+
}, onChange: function () { return setPopupError(undefined); }, onValuesChange: onRemarkValues, form: form, onFinish: function (d) { return __awaiter(void 0, void 0, void 0, function () {
|
29249
29294
|
var res;
|
29250
29295
|
return __generator(this, function (_a) {
|
29251
29296
|
switch (_a.label) {
|
@@ -29284,7 +29329,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
29284
29329
|
popupError ? (React.createElement(antd.Alert, { className: "error", message: popupError, type: "error", showIcon: true })) : (""),
|
29285
29330
|
React.createElement(antd.Form.Item, { className: "footer" },
|
29286
29331
|
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)))));
|
29332
|
+
React.createElement(antd.Button, { className: "mg-left-2", type: "primary", htmlType: "submit", loading: loading, disabled: !remarks }, actionBtnText)))));
|
29288
29333
|
};
|
29289
29334
|
|
29290
29335
|
var ProgrammeTransferForm = function (props) {
|