fix some reviews

This commit is contained in:
x032205
2025-11-14 13:05:34 -05:00
parent 60887bd0ac
commit af2c240839
3 changed files with 6 additions and 2 deletions
@@ -369,14 +369,16 @@ export const pamAccountServiceFactory = ({
if (canReadFolders && accountView === PamAccountView.Nested) { if (canReadFolders && accountView === PamAccountView.Nested) {
const { totalCount } = await pamFolderDAL.findByProjectId({ const { totalCount } = await pamFolderDAL.findByProjectId({
projectId, projectId,
parentId: folderId parentId: folderId,
search: params.search
}); });
totalFolderCount = totalCount; totalFolderCount = totalCount;
} }
const { totalCount: totalAccountCount } = await pamAccountDAL.findByProjectIdWithResourceDetails({ const { totalCount: totalAccountCount } = await pamAccountDAL.findByProjectIdWithResourceDetails({
projectId, projectId,
folderId, folderId,
accountView accountView,
search: params.search
}); });
const totalCount = totalFolderCount + totalAccountCount; const totalCount = totalFolderCount + totalAccountCount;
+1
View File
@@ -148,6 +148,7 @@ export const useListPamAccounts = (
return data; return data;
}, },
placeholderData: (prev) => prev,
...options ...options
}); });
}; };
@@ -228,6 +228,7 @@ export const PamAccountsTable = ({ projectId }: Props) => {
<AccountViewToggle <AccountViewToggle
value={accountView} value={accountView}
onChange={(e) => { onChange={(e) => {
setPage(1);
setAccountView(e); setAccountView(e);
navigate({ navigate({
search: (prev) => ({ search: (prev) => ({