fixing logbook skip take order by (#125)

This commit was merged in pull request #125.
This commit is contained in:
2026-03-23 20:19:58 -05:00
committed by GitHub
parent 5de5a165da
commit d8513e6dd0
6 changed files with 29 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "client",
"private": true,
"version": "2.1.1",
"version": "2.1.2",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -380,13 +380,13 @@ const Logbook: React.FC<unknown> = () => {
setPageIndex
} = table;
const getLogbookEntries = async (pageIndex?: number, pageSize?: number) => {
const getLogbookEntries = async (pageIndex: number, pageSize: number) => {
try {
dispatch({ type: 'SET_IS_LOADING', payload: true });
const response: AxiosResponse = await httpClient.get(`api/logs`, {
params: {
skip: pageIndex,
skip: pageIndex * pageSize,
take: pageSize
}
});
@@ -527,6 +527,10 @@ const Logbook: React.FC<unknown> = () => {
dispatch({ type: 'SET_PAGES', payload: pages })
}, [state.totalEntries, state.pagination?.pageSize])
useEffect(() => {
console.log(state.pagination)
}, [state.pagination])
return (
<>
<div className={`${screenSize === ScreenSize.SM ? 'mr-4 ml-4' : 'mr-10 ml-10'} grid grid-cols-12`}>
@@ -569,7 +573,7 @@ const Logbook: React.FC<unknown> = () => {
>
<option value={10}>10</option>
<option value={25}>25</option>
<option value={3}>50</option>
<option value={50}>50</option>
<option value={state.totalEntries}>All</option>
</select>
</label>