Skip to content

Commit

Permalink
MWB-906: update pagination tasks and projects
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverBerserk committed Dec 12, 2024
1 parent 4695164 commit 3131b12
Show file tree
Hide file tree
Showing 10 changed files with 361 additions and 396 deletions.
29 changes: 14 additions & 15 deletions mapping_workbench/frontend/src/pages/app/mapping-packages/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Paper from '@mui/material/Paper';
import {useEffect, useState} from 'react';
import {saveAs} from 'file-saver';

Expand Down Expand Up @@ -86,10 +87,10 @@ const Page = () => {
justifyContent="space-between"
spacing={4}
>
<Card>
<Paper>
<TableSearchBar onChange={e => itemsSearch.handleSearchItems([e])}
value={itemsSearch.state.search[0]}/>
</Card>
</Paper>
<Stack
alignItems="center"
direction="row"
Expand Down Expand Up @@ -121,19 +122,17 @@ const Page = () => {
</Stack>

</Stack>
<Card>
<ListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
count={itemsSearch.count}
onSort={itemsSearch.handleSort}
sort={itemsSearch.state.sort}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
/>
</Card>
<ListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
count={itemsSearch.count}
onSort={itemsSearch.handleSort}
sort={itemsSearch.state.sort}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
/>
</Stack>

<PackageImporter
Expand Down
32 changes: 15 additions & 17 deletions mapping_workbench/frontend/src/pages/app/projects/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AddIcon from '@mui/icons-material/Add';

import Card from '@mui/material/Card';
import Link from '@mui/material/Link';
import Paper from '@mui/material/Paper';
import Stack from '@mui/material/Stack';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
Expand Down Expand Up @@ -53,11 +53,11 @@ export const Page = () => {
justifyContent="space-between"
spacing={4}
>
<Card>
<Paper>
<TableSearchBar onChange={e => itemsSearch.handleSearchItems([e])}
value={itemsSearch.state.search[0]}
placeholder='Search by Project Title'/>
</Card>
placeholder='Search by Project Title'/>
</Paper>
<Stack
alignItems="center"
direction="row"
Expand All @@ -74,19 +74,17 @@ export const Page = () => {
</Button>
</Stack>
</Stack>
<Card>
<ListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
onSort={itemsSearch.handleSort}
sort={itemsSearch.state.sort}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
count={itemsSearch.count}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
/>
</Card>
<ListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
onSort={itemsSearch.handleSort}
sort={itemsSearch.state.sort}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
count={itemsSearch.count}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
/>
</Stack>
</>
)
Expand Down
37 changes: 17 additions & 20 deletions mapping_workbench/frontend/src/pages/app/shacl-test-suites/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {useEffect, useState} from 'react';

import AddIcon from '@mui/icons-material/Add';

import Card from '@mui/material/Card';
import Paper from '@mui/material/Paper';
import Stack from '@mui/material/Stack';
import Button from '@mui/material/Button';

Expand Down Expand Up @@ -64,10 +64,10 @@ const Page = () => {
justifyContent="space-between"
spacing={4}
>
<Card>
<Paper>
<TableSearchBar onChange={e => itemsSearch.handleSearchItems([e])}
value={itemsSearch.state.search[0]}/>
</Card>
</Paper>
<Stack
alignItems="center"
direction="row"
Expand All @@ -84,23 +84,20 @@ const Page = () => {
</Button>
</Stack>
</Stack>
<Card>

<FileCollectionListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
itemsForced={itemsStore.force}
count={itemsStore.itemsCount}
sort={itemsSearch.state.sort}
onSort={itemsSearch.handleSort}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
fileResourceApi={fileResourceApi}
getItems={itemsStore.handleItemsGet}
/>
</Card>
<FileCollectionListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
itemsForced={itemsStore.force}
count={itemsStore.itemsCount}
sort={itemsSearch.state.sort}
onSort={itemsSearch.handleSort}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
fileResourceApi={fileResourceApi}
getItems={itemsStore.handleItemsGet}
/>
</Stack>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {useEffect, useState} from 'react';

import AddIcon from '@mui/icons-material/Add';

import Card from '@mui/material/Card';
import Paper from '@mui/material/Paper';
import Stack from '@mui/material/Stack';
import Button from '@mui/material/Button';

Expand Down Expand Up @@ -63,10 +63,10 @@ const Page = () => {
justifyContent="space-between"
spacing={4}
>
<Card>
<Paper>
<TableSearchBar onChange={e => itemsSearch.handleSearchItems([e])}
value={itemsSearch.state.search[0]}/>
</Card>
</Paper>
<Stack
alignItems="center"
direction="row"
Expand All @@ -83,23 +83,21 @@ const Page = () => {
</Button>
</Stack>
</Stack>
<Card>
<FileCollectionListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
itemsForced={itemsStore.force}
count={itemsStore.itemsCount}
rowsPerPage={itemsSearch.state.rowsPerPage}
sort={itemsSearch.state.sort}
onSort={itemsSearch.handleSort}
sectionApi={sectionApi}
getItems={itemsStore.handleItemsGet}
selectable={selectable}
fileResourceApi={fileResourcesApi}
/>
</Card>
<FileCollectionListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
itemsForced={itemsStore.force}
count={itemsStore.itemsCount}
rowsPerPage={itemsSearch.state.rowsPerPage}
sort={itemsSearch.state.sort}
onSort={itemsSearch.handleSort}
sectionApi={sectionApi}
getItems={itemsStore.handleItemsGet}
selectable={selectable}
fileResourceApi={fileResourcesApi}
/>
</Stack>
</>
)
Expand Down
36 changes: 17 additions & 19 deletions mapping_workbench/frontend/src/pages/app/tasks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,23 @@ export const Page = () => {
</Button>
</Stack>
</Stack>
<Paper>
<TableLoadWrapper dataState={{load: state.load}}
lines={5}
data={state.items}>
<ListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
onSort={itemsSearch.handleSort}
sort={itemsSearch.state.sort}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
count={itemsSearch.count}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
onCancelAction={handleCancelAction}
onDeleteAction={handleDeleteAction}
/>
</TableLoadWrapper>
</Paper>
<TableLoadWrapper dataState={{load: state.load}}
lines={5}
data={state.items}>
<ListTable
onPageChange={itemsSearch.handlePageChange}
onRowsPerPageChange={itemsSearch.handleRowsPerPageChange}
onSort={itemsSearch.handleSort}
sort={itemsSearch.state.sort}
page={itemsSearch.state.page}
items={itemsSearch.pagedItems}
count={itemsSearch.count}
rowsPerPage={itemsSearch.state.rowsPerPage}
sectionApi={sectionApi}
onCancelAction={handleCancelAction}
onDeleteAction={handleDeleteAction}
/>
</TableLoadWrapper>
</Stack>
</>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ import Paper from '@mui/material/Paper';
import {useEffect, useState} from 'react';
import PropTypes from 'prop-types';

import ChevronRightIcon from '@mui/icons-material/ChevronRight';

import Box from "@mui/system/Box";
import Chip from '@mui/material/Chip';
import Grid from '@mui/material/Grid';
import Table from '@mui/material/Table';
import Stack from "@mui/material/Stack";
import Button from "@mui/material/Button";
import Divider from '@mui/material/Divider';
import SvgIcon from '@mui/material/SvgIcon';
import Checkbox from "@mui/material/Checkbox";
import TableRow from '@mui/material/TableRow';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableHead from '@mui/material/TableHead';
import IconButton from '@mui/material/IconButton';
import CardContent from '@mui/material/CardContent';
import Typography from '@mui/material/Typography';

Expand Down
Loading

0 comments on commit 3131b12

Please sign in to comment.