@undp/carbon-library 1.0.49 → 1.0.51
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +16 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +16 -13
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
@@ -542,7 +542,7 @@ var CompanyManagementComponent = function (props) {
|
|
542
542
|
sorter: true,
|
543
543
|
align: "left",
|
544
544
|
render: function (item) {
|
545
|
-
return item ? item : "-";
|
545
|
+
return item ? addCommSep(item) : "-";
|
546
546
|
},
|
547
547
|
},
|
548
548
|
{
|
@@ -2455,7 +2455,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
2455
2455
|
key: ProgrammeManagementColumns.emissionReductionExpected,
|
2456
2456
|
align: "right",
|
2457
2457
|
render: function (item) {
|
2458
|
-
return item ? item : "-";
|
2458
|
+
return item ? addCommSep(item) : "-";
|
2459
2459
|
},
|
2460
2460
|
},
|
2461
2461
|
{
|
@@ -2464,7 +2464,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
2464
2464
|
key: ProgrammeManagementColumns.emissionReductionAchieved,
|
2465
2465
|
align: "right",
|
2466
2466
|
render: function (item) {
|
2467
|
-
return item ? item : "-";
|
2467
|
+
return item ? addCommSep(item) : "-";
|
2468
2468
|
},
|
2469
2469
|
},
|
2470
2470
|
{
|
@@ -2746,7 +2746,7 @@ var ProgrammeIssueForm = function (props) {
|
|
2746
2746
|
if (!/[0-9\.]/.test(event.key)) {
|
2747
2747
|
event.preventDefault();
|
2748
2748
|
}
|
2749
|
-
} }))),
|
2749
|
+
}, formatter: function (value) { return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ','); } }))),
|
2750
2750
|
React.createElement(Col, { lg: 1, md: 1, className: "seperator" }, '/'),
|
2751
2751
|
React.createElement(Col, { lg: 6, md: 12 },
|
2752
2752
|
React.createElement(Form.Item, { className: "popup-credit-input" },
|
@@ -2934,7 +2934,7 @@ var ProgrammeTransferForm = function (props) {
|
|
2934
2934
|
if (!/[0-9\.]/.test(event.key)) {
|
2935
2935
|
event.preventDefault();
|
2936
2936
|
}
|
2937
|
-
} }))),
|
2937
|
+
}, formatter: function (value) { return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ','); } }))),
|
2938
2938
|
React.createElement(Col, { lg: 1, md: 1, className: "seperator" }, '/'),
|
2939
2939
|
React.createElement(Col, { lg: 6, md: 12 },
|
2940
2940
|
React.createElement(Form.Item, { className: "popup-credit-input" },
|
@@ -3163,7 +3163,7 @@ var ProgrammeRetireForm = function (props) {
|
|
3163
3163
|
if (!/[0-9\.]/.test(event.key)) {
|
3164
3164
|
event.preventDefault();
|
3165
3165
|
}
|
3166
|
-
} }))),
|
3166
|
+
}, formatter: function (value) { return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ','); } }))),
|
3167
3167
|
React.createElement(Col, { lg: 1, md: 1, className: "seperator" }, '/'),
|
3168
3168
|
React.createElement(Col, { lg: 6, md: 12 },
|
3169
3169
|
React.createElement(Form.Item, { className: "popup-credit-input" },
|
@@ -4807,21 +4807,24 @@ var AddNewUserComponent = function (props) {
|
|
4807
4807
|
}); };
|
4808
4808
|
var onUpdateUser = function () { return __awaiter(void 0, void 0, void 0, function () {
|
4809
4809
|
var formOneValues, values, response, error_3;
|
4810
|
-
var _a;
|
4811
|
-
return __generator(this, function (
|
4812
|
-
switch (
|
4810
|
+
var _a, _b, _c, _d;
|
4811
|
+
return __generator(this, function (_e) {
|
4812
|
+
switch (_e.label) {
|
4813
4813
|
case 0:
|
4814
4814
|
setLoading(true);
|
4815
4815
|
formOneValues = formOne.getFieldsValue();
|
4816
4816
|
formOneValues.phoneNo = formatPhoneNumberIntl(formOneValues.phoneNo);
|
4817
|
-
|
4817
|
+
_e.label = 1;
|
4818
4818
|
case 1:
|
4819
|
-
|
4819
|
+
_e.trys.push([1, 3, , 4]);
|
4820
4820
|
values = {
|
4821
4821
|
id: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.id,
|
4822
4822
|
name: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.name,
|
4823
4823
|
phoneNo: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.phoneNo,
|
4824
4824
|
};
|
4825
|
+
if (((_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.companyRole) === CompanyRole$1.MINISTRY) {
|
4826
|
+
values.sectoralScope = (_d = (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.company) === null || _d === void 0 ? void 0 : _d.sectoralScope;
|
4827
|
+
}
|
4825
4828
|
if (ability.can(Action.Update, plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "role"))
|
4826
4829
|
values.role = formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.role;
|
4827
4830
|
if (ability.can(Action.Update, plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "email"))
|
@@ -4829,7 +4832,7 @@ var AddNewUserComponent = function (props) {
|
|
4829
4832
|
console.log("form one values -- > ", values, state.record);
|
4830
4833
|
return [4 /*yield*/, put("national/user/update", values)];
|
4831
4834
|
case 2:
|
4832
|
-
response =
|
4835
|
+
response = _e.sent();
|
4833
4836
|
if (response.status === 200 || response.status === 201) {
|
4834
4837
|
message.open({
|
4835
4838
|
type: "success",
|
@@ -4843,7 +4846,7 @@ var AddNewUserComponent = function (props) {
|
|
4843
4846
|
}
|
4844
4847
|
return [3 /*break*/, 4];
|
4845
4848
|
case 3:
|
4846
|
-
error_3 =
|
4849
|
+
error_3 = _e.sent();
|
4847
4850
|
console.log("Error in user update", error_3);
|
4848
4851
|
message.open({
|
4849
4852
|
type: "error",
|