@undp/carbon-library 1.0.103 → 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 +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/esm/index.js
CHANGED
@@ -4712,6 +4712,7 @@ var AddNewCompanyComponent = function (props) {
|
|
4712
4712
|
if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== CompanyRole.GOVERNMENT &&
|
4713
4713
|
((_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.companyRole) !== CompanyRole.MINISTRY) {
|
4714
4714
|
values.taxId = formOneValues.taxId;
|
4715
|
+
values.paymentId = formOneValues.paymentId;
|
4715
4716
|
}
|
4716
4717
|
if (((_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.companyRole) === CompanyRole.MINISTRY) {
|
4717
4718
|
values.sectoralScope = formOneValues.sectoralScope;
|
@@ -4828,26 +4829,30 @@ var AddNewCompanyComponent = function (props) {
|
|
4828
4829
|
] },
|
4829
4830
|
React.createElement(Input, { size: "large" })))
|
4830
4831
|
: null,
|
4831
|
-
|
4832
|
-
|
4833
|
-
|
4834
|
-
|
4835
|
-
|
4836
|
-
|
4837
|
-
|
4838
|
-
|
4839
|
-
|
4840
|
-
|
4841
|
-
|
4842
|
-
value ===
|
4843
|
-
|
4844
|
-
|
4845
|
-
|
4846
|
-
|
4847
|
-
|
4848
|
-
|
4849
|
-
|
4850
|
-
|
4832
|
+
companyRole !== CompanyRole.MINISTRY
|
4833
|
+
? (!isUpdate ||
|
4834
|
+
(isUpdate &&
|
4835
|
+
companyRole !== CompanyRole.GOVERNMENT)) && (React.createElement(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: [
|
4836
|
+
{
|
4837
|
+
required: true,
|
4838
|
+
message: "",
|
4839
|
+
},
|
4840
|
+
{
|
4841
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
4842
|
+
return __generator(this, function (_a) {
|
4843
|
+
if (String(value).trim() === "" ||
|
4844
|
+
String(value).trim() === undefined ||
|
4845
|
+
value === null ||
|
4846
|
+
value === undefined) {
|
4847
|
+
throw new Error("Registration Payment ID ".concat(t("isRequired")));
|
4848
|
+
}
|
4849
|
+
return [2 /*return*/];
|
4850
|
+
});
|
4851
|
+
}); },
|
4852
|
+
},
|
4853
|
+
] },
|
4854
|
+
React.createElement(Input, { size: "large" })))
|
4855
|
+
: null,
|
4851
4856
|
React.createElement(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: [
|
4852
4857
|
{
|
4853
4858
|
required: true,
|
@@ -13086,6 +13091,11 @@ var UserProfileComponent = function (props) {
|
|
13086
13091
|
React.createElement(Col, { span: 12, className: "field-value" }, organisationDetails.taxId
|
13087
13092
|
? organisationDetails.taxId
|
13088
13093
|
: "-")),
|
13094
|
+
React.createElement(Row, { className: "field" },
|
13095
|
+
React.createElement(Col, { span: 12, className: "field-key" }, t("userProfile:paymentId")),
|
13096
|
+
React.createElement(Col, { span: 12, className: "field-value" }, organisationDetails.paymentId
|
13097
|
+
? organisationDetails.paymentId
|
13098
|
+
: "-")),
|
13089
13099
|
React.createElement(Row, { className: "field" },
|
13090
13100
|
React.createElement(Col, { span: 12, className: "field-key" }, t("userProfile:companyRole")),
|
13091
13101
|
React.createElement(Col, { span: 12, className: "field-value" },
|
@@ -23608,14 +23618,14 @@ var ProgrammeRevokeForm = function (props) {
|
|
23608
23618
|
};
|
23609
23619
|
|
23610
23620
|
var ProgrammeTransferForm = function (props) {
|
23611
|
-
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;
|
23621
|
+
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;
|
23612
23622
|
var t = translator.t;
|
23613
|
-
var
|
23614
|
-
var
|
23615
|
-
var
|
23616
|
-
var
|
23617
|
-
var
|
23618
|
-
var
|
23623
|
+
var _b = useState(undefined), popupError = _b[0], setPopupError = _b[1];
|
23624
|
+
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
23625
|
+
var _d = useState(0), currentSum = _d[0], setCurrentSum = _d[1];
|
23626
|
+
var _e = useState(toCompanyDefault ? [toCompanyDefault] : []), companyList = _e[0], setCompanyList = _e[1];
|
23627
|
+
var _f = useState(), value = _f[0], setValue = _f[1];
|
23628
|
+
var _g = useConnection(); _g.get; _g.delete; var post = _g.post;
|
23619
23629
|
var handleSearch = function (newValue) { return __awaiter(void 0, void 0, void 0, function () {
|
23620
23630
|
var resp;
|
23621
23631
|
return __generator(this, function (_a) {
|
@@ -23676,8 +23686,8 @@ var ProgrammeTransferForm = function (props) {
|
|
23676
23686
|
programme.creditOwnerPercentage = [100];
|
23677
23687
|
}
|
23678
23688
|
var companies = {};
|
23679
|
-
for (var _i = 0,
|
23680
|
-
var c =
|
23689
|
+
for (var _i = 0, _h = programme.company; _i < _h.length; _i++) {
|
23690
|
+
var c = _h[_i];
|
23681
23691
|
companies[c.companyId] = c;
|
23682
23692
|
}
|
23683
23693
|
var validCompanies = [];
|
@@ -23687,7 +23697,8 @@ var ProgrammeTransferForm = function (props) {
|
|
23687
23697
|
userCompanyId !== Number(programme.companyId[index])) ||
|
23688
23698
|
(!toCompanyDefault &&
|
23689
23699
|
(userCompanyId === Number(programme.companyId[index]) ||
|
23690
|
-
companyRole === CompanyRole.GOVERNMENT
|
23700
|
+
companyRole === CompanyRole.GOVERNMENT ||
|
23701
|
+
ministryLevelPermission))) &&
|
23691
23702
|
parseInt(companies[Number(programme.companyId[index])].state) ===
|
23692
23703
|
CompanyState.ACTIVE.valueOf()) {
|
23693
23704
|
var companyAvailableTotal = ((programme.creditBalance -
|