Merge pull request #93 from Telecominfraproject/hotfix/BulkEditTable

hotfix/BulkEditTable: Added radioMap property to tableData array
This commit is contained in:
Sean Macfarlane
2021-03-17 11:47:25 -04:00
committed by GitHub

View File

@@ -237,23 +237,20 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
return minLoadValue; return minLoadValue;
}; };
const setAccessPointsBulkEditTableData = (dataSource = []) => { const setAccessPointsBulkEditTableData = (dataSource = []) =>
const tableData = dataSource.items.map(({ id: key, name, details }) => { dataSource.items.map(({ id: key, name, details }) => ({
return { key,
key, id: key,
id: key, name,
name, manualChannelNumber: getRadioDetails(details, 'manualChannelNumber'),
manualChannelNumber: getRadioDetails(details, 'manualChannelNumber'), manualBackupChannelNumber: getRadioDetails(details, 'manualBackupChannelNumber'),
manualBackupChannelNumber: getRadioDetails(details, 'manualBackupChannelNumber'), cellSize: getRadioDetails(details, 'cellSize'),
cellSize: getRadioDetails(details, 'cellSize'), probeResponseThreshold: getRadioDetails(details, 'probeResponseThreshold'),
probeResponseThreshold: getRadioDetails(details, 'probeResponseThreshold'), clientDisconnectThreshold: getRadioDetails(details, 'clientDisconnectThreshold'),
clientDisconnectThreshold: getRadioDetails(details, 'clientDisconnectThreshold'), snrDrop: getRadioDetails(details, 'snrDrop'),
snrDrop: getRadioDetails(details, 'snrDrop'), minLoad: getRadioDetails(details, 'minLoad'),
minLoad: getRadioDetails(details, 'minLoad'), radioMap: Object.keys(details?.radioMap || {}),
}; }));
});
return tableData;
};
const setUpdatedBulkEditTableData = ( const setUpdatedBulkEditTableData = (
equipmentId, equipmentId,
@@ -393,7 +390,7 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
return ( return (
<BulkEditAccessPoints <BulkEditAccessPoints
tableColumns={accessPointsChannelTableColumns} tableColumns={accessPointsChannelTableColumns}
tableData={setAccessPointsBulkEditTableData(equipData && equipData?.filterEquipment)} tableData={setAccessPointsBulkEditTableData(equipData?.filterEquipment)}
onLoadMore={handleLoadMore} onLoadMore={handleLoadMore}
isLastPage={equipData?.filterEquipment?.context?.lastPage} isLastPage={equipData?.filterEquipment?.context?.lastPage}
onSaveChanges={handleSaveChanges} onSaveChanges={handleSaveChanges}