rez_core 1.0.29 → 1.0.31

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.
Files changed (53) hide show
  1. package/dist/constant/status.constant.d.ts +4 -0
  2. package/dist/constant/status.constant.js +9 -0
  3. package/dist/constant/status.constant.js.map +1 -0
  4. package/dist/module/auth/guards/role.guard.js +3 -3
  5. package/dist/module/enterprise/controller/organization.controller.d.ts +7 -0
  6. package/dist/module/enterprise/controller/organization.controller.js +40 -0
  7. package/dist/module/enterprise/controller/organization.controller.js.map +1 -0
  8. package/dist/module/enterprise/enterprise.module.js +2 -0
  9. package/dist/module/enterprise/enterprise.module.js.map +1 -1
  10. package/dist/module/layout/entity/header-items.entity.d.ts +1 -1
  11. package/dist/module/layout/entity/header-items.entity.js +2 -2
  12. package/dist/module/layout/entity/header-items.entity.js.map +1 -1
  13. package/dist/resources/dev.properties.yaml +1 -1
  14. package/dist/tsconfig.build.tsbuildinfo +1 -1
  15. package/package.json +1 -1
  16. package/src/module/auth/guards/jwt.guard.ts +22 -22
  17. package/src/module/auth/guards/role.guard.ts +68 -68
  18. package/src/module/auth/services/auth.service.ts +29 -29
  19. package/src/module/auth/services/jwt.service.ts +11 -11
  20. package/src/module/auth/strategies/local.strategy.ts +13 -13
  21. package/src/module/dev/dev.module.ts +12 -12
  22. package/src/module/dev/service/dev.service.ts +7 -7
  23. package/src/module/enterprise/controller/organization.controller.ts +16 -0
  24. package/src/module/enterprise/enterprise.module.ts +2 -0
  25. package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
  26. package/src/module/enterprise/entity/organization.entity.ts +80 -80
  27. package/src/module/layout/entity/header-items.entity.ts +2 -2
  28. package/src/module/master/controller/master.controller.ts +22 -22
  29. package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
  30. package/src/module/meta/entity/attribute-master.entity.ts +67 -67
  31. package/src/module/meta/entity/preference.entity.ts +65 -65
  32. package/src/module/meta/repository/attribute-master.repository.ts +28 -28
  33. package/src/module/meta/repository/preference.repository.ts +20 -20
  34. package/src/module/module/controller/menu.controller.ts +15 -15
  35. package/src/module/module/entity/module-access.entity.ts +22 -22
  36. package/src/module/module/entity/module-action.entity.ts +19 -19
  37. package/src/module/user/controller/user.controller.ts +28 -28
  38. package/src/module/user/dto/update-user.dto.ts +4 -4
  39. package/src/module/user/entity/user-role-mapping.entity.ts +21 -21
  40. package/src/module/user/entity/user-session.entity.ts +61 -61
  41. package/src/module/user/entity/user.entity.ts +35 -35
  42. package/src/module/user/repository/role.repository.ts +16 -16
  43. package/src/module/user/repository/userSession.repository.ts +33 -33
  44. package/src/utils/service/encryptUtil.service.ts +97 -97
  45. package/src/utils/service/excelUtil.service.ts +15 -15
  46. package/src/utils/service/reflection-helper.service.ts +53 -53
  47. package/.idea/250218_nodejs_core.iml +0 -12
  48. package/.idea/codeStyles/Project.xml +0 -59
  49. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  50. package/.idea/dataSources.xml +0 -12
  51. package/.idea/modules.xml +0 -8
  52. package/.idea/prettier.xml +0 -6
  53. package/.idea/vcs.xml +0 -6
