expenses pagination fixes

This commit is contained in:
2026-06-18 23:37:56 +05:30
parent 12e5f113b8
commit b0c5332d77
2 changed files with 18 additions and 9 deletions

View File

@@ -23,6 +23,7 @@ import { AuthProvider } from "../react-auth";
import Header from './Header';
import Footer from './Footer';
import AppTheme from './shared-theme/AppTheme';
import { specConfiguration } from './openapi-config';
const queryClient = new QueryClient();
@@ -33,14 +34,6 @@ const rootElement = document.getElementById('root');
const root = createRoot(rootElement);
const AUTH_BASE = import.meta.env.VITE_AUTH_BASE_URL;
const API_BASE = import.meta.env.VITE_API_BASE_URL;
const specConfig = {
specUrl: `${API_BASE}/openapi.yaml`,
baseApiUrl: API_BASE,
title: 'Khata Admin',
getToken: () => localStorage.getItem('token'),
};
const routerMapping = [
{ path: "/", component: Home, headerTitle: "Home" },
@@ -54,7 +47,7 @@ const routerMapping = [
root.render(
<QueryClientProvider client={queryClient}>
<AppProvider specConfiguration={specConfig}>
<AppProvider specConfiguration={specConfiguration}>
<BrowserRouter>
<AuthProvider authBaseUrl={AUTH_BASE}>
<AppTheme>

16
src/openapi-config.ts Normal file
View File

@@ -0,0 +1,16 @@
import type { SpecConfiguration } from "../react-openapi";
// import { tokenStore } from "../react-auth";
const apiBase = import.meta.env.VITE_API_BASE_URL;
export const specConfiguration: SpecConfiguration = {
specUrl: `${apiBase}/openapi.json`,
baseApiUrl: apiBase,
title: "Khata",
resourceConfig: {
expenses: {
filterOptions: { mode: "client" },
},
},
// getToken: () => tokenStore.get(),
};