@undp/carbon-library 1.0.53 → 1.0.55

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -1773,7 +1773,7 @@ var CompanyProfileComponent = function (props) {
1773
1773
  React.createElement(antd.Row, { className: "field" },
1774
1774
  React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:creditBalance")),
1775
1775
  React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.creditBalance
1776
- ? companyDetails.creditBalance
1776
+ ? addCommSep(companyDetails.creditBalance)
1777
1777
  : "-")),
1778
1778
  parseInt(companyDetails.state) === 0 ? (React.createElement(antd.Row, { className: "field" },
1779
1779
  React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:remarks")),
@@ -4909,24 +4909,21 @@ var AddNewUserComponent = function (props) {
4909
4909
  }); };
4910
4910
  var onUpdateUser = function () { return __awaiter(void 0, void 0, void 0, function () {
4911
4911
  var formOneValues, values, response, error_3;
4912
- var _a, _b, _c, _d;
4913
- return __generator(this, function (_e) {
4914
- switch (_e.label) {
4912
+ var _a;
4913
+ return __generator(this, function (_b) {
4914
+ switch (_b.label) {
4915
4915
  case 0:
4916
4916
  setLoading(true);
4917
4917
  formOneValues = formOne.getFieldsValue();
4918
4918
  formOneValues.phoneNo = PhoneInput.formatPhoneNumberIntl(formOneValues.phoneNo);
4919
- _e.label = 1;
4919
+ _b.label = 1;
4920
4920
  case 1:
4921
- _e.trys.push([1, 3, , 4]);
4921
+ _b.trys.push([1, 3, , 4]);
4922
4922
  values = {
4923
4923
  id: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.id,
4924
4924
  name: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.name,
4925
4925
  phoneNo: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.phoneNo,
4926
4926
  };
4927
- if (((_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.companyRole) === exports.CompanyRole.MINISTRY) {
4928
- 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;
4929
- }
4930
4927
  if (ability.can(Action.Update, classTransformer.plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "role"))
4931
4928
  values.role = formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.role;
4932
4929
  if (ability.can(Action.Update, classTransformer.plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "email"))
@@ -4934,7 +4931,7 @@ var AddNewUserComponent = function (props) {
4934
4931
  console.log("form one values -- > ", values, state.record);
4935
4932
  return [4 /*yield*/, put("national/user/update", values)];
4936
4933
  case 2:
4937
- response = _e.sent();
4934
+ response = _b.sent();
4938
4935
  if (response.status === 200 || response.status === 201) {
4939
4936
  antd.message.open({
4940
4937
  type: "success",
@@ -4948,7 +4945,7 @@ var AddNewUserComponent = function (props) {
4948
4945
  }
4949
4946
  return [3 /*break*/, 4];
4950
4947
  case 3:
4951
- error_3 = _e.sent();
4948
+ error_3 = _b.sent();
4952
4949
  console.log("Error in user update", error_3);
4953
4950
  antd.message.open({
4954
4951
  type: "error",
@@ -5381,7 +5378,7 @@ var UserProfileComponent = function (props) {
5381
5378
  React.createElement(antd.Row, { className: "field" },
5382
5379
  React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:creditBalance")),
5383
5380
  React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.creditBalance
5384
- ? organisationDetails.creditBalance
5381
+ ? addCommSep(organisationDetails.creditBalance)
5385
5382
  : "-")))))))))));
5386
5383
  };
5387
5384