rez_core 1.0.27 → 1.0.28

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 (37) hide show
  1. package/dist/core.module.js +5 -2
  2. package/dist/core.module.js.map +1 -1
  3. package/dist/module/layout/controller/layout.controller.d.ts +11 -0
  4. package/dist/module/layout/controller/layout.controller.js +61 -0
  5. package/dist/module/layout/controller/layout.controller.js.map +1 -0
  6. package/dist/module/layout/dto/header.dto.d.ts +0 -0
  7. package/dist/module/layout/dto/header.dto.js +1 -0
  8. package/dist/module/layout/dto/header.dto.js.map +1 -0
  9. package/dist/module/layout/entity/header-items.entity.d.ts +10 -0
  10. package/dist/module/layout/entity/header-items.entity.js +52 -0
  11. package/dist/module/layout/entity/header-items.entity.js.map +1 -0
  12. package/dist/module/layout/entity/header-section.entity.d.ts +7 -0
  13. package/dist/module/layout/entity/header-section.entity.js +40 -0
  14. package/dist/module/layout/entity/header-section.entity.js.map +1 -0
  15. package/dist/module/layout/layout.module.d.ts +2 -0
  16. package/dist/module/layout/layout.module.js +30 -0
  17. package/dist/module/layout/layout.module.js.map +1 -0
  18. package/dist/module/layout/repository/header-items.repository.d.ts +7 -0
  19. package/dist/module/layout/repository/header-items.repository.js +36 -0
  20. package/dist/module/layout/repository/header-items.repository.js.map +1 -0
  21. package/dist/module/layout/repository/header-section.repository.d.ts +7 -0
  22. package/dist/module/layout/repository/header-section.repository.js +36 -0
  23. package/dist/module/layout/repository/header-section.repository.js.map +1 -0
  24. package/dist/module/layout/service/header-section.service.d.ts +8 -0
  25. package/dist/module/layout/service/header-section.service.js +37 -0
  26. package/dist/module/layout/service/header-section.service.js.map +1 -0
  27. package/dist/tsconfig.build.tsbuildinfo +1 -1
  28. package/package.json +1 -1
  29. package/src/core.module.ts +5 -2
  30. package/src/module/layout/controller/layout.controller.ts +32 -0
  31. package/src/module/layout/dto/header.dto.ts +0 -0
  32. package/src/module/layout/entity/header-items.entity.ts +28 -0
  33. package/src/module/layout/entity/header-section.entity.ts +19 -0
  34. package/src/module/layout/layout.module.ts +17 -0
  35. package/src/module/layout/repository/header-items.repository.ts +18 -0
  36. package/src/module/layout/repository/header-section.repository.ts +18 -0
  37. package/src/module/layout/service/header-section.service.ts +26 -0
@@ -16,6 +16,7 @@ const user_module_1 = require("./module/user/user.module");
16
16
  const entity_module_1 = require("./module/meta/entity.module");
17
17
  const module_module_1 = require("./module/module/module.module");
18
18
  const notification_module_1 = require("./module/notification/notification.module");
