@undp/carbon-library 1.0.104 → 1.0.106

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 CHANGED
@@ -4732,6 +4732,7 @@ var AddNewCompanyComponent = function (props) {
4732
4732
  if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== exports.CompanyRole.GOVERNMENT &&
4733
4733
  ((_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.companyRole) !== exports.CompanyRole.MINISTRY) {
4734
4734
  values.taxId = formOneValues.taxId;
4735
+ values.paymentId = formOneValues.paymentId;
4735
4736
  }
4736
4737
  if (((_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.companyRole) === exports.CompanyRole.MINISTRY) {
4737
4738
  values.sectoralScope = formOneValues.sectoralScope;
@@ -4848,26 +4849,30 @@ var AddNewCompanyComponent = function (props) {
4848
4849
  ] },
4849
4850
  React.createElement(antd.Input, { size: "large" })))
4850
4851
  : null,
4851
- React.createElement(antd.Form.Item, { label: "Registration Payment ID", initialValue: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.paymentId, name: "paymentId", rules: [
4852
- {
4853
- required: true,
4854
- message: "",
4855
- },
4856
- {
4857
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
4858
- return __generator(this, function (_a) {
4859
- if (String(value).trim() === "" ||
4860
- String(value).trim() === undefined ||
4861
- value === null ||
4862
- value === undefined) {
4863
- throw new Error("Registration Payment ID ".concat(t("isRequired")));
4864
- }
4865
- return [2 /*return*/];
4866
- });
4867
- }); },
4868
- },
4869
- ] },
4870
- React.createElement(antd.Input, { size: "large" })),
4852
+ companyRole !== exports.CompanyRole.MINISTRY
4853
+ ? (!isUpdate ||
4854
+ (isUpdate &&
4855
+ companyRole !== exports.CompanyRole.GOVERNMENT)) && (React.createElement(antd.Form.Item, { label: "Registration Payment ID", initialValue: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.paymentId, name: "paymentId", rules: [
4856
+ {
4857
+ required: true,
4858
+ message: "",
4859
+ },
4860
+ {
4861
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
4862
+ return __generator(this, function (_a) {
4863
+ if (String(value).trim() === "" ||
4864
+ String(value).trim() === undefined ||
4865
+ value === null ||
4866
+ value === undefined) {
4867
+ throw new Error("Registration Payment ID ".concat(t("isRequired")));
4868
+ }
4869
+ return [2 /*return*/];
4870
+ });
4871
+ }); },
4872
+ },
4873
+ ] },
4874
+ React.createElement(antd.Input, { size: "large" })))
4875
+ : null,
4871
4876
  React.createElement(antd.Form.Item, { label: "Email", name: "email", initialValue: (_d = state === null || state === void 0 ? void 0 : state.record) === null || _d === void 0 ? void 0 : _d.email, rules: [
4872
4877
  {
4873
4878
  required: true,
@@ -13106,6 +13111,11 @@ var UserProfileComponent = function (props) {
13106
13111
  React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.taxId
13107
13112
  ? organisationDetails.taxId
13108
13113
  : "-")),
13114
+ React.createElement(antd.Row, { className: "field" },
13115
+ React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:paymentId")),
13116
+ React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.paymentId
13117
+ ? organisationDetails.paymentId
13118
+ : "-")),
13109
13119
  React.createElement(antd.Row, { className: "field" },
13110
13120
  React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:companyRole")),
13111
13121
  React.createElement(antd.Col, { span: 12, className: "field-value" },