rez_core 2.0.30 → 2.0.32

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.30",
3
+ "version": "2.0.32",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -6,9 +6,19 @@ import { OrganizationController } from './controller/organization.controller';
6
6
  import { UserModule } from '../user/user.module';
7
7
  import { OrganizationAppMappingService } from './service/organization-app-mapping.service';
8
8
  import { OrganizationAppMapping } from './entity/organization-app-mapping.entity';
9
+ import { BrandData } from './entity/brand.entity';
10
+ import { SchoolData } from './entity/school.entity';
9
11
 
10
12
  @Module({
11
- imports: [TypeOrmModule.forFeature([OrganizationData , OrganizationAppMapping]), UserModule],
13
+ imports: [
14
+ TypeOrmModule.forFeature([
15
+ OrganizationData,
16
+ OrganizationAppMapping,
17
+ BrandData,
18
+ SchoolData,
19
+ ]),
20
+ UserModule,
21
+ ],
12
22
  controllers: [OrganizationController],
13
23
  providers: [OrganizationService, OrganizationAppMappingService],
14
24
  exports: [OrganizationService],
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
2
+ import { Entity } from 'typeorm';
3
+
4
+ @Entity({ name: 'cr_brand' })
5
+ export class BrandData extends BaseEntity {}
@@ -0,0 +1,9 @@
1
+ import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
2
+ import { Entity } from 'typeorm';
3
+
4
+ @Entity({ name: 'cr_school' })
5
+ export class SchoolData extends BaseEntity {
6
+ brand_id: number;
7
+
8
+ brand_code: string;
9
+ }
@@ -129,7 +129,7 @@ export class EntityController {
129
129
  await this.reflectionHelper.getBean<EntityServiceImpl>(
130
130
  entityMaster.entity_service,
131
131
  );
132
- console.log(entityService, "entityService");``
132
+ console.log(entityService, "entityService");
133
133
  if (entityService) {
134
134
  let existingEntity = await entityService.getEntityData(entityType, id);
135
135
  console.log(existingEntity, "existingEntity");
@@ -174,7 +174,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
174
174
  entityData.modified_date = new Date();
175
175
  if (loggedInUser) {
176
176
  entityData.modified_by = loggedInUser.id;
177
- if (!entityData.organization_id)
177
+ if (!entityData.organization_id && entityData.parent_type !== 'ORG')
178
178
  entityData.organization_id = loggedInUser.organization_id;
179
179
  if (!entityData.enterprise_id)
180
180
  entityData.enterprise_id = loggedInUser.enterprise_id;