@undp/carbon-library 1.0.56 → 1.0.57

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -965,16 +965,16 @@ var AddNewCompanyComponent = function (props) {
965
965
  }); };
966
966
  var onUpdateCompany = function () { return __awaiter(void 0, void 0, void 0, function () {
967
967
  var formOneValues, values, logoBase64, logoUrls, response, error_3;
968
- var _a, _b, _c, _d, _e, _f;
969
- return __generator(this, function (_g) {
970
- switch (_g.label) {
968
+ var _a, _b, _c, _d, _e, _f, _g, _h;
969
+ return __generator(this, function (_j) {
970
+ switch (_j.label) {
971
971
  case 0:
972
972
  setLoading(true);
973
973
  formOneValues = formOne.getFieldsValue();
974
974
  formOneValues.phoneNo = formatPhoneNumberIntl(formOneValues.phoneNo);
975
- _g.label = 1;
975
+ _j.label = 1;
976
976
  case 1:
977
- _g.trys.push([1, 5, , 6]);
977
+ _j.trys.push([1, 5, , 6]);
978
978
  values = {};
979
979
  if (regionField) {
980
980
  values = {
@@ -997,9 +997,14 @@ var AddNewCompanyComponent = function (props) {
997
997
  companyRole: (_d = state === null || state === void 0 ? void 0 : state.record) === null || _d === void 0 ? void 0 : _d.companyRole,
998
998
  };
999
999
  }
1000
- if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== CompanyRole$1.GOVERNMENT) {
1000
+ if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== CompanyRole$1.GOVERNMENT &&
1001
+ ((_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.companyRole) !== CompanyRole$1.MINISTRY) {
1001
1002
  values.taxId = formOneValues.taxId;
1002
1003
  }
1004
+ if (((_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.companyRole) === CompanyRole$1.MINISTRY) {
1005
+ values.sectoralScope = formOneValues.sectoralScope;
1006
+ values.nameOfMinister = formOneValues.nameOfMinister;
1007
+ }
1003
1008
  if (formOneValues.website) {
1004
1009
  values.website = 'https://' + formOneValues.website;
1005
1010
  }
@@ -1008,15 +1013,15 @@ var AddNewCompanyComponent = function (props) {
1008
1013
  }
1009
1014
  if (!formOneValues.logo) return [3 /*break*/, 3];
1010
1015
  if (!(formOneValues.logo.length !== 0)) return [3 /*break*/, 3];
1011
- return [4 /*yield*/, getBase64((_f = formOneValues.logo[0]) === null || _f === void 0 ? void 0 : _f.originFileObj)];
1016
+ return [4 /*yield*/, getBase64((_h = formOneValues.logo[0]) === null || _h === void 0 ? void 0 : _h.originFileObj)];
1012
1017
  case 2:
1013
- logoBase64 = _g.sent();
1018
+ logoBase64 = _j.sent();
1014
1019
  logoUrls = logoBase64.split(',');
1015
1020
  values.logo = logoUrls[1];
1016
- _g.label = 3;
1021
+ _j.label = 3;
1017
1022
  case 3: return [4 /*yield*/, put('national/organisation/update', values)];
1018
1023
  case 4:
1019
- response = _g.sent();
1024
+ response = _j.sent();
1020
1025
  if (response.status === 200 || response.status === 201) {
1021
1026
  setUserInfo({
1022
1027
  companyLogo: response.data.logo,
@@ -1032,7 +1037,7 @@ var AddNewCompanyComponent = function (props) {
1032
1037
  setLoading(false);
1033
1038
  return [3 /*break*/, 6];
1034
1039
  case 5:
1035
- error_3 = _g.sent();
1040
+ error_3 = _j.sent();
1036
1041
  message.open({
1037
1042
  type: 'error',
1038
1043
  content: "".concat(t('errorInUpdatingCompany'), " ").concat(error_3.message),
@@ -2682,11 +2687,11 @@ var ProgrammeManagementComponent = function (props) {
2682
2687
  React.createElement(Button, { type: "primary", size: "large", block: true, icon: React.createElement(PlusOutlined, null), onClick: onClickAddProgramme }, t("programme:addProgramme")))))),
2683
2688
  React.createElement("div", { className: "content-card" },
2684
2689
  React.createElement(Row, { className: "table-actions-section" },
2685
- React.createElement(Col, { lg: { span: 16 }, md: { span: 16 } },
2690
+ React.createElement(Col, { lg: { span: 15 }, md: { span: 14 } },
2686
2691
  React.createElement("div", { className: "action-bar" },
2687
2692
  React.createElement(Checkbox, { className: "all-check", disabled: loading, indeterminate: indeterminate, onChange: onCheckAllChange, checked: checkAll, defaultChecked: true }, t("programme:all")),
2688
2693
  React.createElement(Checkbox.Group, { disabled: loading, options: statusOptions, defaultValue: statusOptions.map(function (e) { return e.value; }), value: selectedStatus, onChange: onStatusQuery }))),
2689
- React.createElement(Col, { lg: { span: 8 }, md: { span: 8 } },
2694
+ React.createElement(Col, { lg: { span: 9 }, md: { span: 10 } },
2690
2695
  React.createElement("div", { className: "filter-section" },
2691
2696
  React.createElement("div", { className: "search-filter" },
2692
2697
  React.createElement(Checkbox, { className: "label", onChange: function (v) {