Archived
三面拆分③:壳参数化两台,台账随域动态生成,顶栏互跳按权亮灯
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -57,8 +57,13 @@ export type GovWorkflow = GovWorkflowOutput;
|
||||
export type GovTaskLog = GovTaskLogOutput;
|
||||
export type GovGrants = GovGrantsOutput;
|
||||
|
||||
export const useGovTasks = (): UseQueryResult<GovTasks> =>
|
||||
useQuery({ queryKey: ['gov', 'tasks'], queryFn: () => call<GovTasks>(listGovTasksRoute) });
|
||||
/** `enabled: false` 供设计中心用 —— 那一面不看运行态,别去要一份自己无权也无用的数据 */
|
||||
export const useGovTasks = (opts?: { enabled?: boolean }): UseQueryResult<GovTasks> =>
|
||||
useQuery({
|
||||
queryKey: ['gov', 'tasks'],
|
||||
queryFn: () => call<GovTasks>(listGovTasksRoute),
|
||||
enabled: opts?.enabled ?? true,
|
||||
});
|
||||
|
||||
export const useGovApprovals = (): UseQueryResult<GovApprovals> =>
|
||||
useQuery({ queryKey: ['gov', 'approvals'], queryFn: () => call<GovApprovals>(listApprovalsRoute) });
|
||||
@@ -85,8 +90,12 @@ export const useGovActivities = (): UseQueryResult<GovActivities> =>
|
||||
export const useGovTools = (): UseQueryResult<GovTools> =>
|
||||
useQuery({ queryKey: ['gov', 'tools'], queryFn: () => call<GovTools>(listToolsRoute) });
|
||||
|
||||
export const useGovObjects = (): UseQueryResult<GovObjects> =>
|
||||
useQuery({ queryKey: ['gov', 'objects'], queryFn: () => call<GovObjects>(listLedgerObjectsRoute) });
|
||||
export const useGovObjects = (opts?: { enabled?: boolean }): UseQueryResult<GovObjects> =>
|
||||
useQuery({
|
||||
queryKey: ['gov', 'objects'],
|
||||
queryFn: () => call<GovObjects>(listLedgerObjectsRoute),
|
||||
enabled: opts?.enabled ?? true,
|
||||
});
|
||||
|
||||
export const useGovLedger = (domain: string | undefined, object: string | undefined): UseQueryResult<GovLedgerPage> =>
|
||||
useQuery({
|
||||
|
||||
Reference in New Issue
Block a user