diff --git a/src/app/api/settings/item/index.ts b/src/app/api/settings/item/index.ts index b9893a5..280bf3d 100644 --- a/src/app/api/settings/item/index.ts +++ b/src/app/api/settings/item/index.ts @@ -18,6 +18,11 @@ export type ItemQc = { isActive: boolean | undefined; } +export type ItemsResultResponse = { + records: ItemsResult[]; + total: number; +} + export type ItemsResult = { id: string | number code: string; diff --git a/src/components/ItemsSearch/ItemsSearch.tsx b/src/components/ItemsSearch/ItemsSearch.tsx index 58cf945..f6efdc0 100644 --- a/src/components/ItemsSearch/ItemsSearch.tsx +++ b/src/components/ItemsSearch/ItemsSearch.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from "react"; import SearchBox, { Criterion } from "../SearchBox"; -import { ItemsResult } from "@/app/api/settings/item"; +import { ItemsResult, ItemsResultResponse } from "@/app/api/settings/item"; import { useTranslation } from "react-i18next"; import SearchResults, { Column } from "../SearchResults"; import { EditNote } from "@mui/icons-material"; @@ -85,7 +85,7 @@ const ItemsSearch: React.FC = ({ items }) => { ...filterObj, }; try { - const response = await axiosInstance.get( + const response = await axiosInstance.get( `${NEXT_PUBLIC_API_URL}/items/getRecordByPage`, { params } );