fix(admin-web): always fetch all authorization records including revoked
Changed to always include revoked records in API query, filtering is done on frontend side. This ensures all historical records are visible. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
258aff8bf7
commit
0753f036bd
|
|
@ -43,14 +43,14 @@ export default function AuthorizationPage() {
|
|||
const [revokeTarget, setRevokeTarget] = useState<Authorization | null>(null);
|
||||
const [revokeReason, setRevokeReason] = useState('');
|
||||
|
||||
// 查询参数
|
||||
// 查询参数 - 始终获取所有记录(包括已撤销的),前端做状态筛选
|
||||
const queryParams = useMemo(() => ({
|
||||
roleType: filterType || undefined,
|
||||
keyword: searchKeyword || undefined,
|
||||
includeRevoked: filterStatus === 'REVOKED' || filterStatus === '',
|
||||
includeRevoked: true,
|
||||
page,
|
||||
limit,
|
||||
}), [filterType, searchKeyword, filterStatus, page]);
|
||||
}), [filterType, searchKeyword, page]);
|
||||
|
||||
// 获取授权列表
|
||||
const { data, isLoading, error, refetch } = useAuthorizations(queryParams);
|
||||
|
|
|
|||
Loading…
Reference in New Issue