cyril.tsui 1 місяць тому
джерело
коміт
61f6abc927
2 змінених файлів з 7 додано та 2 видалено
  1. +5
    -0
      src/app/api/settings/item/index.ts
  2. +2
    -2
      src/components/ItemsSearch/ItemsSearch.tsx

+ 5
- 0
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;


+ 2
- 2
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<Props> = ({ items }) => {
...filterObj,
};
try {
const response = await axiosInstance.get<ItemsResult[]>(
const response = await axiosInstance.get<ItemsResultResponse>(
`${NEXT_PUBLIC_API_URL}/items/getRecordByPage`,
{ params }
);


Завантаження…
Відмінити
Зберегти