@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/esm/index.js CHANGED
@@ -1753,7 +1753,7 @@ var CompanyProfileComponent = function (props) {
1753
1753
  React.createElement(Row, { className: "field" },
1754
1754
  React.createElement(Col, { span: 12, className: "field-key" }, t("companyProfile:creditBalance")),
1755
1755
  React.createElement(Col, { span: 12, className: "field-value" }, companyDetails.creditBalance
1756
- ? companyDetails.creditBalance
1756
+ ? addCommSep(companyDetails.creditBalance)
1757
1757
  : "-")),
1758
1758
  parseInt(companyDetails.state) === 0 ? (React.createElement(Row, { className: "field" },
1759
1759
  React.createElement(Col, { span: 12, className: "field-key" }, t("companyProfile:remarks")),
@@ -4889,24 +4889,21 @@ var AddNewUserComponent = function (props) {
4889
4889
  }); };
4890
4890
  var onUpdateUser = function () { return __awaiter(void 0, void 0, void 0, function () {
4891
4891
  var formOneValues, values, response, error_3;
4892
- var _a, _b, _c, _d;
4893
- return __generator(this, function (_e) {
4894
- switch (_e.label) {
4892
+ var _a;
4893
+ return __generator(this, function (_b) {
4894
+ switch (_b.label) {
4895
4895
  case 0:
4896
4896
  setLoading(true);
4897
4897
  formOneValues = formOne.getFieldsValue();
4898
4898
  formOneValues.phoneNo = formatPhoneNumberIntl(formOneValues.phoneNo);
4899
- _e.label = 1;
4899
+ _b.label = 1;
4900
4900
  case 1:
4901
- _e.trys.push([1, 3, , 4]);
4901
+ _b.trys.push([1, 3, , 4]);
4902
4902
  values = {
4903
4903
  id: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.id,
4904
4904
  name: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.name,
4905
4905
  phoneNo: formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.phoneNo,
4906
4906
  };
4907
- if (((_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.companyRole) === CompanyRole$1.MINISTRY) {
4908
- 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;
4909
- }
4910
4907
  if (ability.can(Action.Update, plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "role"))
4911
4908
  values.role = formOneValues === null || formOneValues === void 0 ? void 0 : formOneValues.role;
4912
4909
  if (ability.can(Action.Update, plainToClass(User, state === null || state === void 0 ? void 0 : state.record), "email"))
@@ -4914,7 +4911,7 @@ var AddNewUserComponent = function (props) {
4914
4911
  console.log("form one values -- > ", values, state.record);
4915
4912
  return [4 /*yield*/, put("national/user/update", values)];
4916
4913
  case 2:
4917
- response = _e.sent();
4914
+ response = _b.sent();
4918
4915
  if (response.status === 200 || response.status === 201) {
4919
4916
  message.open({
4920
4917
  type: "success",
@@ -4928,7 +4925,7 @@ var AddNewUserComponent = function (props) {
4928
4925
  }
4929
4926
  return [3 /*break*/, 4];
4930
4927
  case 3:
4931
- error_3 = _e.sent();
4928
+ error_3 = _b.sent();
4932
4929
  console.log("Error in user update", error_3);
4933
4930
  message.open({
4934
4931
  type: "error",
@@ -5361,7 +5358,7 @@ var UserProfileComponent = function (props) {
5361
5358
  React.createElement(Row, { className: "field" },
5362
5359
  React.createElement(Col, { span: 12, className: "field-key" }, t("userProfile:creditBalance")),
5363
5360
  React.createElement(Col, { span: 12, className: "field-value" }, organisationDetails.creditBalance
5364
- ? organisationDetails.creditBalance
5361
+ ? addCommSep(organisationDetails.creditBalance)
5365
5362
  : "-")))))))))));
5366
5363
  };
5367
5364