rez_core 2.1.18 → 2.1.19

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.18",
3
+ "version": "2.1.19",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -11,6 +11,7 @@ import { SchoolData } from './entity/school.entity';
11
11
  import { BrandRepository } from './repository/brand.repository';
12
12
  import { SchoolRepository } from './repository/school.repository';
13
13
  import { UtilsModule } from 'src/utils/utils.module';
14
+ import { BrandService } from './service/brand.service';
14
15
 
15
16
  @Module({
16
17
  imports: [
@@ -29,6 +30,10 @@ import { UtilsModule } from 'src/utils/utils.module';
29
30
  OrganizationAppMappingService,
30
31
  BrandRepository,
31
32
  SchoolRepository,
33
+ {
34
+ provide: 'BrandService',
35
+ useClass: BrandService,
36
+ },
32
37
  ],
33
38
  exports: [OrganizationService],
34
39
  })
@@ -0,0 +1,4 @@
1
+ import { Injectable } from '@nestjs/common';
2
+
3
+ @Injectable()
4
+ export class BrandService {}
@@ -25,6 +25,8 @@ export class ListMasterService {
25
25
  private readonly httpService: HttpService,
26
26
  ) {}
27
27
 
28
+ private readonly skipLevelFilterEntities = ['BRN'];
29
+
28
30
  async getDropdownOptions(
29
31
  type: string,
30
32
  params: Record<string, string>,
@@ -77,19 +79,24 @@ export class ListMasterService {
77
79
  }
78
80
 
79
81
  if (loggedInUser?.level_type && loggedInUser?.level_id) {
80
- qb.andWhere(
81
- `${tableName}.level_type = :levelType AND ${tableName}.level_id = :levelId`,
82
- {
83
- levelType: loggedInUser.level_type,
84
- levelId: loggedInUser.level_id,
85
- },
86
- );
82
+ // Skip level filter for certain entities
83
+ if (!this.skipLevelFilterEntities.includes(sourceList)) {
84
+ qb.andWhere(
85
+ `${tableName}.level_type = :levelType AND ${tableName}.level_id = :levelId`,
86
+ {
87
+ levelType: loggedInUser.level_type,
88
+ levelId: loggedInUser.level_id,
89
+ },
90
+ );
91
+ }
87
92
  }
88
93
 
89
94
  if (loggedInUser?.appcode && sourceList === 'ROL') {
90
- qb.andWhere(`${tableName}.appcode = :appcode`, {
91
- appcode: loggedInUser.appcode,
92
- });
95
+ if (!this.skipLevelFilterEntities.includes(sourceList)) {
96
+ qb.andWhere(`${tableName}.appcode = :appcode`, {
97
+ appcode: loggedInUser.appcode,
98
+ });
99
+ }
93
100
  }
94
101
 
95
102
  for (const key in params) {