auto: 2026-09-20 02:30 (ESD_LAPTOP)
This commit is contained in:
@@ -83,8 +83,13 @@ export const fetchGroups = async (): Promise<GroupInfo[]> =>
|
||||
export const fetchFiles = async (group: string): Promise<FileInfo[]> =>
|
||||
(await get<{ files: FileInfo[] }>(`/groups/${encodeURIComponent(group)}/files`, {})).files;
|
||||
|
||||
export const fetchRows = (file: string, page: number, size: number, q: string): Promise<RowsPage> =>
|
||||
get<RowsPage>("/rows", { file, page, size, q });
|
||||
export const fetchRows = (
|
||||
file: string,
|
||||
page: number,
|
||||
size: number,
|
||||
q: string,
|
||||
unlinked = false,
|
||||
): Promise<RowsPage> => get<RowsPage>("/rows", { file, page, size, q, unlinked: unlinked ? 1 : 0 });
|
||||
|
||||
export const fetchTables = (
|
||||
file: string,
|
||||
@@ -107,3 +112,19 @@ export async function saveFiles(files: FileChanges[]): Promise<SaveResult> {
|
||||
if (status === 422 && typeof detail === "object") return { status, errors: detail.errors ?? [] };
|
||||
return { status, detail: typeof detail === "string" ? detail : JSON.stringify(detail) };
|
||||
}
|
||||
|
||||
export type PickKind = "procure" | "price" | "job";
|
||||
|
||||
export interface PickItem {
|
||||
ref: string;
|
||||
이름: string;
|
||||
규격: string;
|
||||
단위: string;
|
||||
값: unknown;
|
||||
관급: boolean;
|
||||
}
|
||||
|
||||
export const fetchPick = (
|
||||
kind: PickKind,
|
||||
q: string,
|
||||
): Promise<{ total: number; items: PickItem[] }> => get("/pick", { kind, q, limit: 50 });
|
||||
|
||||
Reference in New Issue
Block a user