From 8ad576967e44b71ca66468e94f92e6f5e77e6b72 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Fri, 29 Aug 2025 19:28:01 +0530 Subject: [PATCH] feat: add runs table ui message --- src/components/run/RunsTable.tsx | 212 +++++++++++++++++-------------- 1 file changed, 119 insertions(+), 93 deletions(-) diff --git a/src/components/run/RunsTable.tsx b/src/components/run/RunsTable.tsx index 2628bdda..c9eb81ec 100644 --- a/src/components/run/RunsTable.tsx +++ b/src/components/run/RunsTable.tsx @@ -378,102 +378,128 @@ export const RunsTable: React.FC = ({ /> - - {Object.entries(groupedRows) - .slice( - accordionPage * accordionsPerPage, - accordionPage * accordionsPerPage + accordionsPerPage - ) - .map(([robotMetaId, data]) => ( - handleAccordionChange(robotMetaId, isExpanded)} - TransitionProps={{ unmountOnExit: true }} // Optimize accordion rendering - > - }> - {data[0].name} - - - - - - - {translatedColumns.map((column) => ( - { - if (column.id === 'startedAt' || column.id === 'finishedAt') { - handleSort(column.id, robotMetaId); - } - }} - > - - + + {searchTerm ? t('runstable.placeholder.search') : t('runstable.placeholder.title')} + + + {searchTerm + ? t('recordingtable.search_criteria') + : t('runstable.placeholder.body') + } + + + ) : ( + <> + + {Object.entries(groupedRows) + .slice( + accordionPage * accordionsPerPage, + accordionPage * accordionsPerPage + accordionsPerPage + ) + .map(([robotMetaId, data]) => ( + handleAccordionChange(robotMetaId, isExpanded)} + TransitionProps={{ unmountOnExit: true }} // Optimize accordion rendering + > + }> + {data[0].name} + + +
+ + + + {translatedColumns.map((column) => ( + { + if (column.id === 'startedAt' || column.id === 'finishedAt') { + handleSort(column.id, robotMetaId); } - } - }}> - {column.label} - - {renderSortIcon(column, robotMetaId)} - - - - - ))} - - - - {renderTableRows(data, robotMetaId)} - -
+ }} + > + + + {column.label} + + {renderSortIcon(column, robotMetaId)} + + + + + ))} + + + + {renderTableRows(data, robotMetaId)} + + - handleChangePage(robotMetaId, newPage)} - onRowsPerPageChange={(event) => - handleChangeRowsPerPage(robotMetaId, +event.target.value) - } - rowsPerPageOptions={[10, 25, 50, 100]} - /> -
-
- ))} -
+ handleChangePage(robotMetaId, newPage)} + onRowsPerPageChange={(event) => + handleChangeRowsPerPage(robotMetaId, +event.target.value) + } + rowsPerPageOptions={[10, 25, 50, 100]} + /> + + + ))} + - + + + )} ); }; \ No newline at end of file