rez_core 2.1.144 → 2.1.147

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 (110) hide show
  1. package/dist/constant/global.constant.d.ts +1 -0
  2. package/dist/constant/global.constant.js +2 -1
  3. package/dist/constant/global.constant.js.map +1 -1
  4. package/dist/module/enterprise/repository/school.repository.js +18 -2
  5. package/dist/module/enterprise/repository/school.repository.js.map +1 -1
  6. package/dist/module/layout_preference/controller/layout_preference.controller.js +2 -2
  7. package/dist/module/layout_preference/controller/layout_preference.controller.js.map +1 -1
  8. package/dist/module/layout_preference/entity/layout_preference.entity.d.ts +2 -0
  9. package/dist/module/layout_preference/entity/layout_preference.entity.js +13 -0
  10. package/dist/module/layout_preference/entity/layout_preference.entity.js.map +1 -1
  11. package/dist/module/layout_preference/repository/layout_preference.repository.d.ts +1 -1
  12. package/dist/module/layout_preference/repository/layout_preference.repository.js +4 -2
  13. package/dist/module/layout_preference/repository/layout_preference.repository.js.map +1 -1
  14. package/dist/module/layout_preference/service/layout_preference.service.d.ts +1 -1
  15. package/dist/module/layout_preference/service/layout_preference.service.js +10 -4
  16. package/dist/module/layout_preference/service/layout_preference.service.js.map +1 -1
  17. package/dist/module/meta/controller/media.controller.d.ts +1 -1
  18. package/dist/module/meta/controller/media.controller.js +1 -1
  19. package/dist/module/meta/controller/media.controller.js.map +1 -1
  20. package/dist/module/workflow/controller/action-category.controller.d.ts +8 -0
  21. package/dist/module/workflow/controller/action-category.controller.js +45 -0
  22. package/dist/module/workflow/controller/action-category.controller.js.map +1 -0
  23. package/dist/module/workflow/controller/action.controller.d.ts +3 -0
  24. package/dist/module/workflow/controller/action.controller.js +14 -0
  25. package/dist/module/workflow/controller/action.controller.js.map +1 -1
  26. package/dist/module/workflow/controller/comm-template.controller.d.ts +2 -2
  27. package/dist/module/workflow/controller/comm-template.controller.js +4 -4
  28. package/dist/module/workflow/controller/comm-template.controller.js.map +1 -1
  29. package/dist/module/workflow/controller/entity-modification.controller.d.ts +8 -0
  30. package/dist/module/workflow/controller/entity-modification.controller.js +44 -0
  31. package/dist/module/workflow/controller/entity-modification.controller.js.map +1 -0
  32. package/dist/module/workflow/controller/workflow-meta.controller.d.ts +9 -0
  33. package/dist/module/workflow/controller/workflow-meta.controller.js +63 -0
  34. package/dist/module/workflow/controller/workflow-meta.controller.js.map +1 -0
  35. package/dist/module/workflow/controller/workflow.controller.d.ts +9 -1
  36. package/dist/module/workflow/controller/workflow.controller.js +17 -2
  37. package/dist/module/workflow/controller/workflow.controller.js.map +1 -1
  38. package/dist/module/workflow/entity/action-category.entity.d.ts +1 -0
  39. package/dist/module/workflow/entity/action-category.entity.js +4 -0
  40. package/dist/module/workflow/entity/action-category.entity.js.map +1 -1
  41. package/dist/module/workflow/entity/action.entity.d.ts +1 -0
  42. package/dist/module/workflow/entity/action.entity.js +4 -0
  43. package/dist/module/workflow/entity/action.entity.js.map +1 -1
  44. package/dist/module/workflow/entity/comm-template.entity.d.ts +5 -0
  45. package/dist/module/workflow/entity/comm-template.entity.js +21 -1
  46. package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
  47. package/dist/module/workflow/entity/entity-modification.entity.d.ts +13 -0
  48. package/dist/module/workflow/entity/entity-modification.entity.js +63 -0
  49. package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -0
  50. package/dist/module/workflow/entity/stage-movement-data.entity.d.ts +2 -0
  51. package/dist/module/workflow/entity/stage-movement-data.entity.js +8 -0
  52. package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -1
  53. package/dist/module/workflow/entity/template-attach-mapper.entity.d.ts +11 -0
  54. package/dist/module/workflow/entity/template-attach-mapper.entity.js +54 -0
  55. package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -0
  56. package/dist/module/workflow/repository/comm-template.repository.d.ts +8 -2
  57. package/dist/module/workflow/repository/comm-template.repository.js +37 -6
  58. package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
  59. package/dist/module/workflow/service/action-category.service.d.ts +5 -0
  60. package/dist/module/workflow/service/action-category.service.js +20 -1
  61. package/dist/module/workflow/service/action-category.service.js.map +1 -1
  62. package/dist/module/workflow/service/action.service.d.ts +1 -0
  63. package/dist/module/workflow/service/action.service.js +72 -0
  64. package/dist/module/workflow/service/action.service.js.map +1 -1
  65. package/dist/module/workflow/service/comm-template.service.d.ts +4 -1
  66. package/dist/module/workflow/service/comm-template.service.js +38 -1
  67. package/dist/module/workflow/service/comm-template.service.js.map +1 -1
  68. package/dist/module/workflow/service/entity-modification.service.d.ts +8 -0
  69. package/dist/module/workflow/service/entity-modification.service.js +52 -0
  70. package/dist/module/workflow/service/entity-modification.service.js.map +1 -0
  71. package/dist/module/workflow/service/populate-workflow.service.d.ts +21 -0
  72. package/dist/module/workflow/service/populate-workflow.service.js +124 -0
  73. package/dist/module/workflow/service/populate-workflow.service.js.map +1 -0
  74. package/dist/module/workflow/service/workflow-list-master.service.js +3 -3
  75. package/dist/module/workflow/service/workflow-meta.service.d.ts +9 -0
  76. package/dist/module/workflow/service/workflow-meta.service.js +81 -0
  77. package/dist/module/workflow/service/workflow-meta.service.js.map +1 -0
  78. package/dist/module/workflow/workflow.module.js +48 -23
  79. package/dist/module/workflow/workflow.module.js.map +1 -1
  80. package/dist/tsconfig.build.tsbuildinfo +1 -1
  81. package/package.json +1 -1
  82. package/src/constant/global.constant.ts +2 -0
  83. package/src/module/enterprise/repository/school.repository.ts +23 -2
  84. package/src/module/layout_preference/controller/layout_preference.controller.ts +4 -2
  85. package/src/module/layout_preference/entity/layout_preference.entity.ts +11 -0
  86. package/src/module/layout_preference/repository/layout_preference.repository.ts +6 -2
  87. package/src/module/layout_preference/service/layout_preference.service.ts +24 -6
  88. package/src/module/meta/controller/media.controller.ts +5 -7
  89. package/src/module/workflow/controller/action-category.controller.ts +35 -0
  90. package/src/module/workflow/controller/action.controller.ts +11 -0
  91. package/src/module/workflow/controller/comm-template.controller.ts +5 -4
  92. package/src/module/workflow/controller/entity-modification.controller.ts +35 -0
  93. package/src/module/workflow/controller/workflow-meta.controller.ts +52 -0
  94. package/src/module/workflow/controller/workflow.controller.ts +14 -0
  95. package/src/module/workflow/entity/action-category.entity.ts +3 -0
  96. package/src/module/workflow/entity/action.entity.ts +3 -0
  97. package/src/module/workflow/entity/comm-template.entity.ts +18 -1
  98. package/src/module/workflow/entity/entity-modification.entity.ts +38 -0
  99. package/src/module/workflow/entity/stage-movement-data.entity.ts +6 -0
  100. package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -0
  101. package/src/module/workflow/repository/comm-template.repository.ts +58 -5
  102. package/src/module/workflow/service/action-category.service.ts +23 -1
  103. package/src/module/workflow/service/action-template-mapping.service.ts +1 -1
  104. package/src/module/workflow/service/action.service.ts +106 -0
  105. package/src/module/workflow/service/comm-template.service.ts +54 -1
  106. package/src/module/workflow/service/entity-modification.service.ts +67 -0
  107. package/src/module/workflow/service/populate-workflow.service.ts +189 -0
  108. package/src/module/workflow/service/workflow-list-master.service.ts +3 -3
  109. package/src/module/workflow/service/workflow-meta.service.ts +98 -0
  110. package/src/module/workflow/workflow.module.ts +48 -23
