rez_core 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -206,7 +206,7 @@ export class FilterService {
206
206
  tabAttrMeta,
207
207
  );
208
208
  if (tabCondition) {
209
- dataWhere.push(tabCondition);
209
+ if (tabs.value.toLowerCase() !== 'all') dataWhere.push(tabCondition);
210
210
  }
211
211
  }
212
212
 
@@ -74,6 +74,7 @@ export class LayoutPreferenceService extends EntityServiceImpl {
74
74
  .select(`${column} AS column_value`)
75
75
  .addSelect(`COUNT(*) AS count`)
76
76
  .from(tableName, tableName)
77
+ .where(`${column} IS NOT NULL`)
77
78
  .groupBy(column)
78
79
  .getRawMany();
79
80
 
@@ -1,6 +1,6 @@
1
1
  import { BadRequestException, Injectable } from '@nestjs/common';
2
2
  import { InjectRepository } from '@nestjs/typeorm';
3
- import { In, Not, Repository } from 'typeorm';
3
+ import { In, Not, Repository , IsNull} from 'typeorm';
4
4
  import { Role } from 'src/module/user/entity/role.entity';
5
5
  import { ModuleAccess } from '../entity/module-access.entity';
6
6
  import { ModuleAction } from '../entity/module-action.entity';
@@ -23,6 +23,7 @@ export class ModuleAccessRepository {
23
23
  private readonly moduleActionRepo: Repository<ModuleAction>,
24
24
  ) {}
25
25
 
26
+
26
27
 
27
28
  async getRoles({
28
29
  appcode,
@@ -35,7 +36,7 @@ export class ModuleAccessRepository {
35
36
  }) {
36
37
  const where: any = {
37
38
  appcode,
38
- is_factory: Not(1), // Exclude factory roles
39
+ is_factory: [Not(1), IsNull()], // Include NULL or anything not 1
39
40
  };
40
41
 
41
42
  if (level_type) where.level_type = level_type;
@@ -48,6 +49,8 @@ export class ModuleAccessRepository {
48
49
  value: role.id,
49
50
  }));
50
51
  }
52
+
53
+
51
54
  async getModules({ appcode }: { appcode: string }) {
52
55
  const modules = await this.moduleRepo.find({
53
56
  where: { module_level: 'MAINMOD', appcode },