mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 17:50:44 +08:00
Redesign biz compare: editable templates and pre/post result workbook.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
4811a25ac3
commit
14f5870e19
8 changed files with 1133 additions and 298 deletions
|
|
@ -1841,9 +1841,33 @@ export const bizStateDownloadExport = async (batchId: string): Promise<void> =>
|
|||
export const bizCompareListTemplates = () =>
|
||||
apiGet<{ items: Record<string, unknown>[] }>("/v1/biz-state/compare/templates");
|
||||
|
||||
export const bizCompareListMetrics = () =>
|
||||
apiGet<{
|
||||
items: Array<{
|
||||
metric_id: string;
|
||||
fields: Array<{
|
||||
name: string;
|
||||
display_name: string;
|
||||
dtype: string;
|
||||
is_key: boolean;
|
||||
is_interface: boolean;
|
||||
role: string;
|
||||
}>;
|
||||
}>;
|
||||
}>("/v1/biz-state/compare/metrics");
|
||||
|
||||
export const bizCompareCreateTemplate = (body: Record<string, unknown>) =>
|
||||
apiPost<Record<string, unknown>>("/v1/biz-state/compare/templates", body);
|
||||
|
||||
export const bizCompareUpdateTemplate = (templateId: string, body: Record<string, unknown>) =>
|
||||
apiPatch<Record<string, unknown>>(
|
||||
`/v1/biz-state/compare/templates/${encodeURIComponent(templateId)}`,
|
||||
body,
|
||||
);
|
||||
|
||||
export const bizCompareDeleteTemplate = (templateId: string) =>
|
||||
apiDelete<{ ok: boolean }>(`/v1/biz-state/compare/templates/${encodeURIComponent(templateId)}`);
|
||||
|
||||
export const bizCompareListMappings = () =>
|
||||
apiGet<{ items: Record<string, unknown>[] }>("/v1/biz-state/compare/mappings");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue