@undp/carbon-library 1.0.160 → 1.0.163-ndc-action-add-table-fixes.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +149 -104
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/AntComponents/antTableComponents.d.ts +14 -13
- package/dist/esm/index.js +151 -106
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/AntComponents/antTableComponents.d.ts +14 -13
- package/package.json +1 -1
@@ -1,20 +1,21 @@
|
|
1
1
|
import React from "react";
|
2
|
-
|
2
|
+
interface Item {
|
3
3
|
key: string;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
};
|
10
|
-
interface EditableCellProps extends React.HTMLAttributes<HTMLElement> {
|
11
|
-
editing: boolean;
|
12
|
-
dataIndex: string;
|
13
|
-
title: any;
|
14
|
-
inputType: "number" | "text";
|
15
|
-
record: NdcDetail;
|
4
|
+
name: string;
|
5
|
+
age: string;
|
6
|
+
address: string;
|
7
|
+
}
|
8
|
+
interface EditableRowProps {
|
16
9
|
index: number;
|
10
|
+
}
|
11
|
+
export declare const EditableRow: React.FC<EditableRowProps>;
|
12
|
+
interface EditableCellProps {
|
13
|
+
title: React.ReactNode;
|
14
|
+
editable: boolean;
|
17
15
|
children: React.ReactNode;
|
16
|
+
dataIndex: keyof Item;
|
17
|
+
record: Item;
|
18
|
+
handleSave: (record: Item) => void;
|
18
19
|
}
|
19
20
|
export declare const EditableCell: React.FC<EditableCellProps>;
|
20
21
|
export {};
|
package/dist/esm/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined,
|
1
|
+
import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined } from '@ant-design/icons';
|
2
2
|
import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Upload, Tooltip, Select, Modal, Alert, Skeleton, Card, Tag, Checkbox, DatePicker, InputNumber, Popover, List, Typography, Spin, Tabs, Progress } from 'antd';
|
3
|
-
import React, { useState, useEffect, useRef } from 'react';
|
3
|
+
import React, { useState, useEffect, useRef, useContext } from 'react';
|
4
4
|
import { DateTime } from 'luxon';
|
5
5
|
import { Buffer } from 'buffer';
|
6
6
|
import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } from 'react-phone-number-input';
|
@@ -24435,16 +24435,60 @@ var RegistryDashboardComponent = function (props) {
|
|
24435
24435
|
lastUpdateTransferLocations))))))))) : ("")));
|
24436
24436
|
};
|
24437
24437
|
|
24438
|
-
React.createContext(null);
|
24438
|
+
var EditableContext = React.createContext(null);
|
24439
|
+
var EditableRow = function (_a) {
|
24440
|
+
_a.index; var props = __rest(_a, ["index"]);
|
24441
|
+
var form = Form.useForm()[0];
|
24442
|
+
return (React.createElement(Form, { form: form, component: false },
|
24443
|
+
React.createElement(EditableContext.Provider, { value: form },
|
24444
|
+
React.createElement("tr", __assign({}, props)))));
|
24445
|
+
};
|
24439
24446
|
var EditableCell = function (_a) {
|
24440
|
-
var
|
24441
|
-
var
|
24442
|
-
|
24443
|
-
|
24444
|
-
|
24445
|
-
|
24446
|
-
|
24447
|
-
|
24447
|
+
var title = _a.title, editable = _a.editable, children = _a.children, dataIndex = _a.dataIndex, record = _a.record, handleSave = _a.handleSave, restProps = __rest(_a, ["title", "editable", "children", "dataIndex", "record", "handleSave"]);
|
24448
|
+
var _b = useState(false), editing = _b[0], setEditing = _b[1];
|
24449
|
+
var inputRef = useRef(null);
|
24450
|
+
var form = useContext(EditableContext);
|
24451
|
+
useEffect(function () {
|
24452
|
+
if (editing) {
|
24453
|
+
inputRef.current.focus();
|
24454
|
+
}
|
24455
|
+
}, [editing]);
|
24456
|
+
var toggleEdit = function () {
|
24457
|
+
var _a;
|
24458
|
+
setEditing(!editing);
|
24459
|
+
form.setFieldsValue((_a = {}, _a[dataIndex] = record[dataIndex], _a));
|
24460
|
+
};
|
24461
|
+
var save = function () { return __awaiter(void 0, void 0, void 0, function () {
|
24462
|
+
var values, errInfo_1;
|
24463
|
+
return __generator(this, function (_a) {
|
24464
|
+
switch (_a.label) {
|
24465
|
+
case 0:
|
24466
|
+
_a.trys.push([0, 2, , 3]);
|
24467
|
+
return [4 /*yield*/, form.validateFields()];
|
24468
|
+
case 1:
|
24469
|
+
values = _a.sent();
|
24470
|
+
toggleEdit();
|
24471
|
+
handleSave(__assign(__assign({}, record), values));
|
24472
|
+
return [3 /*break*/, 3];
|
24473
|
+
case 2:
|
24474
|
+
errInfo_1 = _a.sent();
|
24475
|
+
console.log("Save failed:", errInfo_1);
|
24476
|
+
return [3 /*break*/, 3];
|
24477
|
+
case 3: return [2 /*return*/];
|
24478
|
+
}
|
24479
|
+
});
|
24480
|
+
}); };
|
24481
|
+
var childNode = children;
|
24482
|
+
if (editable) {
|
24483
|
+
childNode = editing ? (React.createElement(Form.Item, { style: { margin: 0 }, name: dataIndex, rules: [
|
24484
|
+
{
|
24485
|
+
required: true,
|
24486
|
+
message: "".concat(title, " is required."),
|
24487
|
+
},
|
24488
|
+
] },
|
24489
|
+
React.createElement(Input, { ref: inputRef, onPressEnter: save, onBlur: save }))) : (React.createElement("div", { className: "editable-cell-value-wrap", style: { paddingRight: 24, minWidth: "100px", minHeight: "20px" }, onClick: toggleEdit }, children));
|
24490
|
+
}
|
24491
|
+
return React.createElement("td", __assign({}, restProps), childNode);
|
24448
24492
|
};
|
24449
24493
|
|
24450
24494
|
var css_248z$4 = ".ndc-steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: center; }\n .ndc-steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .ndc-steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .ndc-steps-actions .mg-left-1 {\n margin-left: 1rem; }\n";
|
@@ -24467,17 +24511,7 @@ var NdcDetailsComponent = function (props) {
|
|
24467
24511
|
var addedNdcDetailId = useRef(0);
|
24468
24512
|
var selectedNdcDetail = useRef({});
|
24469
24513
|
var _e = useState(0), tableKey = _e[0], setTableKey = _e[1];
|
24470
|
-
var form = Form.useForm()[0];
|
24471
|
-
var _f = useState(""), editingKey = _f[0], setEditingKey = _f[1];
|
24472
24514
|
var userInfoState = useUserContext().userInfoState;
|
24473
|
-
var isEditing = function (record) { return record.key === editingKey; };
|
24474
|
-
var onEditRow = function (record) {
|
24475
|
-
form.setFieldsValue(__assign({ nationalPlanObj: "", kpi: "", ministry: "" }, record));
|
24476
|
-
setEditingKey(record.key);
|
24477
|
-
};
|
24478
|
-
var onEditCancel = function () {
|
24479
|
-
setEditingKey("");
|
24480
|
-
};
|
24481
24515
|
var isAddRangeVisible = function () {
|
24482
24516
|
return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY ||
|
24483
24517
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT) &&
|
@@ -24490,63 +24524,62 @@ var NdcDetailsComponent = function (props) {
|
|
24490
24524
|
var inRange = function (num, min, max) {
|
24491
24525
|
return num >= min && num <= max;
|
24492
24526
|
};
|
24493
|
-
|
24494
|
-
var
|
24495
|
-
|
24496
|
-
|
24497
|
-
|
24498
|
-
|
24499
|
-
|
24500
|
-
|
24501
|
-
|
24502
|
-
|
24503
|
-
|
24504
|
-
|
24505
|
-
|
24506
|
-
|
24507
|
-
|
24527
|
+
function onAddNewSubNdcDetail() {
|
24528
|
+
var range = selectedTab.split('-');
|
24529
|
+
var ndcDetail = ndcDetailsData.find(function (item) { return item.key === selectedNdcDetail.current.key; });
|
24530
|
+
var ndcDetailItemIndex = ndcDetailsData.findIndex(function (item) { return item.key === selectedNdcDetail.current.key; });
|
24531
|
+
if (ndcDetail) {
|
24532
|
+
addedNdcDetailId.current = addedNdcDetailId.current + 1;
|
24533
|
+
var newData = {
|
24534
|
+
key: addedNdcDetailId.current,
|
24535
|
+
startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
|
24536
|
+
endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
|
24537
|
+
ndcActionId: ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.key,
|
24538
|
+
nationalPlanObj: '',
|
24539
|
+
kpi: '',
|
24540
|
+
ministry: '',
|
24541
|
+
};
|
24542
|
+
if (!ndcDetail.subNdcDetails) {
|
24543
|
+
ndcDetail.subNdcDetails = [];
|
24544
|
+
}
|
24545
|
+
ndcDetail.subNdcDetails.push(newData);
|
24546
|
+
}
|
24547
|
+
ndcDetailsData[ndcDetailItemIndex] = ndcDetail;
|
24548
|
+
setNdcDetailsData(ndcDetailsData);
|
24549
|
+
setTableKey(function (key) { return key + 1; });
|
24550
|
+
}
|
24551
|
+
var handleSave = function (row) {
|
24552
|
+
setNdcDetailsData(function (prevData) {
|
24553
|
+
var newData = JSON.parse(JSON.stringify(prevData));
|
24554
|
+
if (row.type === NdcActionType.main) {
|
24555
|
+
var index = newData.findIndex(function (item) { return row.key === item.key; });
|
24556
|
+
if (index !== -1) {
|
24557
|
+
newData[index] = __assign(__assign({}, newData[index]), row);
|
24558
|
+
}
|
24559
|
+
}
|
24560
|
+
else {
|
24561
|
+
var parentIndex = newData.findIndex(function (item) { return row.ndcActionId === item.key; });
|
24562
|
+
var parentItem = newData[parentIndex];
|
24563
|
+
if (parentItem) {
|
24564
|
+
if (parentItem.subNdcDetails) {
|
24565
|
+
var itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return row.key === item.key; });
|
24566
|
+
if (itemIndex === -1) {
|
24567
|
+
parentItem.subNdcDetails.push(row);
|
24508
24568
|
}
|
24509
24569
|
else {
|
24510
|
-
|
24511
|
-
parentItem = updatedNdcDetails[parentIndex];
|
24512
|
-
if (parentItem) {
|
24513
|
-
if (parentItem.subNdcDetails) {
|
24514
|
-
itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return record.key === item.key; });
|
24515
|
-
if (itemIndex !== -1) {
|
24516
|
-
parentItem.subNdcDetails.splice(itemIndex, 1, __assign(__assign({}, record), editedData));
|
24517
|
-
}
|
24518
|
-
if (itemIndex + 1 === parentItem.subNdcDetails.length) {
|
24519
|
-
parentItem.subNdcDetails.push({
|
24520
|
-
key: ++addedNdcDetailId.current,
|
24521
|
-
ndcActionId: parentItem.key,
|
24522
|
-
type: NdcActionType.sub,
|
24523
|
-
startDate: new Date("2019-03-25"),
|
24524
|
-
endDate: new Date("2020-03-25"),
|
24525
|
-
nationalPlanObj: "",
|
24526
|
-
kpi: "",
|
24527
|
-
ministry: "",
|
24528
|
-
});
|
24529
|
-
}
|
24530
|
-
}
|
24531
|
-
updatedNdcDetails.splice(parentIndex, 1, __assign({}, parentItem));
|
24532
|
-
setNdcDetailsData(updatedNdcDetails);
|
24533
|
-
}
|
24570
|
+
parentItem.subNdcDetails[itemIndex] = __assign({}, row);
|
24534
24571
|
}
|
24535
|
-
setEditingKey("");
|
24536
|
-
setTableKey(function (key) { return key + 1; });
|
24537
24572
|
}
|
24538
24573
|
else {
|
24539
|
-
|
24574
|
+
parentItem.subNdcDetails = [row];
|
24540
24575
|
}
|
24541
|
-
|
24542
|
-
|
24543
|
-
|
24544
|
-
console.log("Validate Failed:", errInfo_1);
|
24545
|
-
return [3 /*break*/, 3];
|
24546
|
-
case 3: return [2 /*return*/];
|
24576
|
+
}
|
24577
|
+
newData[parentIndex] = __assign({}, parentItem);
|
24578
|
+
setTableKey(function (key) { return key + 1; });
|
24547
24579
|
}
|
24580
|
+
return newData;
|
24548
24581
|
});
|
24549
|
-
}
|
24582
|
+
};
|
24550
24583
|
var getNdcDetailsForPeriod = function () {
|
24551
24584
|
var range = selectedTab.split("-");
|
24552
24585
|
if (range.length > 1) {
|
@@ -24560,8 +24593,18 @@ var NdcDetailsComponent = function (props) {
|
|
24560
24593
|
}
|
24561
24594
|
};
|
24562
24595
|
var getSubNdcDetails = function (key) {
|
24596
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
24563
24597
|
var ndcDetail = ndcDetailsData.find(function (item) { return item.key === key; });
|
24564
24598
|
if (ndcDetail) {
|
24599
|
+
if (((_b = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_a = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _a === void 0 ? void 0 : _a.length) - 1]) === null || _b === void 0 ? void 0 : _b.ministry.trim()) !== '' &&
|
24600
|
+
((_d = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_c = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _c === void 0 ? void 0 : _c.length) - 1]) === null || _d === void 0 ? void 0 : _d.ministry) &&
|
24601
|
+
((_f = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_e = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _e === void 0 ? void 0 : _e.length) - 1]) === null || _f === void 0 ? void 0 : _f.nationalPlanObj.trim()) !==
|
24602
|
+
'' &&
|
24603
|
+
((_h = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_g = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _g === void 0 ? void 0 : _g.length) - 1]) === null || _h === void 0 ? void 0 : _h.nationalPlanObj) &&
|
24604
|
+
String((_k = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_j = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _j === void 0 ? void 0 : _j.length) - 1]) === null || _k === void 0 ? void 0 : _k.kpi).trim() !== '' &&
|
24605
|
+
String((_m = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails[((_l = ndcDetail === null || ndcDetail === void 0 ? void 0 : ndcDetail.subNdcDetails) === null || _l === void 0 ? void 0 : _l.length) - 1]) === null || _m === void 0 ? void 0 : _m.kpi)) {
|
24606
|
+
onAddNewSubNdcDetail();
|
24607
|
+
}
|
24565
24608
|
return ndcDetail.subNdcDetails;
|
24566
24609
|
}
|
24567
24610
|
else {
|
@@ -24577,7 +24620,7 @@ var NdcDetailsComponent = function (props) {
|
|
24577
24620
|
editable: true,
|
24578
24621
|
width: "50%",
|
24579
24622
|
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
|
24580
|
-
React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add the National Plan Objective", className: "ant-input",
|
24623
|
+
React.createElement("span", null, record.nationalPlanObj))) : (React.createElement("input", { placeholder: "Please add the National Plan Objective", className: "ant-input", type: "text" })))); },
|
24581
24624
|
},
|
24582
24625
|
{
|
24583
24626
|
title: t("ndc:ndcColumnsKpi"),
|
@@ -24587,7 +24630,7 @@ var NdcDetailsComponent = function (props) {
|
|
24587
24630
|
editable: true,
|
24588
24631
|
width: "10%",
|
24589
24632
|
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
|
24590
|
-
React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input",
|
24633
|
+
React.createElement("span", null, record.kpi))) : (React.createElement("input", { placeholder: "Enter Kpi", className: "ant-input", type: "text" })))); },
|
24591
24634
|
},
|
24592
24635
|
{
|
24593
24636
|
title: "Ministry",
|
@@ -24595,26 +24638,9 @@ var NdcDetailsComponent = function (props) {
|
|
24595
24638
|
key: "ministry",
|
24596
24639
|
align: "left",
|
24597
24640
|
editable: true,
|
24598
|
-
width: "
|
24641
|
+
width: "40%",
|
24599
24642
|
render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
|
24600
|
-
React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Ministry name", className: "ant-input",
|
24601
|
-
},
|
24602
|
-
{
|
24603
|
-
title: "Action",
|
24604
|
-
dataIndex: "operation",
|
24605
|
-
width: "10%",
|
24606
|
-
render: function (_, record) {
|
24607
|
-
var editable = isEditing(record);
|
24608
|
-
return editable ? (React.createElement("span", null,
|
24609
|
-
React.createElement(Tooltip, { title: "Save" },
|
24610
|
-
React.createElement(Typography.Link, { onClick: function () { return onHandleSave(record); }, style: { marginRight: 20 } },
|
24611
|
-
React.createElement(SaveOutlined, null))),
|
24612
|
-
React.createElement(Tooltip, { title: "Cancel" },
|
24613
|
-
React.createElement(Typography.Link, { onClick: onEditCancel, style: { marginRight: 8 } },
|
24614
|
-
React.createElement(ExclamationCircleOutlined, null))))) : (React.createElement(Tooltip, { title: "Edit" },
|
24615
|
-
React.createElement(Typography.Link, { disabled: editingKey !== "", onClick: function () { return onEditRow(record); } },
|
24616
|
-
React.createElement(EditOutlined, null))));
|
24617
|
-
},
|
24643
|
+
React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Ministry name", className: "ant-input", type: "text" })))); },
|
24618
24644
|
},
|
24619
24645
|
];
|
24620
24646
|
var columns = defaultColumns.map(function (col) {
|
@@ -24626,7 +24652,7 @@ var NdcDetailsComponent = function (props) {
|
|
24626
24652
|
editable: col.editable,
|
24627
24653
|
dataIndex: col.dataIndex,
|
24628
24654
|
title: col.title,
|
24629
|
-
|
24655
|
+
handleSave: handleSave,
|
24630
24656
|
}); } });
|
24631
24657
|
});
|
24632
24658
|
function onAddNewNdcDetail() {
|
@@ -24657,11 +24683,32 @@ var NdcDetailsComponent = function (props) {
|
|
24657
24683
|
}
|
24658
24684
|
var components = {
|
24659
24685
|
body: {
|
24686
|
+
row: EditableRow,
|
24660
24687
|
cell: EditableCell,
|
24661
24688
|
},
|
24662
24689
|
};
|
24690
|
+
//commented because rendering issue
|
24663
24691
|
function ndcDetailsTableContent() {
|
24664
|
-
return React.createElement("div", null)
|
24692
|
+
return (React.createElement("div", null)
|
24693
|
+
// <div>
|
24694
|
+
// <Button
|
24695
|
+
// onClick={onAddNewNdcDetail}
|
24696
|
+
// type="primary"
|
24697
|
+
// style={{
|
24698
|
+
// marginBottom: 16,
|
24699
|
+
// }}
|
24700
|
+
// >
|
24701
|
+
// Add a row
|
24702
|
+
// </Button>
|
24703
|
+
// <Table
|
24704
|
+
// components={components}
|
24705
|
+
// rowClassName={() => 'editable-row'}
|
24706
|
+
// bordered
|
24707
|
+
// dataSource={ndcDetailsData}
|
24708
|
+
// columns={columns}
|
24709
|
+
// />
|
24710
|
+
// </div>
|
24711
|
+
);
|
24665
24712
|
}
|
24666
24713
|
var onCancelPeriod = function () { };
|
24667
24714
|
var onAddNewPeriod = function () {
|
@@ -24718,7 +24765,6 @@ var NdcDetailsComponent = function (props) {
|
|
24718
24765
|
}
|
24719
24766
|
var onTabChange = function (key) {
|
24720
24767
|
setSelectedTab(key);
|
24721
|
-
setEditingKey("");
|
24722
24768
|
};
|
24723
24769
|
useEffect(function () {
|
24724
24770
|
var defaultNdcDetails = [
|
@@ -24992,18 +25038,17 @@ var NdcDetailsComponent = function (props) {
|
|
24992
25038
|
React.createElement(Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
|
24993
25039
|
selectedTab !== "add_new" && (React.createElement("div", null,
|
24994
25040
|
React.createElement("div", null,
|
24995
|
-
React.createElement(
|
24996
|
-
|
24997
|
-
|
24998
|
-
|
24999
|
-
|
25000
|
-
|
25001
|
-
|
25002
|
-
|
25003
|
-
|
25004
|
-
|
25005
|
-
|
25006
|
-
} })))))));
|
25041
|
+
React.createElement(Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
|
25042
|
+
expandedRowRender: function (record) { return getSubNdcActionContent(record); },
|
25043
|
+
indentSize: 0,
|
25044
|
+
defaultExpandedRowKeys: [selectedNdcDetail.current.key],
|
25045
|
+
}, footer: function () {
|
25046
|
+
return isAddNdcActionVisible() && (React.createElement(Row, { justify: "center" },
|
25047
|
+
React.createElement(Button, { onClick: onAddNewNdcDetail, type: "default", style: {
|
25048
|
+
marginBottom: 16,
|
25049
|
+
width: "100%",
|
25050
|
+
} }, t("ndc:addNdcAction"))));
|
25051
|
+
} }))))));
|
25007
25052
|
};
|
25008
25053
|
|
25009
25054
|
var ImgWithFallback = function (_a) {
|