Преглед изворни кода

fixing for compile

fix負數倉
PC-20260115JRSN\Administrator пре 1 недеља
родитељ
комит
6145d1bbf8
1 измењених фајлова са 22 додато и 0 уклоњено
  1. +22
    -0
      src/app/api/settings/item/actions.ts

+ 22
- 0
src/app/api/settings/item/actions.ts Прегледај датотеку

@@ -138,6 +138,28 @@ export const fetchItemsWithDetails = cache(async (searchParams?: Record<string,
}
});

/** Paged item lookup for Inventory Search (code / name). */
export const fetchItemsByPage = cache(async (queryParams?: Record<string, string | number>) => {
const searchParams = new URLSearchParams();
if (queryParams) {
Object.entries(queryParams).forEach(([key, value]) => {
if (value !== undefined && value !== null && `${value}` !== "") {
searchParams.set(key, String(value));
}
});
}
const queryString = searchParams.toString();
return serverFetchJson<RecordsRes<ItemsResult>>(
queryString
? `${BASE_API_URL}/items/getRecordByPage?${queryString}`
: `${BASE_API_URL}/items/getRecordByPage`,
{
method: "GET",
next: { tags: ["items"] },
},
);
});

export const fetchAllItemsInClient = cache(async () => {
return serverFetchJson<ItemCombo[]>(`${BASE_API_URL}/items/consumables`, {
next: { tags: ["items"] },


Loading…
Откажи
Сачувај