@undp/carbon-library 1.0.284-CARBON-425.0 → 1.0.284-CARBON-406.5
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 +33 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Definitions/Definitions/ndcDetails.definitions.d.ts +1 -0
- package/dist/esm/index.js +33 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Definitions/Definitions/ndcDetails.definitions.d.ts +1 -0
- package/dist/locales/i18n/ndc/en.json +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -26775,7 +26775,21 @@ var EditableCell = function (_a) {
|
|
26775
26775
|
}); },
|
26776
26776
|
},
|
26777
26777
|
] },
|
26778
|
-
React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:nationalPlanObjectivePlaceHolder") }))) : editing && dataIndex === "
|
26778
|
+
React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:nationalPlanObjectivePlaceHolder") }))) : editing && dataIndex === "kpiUnit" ? (React.createElement(antd.Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
|
26779
|
+
{
|
26780
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
26781
|
+
var trimValue;
|
26782
|
+
return __generator(this, function (_a) {
|
26783
|
+
trimValue = typeof value === "string" ? value.trim() : value;
|
26784
|
+
if (!trimValue) {
|
26785
|
+
throw new Error("".concat(title, " ").concat(t("ndc:isRequired")));
|
26786
|
+
}
|
26787
|
+
return [2 /*return*/];
|
26788
|
+
});
|
26789
|
+
}); },
|
26790
|
+
},
|
26791
|
+
] },
|
26792
|
+
React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:kpiUnitPlaceHolder") }))) : editing && dataIndex === "kpi" ? (React.createElement(antd.Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
|
26779
26793
|
{
|
26780
26794
|
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
26781
26795
|
var trimValue;
|
@@ -26923,6 +26937,7 @@ var NdcDetailsComponent = function (props) {
|
|
26923
26937
|
actionType: NdcDetailsActionType.SubAction,
|
26924
26938
|
nationalPlanObjective: "",
|
26925
26939
|
kpi: "",
|
26940
|
+
kpiUnit: "",
|
26926
26941
|
ministryName: loginMinistry,
|
26927
26942
|
status: NdcDetailsActionStatus.New,
|
26928
26943
|
parentActionId: mainActionId,
|
@@ -26934,6 +26949,7 @@ var NdcDetailsComponent = function (props) {
|
|
26934
26949
|
form.setFieldsValue({
|
26935
26950
|
nationalPlanObjective: "",
|
26936
26951
|
kpi: "",
|
26952
|
+
kpiUnit: "",
|
26937
26953
|
});
|
26938
26954
|
}
|
26939
26955
|
setSubNdcActionsForPeriod(subNdcDetails);
|
@@ -26975,6 +26991,7 @@ var NdcDetailsComponent = function (props) {
|
|
26975
26991
|
return [2 /*return*/];
|
26976
26992
|
}
|
26977
26993
|
else if (updatedFields.kpi === row.kpi &&
|
26994
|
+
updatedFields.kpiUnit === row.kpiUnit &&
|
26978
26995
|
updatedFields.nationalPlanObjective === row.nationalPlanObjective) {
|
26979
26996
|
ClearEditMode();
|
26980
26997
|
return [2 /*return*/];
|
@@ -26988,13 +27005,13 @@ var NdcDetailsComponent = function (props) {
|
|
26988
27005
|
else {
|
26989
27006
|
updatedItem.status = NdcDetailsActionStatus.Pending;
|
26990
27007
|
}
|
26991
|
-
return [4 /*yield*/, post("national/programme/addNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi:
|
27008
|
+
return [4 /*yield*/, post("national/programme/addNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseFloat(updatedItem.kpi.toString()) }))];
|
26992
27009
|
case 5:
|
26993
27010
|
_a.sent();
|
26994
27011
|
return [3 /*break*/, 8];
|
26995
27012
|
case 6:
|
26996
27013
|
updatedItem.status = NdcDetailsActionStatus.Pending;
|
26997
|
-
return [4 /*yield*/, put("national/programme/updateNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi:
|
27014
|
+
return [4 /*yield*/, put("national/programme/updateNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseFloat(updatedItem.kpi.toString()) }))];
|
26998
27015
|
case 7:
|
26999
27016
|
_a.sent();
|
27000
27017
|
_a.label = 8;
|
@@ -27078,7 +27095,17 @@ var NdcDetailsComponent = function (props) {
|
|
27078
27095
|
width: 100,
|
27079
27096
|
editable: true,
|
27080
27097
|
render: function (_, record) { return (React.createElement(antd.Space, { size: "middle" }, record.kpi ? (React.createElement(antd.Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
|
27081
|
-
React.createElement("span", null, record.kpi))) : (React.createElement(antd.Input, { placeholder: "
|
27098
|
+
React.createElement("span", null, record.kpi))) : (React.createElement(antd.Input, { placeholder: t("ndc:kpiPlaceHolder") })))); },
|
27099
|
+
},
|
27100
|
+
{
|
27101
|
+
title: t("ndc:ndcColumnsKpiUnit"),
|
27102
|
+
dataIndex: "kpiUnit",
|
27103
|
+
key: "kpiUnit",
|
27104
|
+
align: "left",
|
27105
|
+
width: 100,
|
27106
|
+
editable: true,
|
27107
|
+
render: function (_, record) { return (React.createElement(antd.Space, { size: "middle" }, record.kpiUnit ? (React.createElement(antd.Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
|
27108
|
+
React.createElement("span", null, record.kpiUnit))) : (React.createElement(antd.Input, { placeholder: t("ndc:kpiUnitPlaceHolder") })))); },
|
27082
27109
|
},
|
27083
27110
|
{
|
27084
27111
|
title: t("ndc:ndcColumnsMinistry"),
|
@@ -27142,6 +27169,7 @@ var NdcDetailsComponent = function (props) {
|
|
27142
27169
|
form.setFieldsValue({
|
27143
27170
|
nationalPlanObjective: "",
|
27144
27171
|
kpi: "",
|
27172
|
+
kpiUnit: "",
|
27145
27173
|
});
|
27146
27174
|
periodId = parseInt(selectedPeriod.key);
|
27147
27175
|
newData_1 = {
|
@@ -27149,6 +27177,7 @@ var NdcDetailsComponent = function (props) {
|
|
27149
27177
|
actionType: NdcDetailsActionType.MainAction,
|
27150
27178
|
nationalPlanObjective: "",
|
27151
27179
|
kpi: "",
|
27180
|
+
kpiUnit: "",
|
27152
27181
|
ministryName: loginMinistry,
|
27153
27182
|
periodId: periodId,
|
27154
27183
|
status: NdcDetailsActionStatus.New,
|