@@ -0,0 +1,4 @@
1
+ export declare enum StatusType {
2
+ ACTIVE = 0,
3
+ INACTIVE = 1
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StatusType = void 0;
4
+ var StatusType;
5
+ (function (StatusType) {
6
+ StatusType[StatusType["ACTIVE"] = 0] = "ACTIVE";
7
+ StatusType[StatusType["INACTIVE"] = 1] = "INACTIVE";
8
+ })(StatusType || (exports.StatusType = StatusType = {}));
9
+ //# sourceMappingURL=status.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.constant.js","sourceRoot":"","sources":["../../src/constant/status.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAEX;AAFD,WAAY,UAAU;IAClB,+CAAM,CAAA;IAAE,mDAAQ,CAAA;AACpB,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}
@@ -34,9 +34,9 @@ let RolesGuard = class RolesGuard {
34
34
  }
35
35
  const requiredModule = this.reflector.get('moduleCode', context.getHandler());
36
36
  const requiredActions = this.reflector.get('actions', context.getHandler());
37
- const roleAccess = await this.entityManager.query(`SELECT *
38
- FROM cr_module_access
39
- WHERE role_id = ${user['role_id']}
37
+ const roleAccess = await this.entityManager.query(`SELECT *
38
+ FROM cr_module_access
39
+ WHERE role_id = ${user['role_id']}
40
40
  AND module_code = '${requiredModule}'`);
41
41
  if (!roleAccess || roleAccess.length === 0) {
42
42
  throw new common_1.ForbiddenException('Access denied: No permissions found for this module');
@@ -0,0 +1,7 @@
1
+ import { OrganizationService } from '../service/organization.service';
2
+ import { Request } from 'express';
3
+ export declare class OrganizationController {
4
+ private readonly orgService;
5
+ constructor(orgService: OrganizationService);
6
+ getOrganizationDropdown(req: Request): Promise<import("../entity/organization.entity").OrganizationData[]>;
7
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.OrganizationController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const organization_service_1 = require("../service/organization.service");
18
+ const jwt_guard_1 = require("../../auth/guards/jwt.guard");
19
+ let OrganizationController = class OrganizationController {
20
+ constructor(orgService) {
21
+ this.orgService = orgService;
22
+ }
23
+ async getOrganizationDropdown(req) {
24
+ return this.orgService.findAll();
25
+ }
26
+ };
27
+ exports.OrganizationController = OrganizationController;
28
+ __decorate([
29
+ (0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
30
+ (0, common_1.Get)('dropdown'),
31
+ __param(0, (0, common_1.Req)()),
32
+ __metadata("design:type", Function),
33
+ __metadata("design:paramtypes", [Object]),
34
+ __metadata("design:returntype", Promise)
35
+ ], OrganizationController.prototype, "getOrganizationDropdown", null);
36
+ exports.OrganizationController = OrganizationController = __decorate([
37
+ (0, common_1.Controller)('organization'),
38
+ __metadata("design:paramtypes", [organization_service_1.OrganizationService])
39
+ ], OrganizationController);
40
+ //# sourceMappingURL=organization.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.controller.js","sourceRoot":"","sources":["../../../../src/module/enterprise/controller/organization.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,0EAAsE;AAEtE,2DAAgE;AAGzD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAA6B,UAA+B;QAA/B,eAAU,GAAV,UAAU,CAAqB;IAAG,CAAC;IAI1D,AAAN,KAAK,CAAC,uBAAuB,CAAQ,GAAY;QAE/C,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IACnC,CAAC;CACF,CAAA;AATY,wDAAsB;AAK3B;IAFL,IAAA,kBAAS,EAAC,wBAAY,CAAC;IACvB,IAAA,YAAG,EAAC,UAAU,CAAC;IACe,WAAA,IAAA,YAAG,GAAE,CAAA;;;;qEAGnC;iCARU,sBAAsB;IADlC,IAAA,mBAAU,EAAC,cAAc,CAAC;qCAEgB,0CAAmB;GADjD,sBAAsB,CASlC"}
@@ -11,12 +11,14 @@ const common_1 = require("@nestjs/common");
11
11
  const typeorm_1 = require("@nestjs/typeorm");
12
12
  const organization_service_1 = require("./service/organization.service");
13
13
  const organization_entity_1 = require("./entity/organization.entity");
14
+ const organization_controller_1 = require("./controller/organization.controller");
14
15
  let EnterpriseModule = class EnterpriseModule {
15
16
  };
16
17
  exports.EnterpriseModule = EnterpriseModule;
17
18
  exports.EnterpriseModule = EnterpriseModule = __decorate([
18
19
  (0, common_1.Module)({
19
20
  imports: [typeorm_1.TypeOrmModule.forFeature([organization_entity_1.OrganizationData])],
21
+ controllers: [organization_controller_1.OrganizationController],
20
22
  providers: [organization_service_1.OrganizationService],
21
23
  exports: [organization_service_1.OrganizationService],
22
24
  })
@@ -1 +1 @@
1
- {"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yEAAqE;AACrE,sEAAgE;AAOzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAL5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,sCAAgB,CAAC,CAAC,CAAC;QACvD,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,0CAAmB,CAAC;KAC/B,CAAC;GACW,gBAAgB,CAAG"}
1
+ {"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yEAAqE;AACrE,sEAAgE;AAChE,kFAA8E;AAQvE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAN5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,sCAAgB,CAAC,CAAC,CAAC;QACvD,WAAW,EAAC,CAAC,gDAAsB,CAAC;QACpC,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,OAAO,EAAE,CAAC,0CAAmB,CAAC;KAC/B,CAAC;GACW,gBAAgB,CAAG"}
@@ -6,5 +6,5 @@ export declare class HeaderItems {
6
6
  icon: string;
7
7
  border: boolean;
8
8
  avatar: boolean;
9
- options: string;
9
+ options: any;
10
10
  }
@@ -43,8 +43,8 @@ __decorate([
43
43
  __metadata("design:type", Boolean)
44
44
  ], HeaderItems.prototype, "avatar", void 0);
45
45
  __decorate([
46
- (0, typeorm_1.Column)({ length: 500, nullable: true, type: 'varchar' }),
47
- __metadata("design:type", String)
46
+ (0, typeorm_1.Column)({ nullable: true, type: 'json' }),
47
+ __metadata("design:type", Object)
48
48
  ], HeaderItems.prototype, "options", void 0);
49
49
  exports.HeaderItems = HeaderItems = __decorate([
50
50
  (0, typeorm_1.Entity)({ name: 'cr_header_items' })
@@ -1 +1 @@
1
- {"version":3,"file":"header-items.entity.js","sourceRoot":"","sources":["../../../../src/module/layout/entity/header-items.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiE;AAG1D,IAAM,WAAW,GAAjB,MAAM,WAAW;CAwBvB,CAAA;AAxBY,kCAAW;AAEtB;IADC,IAAA,gCAAsB,GAAE;;uCACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACR;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;wCAC5C;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yCAC3C;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,I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