@undp/carbon-library 1.0.285-CARBON-412.3 → 1.0.285-CARBON-411.1
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 +73 -299
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Definitions/Enums/instrument.enum.d.ts +0 -3
- package/dist/esm/index.js +73 -299
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Definitions/Enums/instrument.enum.d.ts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/locales/i18n/programme/en.json +1 -9
- package/package.json +1 -1
- package/dist/cjs/types/Definitions/Enums/payback.enum.d.ts +0 -8
- package/dist/esm/types/Definitions/Enums/payback.enum.d.ts +0 -8
package/dist/cjs/index.js
CHANGED
@@ -2043,9 +2043,6 @@ exports.Instrument = void 0;
|
|
2043
2043
|
Instrument["EQUITY"] = "Equity";
|
2044
2044
|
Instrument["GUARANTEE"] = "Guarantee";
|
2045
2045
|
Instrument["INKIND"] = "In-Kind";
|
2046
|
-
Instrument["CONLOAN"] = "ConcessionalLoan";
|
2047
|
-
Instrument["NONCONLOAN"] = "Non-ConcessionalLoan";
|
2048
|
-
Instrument["INSURANCE"] = "Insurance";
|
2049
2046
|
Instrument["OTHER"] = "Other";
|
2050
2047
|
})(exports.Instrument || (exports.Instrument = {}));
|
2051
2048
|
|
@@ -5864,7 +5861,7 @@ var AddNewCompanyComponent = function (props) {
|
|
5864
5861
|
});
|
5865
5862
|
}); };
|
5866
5863
|
var getRegionList = function () { return __awaiter(void 0, void 0, void 0, function () {
|
5867
|
-
var response, regionNames, error_1;
|
5864
|
+
var response, regionNames, uniqueRegionNames, error_1;
|
5868
5865
|
return __generator(this, function (_a) {
|
5869
5866
|
switch (_a.label) {
|
5870
5867
|
case 0:
|
@@ -5887,7 +5884,8 @@ var AddNewCompanyComponent = function (props) {
|
|
5887
5884
|
response = _a.sent();
|
5888
5885
|
if (response.data) {
|
5889
5886
|
regionNames = response.data.map(function (item) { return item.regionName; });
|
5890
|
-
|
5887
|
+
uniqueRegionNames = Array.from(new Set(regionNames));
|
5888
|
+
setRegionsList(__spreadArray([t("national")], uniqueRegionNames, true));
|
5891
5889
|
}
|
5892
5890
|
return [3 /*break*/, 5];
|
5893
5891
|
case 3:
|
@@ -13321,7 +13319,7 @@ var ProgrammeCreationComponent = function (props) {
|
|
13321
13319
|
});
|
13322
13320
|
}); };
|
13323
13321
|
var getRegionList = function () { return __awaiter(void 0, void 0, void 0, function () {
|
13324
|
-
var response, regionNames, error_2;
|
13322
|
+
var response, regionNames, uniqueRegionNames, error_2;
|
13325
13323
|
return __generator(this, function (_a) {
|
13326
13324
|
switch (_a.label) {
|
13327
13325
|
case 0:
|
@@ -13344,7 +13342,8 @@ var ProgrammeCreationComponent = function (props) {
|
|
13344
13342
|
response = _a.sent();
|
13345
13343
|
if (response.data) {
|
13346
13344
|
regionNames = response.data.map(function (item) { return item.regionName; });
|
13347
|
-
|
13345
|
+
uniqueRegionNames = Array.from(new Set(regionNames));
|
13346
|
+
setRegionsList(__spreadArray(["National"], uniqueRegionNames, true));
|
13348
13347
|
}
|
13349
13348
|
return [3 /*break*/, 5];
|
13350
13349
|
case 3:
|
@@ -15420,25 +15419,13 @@ var UserManagementComponent = function (props) {
|
|
15420
15419
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openDeleteConfirmationModal, errorMsg: errorMsg, loading: loading })));
|
15421
15420
|
};
|
15422
15421
|
|
15423
|
-
var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n
|
15422
|
+
var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n";
|
15424
15423
|
styleInject(css_248z$m);
|
15425
15424
|
|
15426
15425
|
var Loading = function () {
|
15427
15426
|
return React.createElement(antd.Spin, { className: "loading-center", size: "large" });
|
15428
15427
|
};
|
15429
15428
|
|
15430
|
-
var GuaranteePayback;
|
15431
|
-
(function (GuaranteePayback) {
|
15432
|
-
GuaranteePayback["UPFORNT"] = "Upfront";
|
15433
|
-
GuaranteePayback["ANNUAL"] = "Annual";
|
15434
|
-
})(GuaranteePayback || (GuaranteePayback = {}));
|
15435
|
-
var InsurancePayback;
|
15436
|
-
(function (InsurancePayback) {
|
15437
|
-
InsurancePayback["LUMPSUM"] = "LumpSum";
|
15438
|
-
InsurancePayback["ANNUAL"] = "Annual";
|
15439
|
-
})(InsurancePayback || (InsurancePayback = {}));
|
15440
|
-
|
15441
|
-
var RangePicker$3 = antd.DatePicker.RangePicker;
|
15442
15429
|
var InvestmentCreationComponent = function (props) {
|
15443
15430
|
var t = props.t, useConnection = props.useConnection, userInfoState = props.userInfoState, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
15444
15431
|
var state = useLocation().state;
|
@@ -15459,9 +15446,8 @@ var InvestmentCreationComponent = function (props) {
|
|
15459
15446
|
label: addSpaces(Object.values(exports.Instrument)[index]),
|
15460
15447
|
value: Object.values(exports.Instrument)[index],
|
15461
15448
|
}); });
|
15462
|
-
var onInstrumentChange = function (
|
15463
|
-
|
15464
|
-
setInstrument([e.target.value]);
|
15449
|
+
var onInstrumentChange = function (value) {
|
15450
|
+
setInstrument(value);
|
15465
15451
|
};
|
15466
15452
|
var onPercentageChange = function (value) {
|
15467
15453
|
setCurrentPercTotal(formTwo.getFieldValue("percentage").reduce(function (a, b) { return a + b; }, 0));
|
@@ -15584,7 +15570,7 @@ var InvestmentCreationComponent = function (props) {
|
|
15584
15570
|
if (!data) {
|
15585
15571
|
return React.createElement(Loading, null);
|
15586
15572
|
}
|
15587
|
-
console.log(
|
15573
|
+
console.log('data', data);
|
15588
15574
|
var companyName = {};
|
15589
15575
|
if (data && Object.keys(data)[0] !== "ownership") {
|
15590
15576
|
for (var _i = 0, _l = data === null || data === void 0 ? void 0 : data.company; _i < _l.length; _i++) {
|
@@ -15619,16 +15605,6 @@ var InvestmentCreationComponent = function (props) {
|
|
15619
15605
|
if (payload.paymentPerMetric) {
|
15620
15606
|
payload.paymentPerMetric = parseFloat(payload.paymentPerMetric);
|
15621
15607
|
}
|
15622
|
-
if (payload.period) {
|
15623
|
-
payload.period[0] = moment(payload.period[0]).startOf("day").unix();
|
15624
|
-
payload.period[1] = moment(payload.period[1]).endOf("day").unix();
|
15625
|
-
}
|
15626
|
-
if (payload.startOfPayback) {
|
15627
|
-
payload.startOfPayback = moment(payload.startOfPayback)
|
15628
|
-
.startOf("day")
|
15629
|
-
.unix();
|
15630
|
-
}
|
15631
|
-
payload.instrument = [payload.instrument];
|
15632
15608
|
payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
|
15633
15609
|
payload.percentage = val.percentage;
|
15634
15610
|
payload.toCompanyId = Number(payload.toCompanyId);
|
@@ -15674,7 +15650,7 @@ var InvestmentCreationComponent = function (props) {
|
|
15674
15650
|
}
|
15675
15651
|
};
|
15676
15652
|
var onChangeTypeCreation = function (e) {
|
15677
|
-
console.log(
|
15653
|
+
console.log('radio checked', e.target.value);
|
15678
15654
|
setTypeCreation(e.target.value);
|
15679
15655
|
};
|
15680
15656
|
return (React.createElement("div", { className: "add-programme-main-container" },
|
@@ -15740,30 +15716,8 @@ var InvestmentCreationComponent = function (props) {
|
|
15740
15716
|
React.createElement(antd.Input, { size: "large" }))))),
|
15741
15717
|
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15742
15718
|
React.createElement(antd.Col, { xl: 24, md: 24 },
|
15743
|
-
React.createElement(antd.Form.Item, { label: t("programme:instrument"), name: "instrument",
|
15744
|
-
|
15745
|
-
required: true, className: "investment-radio-button", rules: [
|
15746
|
-
{
|
15747
|
-
required: true,
|
15748
|
-
message: "",
|
15749
|
-
},
|
15750
|
-
{
|
15751
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15752
|
-
return __generator(this, function (_a) {
|
15753
|
-
if (String(value).trim() === "" ||
|
15754
|
-
String(value).trim() === undefined ||
|
15755
|
-
value === null ||
|
15756
|
-
value === undefined) {
|
15757
|
-
throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
|
15758
|
-
}
|
15759
|
-
return [2 /*return*/];
|
15760
|
-
});
|
15761
|
-
}); },
|
15762
|
-
},
|
15763
|
-
] },
|
15764
|
-
React.createElement(antd.Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
|
15765
|
-
return (React.createElement(antd.Radio, { value: e.value }, e.label));
|
15766
|
-
}))))),
|
15719
|
+
React.createElement(antd.Form.Item, { label: t("programme:instrument"), name: "instrument", wrapperCol: { span: 24 }, className: "" },
|
15720
|
+
React.createElement(antd.Checkbox.Group, { options: instrumentOptions, defaultValue: instrumentOptions.map(function (e) { return e.value; }), onChange: onInstrumentChange })))),
|
15767
15721
|
instrument &&
|
15768
15722
|
instrument.indexOf(exports.Instrument.LOAN) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15769
15723
|
React.createElement(antd.Col, { xl: 8, md: 12 },
|
@@ -15794,160 +15748,6 @@ var InvestmentCreationComponent = function (props) {
|
|
15794
15748
|
},
|
15795
15749
|
] },
|
15796
15750
|
React.createElement(antd.Input, { size: "large" })))))),
|
15797
|
-
instrument &&
|
15798
|
-
(instrument.indexOf(exports.Instrument.CONLOAN) >= 0 ||
|
15799
|
-
instrument.indexOf(exports.Instrument.NONCONLOAN) >= 0) && (React.createElement("div", { className: "details-part-two" },
|
15800
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15801
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15802
|
-
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
15803
|
-
{
|
15804
|
-
required: true,
|
15805
|
-
message: "",
|
15806
|
-
},
|
15807
|
-
{
|
15808
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15809
|
-
return __generator(this, function (_a) {
|
15810
|
-
if (String(value).trim() === "" ||
|
15811
|
-
String(value).trim() ===
|
15812
|
-
undefined ||
|
15813
|
-
value === null ||
|
15814
|
-
value === undefined) {
|
15815
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
15816
|
-
}
|
15817
|
-
else if (!isNaN(value)) {
|
15818
|
-
return [2 /*return*/, Promise.resolve()];
|
15819
|
-
}
|
15820
|
-
else {
|
15821
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
15822
|
-
}
|
15823
|
-
});
|
15824
|
-
}); },
|
15825
|
-
},
|
15826
|
-
] },
|
15827
|
-
React.createElement(antd.Input, { size: "large" })))),
|
15828
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15829
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15830
|
-
React.createElement(antd.Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
|
15831
|
-
{
|
15832
|
-
required: true,
|
15833
|
-
message: "",
|
15834
|
-
},
|
15835
|
-
{
|
15836
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15837
|
-
return __generator(this, function (_a) {
|
15838
|
-
if (String(value).trim() === "" ||
|
15839
|
-
String(value).trim() ===
|
15840
|
-
undefined ||
|
15841
|
-
value === null ||
|
15842
|
-
value === undefined) {
|
15843
|
-
throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
|
15844
|
-
}
|
15845
|
-
return [2 /*return*/];
|
15846
|
-
});
|
15847
|
-
}); },
|
15848
|
-
},
|
15849
|
-
] },
|
15850
|
-
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
15851
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15852
|
-
React.createElement(antd.Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
|
15853
|
-
{
|
15854
|
-
required: true,
|
15855
|
-
message: "",
|
15856
|
-
},
|
15857
|
-
{
|
15858
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15859
|
-
return __generator(this, function (_a) {
|
15860
|
-
if (String(value).trim() === "" ||
|
15861
|
-
String(value).trim() ===
|
15862
|
-
undefined ||
|
15863
|
-
value === null ||
|
15864
|
-
value === undefined) {
|
15865
|
-
throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
|
15866
|
-
}
|
15867
|
-
return [2 /*return*/];
|
15868
|
-
});
|
15869
|
-
}); },
|
15870
|
-
},
|
15871
|
-
] },
|
15872
|
-
React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
|
15873
|
-
return currentDate < moment().startOf("day");
|
15874
|
-
} })))))),
|
15875
|
-
instrument &&
|
15876
|
-
instrument.indexOf(exports.Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
|
15877
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15878
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15879
|
-
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
15880
|
-
{
|
15881
|
-
required: true,
|
15882
|
-
message: "",
|
15883
|
-
},
|
15884
|
-
{
|
15885
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15886
|
-
return __generator(this, function (_a) {
|
15887
|
-
if (String(value).trim() === "" ||
|
15888
|
-
String(value).trim() ===
|
15889
|
-
undefined ||
|
15890
|
-
value === null ||
|
15891
|
-
value === undefined) {
|
15892
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
15893
|
-
}
|
15894
|
-
else if (!isNaN(value)) {
|
15895
|
-
return [2 /*return*/, Promise.resolve()];
|
15896
|
-
}
|
15897
|
-
else {
|
15898
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
15899
|
-
}
|
15900
|
-
});
|
15901
|
-
}); },
|
15902
|
-
},
|
15903
|
-
] },
|
15904
|
-
React.createElement(antd.Input, { size: "large" })))),
|
15905
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15906
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15907
|
-
React.createElement(antd.Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
|
15908
|
-
{
|
15909
|
-
required: true,
|
15910
|
-
message: "",
|
15911
|
-
},
|
15912
|
-
{
|
15913
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15914
|
-
return __generator(this, function (_a) {
|
15915
|
-
if (String(value).trim() === "" ||
|
15916
|
-
String(value).trim() ===
|
15917
|
-
undefined ||
|
15918
|
-
value === null ||
|
15919
|
-
value === undefined) {
|
15920
|
-
throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
|
15921
|
-
}
|
15922
|
-
return [2 /*return*/];
|
15923
|
-
});
|
15924
|
-
}); },
|
15925
|
-
},
|
15926
|
-
] },
|
15927
|
-
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
15928
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15929
|
-
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
|
15930
|
-
{
|
15931
|
-
required: true,
|
15932
|
-
message: "",
|
15933
|
-
},
|
15934
|
-
{
|
15935
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15936
|
-
return __generator(this, function (_a) {
|
15937
|
-
if (String(value).trim() === "" ||
|
15938
|
-
String(value).trim() ===
|
15939
|
-
undefined ||
|
15940
|
-
value === null ||
|
15941
|
-
value === undefined) {
|
15942
|
-
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
15943
|
-
}
|
15944
|
-
return [2 /*return*/];
|
15945
|
-
});
|
15946
|
-
}); },
|
15947
|
-
},
|
15948
|
-
] },
|
15949
|
-
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
15950
|
-
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
15951
15751
|
instrument &&
|
15952
15752
|
instrument.indexOf(exports.Instrument.RESULT_BASED) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15953
15753
|
React.createElement(antd.Col, { xl: 12, md: 24 },
|
@@ -16012,32 +15812,6 @@ var InvestmentCreationComponent = function (props) {
|
|
16012
15812
|
},
|
16013
15813
|
] },
|
16014
15814
|
React.createElement(antd.Input, { size: "large" })))))),
|
16015
|
-
instrument &&
|
16016
|
-
instrument.indexOf(exports.Instrument.INSURANCE) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16017
|
-
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16018
|
-
React.createElement("div", { className: "details-part-two" },
|
16019
|
-
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
|
16020
|
-
{
|
16021
|
-
required: true,
|
16022
|
-
message: "",
|
16023
|
-
},
|
16024
|
-
{
|
16025
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16026
|
-
return __generator(this, function (_a) {
|
16027
|
-
if (String(value).trim() === "" ||
|
16028
|
-
String(value).trim() ===
|
16029
|
-
undefined ||
|
16030
|
-
value === null ||
|
16031
|
-
value === undefined) {
|
16032
|
-
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16033
|
-
}
|
16034
|
-
return [2 /*return*/];
|
16035
|
-
});
|
16036
|
-
}); },
|
16037
|
-
},
|
16038
|
-
] },
|
16039
|
-
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16040
|
-
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16041
15815
|
instrument &&
|
16042
15816
|
instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16043
15817
|
React.createElement(antd.Col, { xl: 12, md: 24 },
|
@@ -16063,7 +15837,7 @@ var InvestmentCreationComponent = function (props) {
|
|
16063
15837
|
},
|
16064
15838
|
] },
|
16065
15839
|
React.createElement(antd.Input, { size: "large" })))))),
|
16066
|
-
React.createElement(antd.Row, { className: "row", gutter: [
|
15840
|
+
React.createElement(antd.Row, { className: "row", gutter: [4, 4] },
|
16067
15841
|
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16068
15842
|
React.createElement(antd.Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
|
16069
15843
|
{
|
@@ -16107,73 +15881,73 @@ var InvestmentCreationComponent = function (props) {
|
|
16107
15881
|
React.createElement("div", { className: "step-count" }, "02"),
|
16108
15882
|
React.createElement("div", { className: "title" }, t("programme:ownership")))),
|
16109
15883
|
description: current === 1 && (React.createElement("div", null,
|
16110
|
-
React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 &&
|
16111
|
-
React.createElement(
|
16112
|
-
|
16113
|
-
|
16114
|
-
React.createElement(antd.
|
16115
|
-
React.createElement(
|
16116
|
-
|
16117
|
-
|
16118
|
-
|
16119
|
-
React.createElement(antd.
|
16120
|
-
|
16121
|
-
|
16122
|
-
|
16123
|
-
|
16124
|
-
|
16125
|
-
|
16126
|
-
|
16127
|
-
|
16128
|
-
|
16129
|
-
|
16130
|
-
|
16131
|
-
|
16132
|
-
|
16133
|
-
|
16134
|
-
index,
|
16135
|
-
]) &&
|
16136
|
-
parseFloat(getFieldValue([
|
15884
|
+
React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 &&
|
15885
|
+
React.createElement("div", { className: "programme-sought-form" },
|
15886
|
+
React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment }, data === null || data === void 0 ? void 0 :
|
15887
|
+
data.companyId.map(function (companyId, index) {
|
15888
|
+
return (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15889
|
+
React.createElement(antd.Col, { xl: 8, md: 15 },
|
15890
|
+
React.createElement("div", { className: "label" },
|
15891
|
+
companyName[companyId].name,
|
15892
|
+
React.createElement("span", { className: "required-mark" }, "*"))),
|
15893
|
+
React.createElement(antd.Col, { xl: 8, md: 9 },
|
15894
|
+
React.createElement(antd.Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
15895
|
+
{
|
15896
|
+
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
15897
|
+
message: "Percentage Should be a positive number",
|
15898
|
+
},
|
15899
|
+
{
|
15900
|
+
required: true,
|
15901
|
+
message: "Required field",
|
15902
|
+
},
|
15903
|
+
function (_a) {
|
15904
|
+
var getFieldValue = _a.getFieldValue;
|
15905
|
+
return ({
|
15906
|
+
validator: function (rule, v) {
|
15907
|
+
if (getFieldValue([
|
16137
15908
|
"percentage",
|
16138
15909
|
index,
|
16139
|
-
])
|
16140
|
-
|
16141
|
-
|
16142
|
-
|
16143
|
-
|
16144
|
-
|
16145
|
-
|
16146
|
-
|
16147
|
-
|
16148
|
-
|
16149
|
-
|
16150
|
-
|
16151
|
-
|
15910
|
+
]) &&
|
15911
|
+
parseFloat(getFieldValue([
|
15912
|
+
"percentage",
|
15913
|
+
index,
|
15914
|
+
])) > data.proponentPercentage[index]) {
|
15915
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
15916
|
+
return Promise.reject("Amount > Available");
|
15917
|
+
}
|
15918
|
+
return Promise.resolve();
|
15919
|
+
},
|
15920
|
+
});
|
15921
|
+
},
|
15922
|
+
] },
|
15923
|
+
React.createElement(antd.InputNumber, { placeholder: "", controls: false, disabled: govData.companyId == companyId,
|
15924
|
+
// disabled={userInfoState?.companyId === Number(companyId)}
|
15925
|
+
onKeyPress: function (event) {
|
15926
|
+
if (!/[0-9\.]/.test(event.key)) {
|
15927
|
+
event.preventDefault();
|
15928
|
+
}
|
15929
|
+
} })),
|
15930
|
+
React.createElement("div", { className: "inline separator" }, "/"),
|
15931
|
+
React.createElement(antd.Form.Item, { className: "inline" },
|
15932
|
+
React.createElement(antd.InputNumber, { placeholder: String(data === null || data === void 0 ? void 0 : data.proponentPercentage[index]), disabled: true })))));
|
15933
|
+
}),
|
15934
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15935
|
+
React.createElement(antd.Col, { xl: 8, md: 15 },
|
15936
|
+
React.createElement("div", { className: "label" }, t("programme:total"))),
|
15937
|
+
React.createElement(antd.Col, { xl: 8, md: 9 },
|
15938
|
+
React.createElement(antd.Form.Item, { className: "inline", name: ["total"] },
|
15939
|
+
React.createElement(antd.InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
16152
15940
|
if (!/[0-9\.]/.test(event.key)) {
|
16153
15941
|
event.preventDefault();
|
16154
15942
|
}
|
16155
15943
|
} })),
|
16156
15944
|
React.createElement("div", { className: "inline separator" }, "/"),
|
16157
15945
|
React.createElement(antd.Form.Item, { className: "inline" },
|
16158
|
-
React.createElement(antd.InputNumber, {
|
16159
|
-
|
16160
|
-
|
16161
|
-
|
16162
|
-
|
16163
|
-
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16164
|
-
React.createElement(antd.Form.Item, { className: "inline", name: ["total"] },
|
16165
|
-
React.createElement(antd.InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
16166
|
-
if (!/[0-9\.]/.test(event.key)) {
|
16167
|
-
event.preventDefault();
|
16168
|
-
}
|
16169
|
-
} })),
|
16170
|
-
React.createElement("div", { className: "inline separator" }, "/"),
|
16171
|
-
React.createElement(antd.Form.Item, { className: "inline" },
|
16172
|
-
React.createElement(antd.InputNumber, { disabled: true, placeholder: "100" })))),
|
16173
|
-
React.createElement(antd.Form.Item, null,
|
16174
|
-
React.createElement("div", { className: "steps-actions" },
|
16175
|
-
React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
16176
|
-
React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back")))))))))),
|
15946
|
+
React.createElement(antd.InputNumber, { disabled: true, placeholder: "100" })))),
|
15947
|
+
React.createElement(antd.Form.Item, null,
|
15948
|
+
React.createElement("div", { className: "steps-actions" },
|
15949
|
+
React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
15950
|
+
React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back"))))))))),
|
16177
15951
|
},
|
16178
15952
|
] })))));
|
16179
15953
|
};
|