@undp/carbon-library 1.0.103 → 1.0.106
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +41 -30
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
- package/dist/esm/index.js +41 -30
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
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
|
-
|
4852
|
-
|
4853
|
-
|
4854
|
-
|
4855
|
-
|
4856
|
-
|
4857
|
-
|
4858
|
-
|
4859
|
-
|
4860
|
-
|
4861
|
-
|
4862
|
-
value ===
|
4863
|
-
|
4864
|
-
|
4865
|
-
|
4866
|
-
|
4867
|
-
|
4868
|
-
|
4869
|
-
|
4870
|
-
|
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" },
|
@@ -23628,14 +23638,14 @@ var ProgrammeRevokeForm = function (props) {
|
|
23628
23638
|
};
|
23629
23639
|
|
23630
23640
|
var ProgrammeTransferForm = function (props) {
|
23631
|
-
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var toCompanyDefault = props.toCompanyDefault, disableToCompany = props.disableToCompany, receiverLabelText = props.receiverLabelText, userCompanyId = props.userCompanyId, companyRole = props.companyRole, translator = props.translator, useConnection = props.useConnection;
|
23641
|
+
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var toCompanyDefault = props.toCompanyDefault, disableToCompany = props.disableToCompany, receiverLabelText = props.receiverLabelText, userCompanyId = props.userCompanyId, companyRole = props.companyRole, translator = props.translator, useConnection = props.useConnection, _a = props.ministryLevelPermission, ministryLevelPermission = _a === void 0 ? false : _a;
|
23632
23642
|
var t = translator.t;
|
23633
|
-
var
|
23634
|
-
var
|
23635
|
-
var
|
23636
|
-
var
|
23637
|
-
var
|
23638
|
-
var
|
23643
|
+
var _b = React.useState(undefined), popupError = _b[0], setPopupError = _b[1];
|
23644
|
+
var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
|
23645
|
+
var _d = React.useState(0), currentSum = _d[0], setCurrentSum = _d[1];
|
23646
|
+
var _e = React.useState(toCompanyDefault ? [toCompanyDefault] : []), companyList = _e[0], setCompanyList = _e[1];
|
23647
|
+
var _f = React.useState(), value = _f[0], setValue = _f[1];
|
23648
|
+
var _g = useConnection(); _g.get; _g.delete; var post = _g.post;
|
23639
23649
|
var handleSearch = function (newValue) { return __awaiter(void 0, void 0, void 0, function () {
|
23640
23650
|
var resp;
|
23641
23651
|
return __generator(this, function (_a) {
|
@@ -23696,8 +23706,8 @@ var ProgrammeTransferForm = function (props) {
|
|
23696
23706
|
programme.creditOwnerPercentage = [100];
|
23697
23707
|
}
|
23698
23708
|
var companies = {};
|
23699
|
-
for (var _i = 0,
|
23700
|
-
var c =
|
23709
|
+
for (var _i = 0, _h = programme.company; _i < _h.length; _i++) {
|
23710
|
+
var c = _h[_i];
|
23701
23711
|
companies[c.companyId] = c;
|
23702
23712
|
}
|
23703
23713
|
var validCompanies = [];
|
@@ -23707,7 +23717,8 @@ var ProgrammeTransferForm = function (props) {
|
|
23707
23717
|
userCompanyId !== Number(programme.companyId[index])) ||
|
23708
23718
|
(!toCompanyDefault &&
|
23709
23719
|
(userCompanyId === Number(programme.companyId[index]) ||
|
23710
|
-
companyRole === exports.CompanyRole.GOVERNMENT
|
23720
|
+
companyRole === exports.CompanyRole.GOVERNMENT ||
|
23721
|
+
ministryLevelPermission))) &&
|
23711
23722
|
parseInt(companies[Number(programme.companyId[index])].state) ===
|
23712
23723
|
exports.CompanyState.ACTIVE.valueOf()) {
|
23713
23724
|
var companyAvailableTotal = ((programme.creditBalance -
|