rez_core 2.0.68 → 2.0.70

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.0.68",
3
+ "version": "2.0.70",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -19,7 +19,7 @@ export class JwtStrategy extends PassportStrategy(Strategy) {
19
19
 
20
20
  async validate(payload) {
21
21
  const {
22
- userId,
22
+ id,
23
23
  sessionToken,
24
24
  appcode,
25
25
  email_id,
@@ -43,7 +43,7 @@ export class JwtStrategy extends PassportStrategy(Strategy) {
43
43
  // }
44
44
 
45
45
  let userData = {
46
- id: userId,
46
+ id: id,
47
47
  sessionToken: sessionToken,
48
48
  appcode: appcode,
49
49
  email_id: email_id,
@@ -9,13 +9,16 @@ import { FilterService } from './service/filter.service';
9
9
  import { FilterController } from './controller/filter.controller';
10
10
 
11
11
  @Module({
12
- imports: [TypeOrmModule.forFeature([SavedFilterDetail,SavedFilterMaster]),forwardRef(() => EntityModule)],
12
+ imports: [
13
+ TypeOrmModule.forFeature([SavedFilterDetail, SavedFilterMaster]),
14
+ forwardRef(() => EntityModule),
15
+ ],
13
16
  controllers: [FilterController],
14
17
  providers: [
15
18
  { provide: 'SavedFilterService', useClass: SavedFilterService },
16
- SavedFilterRepositoryService,
17
- FilterService
19
+ SavedFilterRepositoryService,
20
+ FilterService,
18
21
  ],
19
- exports: ['SavedFilterService', SavedFilterRepositoryService],
22
+ exports: ['SavedFilterService', SavedFilterRepositoryService, FilterService],
20
23
  })
21
24
  export class FilterModule {}
@@ -19,6 +19,8 @@ export class FilterService {
19
19
  @Inject('SavedFilterService')
20
20
  private readonly savedFilterService: SavedFilterService,
21
21
  ) {}
22
+ private readonly skipLevelFilterEntities = ['USR'];
23
+
22
24
 
23
25
  private async gettab_value_counts(
24
26
  tableName: string,
@@ -127,6 +129,21 @@ export class FilterService {
127
129
 
128
130
  const baseWhere = this.buildWhereClauses(baseFilters, attributeMetaMap);
129
131
 
132
+ if (
133
+ level_type &&
134
+ level_id &&
135
+ !this.skipLevelFilterEntities.includes(entity_type)
136
+ ) {
137
+ baseWhere.push({
138
+ query: 'e.level_type = :level_type AND e.level_id = :level_id',
139
+ params: {
140
+ level_type,
141
+ level_id,
142
+ },
143
+ });
144
+ }
145
+
146
+
130
147
  // Build query for tab counts (no tab.value filter here)
131
148
  const allTabs = await this.gettab_value_counts(
132
149
  getTableMeta.data_source,
@@ -96,8 +96,9 @@ export class MenuRepository extends Repository<MenuData> {
96
96
  const [sch] = await this.dataSource.query(`
97
97
  SELECT s.brand_id, s.organization_id
98
98
  FROM cr_school s
99
- WHERE s.id = $1
99
+ WHERE s.id = ?
100
100
  `, [levelId]);
101
+
101
102
 
102
103
  const brandId = sch?.brand_id;
103
104
  const orgId = sch?.organization_id;
@@ -34,7 +34,7 @@ export class UserSessionService {
34
34
  await this.userSessionRepository.saveSession(userSession);
35
35
 
36
36
  const payload: any = {
37
- userId: user.id,
37
+ id: user.id,
38
38
  sessionToken,
39
39
  appcode,
40
40
  email_id: user.email_id,
@@ -74,6 +74,7 @@ export class UserSessionService {
74
74
  level_type: string;
75
75
  level_id: string;
76
76
  }> {
77
+ console.log(currentUser, data);
77
78
  let payload;
78
79
 
79
80
  payload = {