@@ -1 +1 @@
1
- {"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AAEjE,gGAAwF;AAExF,qCAAoD;AAI7C,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,+CAAiB;IAClD,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAY;QAEZ,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAA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AED,KAAK,CAAC,iBAAiB,CAAC,SAAiB,EAAE,YAAsB;QAC/D,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QACzC,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,4BAAmB,CAAC,uBAAuB,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACxC;;;;KAID,EACC,CAAC,SAAS,EAAE,eAAe,CAAC,CAC7B,CAAC;QAGF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC;YAC/B,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,KAAK,EAAE,GAAG,CAAC,IAAI;SAChB,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAA;AA3MY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,oBAAU;GADxC,aAAa,CA2MzB"}
1
+ {"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AAEjE,gGAAwF;AAExF,qCAAoD;AAI7C,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,+CAAiB;IAClD,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAY;QAEZ,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC1C;iGAC2F,EAC3F,CAAC,UAAU,CAAC,EAAE,CAAC,CAChB,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iBAC/B,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;iBAClC,MAAM,CAAC,OAAO,CAAC,CAAC;YAEnB,OAAO;gBACL,GAAG,GAAG;gBACN,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;aACrD,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AArTY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,oBAAU;GADxC,aAAa,CAqTzB"}
@@ -1,11 +1,14 @@
1
1
  import { CommTemplateRepository } from '../repository/comm-template.repository';
2
2
  import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
3
+ import { UserData } from 'src/module/user/entity/user.entity';
3
4
  export declare class CommTemplateService extends EntityServiceImpl {
4
5
  private readonly commTemplateRepository;
5
6
  constructor(commTemplateRepository: CommTemplateRepository);
7
+ createEntity(entityData: any, loggedInUser: any): Promise<any>;
8
+ updateEntity(entityData: any, loggedInUser: UserData): Promise<any>;
6
9
  getEntityData(entityType: string, id: number, loggedInUser: any): Promise<any>;
7
10
  getAllCommTemplate(entity_type: string, loggedInUser: any): Promise<{
8
- label: string;
9
11
  value: string;
12
+ name: string;
10
13
  }[]>;
11
14
  }
@@ -18,6 +18,43 @@ let CommTemplateService = class CommTemplateService extends entity_service_impl_
18
18
  super();
19
19
  this.commTemplateRepository = commTemplateRepository;
20
20
  }
