rez_core 0.0.7 → 1.0.2-o
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/.idea/250218_nodejs_core.iml +12 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/dataSources.xml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/data/master.xlsx +0 -0
- package/dist/app.module.d.ts +0 -2
- package/dist/app.module.js +0 -31
- package/dist/app.module.js.map +1 -1
- package/dist/config/config.module.js +1 -1
- package/dist/config/config.module.js.map +1 -1
- package/dist/config/database.config.d.ts +3 -0
- package/dist/config/database.config.js +14 -6
- package/dist/config/database.config.js.map +1 -1
- package/dist/constant/global.constant.d.ts +6 -2
- package/dist/constant/global.constant.js +7 -3
- package/dist/constant/global.constant.js.map +1 -1
- package/dist/core.module.js +6 -0
- package/dist/core.module.js.map +1 -1
- package/dist/decorators/roles.decorator.js.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/module/auth/auth.module.js +1 -1
- package/dist/module/auth/auth.module.js.map +1 -1
- package/dist/module/auth/guards/role.guard.js +3 -3
- package/dist/module/auth/strategies/google.strategy.d.ts +3 -1
- package/dist/module/auth/strategies/google.strategy.js +7 -5
- package/dist/module/auth/strategies/google.strategy.js.map +1 -1
- package/dist/module/auth/strategies/jwt.strategy.d.ts +4 -4
- package/dist/module/auth/strategies/jwt.strategy.js +8 -9
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/module/enterprise/enterprise.module.js +1 -1
- package/dist/module/enterprise/enterprise.module.js.map +1 -1
- package/dist/module/enterprise/service/organization.service.d.ts +9 -7
- package/dist/module/enterprise/service/organization.service.js +35 -14
- package/dist/module/enterprise/service/organization.service.js.map +1 -1
- package/dist/module/layout/controller/layout.controller.d.ts +11 -0
- package/dist/module/layout/controller/layout.controller.js +61 -0
- package/dist/module/layout/controller/layout.controller.js.map +1 -0
- package/dist/module/layout/dto/header.dto.d.ts +0 -0
- package/dist/module/layout/dto/header.dto.js +1 -0
- package/dist/module/layout/dto/header.dto.js.map +1 -0
- package/dist/module/layout/entity/header-items.entity.d.ts +10 -0
- package/dist/module/layout/entity/header-items.entity.js +52 -0
- package/dist/module/layout/entity/header-items.entity.js.map +1 -0
- package/dist/module/layout/entity/header-section.entity.d.ts +7 -0
- package/dist/module/layout/entity/header-section.entity.js +40 -0
- package/dist/module/layout/entity/header-section.entity.js.map +1 -0
- package/dist/module/layout/layout.module.d.ts +2 -0
- package/dist/module/layout/layout.module.js +30 -0
- package/dist/module/layout/layout.module.js.map +1 -0
- package/dist/module/layout/repository/header-items.repository.d.ts +7 -0
- package/dist/module/layout/repository/header-items.repository.js +36 -0
- package/dist/module/layout/repository/header-items.repository.js.map +1 -0
- package/dist/module/layout/repository/header-section.repository.d.ts +7 -0
- package/dist/module/layout/repository/header-section.repository.js +36 -0
- package/dist/module/layout/repository/header-section.repository.js.map +1 -0
- package/dist/module/layout/service/header-section.service.d.ts +8 -0
- package/dist/module/layout/service/header-section.service.js +37 -0
- package/dist/module/layout/service/header-section.service.js.map +1 -0
- package/dist/module/meta/controller/entity.controller.d.ts +1 -0
- package/dist/module/meta/controller/entity.controller.js +37 -1
- package/dist/module/meta/controller/entity.controller.js.map +1 -1
- package/dist/module/meta/entity/base-entity.entity.d.ts +1 -2
- package/dist/module/meta/entity/base-entity.entity.js +1 -2
- package/dist/module/meta/entity/base-entity.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +1 -0
- package/dist/module/meta/entity/entity-master.entity.js +4 -0
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table.entity.d.ts +1 -0
- package/dist/module/meta/entity/entity-table.entity.js +4 -0
- package/dist/module/meta/entity/entity-table.entity.js.map +1 -1
- package/dist/module/meta/entity/media-data.entity.d.ts +11 -0
- package/dist/module/meta/entity/media-data.entity.js +55 -0
- package/dist/module/meta/entity/media-data.entity.js.map +1 -0
- package/dist/module/meta/entity.module.js +15 -1
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/repository/entity-table-column.repository.js +2 -2
- package/dist/module/meta/repository/entity-table.repository.d.ts +1 -0
- package/dist/module/meta/repository/entity-table.repository.js +9 -0
- package/dist/module/meta/repository/entity-table.repository.js.map +1 -1
- package/dist/module/meta/repository/media-data.repository.d.ts +9 -0
- package/dist/module/meta/repository/media-data.repository.js +55 -0
- package/dist/module/meta/repository/media-data.repository.js.map +1 -0
- package/dist/module/meta/service/entity-list.service.d.ts +3 -1
- package/dist/module/meta/service/entity-list.service.js +26 -3
- package/dist/module/meta/service/entity-list.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.d.ts +13 -5
- package/dist/module/meta/service/entity-service-impl.service.js +92 -15
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/entity-table-column.service.d.ts +1 -0
- package/dist/module/meta/service/entity-table-column.service.js +4 -0
- package/dist/module/meta/service/entity-table-column.service.js.map +1 -1
- package/dist/module/meta/service/entity-table.service.d.ts +1 -0
- package/dist/module/meta/service/entity-table.service.js +3 -0
- package/dist/module/meta/service/entity-table.service.js.map +1 -1
- package/dist/module/meta/service/entity.service.d.ts +3 -1
- package/dist/module/meta/service/media-data.service.d.ts +9 -0
- package/dist/module/meta/service/media-data.service.js +36 -0
- package/dist/module/meta/service/media-data.service.js.map +1 -0
- package/dist/module/meta/service/preference.service.d.ts +1 -5
- package/dist/module/meta/service/preference.service.js +3 -11
- package/dist/module/meta/service/preference.service.js.map +1 -1
- package/dist/module/module/entity/menu.entity.d.ts +1 -2
- package/dist/module/module/entity/menu.entity.js +1 -2
- package/dist/module/module/entity/menu.entity.js.map +1 -1
- package/dist/module/module/entity/module.entity.d.ts +1 -2
- package/dist/module/module/entity/module.entity.js +1 -2
- package/dist/module/module/entity/module.entity.js.map +1 -1
- package/dist/module/module/module.module.js +2 -2
- package/dist/module/module/module.module.js.map +1 -1
- package/dist/module/module/repository/menu.repository.js +3 -3
- package/dist/module/module/repository/menu.repository.js.map +1 -1
- package/dist/module/module/repository/module-access.repository.js +31 -20
- package/dist/module/module/repository/module-access.repository.js.map +1 -1
- package/dist/module/module/service/menu.service.js +2 -2
- package/dist/module/module/service/menu.service.js.map +1 -1
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/controller/otp.controller.d.ts +17 -0
- package/dist/module/notification/controller/otp.controller.js +67 -0
- package/dist/module/notification/controller/otp.controller.js.map +1 -0
- package/dist/module/notification/entity/otp.entity.d.ts +10 -0
- package/dist/module/notification/entity/otp.entity.js +52 -0
- package/dist/module/notification/entity/otp.entity.js.map +1 -0
- package/dist/module/notification/notification.module.d.ts +2 -0
- package/dist/module/notification/notification.module.js +27 -0
- package/dist/module/notification/notification.module.js.map +1 -0
- package/dist/module/notification/repository/otp.repository.d.ts +9 -0
- package/dist/module/notification/repository/otp.repository.js +44 -0
- package/dist/module/notification/repository/otp.repository.js.map +1 -0
- package/dist/module/notification/service/otp.service.d.ts +16 -0
- package/dist/module/notification/service/otp.service.js +66 -0
- package/dist/module/notification/service/otp.service.js.map +1 -0
- package/dist/module/user/controller/login.controller.d.ts +1 -3
- package/dist/module/user/controller/login.controller.js +0 -1
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/dto/create-user.dto.js.map +1 -1
- package/dist/module/user/entity/role.entity.js.map +1 -1
- package/dist/module/user/repository/user-role-mapping.repository.js +4 -1
- package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -1
- package/dist/module/user/repository/user.repository.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +12 -4
- package/dist/module/user/service/login.service.js +24 -9
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/role.service.d.ts +1 -5
- package/dist/module/user/service/role.service.js +3 -10
- package/dist/module/user/service/role.service.js.map +1 -1
- package/dist/module/user/service/user-session.service.d.ts +1 -3
- package/dist/module/user/service/user-session.service.js +1 -1
- package/dist/module/user/service/user-session.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +7 -8
- package/dist/module/user/service/user.service.js +13 -17
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/module/user/user.module.js +1 -0
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/resources/dev.properties.yaml +15 -0
- package/dist/resources/properties.module.d.ts +2 -0
- package/dist/resources/properties.module.js +25 -0
- package/dist/resources/properties.module.js.map +1 -0
- package/dist/resources/properties.yaml.d.ts +2 -0
- package/dist/resources/properties.yaml.js +10 -0
- package/dist/resources/properties.yaml.js.map +1 -0
- package/dist/resources/uat.properties.yaml +15 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/dto/excel-data.dto.d.ts +7 -0
- package/dist/utils/dto/excel-data.dto.js +16 -0
- package/dist/utils/dto/excel-data.dto.js.map +1 -0
- package/dist/utils/dto/excelsheet-data.dto.d.ts +5 -0
- package/dist/utils/dto/excelsheet-data.dto.js +3 -0
- package/dist/utils/dto/excelsheet-data.dto.js.map +1 -0
- package/dist/utils/service/excel-helper.service.d.ts +3 -1
- package/dist/utils/service/excel-helper.service.js +12 -3
- package/dist/utils/service/excel-helper.service.js.map +1 -1
- package/dist/utils/service/loggingUtil.service.js +6 -6
- package/dist/utils/service/loggingUtil.service.js.map +1 -1
- package/dist/utils/utils.module.js.map +1 -1
- package/nest-cli.json +6 -0
- package/package.json +1 -1
- package/src/app.module.ts +0 -0
- package/src/config/config.module.ts +1 -1
- package/src/config/database.config.ts +10 -5
- package/src/constant/global.constant.ts +13 -4
- package/src/core.module.ts +6 -0
- package/src/decorators/roles.decorator.ts +5 -2
- package/src/module/auth/auth.module.ts +3 -2
- package/src/module/auth/guards/google-auth.guard.ts +1 -1
- package/src/module/auth/guards/jwt.guard.ts +22 -22
- package/src/module/auth/guards/role.guard.ts +68 -68
- package/src/module/auth/services/auth.service.ts +29 -29
- package/src/module/auth/services/jwt.service.ts +11 -11
- package/src/module/auth/strategies/google.strategy.ts +7 -4
- package/src/module/auth/strategies/jwt.strategy.ts +5 -6
- package/src/module/auth/strategies/local.strategy.ts +13 -13
- package/src/module/dev/dev.module.ts +12 -12
- package/src/module/dev/service/dev.service.ts +7 -7
- package/src/module/enterprise/enterprise.module.ts +2 -3
- package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
- package/src/module/enterprise/entity/organization.entity.ts +80 -80
- package/src/module/enterprise/service/organization.service.ts +48 -13
- package/src/module/layout/controller/layout.controller.ts +32 -0
- package/src/module/layout/dto/header.dto.ts +0 -0
- package/src/module/layout/entity/header-items.entity.ts +28 -0
- package/src/module/layout/entity/header-section.entity.ts +19 -0
- package/src/module/layout/layout.module.ts +17 -0
- package/src/module/layout/repository/header-items.repository.ts +18 -0
- package/src/module/layout/repository/header-section.repository.ts +18 -0
- package/src/module/layout/service/header-section.service.ts +26 -0
- package/src/module/master/controller/master.controller.ts +22 -22
- package/src/module/meta/controller/entity.controller.ts +56 -3
- package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
- package/src/module/meta/entity/attribute-master.entity.ts +67 -67
- package/src/module/meta/entity/base-entity.entity.ts +2 -3
- package/src/module/meta/entity/entity-master.entity.ts +3 -0
- package/src/module/meta/entity/entity-table-column.entity.ts +1 -1
- package/src/module/meta/entity/entity-table.entity.ts +4 -2
- package/src/module/meta/entity/media-data.entity.ts +32 -0
- package/src/module/meta/entity/preference.entity.ts +65 -65
- package/src/module/meta/entity.module.ts +15 -1
- package/src/module/meta/repository/attribute-master.repository.ts +28 -28
- package/src/module/meta/repository/entity-table-column.repository.ts +3 -3
- package/src/module/meta/repository/entity-table.repository.ts +14 -0
- package/src/module/meta/repository/media-data.repository.ts +50 -0
- package/src/module/meta/repository/preference.repository.ts +20 -20
- package/src/module/meta/service/entity-list.service.ts +36 -7
- package/src/module/meta/service/entity-service-impl.service.ts +138 -20
- package/src/module/meta/service/entity-table-column.service.ts +14 -1
- package/src/module/meta/service/entity-table.service.ts +8 -1
- package/src/module/meta/service/entity.service.ts +13 -1
- package/src/module/meta/service/media-data.service.ts +44 -0
- package/src/module/meta/service/preference.service.ts +2 -17
- package/src/module/module/controller/menu.controller.ts +15 -15
- package/src/module/module/controller/module-access.controller.ts +1 -1
- package/src/module/module/entity/menu.entity.ts +10 -11
- package/src/module/module/entity/module-access.entity.ts +22 -22
- package/src/module/module/entity/module-action.entity.ts +19 -19
- package/src/module/module/entity/module.entity.ts +9 -10
- package/src/module/module/module.module.ts +2 -4
- package/src/module/module/repository/menu.repository.ts +7 -10
- package/src/module/module/repository/module-access.repository.ts +57 -42
- package/src/module/module/service/menu.service.ts +9 -10
- package/src/module/module/service/module-access.service.ts +8 -3
- package/src/module/notification/controller/otp.controller.ts +41 -0
- package/src/module/notification/entity/otp.entity.ts +28 -0
- package/src/module/notification/notification.module.ts +14 -0
- package/src/module/notification/repository/otp.repository.ts +27 -0
- package/src/module/notification/service/otp.service.ts +56 -0
- package/src/module/user/controller/login.controller.ts +2 -1
- package/src/module/user/controller/user.controller.ts +28 -28
- package/src/module/user/dto/create-user.dto.ts +43 -43
- package/src/module/user/dto/update-user.dto.ts +4 -4
- package/src/module/user/entity/role.entity.ts +1 -1
- package/src/module/user/entity/user-role-mapping.entity.ts +21 -21
- package/src/module/user/entity/user-session.entity.ts +61 -61
- package/src/module/user/entity/user.entity.ts +35 -35
- package/src/module/user/repository/role.repository.ts +16 -16
- package/src/module/user/repository/user-role-mapping.repository.ts +9 -3
- package/src/module/user/repository/user.repository.ts +2 -2
- package/src/module/user/repository/userSession.repository.ts +33 -33
- package/src/module/user/service/login.service.ts +25 -8
- package/src/module/user/service/role.service.ts +2 -13
- package/src/module/user/service/user-role-mapping.service.ts +1 -1
- package/src/module/user/service/user-session.service.ts +2 -2
- package/src/module/user/service/user.service.ts +16 -27
- package/src/module/user/user.module.ts +1 -1
- package/src/resources/dev.properties.yaml +15 -0
- package/src/resources/properties.module.ts +12 -0
- package/src/resources/properties.yaml.ts +11 -0
- package/src/resources/uat.properties.yaml +15 -0
- package/src/utils/dto/excel-data.dto.ts +14 -0
- package/src/utils/dto/excelsheet-data.dto.ts +5 -0
- package/src/utils/service/clockIDGenUtil.service.ts +1 -1
- package/src/utils/service/dateUtil.service.ts +1 -1
- package/src/utils/service/encryptUtil.service.ts +97 -97
- package/src/utils/service/excel-helper.service.ts +14 -1
- package/src/utils/service/excelUtil.service.ts +15 -15
- package/src/utils/service/loggingUtil.service.ts +48 -48
- package/src/utils/service/reflection-helper.service.ts +53 -53
- package/src/utils/utils.module.ts +7 -7
- package/.env +0 -6
- package/dist/constant/status.constant.d.ts +0 -4
- package/dist/constant/status.constant.js +0 -9
- package/dist/constant/status.constant.js.map +0 -1
- package/src/constant/status.constant.ts +0 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PassportStrategy } from '@nestjs/passport';
|
|
2
|
-
import { AuthService } from '../services/auth.service';
|
|
3
|
-
import { Injectable } from '@nestjs/common';
|
|
4
|
-
import { Strategy } from 'passport-jwt';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class LocalStrategy extends PassportStrategy(Strategy) {
|
|
8
|
-
constructor(private authService: AuthService) {
|
|
9
|
-
super({
|
|
10
|
-
usernameField: 'email',
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
import { PassportStrategy } from '@nestjs/passport';
|
|
2
|
+
import { AuthService } from '../services/auth.service';
|
|
3
|
+
import { Injectable } from '@nestjs/common';
|
|
4
|
+
import { Strategy } from 'passport-jwt';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class LocalStrategy extends PassportStrategy(Strategy) {
|
|
8
|
+
constructor(private authService: AuthService) {
|
|
9
|
+
super({
|
|
10
|
+
usernameField: 'email',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Module } from '@nestjs/common';
|
|
2
|
-
import { EntityModule } from '../meta/entity.module';
|
|
3
|
-
import { UserModule } from '../user/user.module';
|
|
4
|
-
import { ModuleModule } from '../module/module.module';
|
|
5
|
-
import { DevService } from './service/dev.service';
|
|
6
|
-
|
|
7
|
-
@Module({
|
|
8
|
-
imports: [EntityModule, UserModule, ModuleModule],
|
|
9
|
-
controllers: [],
|
|
10
|
-
providers: [DevService],
|
|
11
|
-
})
|
|
12
|
-
export class DevModule {}
|
|
1
|
+
import { Module } from '@nestjs/common';
|
|
2
|
+
import { EntityModule } from '../meta/entity.module';
|
|
3
|
+
import { UserModule } from '../user/user.module';
|
|
4
|
+
import { ModuleModule } from '../module/module.module';
|
|
5
|
+
import { DevService } from './service/dev.service';
|
|
6
|
+
|
|
7
|
+
@Module({
|
|
8
|
+
imports: [EntityModule, UserModule, ModuleModule],
|
|
9
|
+
controllers: [],
|
|
10
|
+
providers: [DevService],
|
|
11
|
+
})
|
|
12
|
+
export class DevModule {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
|
-
import { UserService } from '../../user/service/user.service';
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class DevService {
|
|
6
|
-
constructor(private readonly userService: UserService) {}
|
|
7
|
-
}
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { UserService } from '../../user/service/user.service';
|
|
3
|
+
|
|
4
|
+
@Injectable()
|
|
5
|
+
export class DevService {
|
|
6
|
+
constructor(private readonly userService: UserService) {}
|
|
7
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Module } from '@nestjs/common';
|
|
2
2
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
3
|
-
import { UserData } from '../user/entity/user.entity';
|
|
4
3
|
import { OrganizationService } from './service/organization.service';
|
|
5
4
|
import { OrganizationData } from './entity/organization.entity';
|
|
6
5
|
|
|
7
6
|
@Module({
|
|
8
7
|
imports: [TypeOrmModule.forFeature([OrganizationData])],
|
|
9
|
-
providers:[OrganizationService],
|
|
10
|
-
exports:[OrganizationService]
|
|
8
|
+
providers: [OrganizationService],
|
|
9
|
+
exports: [OrganizationService],
|
|
11
10
|
})
|
|
12
11
|
export class EnterpriseModule {}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
@Entity({ name: 'cr_enterprise' })
|
|
4
|
-
export class EnterpriseData {
|
|
5
|
-
@PrimaryGeneratedColumn({ name: 'id', type: 'bigint' })
|
|
6
|
-
id: number;
|
|
7
|
-
|
|
8
|
-
@Column({ name: 'entity_type', type: 'varchar', nullable: true, length: 50 })
|
|
9
|
-
entityType: string;
|
|
10
|
-
|
|
11
|
-
@Column({ name: 'code', type: 'varchar', nullable: true, length: 50 })
|
|
12
|
-
code: string;
|
|
13
|
-
|
|
14
|
-
@Column({ name: 'name', type: 'varchar', nullable: true, length: 50 })
|
|
15
|
-
name: string;
|
|
16
|
-
|
|
17
|
-
@Column({ name: 'status', type: 'varchar', nullable: true, length: 50 })
|
|
18
|
-
status: string;
|
|
19
|
-
|
|
20
|
-
@Column({ name: 'created_by', type: 'int', nullable: true })
|
|
21
|
-
createdBy: number;
|
|
22
|
-
|
|
23
|
-
@Column({ name: 'modified_by', type: 'int', nullable: true })
|
|
24
|
-
modifiedBy: number;
|
|
25
|
-
|
|
26
|
-
@Column({ name: 'created_date', type: 'datetime', nullable: true })
|
|
27
|
-
createdDate: Date;
|
|
28
|
-
|
|
29
|
-
@Column({ name: 'modified_date', type: 'datetime', nullable: true })
|
|
30
|
-
modifiedDate: Date;
|
|
31
|
-
|
|
32
|
-
@Column({ name: 'app_code', type: 'varchar', nullable: true, length: 50 })
|
|
33
|
-
appCode: string;
|
|
34
|
-
|
|
35
|
-
@Column({ name: 'app_url_name', type: 'varchar', nullable: true, length: 50 })
|
|
36
|
-
appUrlName: string;
|
|
37
|
-
}
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
@Entity({ name: 'cr_enterprise' })
|
|
4
|
+
export class EnterpriseData {
|
|
5
|
+
@PrimaryGeneratedColumn({ name: 'id', type: 'bigint' })
|
|
6
|
+
id: number;
|
|
7
|
+
|
|
8
|
+
@Column({ name: 'entity_type', type: 'varchar', nullable: true, length: 50 })
|
|
9
|
+
entityType: string;
|
|
10
|
+
|
|
11
|
+
@Column({ name: 'code', type: 'varchar', nullable: true, length: 50 })
|
|
12
|
+
code: string;
|
|
13
|
+
|
|
14
|
+
@Column({ name: 'name', type: 'varchar', nullable: true, length: 50 })
|
|
15
|
+
name: string;
|
|
16
|
+
|
|
17
|
+
@Column({ name: 'status', type: 'varchar', nullable: true, length: 50 })
|
|
18
|
+
status: string;
|
|
19
|
+
|
|
20
|
+
@Column({ name: 'created_by', type: 'int', nullable: true })
|
|
21
|
+
createdBy: number;
|
|
22
|
+
|
|
23
|
+
@Column({ name: 'modified_by', type: 'int', nullable: true })
|
|
24
|
+
modifiedBy: number;
|
|
25
|
+
|
|
26
|
+
@Column({ name: 'created_date', type: 'datetime', nullable: true })
|
|
27
|
+
createdDate: Date;
|
|
28
|
+
|
|
29
|
+
@Column({ name: 'modified_date', type: 'datetime', nullable: true })
|
|
30
|
+
modifiedDate: Date;
|
|
31
|
+
|
|
32
|
+
@Column({ name: 'app_code', type: 'varchar', nullable: true, length: 50 })
|
|
33
|
+
appCode: string;
|
|
34
|
+
|
|
35
|
+
@Column({ name: 'app_url_name', type: 'varchar', nullable: true, length: 50 })
|
|
36
|
+
appUrlName: string;
|
|
37
|
+
}
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
@Entity({ name: 'cr_organization' })
|
|
4
|
-
export class OrganizationData {
|
|
5
|
-
@PrimaryGeneratedColumn({ name: 'id', type: 'int' })
|
|
6
|
-
id: number;
|
|
7
|
-
|
|
8
|
-
@Column({ name: 'enterprise_id', type: 'int' })
|
|
9
|
-
enterprise_id: number;
|
|
10
|
-
|
|
11
|
-
@Column({ name: 'code', nullable: true })
|
|
12
|
-
code: string;
|
|
13
|
-
|
|
14
|
-
@Column({ name: 'app_code', nullable: true })
|
|
15
|
-
appCode: string;
|
|
16
|
-
|
|
17
|
-
@Column({ name: 'name', nullable: true })
|
|
18
|
-
name: string;
|
|
19
|
-
|
|
20
|
-
@Column({ name: 'status', type: 'varchar', nullable: true })
|
|
21
|
-
status: string;
|
|
22
|
-
|
|
23
|
-
@Column({ name: 'seq_no', nullable: true })
|
|
24
|
-
seq_no: number;
|
|
25
|
-
|
|
26
|
-
@Column({ name: 'created_by', nullable: true })
|
|
27
|
-
created_by: number;
|
|
28
|
-
|
|
29
|
-
@Column({ name: 'modified_by', nullable: true })
|
|
30
|
-
modified_by: number;
|
|
31
|
-
|
|
32
|
-
@Column({ name: 'created_date', nullable: true })
|
|
33
|
-
created_date: Date;
|
|
34
|
-
|
|
35
|
-
@Column({ name: 'parent_id', nullable: true })
|
|
36
|
-
parent_id: number;
|
|
37
|
-
|
|
38
|
-
@Column({ name: 'modified_date', nullable: true })
|
|
39
|
-
modified_date: Date;
|
|
40
|
-
|
|
41
|
-
@Column({ name: 'contact_number', nullable: true })
|
|
42
|
-
contact_number: string;
|
|
43
|
-
|
|
44
|
-
@Column({ name: 'email', nullable: true })
|
|
45
|
-
emailId: string;
|
|
46
|
-
|
|
47
|
-
@Column({ name: 'entity_type', nullable: true })
|
|
48
|
-
entity_type: string;
|
|
49
|
-
|
|
50
|
-
@Column({ name: 'primary_contact_name', nullable: true })
|
|
51
|
-
primary_contact_name: string;
|
|
52
|
-
|
|
53
|
-
@Column({ name: 'address', nullable: true })
|
|
54
|
-
address: string;
|
|
55
|
-
|
|
56
|
-
@Column({ name: 'gstin', nullable: true })
|
|
57
|
-
gstin: string;
|
|
58
|
-
|
|
59
|
-
@Column({ name: 'company_pan_number', nullable: true })
|
|
60
|
-
company_pan_number: string;
|
|
61
|
-
|
|
62
|
-
@Column({ name: 'bankacc_benef_name', nullable: true })
|
|
63
|
-
bankacc_benef_name: string;
|
|
64
|
-
|
|
65
|
-
@Column({ name: 'bankacc_bank_name', nullable: true })
|
|
66
|
-
bankacc_bank_name: string;
|
|
67
|
-
|
|
68
|
-
@Column({ name: 'bankacc_account_number', nullable: true })
|
|
69
|
-
bankaccAccountNumber: string;
|
|
70
|
-
|
|
71
|
-
@Column({ name: 'bankacc_branch_IFSC', nullable: true })
|
|
72
|
-
bankacc_account_number: string;
|
|
73
|
-
|
|
74
|
-
@Column({
|
|
75
|
-
name: 'organization_type',
|
|
76
|
-
type: 'varchar',
|
|
77
|
-
nullable: true,
|
|
78
|
-
})
|
|
79
|
-
organization_type: string;
|
|
80
|
-
}
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
@Entity({ name: 'cr_organization' })
|
|
4
|
+
export class OrganizationData {
|
|
5
|
+
@PrimaryGeneratedColumn({ name: 'id', type: 'int' })
|
|
6
|
+
id: number;
|
|
7
|
+
|
|
8
|
+
@Column({ name: 'enterprise_id', type: 'int' })
|
|
9
|
+
enterprise_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ name: 'code', nullable: true })
|
|
12
|
+
code: string;
|
|
13
|
+
|
|
14
|
+
@Column({ name: 'app_code', nullable: true })
|
|
15
|
+
appCode: string;
|
|
16
|
+
|
|
17
|
+
@Column({ name: 'name', nullable: true })
|
|
18
|
+
name: string;
|
|
19
|
+
|
|
20
|
+
@Column({ name: 'status', type: 'varchar', nullable: true })
|
|
21
|
+
status: string;
|
|
22
|
+
|
|
23
|
+
@Column({ name: 'seq_no', nullable: true })
|
|
24
|
+
seq_no: number;
|
|
25
|
+
|
|
26
|
+
@Column({ name: 'created_by', nullable: true })
|
|
27
|
+
created_by: number;
|
|
28
|
+
|
|
29
|
+
@Column({ name: 'modified_by', nullable: true })
|
|
30
|
+
modified_by: number;
|
|
31
|
+
|
|
32
|
+
@Column({ name: 'created_date', nullable: true })
|
|
33
|
+
created_date: Date;
|
|
34
|
+
|
|
35
|
+
@Column({ name: 'parent_id', nullable: true })
|
|
36
|
+
parent_id: number;
|
|
37
|
+
|
|
38
|
+
@Column({ name: 'modified_date', nullable: true })
|
|
39
|
+
modified_date: Date;
|
|
40
|
+
|
|
41
|
+
@Column({ name: 'contact_number', nullable: true })
|
|
42
|
+
contact_number: string;
|
|
43
|
+
|
|
44
|
+
@Column({ name: 'email', nullable: true })
|
|
45
|
+
emailId: string;
|
|
46
|
+
|
|
47
|
+
@Column({ name: 'entity_type', nullable: true })
|
|
48
|
+
entity_type: string;
|
|
49
|
+
|
|
50
|
+
@Column({ name: 'primary_contact_name', nullable: true })
|
|
51
|
+
primary_contact_name: string;
|
|
52
|
+
|
|
53
|
+
@Column({ name: 'address', nullable: true })
|
|
54
|
+
address: string;
|
|
55
|
+
|
|
56
|
+
@Column({ name: 'gstin', nullable: true })
|
|
57
|
+
gstin: string;
|
|
58
|
+
|
|
59
|
+
@Column({ name: 'company_pan_number', nullable: true })
|
|
60
|
+
company_pan_number: string;
|
|
61
|
+
|
|
62
|
+
@Column({ name: 'bankacc_benef_name', nullable: true })
|
|
63
|
+
bankacc_benef_name: string;
|
|
64
|
+
|
|
65
|
+
@Column({ name: 'bankacc_bank_name', nullable: true })
|
|
66
|
+
bankacc_bank_name: string;
|
|
67
|
+
|
|
68
|
+
@Column({ name: 'bankacc_account_number', nullable: true })
|
|
69
|
+
bankaccAccountNumber: string;
|
|
70
|
+
|
|
71
|
+
@Column({ name: 'bankacc_branch_IFSC', nullable: true })
|
|
72
|
+
bankacc_account_number: string;
|
|
73
|
+
|
|
74
|
+
@Column({
|
|
75
|
+
name: 'organization_type',
|
|
76
|
+
type: 'varchar',
|
|
77
|
+
nullable: true,
|
|
78
|
+
})
|
|
79
|
+
organization_type: string;
|
|
80
|
+
}
|
|
@@ -1,34 +1,69 @@
|
|
|
1
1
|
import { Injectable } from '@nestjs/common';
|
|
2
2
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
|
-
import { Repository } from 'typeorm';
|
|
3
|
+
import { EntityManager, Repository } from 'typeorm';
|
|
4
4
|
import { OrganizationData } from '../entity/organization.entity';
|
|
5
|
+
import { ClockIDGenService } from 'src/utils/service/clockIDGenUtil.service';
|
|
5
6
|
|
|
6
7
|
@Injectable()
|
|
7
8
|
export class OrganizationService {
|
|
8
9
|
constructor(
|
|
9
10
|
@InjectRepository(OrganizationData)
|
|
10
11
|
private readonly organizationRepository: Repository<OrganizationData>,
|
|
12
|
+
private readonly idGen: ClockIDGenService,
|
|
11
13
|
) {}
|
|
12
14
|
|
|
13
|
-
async create(
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
async create(
|
|
16
|
+
organizationDto: Partial<OrganizationData>,
|
|
17
|
+
manager?: EntityManager,
|
|
18
|
+
): Promise<OrganizationData> {
|
|
19
|
+
const repo = manager
|
|
20
|
+
? manager.getRepository(OrganizationData)
|
|
21
|
+
: this.organizationRepository;
|
|
22
|
+
|
|
23
|
+
organizationDto.code = this.idGen.idGenerator('ORG');
|
|
24
|
+
organizationDto.status = 'ACTIVE';
|
|
25
|
+
organizationDto.created_date = new Date();
|
|
26
|
+
const organization = repo.create(organizationDto);
|
|
27
|
+
return await repo.save(organization);
|
|
16
28
|
}
|
|
17
29
|
|
|
18
|
-
async findAll(): Promise<OrganizationData[]> {
|
|
19
|
-
|
|
30
|
+
async findAll(manager?: EntityManager): Promise<OrganizationData[]> {
|
|
31
|
+
const repo = manager
|
|
32
|
+
? manager.getRepository(OrganizationData)
|
|
33
|
+
: this.organizationRepository;
|
|
34
|
+
|
|
35
|
+
return await repo.find();
|
|
20
36
|
}
|
|
21
37
|
|
|
22
|
-
async findOne(
|
|
23
|
-
|
|
38
|
+
async findOne(
|
|
39
|
+
id: number,
|
|
40
|
+
manager?: EntityManager,
|
|
41
|
+
): Promise<OrganizationData | null> {
|
|
42
|
+
const repo = manager
|
|
43
|
+
? manager.getRepository(OrganizationData)
|
|
44
|
+
: this.organizationRepository;
|
|
45
|
+
|
|
46
|
+
return await repo.findOne({ where: { id } });
|
|
24
47
|
}
|
|
25
48
|
|
|
26
|
-
async update(
|
|
27
|
-
|
|
28
|
-
|
|
49
|
+
async update(
|
|
50
|
+
id: number,
|
|
51
|
+
organizationDto: Partial<OrganizationData>,
|
|
52
|
+
manager?: EntityManager,
|
|
53
|
+
): Promise<OrganizationData | null> {
|
|
54
|
+
const repo = manager
|
|
55
|
+
? manager.getRepository(OrganizationData)
|
|
56
|
+
: this.organizationRepository;
|
|
57
|
+
|
|
58
|
+
await repo.update(id, organizationDto);
|
|
59
|
+
return await repo.findOne({ where: { id } });
|
|
29
60
|
}
|
|
30
61
|
|
|
31
|
-
async remove(id: number): Promise<void> {
|
|
32
|
-
|
|
62
|
+
async remove(id: number, manager?: EntityManager): Promise<void> {
|
|
63
|
+
const repo = manager
|
|
64
|
+
? manager.getRepository(OrganizationData)
|
|
65
|
+
: this.organizationRepository;
|
|
66
|
+
|
|
67
|
+
await repo.delete(id);
|
|
33
68
|
}
|
|
34
69
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Controller, Get, HttpStatus, Inject, Req, Res, UseGuards } from '@nestjs/common';
|
|
2
|
+
import { JwtAuthGuard } from '../../auth/guards/jwt.guard';
|
|
3
|
+
import { HeaderSectionService } from '../service/header-section.service';
|
|
4
|
+
import { Request, Response } from 'express';
|
|
5
|
+
import { UserService } from '../../user/service/user.service';
|
|
6
|
+
import { ENTITYTYPE_USER } from '../../../constant/global.constant';
|
|
7
|
+
|
|
8
|
+
@Controller('layout')
|
|
9
|
+
@UseGuards(JwtAuthGuard)
|
|
10
|
+
export class LayoutController {
|
|
11
|
+
constructor(private readonly headerSectionService: HeaderSectionService,
|
|
12
|
+
@Inject('UserService') private readonly userService: UserService) {}
|
|
13
|
+
|
|
14
|
+
@Get('header')
|
|
15
|
+
async getHeader(@Req() req: Request & { user: any }, @Res() res: Response) {
|
|
16
|
+
const userId = req.user.userId;
|
|
17
|
+
const userData = await this.userService.getEntityData(ENTITYTYPE_USER, userId);
|
|
18
|
+
if (userData) {
|
|
19
|
+
let response = await this.headerSectionService.findByOrganizationId(userData.organization_id);
|
|
20
|
+
return res.json({
|
|
21
|
+
success: true,
|
|
22
|
+
data: response,
|
|
23
|
+
message: 'Header fetched successfully'
|
|
24
|
+
});
|
|
25
|
+
} else {
|
|
26
|
+
return res.status(HttpStatus.BAD_REQUEST).json({
|
|
27
|
+
success: false,
|
|
28
|
+
message: 'User data not found'
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
@Entity({ name: 'cr_header_items' })
|
|
4
|
+
export class HeaderItems {
|
|
5
|
+
@PrimaryGeneratedColumn()
|
|
6
|
+
id: number;
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
section_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ length: 50, nullable: true, type: 'varchar' })
|
|
12
|
+
key: string;
|
|
13
|
+
|
|
14
|
+
@Column({ length: 50, nullable: true, type: 'varchar' })
|
|
15
|
+
type: string;
|
|
16
|
+
|
|
17
|
+
@Column({ length: 50, nullable: true, type: 'varchar' })
|
|
18
|
+
icon: string;
|
|
19
|
+
|
|
20
|
+
@Column({ nullable: true, type: 'boolean' })
|
|
21
|
+
border: boolean;
|
|
22
|
+
|
|
23
|
+
@Column({ nullable: true, type: 'boolean' })
|
|
24
|
+
avatar: boolean;
|
|
25
|
+
|
|
26
|
+
@Column({ length: 500, nullable: true, type: 'varchar' })
|
|
27
|
+
options: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
@Entity({ name: 'cr_header_sections' })
|
|
4
|
+
export class HeaderSection {
|
|
5
|
+
@PrimaryGeneratedColumn()
|
|
6
|
+
id: number;
|
|
7
|
+
|
|
8
|
+
@Column({ name: 'enterprise_id', type: 'int', nullable: true })
|
|
9
|
+
enterprise_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: true, type: 'int' })
|
|
12
|
+
organization_id: number;
|
|
13
|
+
|
|
14
|
+
@Column({ length: 50, type: 'varchar', nullable: true })
|
|
15
|
+
section_name: string;
|
|
16
|
+
|
|
17
|
+
@Column({ length: 50, type: 'varchar', nullable: true })
|
|
18
|
+
position: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Module } from '@nestjs/common';
|
|
2
|
+
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
3
|
+
import { HeaderSection } from './entity/header-section.entity';
|
|
4
|
+
import { HeaderItems } from './entity/header-items.entity';
|
|
5
|
+
import { HeaderItemsRepository } from './repository/header-items.repository';
|
|
6
|
+
import { HeaderSectionRepository } from './repository/header-section.repository';
|
|
7
|
+
import { LayoutController } from './controller/layout.controller';
|
|
8
|
+
import { UserModule } from '../user/user.module';
|
|
9
|
+
import { HeaderSectionService } from './service/header-section.service';
|
|
10
|
+
|
|
11
|
+
@Module({
|
|
12
|
+
imports: [TypeOrmModule.forFeature([HeaderSection, HeaderItems]), UserModule],
|
|
13
|
+
controllers: [LayoutController],
|
|
14
|
+
providers: [HeaderItemsRepository, HeaderSectionRepository, HeaderSectionService],
|
|
15
|
+
exports: [],
|
|
16
|
+
})
|
|
17
|
+
export class LayoutModule {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
|
+
import { HeaderItems } from '../entity/header-items.entity';
|
|
4
|
+
import { Repository } from 'typeorm';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class HeaderItemsRepository {
|
|
8
|
+
constructor(
|
|
9
|
+
@InjectRepository(HeaderItems)
|
|
10
|
+
private readonly headerItemsRepository: Repository<HeaderItems>,
|
|
11
|
+
) {}
|
|
12
|
+
|
|
13
|
+
async findBySectionId(sectionId: number) {
|
|
14
|
+
return await this.headerItemsRepository.find({
|
|
15
|
+
where: { section_id: sectionId },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
|
+
import { Repository } from 'typeorm';
|
|
4
|
+
import { HeaderSection } from '../entity/header-section.entity';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class HeaderSectionRepository {
|
|
8
|
+
constructor(
|
|
9
|
+
@InjectRepository(HeaderSection)
|
|
10
|
+
private readonly headerSectionRepository: Repository<HeaderSection>,
|
|
11
|
+
) {}
|
|
12
|
+
|
|
13
|
+
async findByOrganizationId(organizationId: number) {
|
|
14
|
+
return await this.headerSectionRepository.find({
|
|
15
|
+
where: { organization_id: organizationId },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { HeaderSectionRepository } from '../repository/header-section.repository';
|
|
3
|
+
import { HeaderItemsRepository } from '../repository/header-items.repository';
|
|
4
|
+
|
|
5
|
+
@Injectable()
|
|
6
|
+
export class HeaderSectionService {
|
|
7
|
+
constructor(
|
|
8
|
+
private readonly headerSectionRepository: HeaderSectionRepository,
|
|
9
|
+
private readonly headerItemsRepository: HeaderItemsRepository,
|
|
10
|
+
) {}
|
|
11
|
+
|
|
12
|
+
async findByOrganizationId(organizationId: number) {
|
|
13
|
+
let headerSections =
|
|
14
|
+
await this.headerSectionRepository.findByOrganizationId(organizationId);
|
|
15
|
+
let response = {};
|
|
16
|
+
|
|
17
|
+
await Promise.all(
|
|
18
|
+
headerSections.map(async (headerSection) => {
|
|
19
|
+
response[headerSection.section_name] =
|
|
20
|
+
await this.headerItemsRepository.findBySectionId(headerSection.id);
|
|
21
|
+
}),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
return response;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Controller,
|
|
3
|
-
Post,
|
|
4
|
-
UploadedFile,
|
|
5
|
-
UseInterceptors,
|
|
6
|
-
} from '@nestjs/common';
|
|
7
|
-
import { FileInterceptor } from '@nestjs/platform-express';
|
|
8
|
-
import { MasterService } from '../service/master.service';
|
|
9
|
-
|
|
10
|
-
@Controller('master')
|
|
11
|
-
export class MasterController {
|
|
12
|
-
constructor(private readonly masterService: MasterService) {}
|
|
13
|
-
|
|
14
|
-
@Post('upload')
|
|
15
|
-
@UseInterceptors(FileInterceptor('file'))
|
|
16
|
-
async uploadFile(@UploadedFile() file) {
|
|
17
|
-
if (!file) {
|
|
18
|
-
throw new Error('File is required');
|
|
19
|
-
}
|
|
20
|
-
return this.masterService.processExcel(file);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Controller,
|
|
3
|
+
Post,
|
|
4
|
+
UploadedFile,
|
|
5
|
+
UseInterceptors,
|
|
6
|
+
} from '@nestjs/common';
|
|
7
|
+
import { FileInterceptor } from '@nestjs/platform-express';
|
|
8
|
+
import { MasterService } from '../service/master.service';
|
|
9
|
+
|
|
10
|
+
@Controller('master')
|
|
11
|
+
export class MasterController {
|
|
12
|
+
constructor(private readonly masterService: MasterService) {}
|
|
13
|
+
|
|
14
|
+
@Post('upload')
|
|
15
|
+
@UseInterceptors(FileInterceptor('file'))
|
|
16
|
+
async uploadFile(@UploadedFile() file) {
|
|
17
|
+
if (!file) {
|
|
18
|
+
throw new Error('File is required');
|
|
19
|
+
}
|
|
20
|
+
return this.masterService.processExcel(file);
|
|
21
|
+
}
|
|
22
|
+
}
|