Fixed bugs

This commit is contained in:
kriks7iitk 2024-07-16 11:37:19 +05:30
parent 1fff37a624
commit ec81a8b393
3 changed files with 9 additions and 4 deletions

View file

@ -134,6 +134,7 @@ class ManageGranularAccessComponent extends React.Component {
})
.catch(({ error }) => {
this.closeAddPermissionModal();
console.log(error);
if (error?.error) {
this.props.updateParentState({
showEditRoleErrorModal: true,
@ -142,8 +143,9 @@ class ManageGranularAccessComponent extends React.Component {
errorIconName: 'usergear',
errorListItems: error.data,
});
return;
}
toast.error(error, {
toast.error(error?.error, {
style: {
maxWidth: '500px',
},
@ -213,6 +215,7 @@ class ManageGranularAccessComponent extends React.Component {
errorMessage: error.error,
errorIconName: 'usergear',
errorListItems: error.data,
showAddPermissionModal: false,
});
});
};

View file

@ -24,8 +24,8 @@ export function getRoleUsersListQuery(
.innerJoin('user.organizationUsers', 'organizationUsers', 'organizationUsers.organizationId = :organizationId', {
organizationId,
})
.andWhere('organizationUsers.status = :status', {
status: USER_STATUS.ACTIVE,
.andWhere('organizationUsers.status != :status', {
status: USER_STATUS.ARCHIVED,
});
if (groupPermissionId) {

View file

@ -79,7 +79,9 @@ export class FoldersService {
return await dbTransactionWrap(async (manager: EntityManager) => {
const folderApps = await manager
.createQueryBuilder(FolderApp, 'folderApp')
.innerJoin('folderApp.app', 'app')
.innerJoin('folderApp.app', 'app', 'folderApp.folderId = :id', {
id: folder.id,
})
.where('app.name LIKE :name', { name: `%${searchKey}%` })
.getMany();