21
+ async createEntity(entityData, loggedInUser) {
22
+ const { attachments, ...templateData } = entityData;
23
+ const tempData = await super.createEntity(templateData, loggedInUser);
24
+ if (attachments && attachments.length > 0) {
25
+ const attachmentEntities = attachments.map((attachment) => ({
26
+ entity_type: templateData.entity_type,
27
+ template_id: tempData.id,
28
+ media_id: attachment,
29
+ organization_id: loggedInUser.organization_id,
30
+ appcode: loggedInUser.appcode,
31
+ level_id: loggedInUser.level_id,
32
+ level_type: loggedInUser.level_type,
33
+ }));
34
+ await this.commTemplateRepository.save(attachmentEntities);
35
+ }
36
+ return tempData;
37
+ }
38
+ async updateEntity(entityData, loggedInUser) {
39
+ const { attachments, ...templateData } = entityData;
40
+ const tempData = await super.updateEntity(templateData, loggedInUser);
41
+ await this.commTemplateRepository.delete({
42
+ template_id: tempData.id,
43
+ });
44
+ if (attachments && attachments.length > 0) {
45
+ const attachmentEntities = attachments.map((attachment) => ({
46
+ entity_type: templateData.entity_type,
47
+ template_id: tempData.id,
48
+ media_id: attachment,
49
+ organization_id: loggedInUser.organization_id,
50
+ appcode: loggedInUser.appcode,
51
+ level_id: loggedInUser.level_id,
52
+ level_type: loggedInUser.level_type,
53
+ }));
54
+ await this.commTemplateRepository.save(attachmentEntities);
55
+ }
56
+ return tempData;
57
+ }
21
58
  async getEntityData(entityType, id, loggedInUser) {
22
59
  const getTemplate = await this.commTemplateRepository.getTemplateByCode(entityType, id.toString(), loggedInUser);
23
60
  return getTemplate;
@@ -25,8 +62,8 @@ let CommTemplateService = class CommTemplateService extends entity_service_impl_
25
62
  async getAllCommTemplate(entity_type, loggedInUser) {
26
63
  const commTemplateData = await this.commTemplateRepository.getAllCommTemplate(entity_type, loggedInUser);
27
64
  const response = commTemplateData.map((item) => ({
28
- label: item.name,
29
65
  value: item.code,
66
+ name: item.name,
30
67
  }));
31
68
  return response;
32
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"comm-template.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/comm-template.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qFAAgF;AAChF,gGAAwF;AAGjF,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,+CAAiB;IACxD,YAA6B,sBAA8C;QACzE,KAAK,EAAE,CAAC;QADmB,2BAAsB,GAAtB,sBAAsB,CAAwB;IAE3E,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAY;QAIZ,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,CACrE,UAAU,EACV,EAAE,CAAC,QAAQ,EAAE,EACb,YAAY,CACb,CAAC;QAEF,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,WAAmB,EAAE,YAAY;QACxD,MAAM,gBAAgB,GACpB,MAAM,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,CAClD,WAAW,EACX,YAAY,CACb,CAAC;QAEJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/C,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,KAAK,EAAE,IAAI,CAAC,IAAI;SACjB,CAAC,CAAC,CAAC;QAEJ,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AAnCY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAE0C,iDAAsB;GADhE,mBAAmB,CAmC/B"}
1
+ {"version":3,"file":"comm-template.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/comm-template.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qFAAgF;AAChF,gGAAwF;AAKjF,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,+CAAiB;IACxD,YAA6B,sBAA8C;QACzE,KAAK,EAAE,CAAC;QADmB,2BAAsB,GAAtB,sBAAsB,CAAwB;IAE3E,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,UAAe,EAAE,YAAiB;QACnD,MAAM,EAAE,WAAW,EAAE,GAAG,YAAY,EAAE,GAAG,UAAU,CAAC;QAEpD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QAGtE,IAAI,WAAW,IAAI,W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AE,YAAY,CAAC,UAAU;aACpC,CAAC,CAAC,CAAC;YAEJ,MAAM,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAY;QAIZ,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,CACrE,UAAU,EACV,EAAE,CAAC,QAAQ,EAAE,EACb,YAAY,CACb,CAAC;QAEF,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,WAAmB,EAAE,YAAY;QACxD,MAAM,gBAAgB,GACpB,MAAM,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,CAClD,WAAW,EACX,YAAY,CACb,CAAC;QAEJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/C,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC,CAAC;QAEJ,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AAtFY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAE0C,iDAAsB;GADhE,mBAAmB,CAsF/B"}
@@ -0,0 +1,8 @@
1
+ import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
2
+ import { UserData } from 'src/module/user/entity/user.entity';
3
+ import { DataSource } from 'typeorm';
4
+ export declare class EntityModificationService extends EntityServiceImpl {
5
+ private readonly dataSource;
6
+ constructor(dataSource: DataSource);
7
+ logModification(modificationData: any, loggedInUser: UserData): Promise<any>;
8
+ }
@@ -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.EntityModificationService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
15
+ const typeorm_1 = require("typeorm");
16
+ let EntityModificationService = class EntityModificationService extends entity_service_impl_service_1.EntityServiceImpl {
17
+ constructor(dataSource) {
18
+ super();
19
+ this.dataSource = dataSource;
20
+ }
21
+ async logModification(modificationData, loggedInUser) {
22
+ const { mapped_entity_type, mapped_entity_id, attribute_key } = modificationData;
23
+ const { organization_id } = loggedInUser;
24
+ if (!mapped_entity_type || !mapped_entity_id || !attribute_key) {
25
+ throw new common_1.BadRequestException('Missing required modification data: mapped_entity_type, mapped_entity_id, or attribute_key');
26
+ }
27
+ const [entityMeta] = await this.dataSource.query(`
28
+ SELECT db_table_name
29
+ FROM cr_entity_master
30
+ WHERE mapped_entity_type = ? AND organization_id = ?
31
+ `, [mapped_entity_type, organization_id]);
32
+ if (!entityMeta || !entityMeta.db_table_name) {
33
+ throw new common_1.NotFoundException('Entity metadata not found in cr_entity_master');
34
+ }
35
+ const tableName = entityMeta.db_table_name;
36
+ const [entityRow] = await this.dataSource.query(`
37
+ SELECT * FROM ${tableName} WHERE id = ?
38
+ `, [mapped_entity_id]);
39
+ if (!entityRow) {
40
+ throw new common_1.NotFoundException(`No record found in ${tableName} with ID ${mapped_entity_id}`);
41
+ }
42
+ const currentAttributeValue = entityRow[attribute_key];
43
+ modificationData.current_value = currentAttributeValue;
44
+ return await super.createEntity(modificationData, loggedInUser);
45
+ }
46
+ };
47
+ exports.EntityModificationService = EntityModificationService;
48
+ exports.EntityModificationService = EntityModificationService = __decorate([
49
+ (0, common_1.Injectable)(),
50
+ __metadata("design:paramtypes", [typeorm_1.DataSource])
51
+ ], EntityModificationService);
52
+ //# sourceMappingURL=entity-modification.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-modification.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/entity-modification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAIwB;AACxB,gGAAwF;AAExF,qCAAqC;AAG9B,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,+CAAiB;IAC9D,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IACD,KAAK,CAAC,eAAe,CAAC,gBAAqB,EAAE,YAAsB;QACjE,MAAM,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAC3D,gBAAgB,CAAC;QACnB,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QAEzC,IAAI,CAAC,kBAAkB,IAAI,CAAC,gBAAgB,IAAI,CAAC,aAAa,EAAE,CAAC;YAC/D,MAAM,IAAI,4BAAmB,CAC3B,4FAA4F,CAC7F,CAAC;QACJ,CAAC;QAGD,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC9C;;;;KAID,EACC,CAAC,kBAAkB,EAAE,eAAe,CAAC,CACtC,CAAC;QAEF,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;YAC7C,MAAM,IAAI,0BAAiB,CACzB,+CAA+C,CAChD,CAAC;QACJ,CAAC;QAED,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC;QAG3C,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC7C;oBACc,SAAS;KACxB,EACC,CAAC,gBAAgB,CAAC,CACnB,CAAC;QAEF,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,0BAAiB,CACzB,sBAAsB,SAAS,YAAY,gBAAgB,EAAE,CAC9D,CAAC;QACJ,CAAC;QAGD,MAAM,qBAAqB,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;QAGvD,gBAAgB,CAAC,aAAa,GAAG,qBAAqB,CAAC;QAGvD,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IAClE,CAAC;CACF,CAAA;AAxDY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAE8B,oBAAU;GADxC,yBAAyB,CAwDrC"}
@@ -0,0 +1,21 @@
1
+ import { DataSource } from 'typeorm';
2
+ import { PopulateMetaService } from './../../meta/service/populate-meta.service';
3
+ import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
4
+ import { WorkflowService } from './workflow.service';
5
+ import { UserData } from 'src/module/user/entity/user.entity';
6
+ import { StageGroupService } from './stage-group.service';
7
+ import { StageService } from './stage.service';
8
+ import { ActionService } from './action.service';
9
+ export declare class PopulateWorkflowService extends EntityServiceImpl {
10
+ private readonly populateMetaService;
11
+ private readonly dataSource;
12
+ private readonly workflowService;
13
+ private readonly stageGroupService;
14
+ private readonly stageService;
15
+ private readonly actionService;
16
+ constructor(populateMetaService: PopulateMetaService, dataSource: DataSource, workflowService: WorkflowService, stageGroupService: StageGroupService, stageService: StageService, actionService: ActionService);
17
+ populateWorkflowData(organization_id: number, loggedInUser: UserData): Promise<{
18
+ message: string;
19
+ status: string;
20
+ }>;
21
+ }
@@ -0,0 +1,124 @@
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.PopulateWorkflowService = void 0;
16
+ const typeorm_1 = require("typeorm");
17
+ const populate_meta_service_1 = require("./../../meta/service/populate-meta.service");
18
+ const common_1 = require("@nestjs/common");
19
+ const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
20
+ const workflow_service_1 = require("./workflow.service");
21
+ const stage_group_service_1 = require("./stage-group.service");
22
+ const stage_service_1 = require("./stage.service");
23
+ const action_service_1 = require("./action.service");
24
+ let PopulateWorkflowService = class PopulateWorkflowService extends entity_service_impl_service_1.EntityServiceImpl {
25
+ constructor(populateMetaService, dataSource, workflowService, stageGroupService, stageService, actionService) {
26
+ super();
27
+ this.populateMetaService = populateMetaService;
28
+ this.dataSource = dataSource;
29
+ this.workflowService = workflowService;
30
+ this.stageGroupService = stageGroupService;
31
+ this.stageService = stageService;
32
+ this.actionService = actionService;
33
+ }
34
+ async populateWorkflowData(organization_id, loggedInUser) {
35
+ const workflowTables = [
36
+ { table: 'cr_workflow', entityType: 'WRFW', service: 'workflowService' },
37
+ {
38
+ table: 'cr_wf_stage_group',
39
+ entityType: 'STGP',
40
+ service: 'stageGroupService',
41
+ },
42
+ { table: 'cr_wf_stage', entityType: 'STG', service: 'stageService' },
43
+ { table: 'cr_wf_action', entityType: 'ACTN', service: 'actionService' },
44
+ ];
45
+ const getAllFactoryData = async (table) => this.dataSource.query(`SELECT * FROM ${table.table} WHERE organization_id = -1 AND level_type = 'ORG' AND level_id = -1`);
46
+ const factoryData = await Promise.all(workflowTables.map(getAllFactoryData));
47
+ const [workflows, stageGroups, stages, actions] = factoryData;
48
+ const workflowIdMap = {};
49
+ for (const row of workflows) {
50
+ const { id, ...rest } = row;
51
+ const newWf = await this.workflowService.createEntity({
52
+ ...rest,
53
+ organization_id,
54
+ level_id: organization_id,
55
+ entity_type: 'WRFW',
56
+ }, loggedInUser);
57
+ workflowIdMap[id] = newWf.id;
58
+ }
59
+ const stageGroupIdMap = {};
60
+ const stageGroupToWorkflowMap = {};
61
+ for (const row of stageGroups) {
62
+ const { id, workflow_id, ...rest } = row;
63
+ const newSg = await this.stageGroupService.createEntity({
64
+ ...rest,
65
+ workflow_id: workflowIdMap[workflow_id],
66
+ organization_id,
67
+ level_id: organization_id,
68
+ entity_type: 'STGP',
69
+ }, loggedInUser);
70
+ stageGroupIdMap[id] = newSg.id;
71
+ stageGroupToWorkflowMap[id] = workflow_id;
72
+ }
73
+ const stageIdMap = {};
74
+ const stageToStageGroupMap = {};
75
+ for (const row of stages) {
76
+ const { id, stage_group_id, ...rest } = row;
77
+ const originalWorkflowId = stageGroupToWorkflowMap[stage_group_id];
78
+ const newStage = await this.stageService.createEntity({
79
+ ...rest,
80
+ stage_group_id: stageGroupIdMap[stage_group_id],
81
+ workflow_id: workflowIdMap[originalWorkflowId],
82
+ organization_id,
83
+ level_id: organization_id,
84
+ entity_type: 'STG',
85
+ }, loggedInUser);
86
+ stageIdMap[id] = newStage.id;
87
+ stageToStageGroupMap[id] = stage_group_id;
88
+ }
89
+ for (const row of actions) {
90
+ const { id, stage_id, created_date, modified_date, ...rest } = row;
91
+ const newStageId = stageIdMap[stage_id];
92
+ const oldStageGroupId = stageToStageGroupMap[stage_id];
93
+ const oldWorkflowId = stageGroupToWorkflowMap[oldStageGroupId];
94
+ const newWorkflowId = workflowIdMap[oldWorkflowId];
95
+ await this.actionService.createEntity({
96
+ ...rest,
97
+ stage_id: newStageId,
98
+ workflow_id: newWorkflowId,
99
+ organization_id,
100
+ level_id: organization_id,
101
+ entity_type: 'ACTN',
102
+ }, loggedInUser);
103
+ }
104
+ return {
105
+ message: 'Workflow data populated successfully',
106
+ status: 'success',
107
+ };
108
+ }
109
+ };
110
+ exports.PopulateWorkflowService = PopulateWorkflowService;
111
+ exports.PopulateWorkflowService = PopulateWorkflowService = __decorate([
112
+ (0, common_1.Injectable)(),
113
+ __param(2, (0, common_1.Inject)('WorkflowService')),
114
+ __param(3, (0, common_1.Inject)('StageGroupService')),
115
+ __param(4, (0, common_1.Inject)('StageService')),
116
+ __param(5, (0, common_1.Inject)('ActionService')),
117
+ __metadata("design:paramtypes", [populate_meta_service_1.PopulateMetaService,
118
+ typeorm_1.DataSource,
119
+ workflow_service_1.WorkflowService,
120
+ stage_group_service_1.StageGroupService,
121
+ stage_service_1.StageService,
122
+ action_service_1.ActionService])
123
+ ], PopulateWorkflowService);
124
+ //# sourceMappingURL=populate-workflow.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"populate-workflow.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/populate-workflow.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAqC;AACrC,sFAAiF;AACjF,2CAAoD;AACpD,gGAAwF;AACxF,yDAAqD;AAErD,+DAA0D;AAC1D,mDAA+C;AAC/C,qDAAiD;AAG1C,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,+CAAiB;IAC5D,YACmB,mBAAwC,EACxC,UAAsB,EAEtB,eAAgC,EAEhC,iBAAoC,EAEpC,YAA0B,EAE1B,aAA4B;QAE7C,KAAK,EAAE,CAAC;QAXS,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,eAAU,GAAV,UAAU,CAAY;QAEtB,oBAAe,GAAf,eAAe,CAAi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E,CAAC,GAAG,cAAc,CAAC;QAC5C,CAAC;QAGD,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YAC1B,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG,CAAC;YAEnE,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YACxC,MAAM,eAAe,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;YACvD,MAAM,aAAa,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC;YAC/D,MAAM,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;YAEnD,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CACnC;gBACE,GAAG,IAAI;gBACP,QAAQ,EAAE,UAAU;gBACpB,WAAW,EAAE,aAAa;gBAC1B,eAAe;gBACf,QAAQ,EAAE,eAAe;gBACzB,WAAW,EAAE,MAAM;aACpB,EACD,YAAY,CACb,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE,sCAAsC;YAC/C,MAAM,EAAE,SAAS;SAClB,CAAC;IACJ,CAAC;CACF,CAAA;AAjLY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,iBAAiB,CAAC,CAAA;IAEzB,WAAA,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAA;IAE3B,WAAA,IAAA,eAAM,EAAC,cAAc,CAAC,CAAA;IAEtB,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;qCARc,2CAAmB;QAC5B,oBAAU;QAEL,kCAAe;QAEb,uCAAiB;QAEtB,4BAAY;QAEX,8BAAa;GAXpC,uBAAuB,CAiLnC"}
@@ -21,8 +21,8 @@ let WorkflowListMasterService = class WorkflowListMasterService extends entity_s
21
21
  async getActionCategoryListByStageId(stageId) {
22
22
  const results = await this.dataSource.query(`
23
23
  SELECT
24
- ac.logo AS logo,
25
- ac.name AS name,
24
+ ac.name AS name,
25
+ ac.logo AS logo,
26
26
  ac.modalName AS modalName,
27
27
  a.action_requirement AS actionRequirement
28
28
  FROM cr_wf_stage_action_mapping sam
@@ -31,8 +31,8 @@ let WorkflowListMasterService = class WorkflowListMasterService extends entity_s
31
31
  WHERE sam.stage_id = ?
32
32
  `, [stageId]);
33
33
  return results.map((item) => ({
34
- logo: item.logo,
35
34
  name: item.name,
35
+ logo: item.logo,
36
36
  modalName: item.modalName,
37
37
  actionRequirement: item.actionRequirement,
38
38
  actionStatus: 'Done',
@@ -0,0 +1,9 @@
1
+ import { Repository } from 'typeorm';
2
+ import { StageMovementData } from '../entity/stage-movement-data.entity';
3
+ export declare class WorkflowMetaService {
4
+ private readonly stageMovementRepo;
5
+ constructor(stageMovementRepo: Repository<StageMovementData>);
6
+ getCurrentStage(mapped_entity_type: string, mapped_entity_id: number): Promise<StageMovementData | null>;
7
+ getNextStage(currentStage: StageMovementData): Promise<number | null>;
8
+ moveToNextStage(mapped_entity_type: string, mapped_entity_id: number, current_user_id: number): Promise<string>;
9
+ }
@@ -0,0 +1,81 @@
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.WorkflowMetaService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const typeorm_1 = require("@nestjs/typeorm");
18
+ const typeorm_2 = require("typeorm");
19
+ const stage_movement_data_entity_1 = require("../entity/stage-movement-data.entity");
20
+ let WorkflowMetaService = class WorkflowMetaService {
21
+ constructor(stageMovementRepo) {
22
+ this.stageMovementRepo = stageMovementRepo;
23
+ }
24
+ async getCurrentStage(mapped_entity_type, mapped_entity_id) {
25
+ return this.stageMovementRepo.findOne({
26
+ where: {
27
+ mapped_entity_type,
28
+ mapped_entity_id,
29
+ is_current: 'Y',
30
+ },
31
+ });
32
+ }
33
+ async getNextStage(currentStage) {
34
+ const nextStageId = currentStage.stage_action_mapping_id + 1;
35
+ const hasNext = true;
36
+ return hasNext ? nextStageId : null;
37
+ }
38
+ async moveToNextStage(mapped_entity_type, mapped_entity_id, current_user_id) {
39
+ const now = new Date();
40
+ const currentStage = await this.getCurrentStage(mapped_entity_type, mapped_entity_id);
41
+ if (!currentStage) {
42
+ const firstStageId = 1;
43
+ await this.stageMovementRepo.save({
44
+ mapped_entity_type,
45
+ mapped_entity_id,
46
+ current_user_id,
47
+ stage_action_mapping_id: firstStageId,
48
+ start_date: now,
49
+ is_current: 'Y',
50
+ });
51
+ return 'Workflow started with the first stage.';
52
+ }
53
+ const nextStageId = await this.getNextStage(currentStage);
54
+ if (nextStageId) {
55
+ currentStage.end_date = now;
56
+ currentStage.is_current = 'N';
57
+ await this.stageMovementRepo.save(currentStage);
58
+ await this.stageMovementRepo.save({
59
+ entity_type: 'STAGE_MOVEMENT_DATA',
60
+ mapped_entity_type,
61
+ mapped_entity_id,
62
+ current_user_id,
63
+ stage_action_mapping_id: nextStageId,
64
+ start_date: now,
65
+ is_current: 'Y',
66
+ });
67
+ return `Moved to next stage (Stage ID: ${nextStageId}).`;
68
+ }
69
+ currentStage.end_date = now;
70
+ currentStage.is_current = 'N';
71
+ await this.stageMovementRepo.save(currentStage);
72
+ return 'Workflow completed. No next stage available.';
73
+ }
74
+ };
75
+ exports.WorkflowMetaService = WorkflowMetaService;
76
+ exports.WorkflowMetaService = WorkflowMetaService = __decorate([
77
+ (0, common_1.Injectable)(),
78
+ __param(0, (0, typeorm_1.InjectRepository)(stage_movement_data_entity_1.StageMovementData)),
79
+ __metadata("design:paramtypes", [typeorm_2.Repository])
80
+ ], WorkflowMetaService);
81
+ //# sourceMappingURL=workflow-meta.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-meta.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/workflow-meta.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAqC;AACrC,qFAAyE;AAGlE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAEmB,iBAAgD;QAAhD,sBAAiB,GAAjB,iBAAiB,CAA+B;IAChE,CAAC;IAKJ,KAAK,CAAC,eAAe,CACnB,kBAA0B,EAC1B,gBAAwB;QAExB,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;YACpC,KAAK,EAAE;gBACL,kBAAkB;gBAClB,gBAAgB;gBAChB,UAAU,EAAE,GAAG;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAMD,KAAK,CAAC,YAAY,CAAC,YAA+B;QAEhD,MAAM,WAAW,GAAG,YAAY,CAAC,uBAAuB,GAAG,CAAC,CAAC;QAC7D,MAAM,OAAO,GAAG,IAAI,CAAC;QAErB,OAAO,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;IACtC,CAAC;IAKD,KAAK,CAAC,eAAe,CACnB,kBAA0B,EAC1B,gBAAwB,EACxB,eAAuB;QAEvB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC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function (decorators, target, key,
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.WorkflowModule = void 0;
10
10
  const common_1 = require("@nestjs/common");
11
- const workflow_entity_1 = require("./entity/workflow.entity");
12
- const workflow_service_1 = require("./service/workflow.service");
13
- const stage_group_entity_1 = require("./entity/stage-group.entity");
14
- const stage_entity_1 = require("./entity/stage.entity");
11
+ const typeorm_1 = require("@nestjs/typeorm");
12
+ const listmaster_module_1 = require("../listmaster/listmaster.module");
13
+ const entity_module_1 = require("../meta/entity.module");
14
+ const action_template_mapping_controller_1 = require("./controller/action-template-mapping.controller");
15
+ const action_controller_1 = require("./controller/action.controller");
16
+ const comm_template_controller_1 = require("./controller/comm-template.controller");
17
+ const entity_modification_controller_1 = require("./controller/entity-modification.controller");
18
+ const stage_group_controller_1 = require("./controller/stage-group.controller");
19
+ const stage_controller_1 = require("./controller/stage.controller");
20
+ const workflow_list_master_controller_1 = require("./controller/workflow-list-master.controller");
21
+ const workflow_meta_controller_1 = require("./controller/workflow-meta.controller");
22
+ const workflow_controller_1 = require("./controller/workflow.controller");
15
23
  const action_category_entity_1 = require("./entity/action-category.entity");
16
- const comm_template_entity_1 = require("./entity/comm-template.entity");
17
24
  const action_template_mapping_entity_1 = require("./entity/action-template-mapping.entity");
25
+ const action_entity_1 = require("./entity/action.entity");
26
+ const comm_template_entity_1 = require("./entity/comm-template.entity");
27
+ const entity_modification_entity_1 = require("./entity/entity-modification.entity");
18
28
  const stage_action_mapping_entity_1 = require("./entity/stage-action-mapping.entity");
29
+ const stage_group_entity_1 = require("./entity/stage-group.entity");
30
+ const stage_movement_data_entity_1 = require("./entity/stage-movement-data.entity");
31
+ const stage_entity_1 = require("./entity/stage.entity");
32
+ const template_attach_mapper_entity_1 = require("./entity/template-attach-mapper.entity");
33
+ const workflow_entity_1 = require("./entity/workflow.entity");
34
+ const comm_template_repository_1 = require("./repository/comm-template.repository");
35
+ const stage_group_repository_1 = require("./repository/stage-group.repository");
36
+ const stage_repository_1 = require("./repository/stage.repository");
37
+ const workflow_repository_1 = require("./repository/workflow.repository");
19
38
  const action_category_service_1 = require("./service/action-category.service");
20
- const comm_template_service_1 = require("./service/comm-template.service");
21
- const stage_action_mapping_service_1 = require("./service/stage-action-mapping.service");
22
39
  const action_template_mapping_service_1 = require("./service/action-template-mapping.service");
23
40
  const action_service_1 = require("./service/action.service");
24
- const stage_service_1 = require("./service/stage.service");
41
+ const comm_template_service_1 = require("./service/comm-template.service");
42
+ const entity_modification_service_1 = require("./service/entity-modification.service");
43
+ const populate_workflow_service_1 = require("./service/populate-workflow.service");
44
+ const stage_action_mapping_service_1 = require("./service/stage-action-mapping.service");
25
45
  const stage_group_service_1 = require("./service/stage-group.service");
26
- const typeorm_1 = require("@nestjs/typeorm");
27
- const entity_module_1 = require("../meta/entity.module");
46
+ const stage_service_1 = require("./service/stage.service");
28
47
  const workflow_list_master_service_1 = require("./service/workflow-list-master.service");
29
- const workflow_list_master_controller_1 = require("./controller/workflow-list-master.controller");
30
- const action_template_mapping_controller_1 = require("./controller/action-template-mapping.controller");
31
- const workflow_controller_1 = require("./controller/workflow.controller");
32
- const workflow_repository_1 = require("./repository/workflow.repository");
33
- const listmaster_module_1 = require("../listmaster/listmaster.module");
34
- const comm_template_controller_1 = require("./controller/comm-template.controller");
35
- const comm_template_repository_1 = require("./repository/comm-template.repository");
36
- const action_entity_1 = require("./entity/action.entity");
37
- const stage_group_repository_1 = require("./repository/stage-group.repository");
38
- const stage_group_controller_1 = require("./controller/stage-group.controller");
39
- const stage_controller_1 = require("./controller/stage.controller");
40
- const stage_repository_1 = require("./repository/stage.repository");
41
- const action_controller_1 = require("./controller/action.controller");
48
+ const workflow_meta_service_1 = require("./service/workflow-meta.service");
49
+ const workflow_service_1 = require("./service/workflow.service");
50
+ const action_category_controller_1 = require("./controller/action-category.controller");
42
51
  let WorkflowModule = class WorkflowModule {
43
52
  };
44
53
  exports.WorkflowModule = WorkflowModule;
@@ -54,6 +63,9 @@ exports.WorkflowModule = WorkflowModule = __decorate([
54
63
  comm_template_entity_1.CommTemplate,
55
64
  action_template_mapping_entity_1.ActionTemplateMapping,
56
65
  stage_action_mapping_entity_1.StageActionMapping,
66
+ stage_movement_data_entity_1.StageMovementData,
67
+ entity_modification_entity_1.EntityModification,
68
+ template_attach_mapper_entity_1.TemplateAttach,
57
69
  ]),
58
70
  entity_module_1.EntityModule,
59
71
  listmaster_module_1.ListMasterModule,
@@ -69,6 +81,10 @@ exports.WorkflowModule = WorkflowModule = __decorate([
69
81
  { provide: 'StageService', useClass: stage_service_1.StageService },
70
82
  { provide: 'StageGroupService', useClass: stage_group_service_1.StageGroupService },
71
83
  { provide: 'WorkflowService', useClass: workflow_service_1.WorkflowService },
84
+ {
85
+ provide: 'EntityModificationService',
86
+ useClass: entity_modification_service_1.EntityModificationService,
87
+ },
72
88
  workflow_list_master_service_1.WorkflowListMasterService,
73
89
  action_template_mapping_service_1.ActionTemplateMappingService,
74
90
  workflow_repository_1.WorkflowRepository,
@@ -76,6 +92,9 @@ exports.WorkflowModule = WorkflowModule = __decorate([
76
92
  comm_template_repository_1.CommTemplateRepository,
77
93
  stage_group_repository_1.StageGroupRepository,
78
94
  stage_repository_1.StageRepository,
95
+ workflow_service_1.WorkflowService,
96
+ workflow_meta_service_1.WorkflowMetaService,
97
+ populate_workflow_service_1.PopulateWorkflowService,
79
98
  ],
80
99
  exports: [
81
100
  'ActionCategoryService',
@@ -84,9 +103,12 @@ exports.WorkflowModule = WorkflowModule = __decorate([
84
103
  'ActionService',
85
104
  'StageService',
86
105
  'StageGroupService',
106
+ 'EntityModificationService',
87
107
  workflow_repository_1.WorkflowRepository,
88
108
  stage_group_repository_1.StageGroupRepository,
89
109
  stage_repository_1.StageRepository,
110
+ workflow_meta_service_1.WorkflowMetaService,
111
+ populate_workflow_service_1.PopulateWorkflowService,
90
112
  ],
91
113
  controllers: [
92
114
  workflow_list_master_controller_1.WorkflowListMasterController,
@@ -96,6 +118,9 @@ exports.WorkflowModule = WorkflowModule = __decorate([
96
118
  stage_group_controller_1.StageGroupController,
97
119
  stage_controller_1.StageController,
98
120
  action_controller_1.ActionController,
121
+ workflow_meta_controller_1.WorkflowMetaController,
122
+ entity_modification_controller_1.EntityModificationController,
123
+ action_category_controller_1.ActionCategoryController,
99
124
  ],
100
125
  })
101
126
  ], WorkflowModule);
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.module.js","sourceRoot":"","sources":["../../../src/module/workflow/workflow.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,8DAAoD;AACpD,iEAA6D;AAC7D,oEAAyD;AACzD,wDAA8C;AAC9C,4EAAiE;AACjE,wEAA6D;AAC7D,4FAAgF;AAChF,sFAA0E;AAC1E,+EAA0E;AAC1E,2EAAsE;AACtE,yFAAmF;AACnF,+FAAyF;AACzF,6DAAyD;AACzD,2DAAuD;AACvD,uEAAkE;AAClE,6CAAgD;AAChD,yDAAqD;AACrD,yFAAmF;AACnF,kGAA4F;AAC5F,wGAAkG;AAClG,0EAAsE;AACtE,0EAAsE;AACtE,uEAAmE;AACnE,oFAA+E;AAC/E,oFAA+E;AAC/E,0DAAsD;AACtD,gFAA2E;AAC3E,gFAA2E;AAC3E,oEAAgE;AAChE,oEAAgE;AAChE,sEAAkE;AAyD3D,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAvD1B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,0BAAQ;gBACR,4BAAY;gBACZ,uCAAc;gBACd,oBAAK;gBACL,+BAAU;gBACV,mCAAY;gBACZ,sDAAqB;gBACrB,gDAAkB;aACnB,CAAC;YACF,4BAAY;YACZ,oCAAgB;SACjB;QACD,SAAS,EAAE;YACT,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,+CAAqB,EAAE;YACrE,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,2CAAmB,EAAE;YACjE;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,wDAAyB;aACpC;YACD,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,8BAAa,EAAE;YACrD,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,4BAAY,EAAE;YACnD,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,uCAAiB,EAAE;YAC7D,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,kCAAe,EAAE;YACzD,wDAAyB;YACzB,8DAA4B;YAC5B,wCAAkB;YAClB,2CAAmB;YACnB,iDAAsB;YACtB,6CAAoB;YACpB,kCAAe;SAChB;QACD,OAAO,EAAE;YACP,uBAAuB;YACvB,qBAAqB;YACrB,2BAA2B;YAC3B,eAAe;YACf,cAAc;YACd,mBAAmB;YACnB,wCAAkB;YAClB,6CAAoB;YACpB,kCAAe;SAChB;QACD,WAAW,EAAE;YACX,8DAA4B;YAC5B,oEAA+B;YAC/B,wCAAkB;YAClB,iDAAsB;YACtB,6CAAoB;YACpB,kCAAe;YACf,oCAAgB;SACjB;KACF,CAAC;GACW,cAAc,CAAG"}
1
+ {"version":3,"file":"workflow.module.js","sourceRoot":"","sources":["../../../src/module/workflow/workflow.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,uEAAmE;AACnE,yDAAqD;AACrD,wGAAkG;AAClG,sEAAkE;AAClE,oFAA+E;AAC/E,gGAA2F;AAC3F,gFAA2E;AAC3E,oEAAgE;AAChE,kGAA4F;AAC5F,oFAA+E;AAC/E,0EAAsE;AACtE,4EAAiE;AACjE,4FAAgF;AAChF,0DAAsD;AACtD,wEAA6D;AAC7D,oFAAyE;AACzE,sFAA0E;AAC1E,oEAAyD;AACzD,oFAAwE;AACxE,wDAA8C;AAC9C,0FAAwE;AACxE,8DAAoD;AACpD,oFAA+E;AAC/E,gFAA2E;AAC3E,oEAAg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