19
+ const layout_module_1 = require("./module/layout/layout.module");
19
20
  let CoreModule = CoreModule_1 = class CoreModule {
20
21
  static forRootAsync(dbModule) {
21
22
  if (!dbModule) {
@@ -31,7 +32,8 @@ let CoreModule = CoreModule_1 = class CoreModule {
31
32
  utils_module_1.UtilsModule,
32
33
  user_module_1.UserModule,
33
34
  module_module_1.ModuleModule,
34
- notification_module_1.NotificationModule
35
+ notification_module_1.NotificationModule,
36
+ layout_module_1.LayoutModule,
35
37
  ],
36
38
  exports: [
37
39
  config_1.ConfigModule,
@@ -41,7 +43,8 @@ let CoreModule = CoreModule_1 = class CoreModule {
41
43
  utils_module_1.UtilsModule,
42
44
  user_module_1.UserModule,
43
45
  module_module_1.ModuleModule,
44
- notification_module_1.NotificationModule
46
+ notification_module_1.NotificationModule,
47
+ layout_module_1.LayoutModule,
45
48
  ],
46
49
  };
47
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"core.module.js","sourceRoot":"","sources":["../src/core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,2CAA8C;AAC9C,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,mFAA+E;AAIxE,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,YAAY,CAAC,QAAuB;QACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,CAAC;QAED,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE;gBACP,qBAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBACxC,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;gBACZ,wCAAkB;aACnB;YACD,OAAO,EAAE;gBACP,qBAAY;gBACZ,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;gBACZ,wCAAkB;aACnB;SACF,CAAC;IACJ,CAAC;CAEF,CAAA;AA/BY,gCAAU;qBAAV,UAAU;IAFtB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CA+BtB"}
1
+ {"version":3,"file":"core.module.js","sourceRoot":"","sources":["../src/core.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,2CAA8C;AAC9C,6EAAyE;AACzE,uDAAmD;AACnD,2DAAuD;AACvD,+DAA2D;AAC3D,iEAA6D;AAC7D,mFAA+E;AAC/E,iEAA6D;AAItD,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,YAAY,CAAC,QAAuB;QACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,CAAC;QAED,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE;gBACP,qBAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBACxC,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;gBACZ,wCAAkB;gBAClB,4BAAY;aACb;YACD,OAAO,EAAE;gBACP,qBAAY;gBACZ,QAAQ;gBACR,4BAAY;gBACZ,oCAAgB;gBAChB,0BAAW;gBACX,wBAAU;gBACV,4BAAY;gBACZ,wCAAkB;gBAClB,4BAAY;aACb;SACF,CAAC;IACJ,CAAC;CAEF,CAAA;AAjCY,gCAAU;qBAAV,UAAU;IAFtB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CAiCtB"}
@@ -0,0 +1,11 @@
1
+ import { HeaderSectionService } from '../service/header-section.service';
2
+ import { Request, Response } from 'express';
3
+ import { UserService } from '../../user/service/user.service';
4
+ export declare class LayoutController {
5
+ private readonly headerSectionService;
6
+ private readonly userService;
7
+ constructor(headerSectionService: HeaderSectionService, userService: UserService);
8
+ getHeader(req: Request & {
9
+ user: any;
10
+ }, res: Response): Promise<Response<any, Record<string, any>>>;
11
+ }
@@ -0,0 +1,61 @@
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.LayoutController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const jwt_guard_1 = require("../../auth/guards/jwt.guard");
18
+ const header_section_service_1 = require("../service/header-section.service");
19
+ const user_service_1 = require("../../user/service/user.service");
20
+ const global_constant_1 = require("../../../constant/global.constant");
21
+ let LayoutController = class LayoutController {
22
+ constructor(headerSectionService, userService) {
23
+ this.headerSectionService = headerSectionService;
24
+ this.userService = userService;
25
+ }
26
+ async getHeader(req, res) {
27
+ const userId = req.user.userId;
28
+ const userData = await this.userService.getEntityData(global_constant_1.ENTITYTYPE_USER, userId);
29
+ if (userData) {
30
+ let response = await this.headerSectionService.findByOrganizationId(userData.organization_id);
31
+ return res.json({
32
+ success: true,
33
+ data: response,
34
+ message: 'Header fetched successfully'
35
+ });
36
+ }
37
+ else {
38
+ return res.status(common_1.HttpStatus.BAD_REQUEST).json({
39
+ success: false,
40
+ message: 'User data not found'
41
+ });
42
+ }
43
+ }
44
+ };
45
+ exports.LayoutController = LayoutController;
46
+ __decorate([
47
+ (0, common_1.Get)('header'),
48
+ __param(0, (0, common_1.Req)()),
49
+ __param(1, (0, common_1.Res)()),
50
+ __metadata("design:type", Function),
51
+ __metadata("design:paramtypes", [Object, Object]),
52
+ __metadata("design:returntype", Promise)
53
+ ], LayoutController.prototype, "getHeader", null);
54
+ exports.LayoutController = LayoutController = __decorate([
55
+ (0, common_1.Controller)('layout'),
56
+ (0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
57
+ __param(1, (0, common_1.Inject)('UserService')),
58
+ __metadata("design:paramtypes", [header_section_service_1.HeaderSectionService,
59
+ user_service_1.UserService])
60
+ ], LayoutController);
61
+ //# sourceMappingURL=layout.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.controller.js","sourceRoot":"","sources":["../../../../src/module/layout/controller/layout.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0F;AAC1F,2DAA2D;AAC3D,8EAAyE;AAEzE,kEAA8D;AAC9D,uEAAoE;AAI7D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAA6B,oBAA0C,EAClB,WAAwB;QADhD,yBAAoB,GAApB,oBAAoB,CAAsB;QAClB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAG3E,AAAN,KAAK,CAAC,SAAS,CAAQ,GAA4B,EAAS,GAAa;QACvE,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC/B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,iCAAe,EAAE,MAAM,CAAC,CAAC;QAC/E,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,QAAQ,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YAC9F,OAAO,GAAG,CAAC,IAAI,CAAC;gBACd,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6BAA6B;aACvC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,CAAC,MAAM,CAAC,mBAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;gBAC7C,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,qBAAqB;aAC/B,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAtBY,4CAAgB;AAKrB;IADL,IAAA,YAAG,EAAC,QAAQ,CAAC;IACG,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgC,WAAA,IAAA,YAAG,GAAE,CAAA;;;;iDAgB1D;2BArBU,gBAAgB;IAF5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;IACpB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAGT,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;qCADiB,6CAAoB;QACL,0BAAW;GAFlE,gBAAgB,CAsB5B"}
File without changes
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=header.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.dto.js","sourceRoot":"","sources":["../../../../src/module/layout/dto/header.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export declare class HeaderItems {
2
+ id: number;
3
+ section_id: number;
4
+ key: string;
5
+ type: string;
6
+ icon: string;
7
+ border: string;
8
+ avatar: string;
9
+ options: string;
10
+ }
@@ -0,0 +1,52 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HeaderItems = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let HeaderItems = class HeaderItems {
15
+ };
16
+ exports.HeaderItems = HeaderItems;
17
+ __decorate([
18
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
19
+ __metadata("design:type", Number)
20
+ ], HeaderItems.prototype, "id", void 0);
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ nullable: true }),
23
+ __metadata("design:type", Number)
24
+ ], HeaderItems.prototype, "section_id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ length: 50, nullable: true, type: 'varchar' }),
27
+ __metadata("design:type", String)
28
+ ], HeaderItems.prototype, "key", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ length: 50, nullable: true, type: 'varchar' }),
31
+ __metadata("design:type", String)
32
+ ], HeaderItems.prototype, "type", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ length: 50, nullable: true, type: 'varchar' }),
35
+ __metadata("design:type", String)
36
+ ], HeaderItems.prototype, "icon", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ length: 50, nullable: true, type: 'varchar' }),
39
+ __metadata("design:type", String)
40
+ ], HeaderItems.prototype, "border", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ length: 50, nullable: true, type: 'varchar' }),
43
+ __metadata("design:type", String)
44
+ ], HeaderItems.prototype, "avatar", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ length: 500, nullable: true, type: 'varchar' }),
47
+ __metadata("design:type", String)
48
+ ], HeaderItems.prototype, "options", void 0);
49
+ exports.HeaderItems = HeaderItems = __decorate([
50
+ (0, typeorm_1.Entity)({ name: 'cr_header_items' })
51
+ ], HeaderItems);
52
+ //# sourceMappingURL=header-items.entity.js.map
@@ -0,0 +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,EAAC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;wCAC1C;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;yCACzC;AAGb;IADC,IAAA,gBAAM,EAAC,EAAC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;yCACzC;AAGb;IADC,IAAA,gBAAM,EAAC,EAAC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;2CACvC;AAGf;IADC,IAAA,gBAAM,EAAC,EAAC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;2CACvC;AAGf;IADC,IAAA,gBAAM,EAAC,EAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;;4CACvC;sBAvBL,WAAW;IADvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;GACvB,WAAW,CAwBvB"}
@@ -0,0 +1,7 @@
1
+ export declare class HeaderSection {
2
+ id: number;
3
+ enterprise_id: number;
4
+ organization_id: number;
5
+ section_name: string;
6
+ position: string;
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HeaderSection = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let HeaderSection = class HeaderSection {
15
+ };
16
+ exports.HeaderSection = HeaderSection;
17
+ __decorate([
18
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
19
+ __metadata("design:type", Number)
20
+ ], HeaderSection.prototype, "id", void 0);
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ name: 'enterprise_id', type: 'int', nullable: true }),
23
+ __metadata("design:type", Number)
24
+ ], HeaderSection.prototype, "enterprise_id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ nullable: true, type: 'int' }),
27
+ __metadata("design:type", Number)
28
+ ], HeaderSection.prototype, "organization_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ length: 50, type: 'varchar', nullable: true }),
31
+ __metadata("design:type", String)
32
+ ], HeaderSection.prototype, "section_name", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ length: 50, type: 'varchar', nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], HeaderSection.prototype, "position", void 0);
37
+ exports.HeaderSection = HeaderSection = __decorate([
38
+ (0, typeorm_1.Entity)({ name: 'cr_header_sections' })
39
+ ], HeaderSection);
40
+ //# sourceMappingURL=header-section.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-section.entity.js","sourceRoot":"","sources":["../../../../src/module/layout/entity/header-section.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiE;AAG1D,IAAM,aAAa,GAAnB,MAAM,aAAa;CAezB,CAAA;AAfY,sCAAa;AAExB;IADC,IAAA,gCAAsB,GAAE;;yCACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACzC;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;sDAChB;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACnC;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACvC;wBAdN,aAAa;IADzB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;GAC1B,aAAa,CAezB"}
@@ -0,0 +1,2 @@
1
+ export declare class LayoutModule {
2
+ }
@@ -0,0 +1,30 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.LayoutModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const typeorm_1 = require("@nestjs/typeorm");
12
+ const header_section_entity_1 = require("./entity/header-section.entity");
13
+ const header_items_entity_1 = require("./entity/header-items.entity");
14
+ const header_items_repository_1 = require("./repository/header-items.repository");
15
+ const header_section_repository_1 = require("./repository/header-section.repository");
16
+ const layout_controller_1 = require("./controller/layout.controller");
17
+ const user_module_1 = require("../user/user.module");
18
+ const header_section_service_1 = require("./service/header-section.service");
19
+ let LayoutModule = class LayoutModule {
20
+ };
21
+ exports.LayoutModule = LayoutModule;
22
+ exports.LayoutModule = LayoutModule = __decorate([
23
+ (0, common_1.Module)({
24
+ imports: [typeorm_1.TypeOrmModule.forFeature([header_section_entity_1.HeaderSection, header_items_entity_1.HeaderItems]), user_module_1.UserModule],
25
+ controllers: [layout_controller_1.LayoutController],
26
+ providers: [header_items_repository_1.HeaderItemsRepository, header_section_repository_1.HeaderSectionRepository, header_section_service_1.HeaderSectionService],
27
+ exports: [],
28
+ })
29
+ ], LayoutModule);
30
+ //# sourceMappingURL=layout.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.module.js","sourceRoot":"","sources":["../../../src/module/layout/layout.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,0EAA+D;AAC/D,sEAA2D;AAC3D,kFAA6E;AAC7E,sFAAiF;AACjF,sEAAkE;AAClE,qDAAiD;AACjD,6EAAwE;AAQjE,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IANxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,qCAAa,EAAE,iCAAW,CAAC,CAAC,EAAE,wBAAU,CAAC;QAC7E,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,CAAC,+CAAqB,EAAE,mDAAuB,EAAE,6CAAoB,CAAC;QACjF,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,YAAY,CAAG"}
@@ -0,0 +1,7 @@
1
+ import { HeaderItems } from '../entity/header-items.entity';
2
+ import { Repository } from 'typeorm';
3
+ export declare class HeaderItemsRepository {
4
+ private readonly headerItemsRepository;
5
+ constructor(headerItemsRepository: Repository<HeaderItems>);
6
+ findBySectionId(sectionId: number): Promise<HeaderItems[]>;
7
+ }
@@ -0,0 +1,36 @@
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.HeaderItemsRepository = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const typeorm_1 = require("@nestjs/typeorm");
18
+ const header_items_entity_1 = require("../entity/header-items.entity");
19
+ const typeorm_2 = require("typeorm");
20
+ let HeaderItemsRepository = class HeaderItemsRepository {
21
+ constructor(headerItemsRepository) {
22
+ this.headerItemsRepository = headerItemsRepository;
23
+ }
24
+ async findBySectionId(sectionId) {
25
+ return await this.headerItemsRepository.find({
26
+ where: { section_id: sectionId },
27
+ });
28
+ }
29
+ };
30
+ exports.HeaderItemsRepository = HeaderItemsRepository;
31
+ exports.HeaderItemsRepository = HeaderItemsRepository = __decorate([
32
+ (0, common_1.Injectable)(),
33
+ __param(0, (0, typeorm_1.InjectRepository)(header_items_entity_1.HeaderItems)),
34
+ __metadata("design:paramtypes", [typeorm_2.Repository])
35
+ ], HeaderItemsRepository);
36
+ //# sourceMappingURL=header-items.repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-items.repository.js","sourceRoot":"","sources":["../../../../src/module/layout/repository/header-items.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,uEAA4D;AAC5D,qCAAqC;AAG9B,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YAEmB,qBAA8C;QAA9C,0BAAqB,GAArB,qBAAqB,CAAyB;IAC9D,CAAC;IAEJ,KAAK,CAAC,eAAe,CAAC,SAAiB;QACrC,OAAO,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC;YAC3C,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAXY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,iCAAW,CAAC,CAAA;qCACU,oBAAU;GAHzC,qBAAqB,CAWjC"}
@@ -0,0 +1,7 @@
1
+ import { Repository } from 'typeorm';
2
+ import { HeaderSection } from '../entity/header-section.entity';
3
+ export declare class HeaderSectionRepository {
4
+ private readonly headerSectionRepository;
5
+ constructor(headerSectionRepository: Repository<HeaderSection>);
6
+ findByOrganizationId(organizationId: number): Promise<HeaderSection[]>;
7
+ }
@@ -0,0 +1,36 @@
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.HeaderSectionRepository = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const typeorm_1 = require("@nestjs/typeorm");
18
+ const typeorm_2 = require("typeorm");
19
+ const header_section_entity_1 = require("../entity/header-section.entity");
20
+ let HeaderSectionRepository = class HeaderSectionRepository {
21
+ constructor(headerSectionRepository) {
22
+ this.headerSectionRepository = headerSectionRepository;
23
+ }
24
+ async findByOrganizationId(organizationId) {
25
+ return await this.headerSectionRepository.find({
26
+ where: { organization_id: organizationId },
27
+ });
28
+ }
29
+ };
30
+ exports.HeaderSectionRepository = HeaderSectionRepository;
31
+ exports.HeaderSectionRepository = HeaderSectionRepository = __decorate([
32
+ (0, common_1.Injectable)(),
33
+ __param(0, (0, typeorm_1.InjectRepository)(header_section_entity_1.HeaderSection)),
34
+ __metadata("design:paramtypes", [typeorm_2.Repository])
35
+ ], HeaderSectionRepository);
36
+ //# sourceMappingURL=header-section.repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-section.repository.js","sourceRoot":"","sources":["../../../../src/module/layout/repository/header-section.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AACrC,2EAAgE;AAGzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAEmB,uBAAkD;QAAlD,4BAAuB,GAAvB,uBAAuB,CAA2B;IAClE,CAAC;IAEJ,KAAK,CAAC,oBAAoB,CAAC,cAAsB;QAC/C,OAAO,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC;YAC7C,KAAK,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE;SAC3C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAXY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,qCAAa,CAAC,CAAA;qCACU,oBAAU;GAH3C,uBAAuB,CAWnC"}
@@ -0,0 +1,8 @@
1
+ import { HeaderSectionRepository } from '../repository/header-section.repository';
2
+ import { HeaderItemsRepository } from '../repository/header-items.repository';
3
+ export declare class HeaderSectionService {
4
+ private readonly headerSectionRepository;
5
+ private readonly headerItemsRepository;
6
+ constructor(headerSectionRepository: HeaderSectionRepository, headerItemsRepository: HeaderItemsRepository);
7
+ findByOrganizationId(organizationId: number): Promise<{}>;
8
+ }
@@ -0,0 +1,37 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HeaderSectionService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const header_section_repository_1 = require("../repository/header-section.repository");
15
+ const header_items_repository_1 = require("../repository/header-items.repository");
16
+ let HeaderSectionService = class HeaderSectionService {
17
+ constructor(headerSectionRepository, headerItemsRepository) {
18
+ this.headerSectionRepository = headerSectionRepository;
19
+ this.headerItemsRepository = headerItemsRepository;
20
+ }
21
+ async findByOrganizationId(organizationId) {
22
+ let headerSections = await this.headerSectionRepository.findByOrganizationId(organizationId);
23
+ let response = {};
24
+ await Promise.all(headerSections.map(async (headerSection) => {
25
+ response[headerSection.section_name] =
26
+ await this.headerItemsRepository.findBySectionId(headerSection.id);
27
+ }));
28
+ return response;
29
+ }
30
+ };
31
+ exports.HeaderSectionService = HeaderSectionService;
32
+ exports.HeaderSectionService = HeaderSectionService = __decorate([
33
+ (0, common_1.Injectable)(),
34
+ __metadata("design:paramtypes", [header_section_repository_1.HeaderSectionRepository,
35
+ header_items_repository_1.HeaderItemsRepository])
36
+ ], HeaderSectionService);
37
+ //# sourceMappingURL=header-section.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-section.service.js","sourceRoot":"","sources":["../../../../src/module/layout/service/header-section.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uFAAkF;AAClF,mFAA8E;AAGvE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,uBAAgD,EAChD,qBAA4C;QAD5C,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,0BAAqB,GAArB,qBAAqB,CAAuB;IAC5D,CAAC;IAEJ,KAAK,CAAC,oBAAoB,CAAC,cAAsB;QAC/C,IAAI,cAAc,GAChB,MAAM,IAAI,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;QAC1E,IAAI,QAAQ,GAAG,EAAE,CAAC;QAElB,MAAM,OAAO,CAAC,GAAG,CACf,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE;YACzC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC;gBAClC,MAAM,IAAI,CAAC,qBAAqB,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AApBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAGiC,mDAAuB;QACzB,+CAAqB;GAHpD,oBAAoB,CAoBhC"}