Sfoglia il codice sorgente

update error line

master
cyril.tsui 1 mese fa
parent
commit
61f6abc927
2 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  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 Vedi File

@@ -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 Vedi File

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


Caricamento…
Annulla
Salva