@undp/carbon-library 1.0.49 → 1.0.51
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 +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/cjs/index.js
CHANGED
@@ -562,7 +562,7 @@ var CompanyManagementComponent = function (props) {
|
|
562
562
|
sorter: true,
|
563
563
|
align: "left",
|
564
564
|
render: function (item) {
|
565
|
-
return item ? item : "-";
|
565
|
+
return item ? addCommSep(item) : "-";
|
566
566
|
},
|
567
567
|
},
|
568
568
|
{
|
@@ -2475,7 +2475,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
2475
2475
|
key: exports.ProgrammeManagementColumns.emissionReductionExpected,
|
2476
2476
|
align: "right",
|
2477
2477
|
render: function (item) {
|
2478
|
-
return item ? item : "-";
|
2478
|
+
return item ? addCommSep(item) : "-";
|
2479
2479
|
},
|
2480
2480
|
},
|
2481
2481
|
{
|
@@ -2484,7 +2484,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
2484
2484
|
key: exports.ProgrammeManagementColumns.emissionReductionAchieved,
|
2485
2485
|
align: "right",
|
2486
2486
|
render: function (item) {
|
2487
|
-
return item ? item : "-";
|
2487
|
+
return item ? addCommSep(item) : "-";
|
2488
2488
|
},
|
2489
2489
|
},
|
2490
2490
|
{
|
@@ -2766,7 +2766,7 @@ var ProgrammeIssueForm = function (props) {
|
|
2766
2766
|
if (!/[0-9\.]/.test(event.key)) {
|
2767
2767
|
event.preventDefault();
|
2768
2768
|
}
|
2769
|
-
} }))),
|
2769
|
+
}, formatter: function (value) { return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ','); } }))),
|
2770
2770
|
React.createElement(antd.Col, { lg: 1, md: 1, className: "seperator" }, '/'),
|
2771
2771
|
React.createElement(antd.Col, { lg: 6, md: 12 },
|
2772
2772
|
React.createElement(antd.Form.Item, { className: "popup-credit-input" },
|
@@ -2954,7 +2954,7 @@ var ProgrammeTransferForm = function (props) {
|
|
2954
2954
|
if (!/[0-9\.]/.test(event.key)) {
|
2955
2955
|
event.preventDefault();
|
2956
2956
|
}
|
2957
|
-
} }))),
|
2957
|
+
}, formatter: function (value) { return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ','); } }))),
|
2958
2958
|
React.createElement(antd.Col, { lg: 1, md: 1, className: "seperator" }, '/'),
|
2959
2959
|
React.createElement(antd.Col, { lg: 6, md: 12 },
|
2960
2960
|
React.createElement(antd.Form.Item, { className: "popup-credit-input" },
|
@@ -3183,7 +3183,7 @@ var ProgrammeRetireForm = function (props) {
|
|
3183
3183
|
if (!/[0-9\.]/.test(event.key)) {
|
3184
3184
|
event.preventDefault();
|
3185
3185
|
}
|
3186
|
-
} }))),
|
3186
|
+
}, formatter: function (value) { return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ','); } }))),
|
3187
3187
|
React.createElement(antd.Col, { lg: 1, md: 1, className: "seperator" }, '/'),
|
3188
3188
|
React.createElement(antd.Col, { lg: 6, md: 12 },
|
3189
3189
|
React.createElement(antd.Form.Item, { className: "popup-credit-input" },
|
@@ -4827,21 +4827,24 @@ var AddNewUserComponent = function (props) {
|
|
4827
4827
|
}); };
|
4828
4828
|
var onUpdateUser = function () { return __awaiter(void 0, void 0, void 0, function () {
|
4829
4829
|
var formOneValues, values, response, error_3;
|
4830
|
-
var _a;
|
4831
|
-
return __generator(this, function (
|
4832
|
-
switch (
|
4830
|
+
var _a, _b, _c, _d;
|
4831
|
+
return __generator(this, function (_e) {
|
4832
|
+
switch (_e.label) {
|
4833
4833
|
case 0:
|
4834
4834
|
setLoading(true);
|
4835
4835
|
formOneValues = formOne.getFieldsValue();
|
4836
4836
|
formOneValues.phoneNo = PhoneInput.formatPhoneNumberIntl(formOneValues.phoneNo);
|
4837
|
-
|
4837
|
+
_e.label = 1;
|
4838
4838
|
case 1:
|
4839
|
-
|
4839
|
+
_e.trys.push([1, 3, , 4]);
|
4840
4840
|
values = {
|
4841
4841
|
id: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.id,
|
4842
4842
|
name: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.name,
|
4843
4843
|
phoneNo: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.phoneNo,
|
4844
4844
|
};
|
4845
|
+
if (((_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.companyRole) === exports.CompanyRole.MINISTRY) {
|
4846
|
+
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;
|
4847
|
+
}
|
4845
4848
|
if (ability.can(Action.Update, classTransformer.plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "role"))
|
4846
4849
|
values.role = formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.role;
|
4847
4850
|
if (ability.can(Action.Update, classTransformer.plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "email"))
|
@@ -4849,7 +4852,7 @@ var AddNewUserComponent = function (props) {
|
|
4849
4852
|
console.log("form one values -- > ", values, state.record);
|
4850
4853
|
return [4 /*yield*/, put("national/user/update", values)];
|
4851
4854
|
case 2:
|
4852
|
-
response =
|
4855
|
+
response = _e.sent();
|
4853
4856
|
if (response.status === 200 || response.status === 201) {
|
4854
4857
|
antd.message.open({
|
4855
4858
|
type: "success",
|
@@ -4863,7 +4866,7 @@ var AddNewUserComponent = function (props) {
|
|
4863
4866
|
}
|
4864
4867
|
return [3 /*break*/, 4];
|
4865
4868
|
case 3:
|
4866
|
-
error_3 =
|
4869
|
+
error_3 = _e.sent();
|
4867
4870
|
console.log("Error in user update", error_3);
|
4868
4871
|
antd.message.open({
|
4869
4872
|
type: "error",
|