소스 검색

update error line

master
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 }
);


불러오는 중...
취소
저장