rez_core 5.0.182 → 6.5.0

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 (426) hide show
  1. package/.claude/settings.local.json +26 -0
  2. package/.idea/250218_nodejs_core.iml +8 -11
  3. package/.idea/codeStyles/Project.xml +58 -58
  4. package/.idea/codeStyles/codeStyleConfig.xml +4 -4
  5. package/.idea/copilot.data.migration.agent.xml +6 -0
  6. package/.idea/copilot.data.migration.ask.xml +6 -0
  7. package/.idea/copilot.data.migration.ask2agent.xml +6 -0
  8. package/.idea/copilot.data.migration.edit.xml +6 -0
  9. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  10. package/.idea/misc.xml +6 -0
  11. package/.idea/modules.xml +7 -7
  12. package/.idea/prettier.xml +6 -0
  13. package/.idea/vcs.xml +5 -5
  14. package/.prettierrc +3 -3
  15. package/README.md +99 -99
  16. package/dist/module/auth/guards/role.guard.js +3 -3
  17. package/dist/module/enterprise/controller/enterprise.controller.d.ts +12 -0
  18. package/dist/module/enterprise/controller/enterprise.controller.js +57 -0
  19. package/dist/module/enterprise/controller/enterprise.controller.js.map +1 -0
  20. package/dist/module/enterprise/controller/organization.controller.d.ts +11 -1
  21. package/dist/module/enterprise/controller/organization.controller.js +62 -2
  22. package/dist/module/enterprise/controller/organization.controller.js.map +1 -1
  23. package/dist/module/enterprise/enterprise.module.js +2 -1
  24. package/dist/module/enterprise/enterprise.module.js.map +1 -1
  25. package/dist/module/enterprise/entity/enterprise.entity.d.ts +1 -3
  26. package/dist/module/enterprise/entity/enterprise.entity.js +4 -12
  27. package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -1
  28. package/dist/module/enterprise/entity/organization.entity.d.ts +1 -17
  29. package/dist/module/enterprise/entity/organization.entity.js +4 -72
  30. package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
  31. package/dist/module/enterprise/repository/enterprise.repository.d.ts +2 -2
  32. package/dist/module/enterprise/repository/enterprise.repository.js +9 -4
  33. package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -1
  34. package/dist/module/enterprise/service/enterprise.service.d.ts +2 -2
  35. package/dist/module/enterprise/service/enterprise.service.js +4 -4
  36. package/dist/module/enterprise/service/enterprise.service.js.map +1 -1
  37. package/dist/module/enterprise/service/organization.service.d.ts +2 -2
  38. package/dist/module/enterprise/service/organization.service.js +97 -20
  39. package/dist/module/enterprise/service/organization.service.js.map +1 -1
  40. package/dist/module/filter/service/filter.service.js +19 -19
  41. package/dist/module/integration/examples/usage.example.js +9 -9
  42. package/dist/module/meta/repository/attribute-master.repository.js +8 -8
  43. package/dist/module/meta/service/entity-dynamic.service.js +16 -16
  44. package/dist/module/meta/service/media-data.service.js +6 -6
  45. package/dist/module/meta/service/resolver.service.js +11 -11
  46. package/dist/module/module/repository/menu.repository.js +4 -4
  47. package/dist/module/notification/service/notification.service.js +6 -6
  48. package/dist/module/user/controller/login.controller.js +18 -18
  49. package/dist/module/workflow/repository/action.repository.js +2 -2
  50. package/dist/module/workflow/repository/stage.repository.js +8 -8
  51. package/dist/module/workflow/service/action-template-mapping.service.js +2 -2
  52. package/dist/module/workflow/service/action.service.js +5 -5
  53. package/dist/module/workflow/service/entity-modification.service.js +2 -2
  54. package/dist/module/workflow/service/task.service.js +8 -8
  55. package/dist/module/workflow-automation/service/schedule-handler.service.js +9 -9
  56. package/dist/table.config.d.ts +1 -2
  57. package/dist/tsconfig.build.tsbuildinfo +1 -1
  58. package/dist/utils/service/reflection-helper.service.js +2 -2
  59. package/docs/modules/event-driven-integration-design.md +91 -91
  60. package/docs/modules/integration.md +250 -250
  61. package/eslint.config.mjs +34 -34
  62. package/nest-cli.json +14 -14
  63. package/package.json +125 -125
  64. package/server.log +850 -0
  65. package/src/app.controller.ts +12 -12
  66. package/src/app.module.ts +68 -68
  67. package/src/app.service.ts +8 -8
  68. package/src/config/bull.config.ts +69 -69
  69. package/src/config/config.module.ts +17 -17
  70. package/src/config/database.config.ts +48 -48
  71. package/src/constant/global.constant.ts +67 -67
  72. package/src/core.module.ts +94 -94
  73. package/src/decorators/roles.decorator.ts +7 -7
  74. package/src/dtos/response.dto.ts +6 -6
  75. package/src/dtos/response.ts +5 -5
  76. package/src/index.ts +1 -1
  77. package/src/module/auth/auth.module.ts +49 -49
  78. package/src/module/auth/controller/auth.controller.ts +28 -28
  79. package/src/module/auth/guards/google-auth.guard.ts +9 -9
  80. package/src/module/auth/guards/jwt.guard.ts +22 -22
  81. package/src/module/auth/guards/role.guard.ts +68 -68
  82. package/src/module/auth/services/auth.service.ts +56 -56
  83. package/src/module/auth/services/jwt.service.ts +11 -11
  84. package/src/module/auth/strategies/google.strategy.ts +54 -54
  85. package/src/module/auth/strategies/jwt.strategy.ts +58 -58
  86. package/src/module/auth/strategies/local.strategy.ts +13 -13
  87. package/src/module/dashboard/controller/dashboard.controller.ts +38 -38
  88. package/src/module/dashboard/dashboard.module.ts +21 -21
  89. package/src/module/dashboard/entity/dashboard_page_data.entity.ts +27 -27
  90. package/src/module/dashboard/entity/widget_master.entity.ts +18 -18
  91. package/src/module/dashboard/repository/dashboard.repository.ts +49 -49
  92. package/src/module/dashboard/service/dashboard.service.ts +72 -72
  93. package/src/module/enterprise/controller/enterprise.controller.ts +40 -0
  94. package/src/module/enterprise/controller/organization.controller.ts +93 -36
  95. package/src/module/enterprise/enterprise.module.ts +46 -45
  96. package/src/module/enterprise/entity/enterprise.entity.ts +31 -37
  97. package/src/module/enterprise/entity/organization-app-mapping.entity.ts +13 -13
  98. package/src/module/enterprise/entity/organization.entity.ts +40 -92
  99. package/src/module/enterprise/repository/enterprise.repository.ts +39 -31
  100. package/src/module/enterprise/repository/organization.repository.ts +26 -26
  101. package/src/module/enterprise/repository/school.repository.ts +272 -272
  102. package/src/module/enterprise/service/brand.service.ts +5 -5
  103. package/src/module/enterprise/service/enterprise.service.ts +22 -16
  104. package/src/module/enterprise/service/organization-app-mapping.service.ts +4 -4
  105. package/src/module/enterprise/service/organization.service.ts +262 -145
  106. package/src/module/entity_json/controller/entity_json.controller.ts +47 -47
  107. package/src/module/entity_json/entity/entityJson.entity.ts +39 -39
  108. package/src/module/entity_json/entity_json.module.ts +18 -18
  109. package/src/module/entity_json/service/entityJson.repository.ts +37 -37
  110. package/src/module/entity_json/service/entity_json.service.ts +241 -241
  111. package/src/module/export/controller/export.controller.ts +83 -83
  112. package/src/module/export/export.module.ts +14 -14
  113. package/src/module/export/service/export.service.ts +105 -105
  114. package/src/module/filter/controller/filter.controller.ts +87 -87
  115. package/src/module/filter/dto/filter-request.dto.ts +39 -39
  116. package/src/module/filter/entity/saved-filter-detail.entity.ts +41 -41
  117. package/src/module/filter/entity/saved-filter-master.entity.ts +35 -35
  118. package/src/module/filter/filter.module.ts +33 -33
  119. package/src/module/filter/repository/saved-filter.repository.ts +247 -247
  120. package/src/module/filter/repository/saved.filter-detail.repository.ts +19 -19
  121. package/src/module/filter/service/filter-evaluator.service.ts +82 -82
  122. package/src/module/filter/service/filter.service.ts +1316 -1316
  123. package/src/module/filter/service/saved-filter.service.ts +164 -164
  124. package/src/module/ics/controller/ics.controller.ts +21 -21
  125. package/src/module/ics/dto/ics.dto.ts +55 -55
  126. package/src/module/ics/ics.module.ts +13 -13
  127. package/src/module/ics/service/ics.service.ts +57 -57
  128. package/src/module/integration/controller/calender-event.controller.ts +31 -31
  129. package/src/module/integration/controller/integration.controller.ts +662 -662
  130. package/src/module/integration/controller/wrapper.controller.ts +37 -37
  131. package/src/module/integration/dto/create-config.dto.ts +526 -526
  132. package/src/module/integration/entity/integration-config.entity.ts +112 -112
  133. package/src/module/integration/entity/integration-entity-mapper.entity.ts +14 -14
  134. package/src/module/integration/entity/integration-source.entity.ts +17 -17
  135. package/src/module/integration/entity/user-integration.entity.ts +71 -71
  136. package/src/module/integration/examples/usage.example.ts +338 -338
  137. package/src/module/integration/factories/base.factory.ts +7 -7
  138. package/src/module/integration/factories/email.factory.ts +49 -49
  139. package/src/module/integration/factories/integration.factory.ts +121 -121
  140. package/src/module/integration/factories/sms.factory.ts +51 -51
  141. package/src/module/integration/factories/telephone.factory.ts +41 -41
  142. package/src/module/integration/factories/whatsapp.factory.ts +56 -56
  143. package/src/module/integration/integration.module.ts +110 -110
  144. package/src/module/integration/service/calendar-event.service.ts +118 -118
  145. package/src/module/integration/service/integration-entity-mapper.service.ts +17 -17
  146. package/src/module/integration/service/integration-queue.service.ts +229 -229
  147. package/src/module/integration/service/integration.service.ts +2634 -2634
  148. package/src/module/integration/service/oauth.service.ts +224 -224
  149. package/src/module/integration/service/wrapper.service.ts +753 -753
  150. package/src/module/integration/strategies/email/gmail-api.strategy.ts +280 -280
  151. package/src/module/integration/strategies/email/outlook-api.strategy.ts +44 -44
  152. package/src/module/integration/strategies/email/outlook.strategy.ts +64 -64
  153. package/src/module/integration/strategies/email/sendgrid-api.strategy.ts +260 -260
  154. package/src/module/integration/strategies/integration.strategy.ts +97 -97
  155. package/src/module/integration/strategies/sms/gupshup-sms.strategy.ts +146 -146
  156. package/src/module/integration/strategies/sms/msg91-sms.strategy.ts +164 -164
  157. package/src/module/integration/strategies/sms/tubelight-sms.strategy.ts +163 -163
  158. package/src/module/integration/strategies/telephone/ozonetel-voice.strategy.ts +238 -238
  159. package/src/module/integration/strategies/telephone/tubelight-voice.strategy.ts +210 -210
  160. package/src/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.ts +359 -359
  161. package/src/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.ts +372 -372
  162. package/src/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.ts +403 -403
  163. package/src/module/integration/strategies/whatsapp/whatsapp.strategy.ts +57 -57
  164. package/src/module/layout/controller/layout.controller.ts +47 -47
  165. package/src/module/layout/entity/header-items.entity.ts +28 -28
  166. package/src/module/layout/entity/header-section.entity.ts +19 -19
  167. package/src/module/layout/layout.module.ts +21 -21
  168. package/src/module/layout/repository/header-items.repository.ts +18 -18
  169. package/src/module/layout/repository/header-section.repository.ts +22 -22
  170. package/src/module/layout/service/header-section.service.ts +25 -25
  171. package/src/module/layout_preference/controller/layout_preference.controller.ts +76 -76
  172. package/src/module/layout_preference/entity/layout_preference.entity.ts +28 -28
  173. package/src/module/layout_preference/layout_preference.module.ts +22 -22
  174. package/src/module/layout_preference/repository/layout_preference.repository.ts +65 -65
  175. package/src/module/layout_preference/service/layout_preference.service.ts +191 -191
  176. package/src/module/lead/controller/lead.controller.ts +30 -30
  177. package/src/module/lead/lead.module.ts +14 -14
  178. package/src/module/lead/repository/lead.repository.ts +41 -41
  179. package/src/module/lead/service/lead.service.ts +54 -54
  180. package/src/module/linked_attributes/controller/linked_attributes.controller.ts +37 -37
  181. package/src/module/linked_attributes/entity/linked_attribute.entity.ts +51 -51
  182. package/src/module/linked_attributes/linked_attributes.module.ts +16 -16
  183. package/src/module/linked_attributes/repository/linked_attribute.repository.ts +12 -12
  184. package/src/module/linked_attributes/service/linked_attributes.service.ts +73 -73
  185. package/src/module/listmaster/controller/list-master.controller.ts +230 -230
  186. package/src/module/listmaster/entity/list-master-items.entity.ts +43 -43
  187. package/src/module/listmaster/entity/list-master.entity.ts +33 -33
  188. package/src/module/listmaster/listmaster.module.ts +46 -46
  189. package/src/module/listmaster/repository/list-master-items.repository.ts +173 -173
  190. package/src/module/listmaster/repository/list-master.repository.ts +56 -56
  191. package/src/module/listmaster/service/list-master-engine.ts +19 -19
  192. package/src/module/listmaster/service/list-master-extension.interface.ts +4 -4
  193. package/src/module/listmaster/service/list-master-item.service.ts +280 -280
  194. package/src/module/listmaster/service/list-master-registry.ts +15 -15
  195. package/src/module/listmaster/service/list-master.service.ts +527 -527
  196. package/src/module/mapper/controller/field-mapper.controller.ts +76 -76
  197. package/src/module/mapper/controller/mapper.controller.ts +20 -20
  198. package/src/module/mapper/dto/field-mapper.dto.ts +14 -14
  199. package/src/module/mapper/entity/field-lovs.entity.ts +19 -19
  200. package/src/module/mapper/entity/field-mapper.entity.ts +53 -53
  201. package/src/module/mapper/entity/mapper.entity.ts +16 -16
  202. package/src/module/mapper/mapper.module.ts +35 -35
  203. package/src/module/mapper/repository/field-lovs.repository.ts +35 -35
  204. package/src/module/mapper/repository/field-mapper.repository.ts +42 -42
  205. package/src/module/mapper/repository/mapper.repository.ts +32 -32
  206. package/src/module/mapper/service/field-mapper.service.ts +269 -269
  207. package/src/module/mapper/service/mapper.service.ts +80 -80
  208. package/src/module/master/controller/master.controller.ts +74 -74
  209. package/src/module/master/service/master.service.ts +484 -484
  210. package/src/module/meta/controller/app-master.controller.ts +38 -38
  211. package/src/module/meta/controller/attribute-master.controller.ts +84 -84
  212. package/src/module/meta/controller/entity-dynamic.controller.ts +125 -125
  213. package/src/module/meta/controller/entity-master.controller.ts +41 -41
  214. package/src/module/meta/controller/entity-relation.controller.ts +36 -36
  215. package/src/module/meta/controller/entity.controller.ts +308 -308
  216. package/src/module/meta/controller/entity.public.controller.ts +75 -75
  217. package/src/module/meta/controller/media.controller.ts +135 -135
  218. package/src/module/meta/controller/meta.controller.ts +101 -101
  219. package/src/module/meta/controller/view-master.controller.ts +79 -79
  220. package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
  221. package/src/module/meta/dto/entity-tab.dto.ts +4 -4
  222. package/src/module/meta/dto/entity-table.dto.ts +12 -12
  223. package/src/module/meta/entity/app-master.entity.ts +37 -37
  224. package/src/module/meta/entity/attribute-master.entity.ts +92 -92
  225. package/src/module/meta/entity/base-entity.entity.ts +75 -75
  226. package/src/module/meta/entity/entity-master.entity.ts +85 -85
  227. package/src/module/meta/entity/entity-relation-data.entity.ts +29 -29
  228. package/src/module/meta/entity/entity-relation.entity.ts +23 -23
  229. package/src/module/meta/entity/entity-table-column.entity.ts +61 -61
  230. package/src/module/meta/entity/entity-table.entity.ts +50 -50
  231. package/src/module/meta/entity/media-data.entity.ts +32 -32
  232. package/src/module/meta/entity/preference.entity.ts +62 -62
  233. package/src/module/meta/entity/view-master.entity.ts +41 -41
  234. package/src/module/meta/entity.module.ts +165 -165
  235. package/src/module/meta/repository/app-master.repository.ts +20 -20
  236. package/src/module/meta/repository/attribute-master.repository.ts +164 -164
  237. package/src/module/meta/repository/entity-attribute-update.repository.ts +48 -48
  238. package/src/module/meta/repository/entity-master.repository.ts +120 -120
  239. package/src/module/meta/repository/entity-relation.repository.ts +22 -22
  240. package/src/module/meta/repository/entity-table-column.repository.ts +39 -39
  241. package/src/module/meta/repository/entity-table.repository.ts +53 -53
  242. package/src/module/meta/repository/media-data.repository.ts +50 -50
  243. package/src/module/meta/repository/preference.repository.ts +20 -20
  244. package/src/module/meta/repository/user-app-mapping.repository.ts +28 -28
  245. package/src/module/meta/repository/view-master.repository.ts +42 -42
  246. package/src/module/meta/service/app-master.service.ts +37 -37
  247. package/src/module/meta/service/attribute-master.service.ts +132 -132
  248. package/src/module/meta/service/common.service.ts +9 -9
  249. package/src/module/meta/service/entity-attribute-update.service.ts +26 -26
  250. package/src/module/meta/service/entity-dynamic.service.ts +824 -824
  251. package/src/module/meta/service/entity-master.service.ts +171 -171
  252. package/src/module/meta/service/entity-realation-data.service.ts +9 -9
  253. package/src/module/meta/service/entity-relation.service.ts +74 -74
  254. package/src/module/meta/service/entity-service-impl.service.ts +388 -388
  255. package/src/module/meta/service/entity-table-column.service.ts +26 -26
  256. package/src/module/meta/service/entity-table.service.ts +157 -157
  257. package/src/module/meta/service/entity-validation.service.ts +188 -188
  258. package/src/module/meta/service/entity.service.ts +49 -49
  259. package/src/module/meta/service/field-group.service.ts +103 -103
  260. package/src/module/meta/service/media-data.service.ts +591 -591
  261. package/src/module/meta/service/populate-meta.service.ts +222 -222
  262. package/src/module/meta/service/preference.service.ts +16 -16
  263. package/src/module/meta/service/resolver.service.ts +280 -280
  264. package/src/module/meta/service/section-master.service.ts +104 -104
  265. package/src/module/meta/service/update-form-json.service.ts +22 -22
  266. package/src/module/meta/service/user-app-mapping.service.ts +17 -17
  267. package/src/module/meta/service/view-master.service.ts +127 -127
  268. package/src/module/microservice-client/microservice-clients.module.ts +13 -13
  269. package/src/module/microservice-client/service/microservice-client-factory.ts +37 -37
  270. package/src/module/microservice-client/service/microservice-clients.ts +4 -4
  271. package/src/module/module/controller/menu.controller.ts +15 -15
  272. package/src/module/module/controller/module-access.controller.ts +133 -133
  273. package/src/module/module/entity/menu.entity.ts +43 -43
  274. package/src/module/module/entity/module-access.entity.ts +25 -25
  275. package/src/module/module/entity/module-action.entity.ts +17 -17
  276. package/src/module/module/entity/module.entity.ts +52 -52
  277. package/src/module/module/module.module.ts +42 -42
  278. package/src/module/module/repository/menu.repository.ts +186 -186
  279. package/src/module/module/repository/module-access.repository.ts +344 -344
  280. package/src/module/module/service/menu.service.ts +82 -82
  281. package/src/module/module/service/module-access.service.ts +189 -189
  282. package/src/module/notification/controller/notification.controller.ts +58 -58
  283. package/src/module/notification/controller/otp.controller.ts +117 -117
  284. package/src/module/notification/entity/notification.entity.ts +26 -26
  285. package/src/module/notification/entity/otp.entity.ts +28 -28
  286. package/src/module/notification/firebase-admin.config.ts +22 -22
  287. package/src/module/notification/notification.module.ts +69 -69
  288. package/src/module/notification/repository/otp.repository.ts +27 -27
  289. package/src/module/notification/service/email.service.ts +127 -127
  290. package/src/module/notification/service/notification.service.ts +164 -164
  291. package/src/module/notification/service/otp.service.ts +133 -133
  292. package/src/module/third-party-module/entity/third-party-api-registry.entity.ts +52 -52
  293. package/src/module/third-party-module/repository/third-party-api-registry.repository.ts +20 -20
  294. package/src/module/third-party-module/service/api-registry.service.ts +13 -13
  295. package/src/module/third-party-module/third-party.module.ts +12 -12
  296. package/src/module/user/controller/login.controller.ts +198 -198
  297. package/src/module/user/controller/user.controller.ts +40 -40
  298. package/src/module/user/dto/create-user.dto.ts +62 -62
  299. package/src/module/user/dto/update-user.dto.ts +4 -4
  300. package/src/module/user/entity/role.entity.ts +33 -33
  301. package/src/module/user/entity/user-role-mapping.entity.ts +38 -38
  302. package/src/module/user/entity/user-session.entity.ts +73 -73
  303. package/src/module/user/entity/user.entity.ts +62 -62
  304. package/src/module/user/repository/role.repository.ts +96 -96
  305. package/src/module/user/repository/user-role-mapping.repository.ts +126 -126
  306. package/src/module/user/repository/user.repository.ts +50 -50
  307. package/src/module/user/repository/userSession.repository.ts +33 -33
  308. package/src/module/user/service/login.service.ts +326 -326
  309. package/src/module/user/service/role.service.ts +197 -197
  310. package/src/module/user/service/user-role-mapping.service.ts +98 -98
  311. package/src/module/user/service/user-session.service.ts +200 -200
  312. package/src/module/user/service/user.service.ts +368 -368
  313. package/src/module/user/user.module.ts +65 -65
  314. package/src/module/workflow/controller/action-category.controller.ts +54 -54
  315. package/src/module/workflow/controller/action-resource-mapping.controller.ts +23 -23
  316. package/src/module/workflow/controller/action-template-mapping.controller.ts +35 -35
  317. package/src/module/workflow/controller/action.controller.ts +111 -111
  318. package/src/module/workflow/controller/activity-log.controller.ts +55 -55
  319. package/src/module/workflow/controller/comm-template.controller.ts +43 -43
  320. package/src/module/workflow/controller/entity-modification.controller.ts +35 -35
  321. package/src/module/workflow/controller/form-master.controller.ts +43 -43
  322. package/src/module/workflow/controller/stage-group.controller.ts +49 -49
  323. package/src/module/workflow/controller/stage.controller.ts +51 -51
  324. package/src/module/workflow/controller/task.controller.ts +77 -77
  325. package/src/module/workflow/controller/workflow-list-master.controller.ts +44 -44
  326. package/src/module/workflow/controller/workflow-meta.controller.ts +80 -80
  327. package/src/module/workflow/controller/workflow.controller.ts +67 -67
  328. package/src/module/workflow/entity/action-category.entity.ts +38 -38
  329. package/src/module/workflow/entity/action-data.entity.ts +55 -55
  330. package/src/module/workflow/entity/action-resources-mapping.entity.ts +29 -29
  331. package/src/module/workflow/entity/action-template-mapping.entity.ts +17 -17
  332. package/src/module/workflow/entity/action.entity.ts +53 -53
  333. package/src/module/workflow/entity/activity-log.entity.ts +43 -43
  334. package/src/module/workflow/entity/comm-template.entity.ts +43 -43
  335. package/src/module/workflow/entity/entity-modification.entity.ts +38 -38
  336. package/src/module/workflow/entity/form.entity.ts +25 -25
  337. package/src/module/workflow/entity/stage-action-mapping.entity.ts +17 -17
  338. package/src/module/workflow/entity/stage-group.entity.ts +23 -23
  339. package/src/module/workflow/entity/stage-movement-data.entity.ts +38 -38
  340. package/src/module/workflow/entity/stage.entity.ts +20 -20
  341. package/src/module/workflow/entity/task-data.entity.ts +88 -88
  342. package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -30
  343. package/src/module/workflow/entity/workflow-data.entity.ts +11 -11
  344. package/src/module/workflow/entity/workflow-level-mapping.entity.ts +18 -18
  345. package/src/module/workflow/entity/workflow.entity.ts +20 -20
  346. package/src/module/workflow/repository/action-category.repository.ts +79 -79
  347. package/src/module/workflow/repository/action-data.repository.ts +347 -347
  348. package/src/module/workflow/repository/action.repository.ts +339 -339
  349. package/src/module/workflow/repository/activity-log.repository.ts +148 -148
  350. package/src/module/workflow/repository/comm-template.repository.ts +157 -157
  351. package/src/module/workflow/repository/form-master.repository.ts +50 -50
  352. package/src/module/workflow/repository/stage-group.repository.ts +186 -186
  353. package/src/module/workflow/repository/stage-movement.repository.ts +217 -217
  354. package/src/module/workflow/repository/stage.repository.ts +160 -160
  355. package/src/module/workflow/repository/task.repository.ts +154 -154
  356. package/src/module/workflow/repository/workflow.repository.ts +42 -42
  357. package/src/module/workflow/service/action-category.service.ts +33 -33
  358. package/src/module/workflow/service/action-data.service.ts +62 -62
  359. package/src/module/workflow/service/action-resources-mapping.service.ts +10 -10
  360. package/src/module/workflow/service/action-template-mapping.service.ts +137 -137
  361. package/src/module/workflow/service/action.service.ts +302 -302
  362. package/src/module/workflow/service/activity-log.service.ts +107 -107
  363. package/src/module/workflow/service/comm-template.service.ts +181 -181
  364. package/src/module/workflow/service/entity-modification.service.ts +61 -61
  365. package/src/module/workflow/service/form-master.service.ts +35 -35
  366. package/src/module/workflow/service/populate-workflow.service.ts +320 -320
  367. package/src/module/workflow/service/stage-action-mapping.service.ts +5 -5
  368. package/src/module/workflow/service/stage-group.service.ts +325 -325
  369. package/src/module/workflow/service/stage.service.ts +197 -197
  370. package/src/module/workflow/service/task.service.ts +551 -551
  371. package/src/module/workflow/service/workflow-list-master.service.ts +68 -68
  372. package/src/module/workflow/service/workflow-meta.service.ts +640 -640
  373. package/src/module/workflow/service/workflow.service.ts +213 -213
  374. package/src/module/workflow/workflow.module.ts +180 -180
  375. package/src/module/workflow-automation/SCHEDULING_GUIDE.md +145 -145
  376. package/src/module/workflow-automation/controller/workflow-automation.controller.ts +43 -43
  377. package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +26 -26
  378. package/src/module/workflow-automation/entity/workflow-automation.entity.ts +40 -40
  379. package/src/module/workflow-automation/interface/action.decorator.ts +7 -7
  380. package/src/module/workflow-automation/interface/action.interface.ts +5 -5
  381. package/src/module/workflow-automation/service/action-registery.service.ts +35 -35
  382. package/src/module/workflow-automation/service/schedule-handler.service.ts +168 -168
  383. package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +219 -219
  384. package/src/module/workflow-automation/service/workflow-automation.service.ts +476 -476
  385. package/src/module/workflow-automation/workflow-automation.module.ts +54 -54
  386. package/src/module/workflow-schedule/INSTALLATION.md +244 -244
  387. package/src/module/workflow-schedule/MULTI_PROJECT_GUIDE.md +196 -196
  388. package/src/module/workflow-schedule/README.md +422 -422
  389. package/src/module/workflow-schedule/constants/schedule.constants.ts +48 -48
  390. package/src/module/workflow-schedule/controller/workflow-schedule.controller.ts +253 -253
  391. package/src/module/workflow-schedule/docs/CLAUDE_CODE_GUIDE.md +510 -510
  392. package/src/module/workflow-schedule/docs/CLAUDE_CODE_PROMPT.md +362 -362
  393. package/src/module/workflow-schedule/docs/RUN_CLAUDE_CODE.sh +68 -68
  394. package/src/module/workflow-schedule/dto/create-schedule.dto.ts +147 -147
  395. package/src/module/workflow-schedule/dto/get-execution-logs.dto.ts +119 -119
  396. package/src/module/workflow-schedule/dto/update-schedule.dto.ts +96 -96
  397. package/src/module/workflow-schedule/entities/scheduled-workflow.entity.ts +148 -148
  398. package/src/module/workflow-schedule/entities/workflow-execution-log.entity.ts +154 -154
  399. package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +53 -53
  400. package/src/module/workflow-schedule/interfaces/workflow-schedule-options.interface.ts +12 -12
  401. package/src/module/workflow-schedule/processors/schedule.processor.ts +620 -620
  402. package/src/module/workflow-schedule/service/workflow-schedule.service.ts +597 -597
  403. package/src/module/workflow-schedule/workflow-schedule.module.ts +67 -67
  404. package/src/resources/dev.properties.yaml +31 -31
  405. package/src/resources/local.properties.yaml +27 -27
  406. package/src/resources/properties.module.ts +12 -12
  407. package/src/resources/properties.yaml.ts +11 -11
  408. package/src/resources/uat.properties.yaml +31 -31
  409. package/src/table.config.ts +133 -133
  410. package/src/utils/dto/excel-data.dto.ts +14 -14
  411. package/src/utils/dto/excelsheet-data.dto.ts +5 -5
  412. package/src/utils/service/base64util.service.ts +18 -18
  413. package/src/utils/service/clockIDGenUtil.service.ts +21 -21
  414. package/src/utils/service/codeGenerator.service.ts +22 -22
  415. package/src/utils/service/dateUtil.service.ts +17 -17
  416. package/src/utils/service/encryptUtil.service.ts +97 -97
  417. package/src/utils/service/excel-helper.service.ts +72 -72
  418. package/src/utils/service/excelUtil.service.ts +15 -15
  419. package/src/utils/service/file-util.service.ts +11 -11
  420. package/src/utils/service/json-util.service.ts +23 -23
  421. package/src/utils/service/loggingUtil.service.ts +88 -88
  422. package/src/utils/service/reflection-helper.service.ts +62 -62
  423. package/src/utils/service/wbsCodeGen.service.ts +8 -8
  424. package/src/utils/utils.module.ts +27 -27
  425. package/tsconfig.build.json +4 -4
  426. package/tsconfig.json +24 -24
@@ -22,6 +22,10 @@ let OrganizationController = class OrganizationController {
22
22
  this.orgService = orgService;
23
23
  this.userService = userService;
24
24
  }
25
+ async create(organizationDto, req) {
26
+ const loggedInUser = req.user.userData;
27
+ return await this.orgService.create(organizationDto, loggedInUser);
28
+ }
25
29
  async getOrganizationDropdown(req) {
26
30
  const userData = req.user.userData;
27
31
  return this.orgService.findById(userData?.organization_id);
@@ -32,26 +36,82 @@ let OrganizationController = class OrganizationController {
32
36
  const org_id = req.user.userData?.organization_id;
33
37
  return await this.orgService.getOrganizationHierarchy(userId, appcode, org_id);
34
38
  }
39
+ async findAll() {
40
+ return await this.orgService.findAll();
41
+ }
42
+ async findOne(id) {
43
+ return await this.orgService.findOne(id);
44
+ }
45
+ async update(id, organizationDto, req) {
46
+ const loggedInUser = req.user.userData;
47
+ return await this.orgService.update(id, organizationDto, loggedInUser);
48
+ }
49
+ async remove(id) {
50
+ return await this.orgService.remove(id);
51
+ }
35
52
  };
36
53
  exports.OrganizationController = OrganizationController;
37
54
  __decorate([
38
- (0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
55
+ (0, common_1.Post)('create'),
56
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
57
+ __param(0, (0, common_1.Body)()),
58
+ __param(1, (0, common_1.Req)()),
59
+ __metadata("design:type", Function),
60
+ __metadata("design:paramtypes", [Object, Object]),
61
+ __metadata("design:returntype", Promise)
62
+ ], OrganizationController.prototype, "create", null);
63
+ __decorate([
39
64
  (0, common_1.Get)('dropdown'),
65
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
40
66
  __param(0, (0, common_1.Req)()),
41
67
  __metadata("design:type", Function),
42
68
  __metadata("design:paramtypes", [Object]),
43
69
  __metadata("design:returntype", Promise)
44
70
  ], OrganizationController.prototype, "getOrganizationDropdown", null);
45
71
  __decorate([
46
- (0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
47
72
  (0, common_1.Get)('hierarchy'),
73
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
48
74
  __param(0, (0, common_1.Req)()),
49
75
  __metadata("design:type", Function),
50
76
  __metadata("design:paramtypes", [Object]),
51
77
  __metadata("design:returntype", Promise)
52
78
  ], OrganizationController.prototype, "getOrganizationHierarchy", null);
79
+ __decorate([
80
+ (0, common_1.Get)(),
81
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
82
+ __metadata("design:type", Function),
83
+ __metadata("design:paramtypes", []),
84
+ __metadata("design:returntype", Promise)
85
+ ], OrganizationController.prototype, "findAll", null);
86
+ __decorate([
87
+ (0, common_1.Get)(':id'),
88
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
89
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
90
+ __metadata("design:type", Function),
91
+ __metadata("design:paramtypes", [Number]),
92
+ __metadata("design:returntype", Promise)
93
+ ], OrganizationController.prototype, "findOne", null);
94
+ __decorate([
95
+ (0, common_1.Post)('update/:id'),
96
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
97
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
98
+ __param(1, (0, common_1.Body)()),
99
+ __param(2, (0, common_1.Req)()),
100
+ __metadata("design:type", Function),
101
+ __metadata("design:paramtypes", [Number, Object, Object]),
102
+ __metadata("design:returntype", Promise)
103
+ ], OrganizationController.prototype, "update", null);
104
+ __decorate([
105
+ (0, common_1.Delete)(':id'),
106
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
107
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
108
+ __metadata("design:type", Function),
109
+ __metadata("design:paramtypes", [Number]),
110
+ __metadata("design:returntype", Promise)
111
+ ], OrganizationController.prototype, "remove", null);
53
112
  exports.OrganizationController = OrganizationController = __decorate([
54
113
  (0, common_1.Controller)('organization'),
114
+ (0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
55
115
  __param(1, (0, common_1.Inject)('UserService')),
56
116
  __metadata("design:paramtypes", [organization_service_1.OrganizationService,
57
117
  user_service_1.UserService])
@@ -1 +1 @@
1
- {"version":3,"file":"organization.controller.js","sourceRoot":"","sources":["../../../../src/module/enterprise/controller/organization.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyE;AAEzE,2DAAgE;AAChE,kEAAmE;AACnE,0EAAsE;AAG/D,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YACmB,UAA+B,EACR,WAAwB;QAD/C,eAAU,GAAV,UAAU,CAAqB;QACR,gBAAW,GAAX,WAAW,CAAa;IAC/D,CAAC;IAIE,AAAN,KAAK,CAAC,uBAAuB,CAAQ,GAA4B;QAC/D,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAGnC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC7D,CAAC;IAIK,AAAN,KAAK,CAAC,wBAAwB,CAAQ,GAA4B;QAChE,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;QACrC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC3C,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC;QAElD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,wBAAwB,CACnD,MAAM,EACN,OAAO,EACP,MAAM,CACP,CAAC;IACJ,CAAC;CACF,CAAA;AA5BY,wDAAsB;AAQ3B;IAFL,IAAA,kBAAS,EAAC,wBAAY,CAAC;IACvB,IAAA,YAAG,EAAC,UAAU,CAAC;IACe,WAAA,IAAA,YAAG,GAAE,CAAA;;;;qEAKnC;AAIK;IAFL,IAAA,kBAAS,EAAC,wBAAY,CAAC;IACvB,IAAA,YAAG,EAAC,WAAW,CAAC;IACe,WAAA,IAAA,YAAG,GAAE,CAAA;;;;sEAUpC;iCA3BU,sBAAsB;IADlC,IAAA,mBAAU,EAAC,cAAc,CAAC;IAItB,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;qCADO,0CAAmB;QACK,0BAAW;GAHvD,sBAAsB,CA4BlC"}
1
+ {"version":3,"file":"organization.controller.js","sourceRoot":"","sources":["../../../../src/module/enterprise/controller/organization.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAcwB;AAExB,2DAAgE;AAChE,kEAAmE;AACnE,0EAAsE;AA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I,GAAE,CAAA;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;;;;oDAIP;AAIK;IAFL,IAAA,eAAM,EAAC,KAAK,CAAC;IACb,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACV,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;oDAEtC;iCApEU,sBAAsB;IAFlC,IAAA,mBAAU,EAAC,cAAc,CAAC;IAC1B,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAInB,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;qCADO,0CAAmB;QACK,0BAAW;GAHvD,sBAAsB,CAqElC"}
@@ -23,6 +23,7 @@ const enterprise_service_1 = require("./service/enterprise.service");
23
23
  const brand_service_1 = require("./service/brand.service");
24
24
  const enterprise_repository_1 = require("./repository/enterprise.repository");
25
25
  const enterprise_entity_1 = require("./entity/enterprise.entity");
26
+ const enterprise_controller_1 = require("./controller/enterprise.controller");
26
27
  let EnterpriseModule = class EnterpriseModule {
27
28
  };
28
29
  exports.EnterpriseModule = EnterpriseModule;
@@ -38,7 +39,7 @@ exports.EnterpriseModule = EnterpriseModule = __decorate([
38
39
  utils_module_1.UtilsModule,
39
40
  entity_module_1.EntityModule,
40
41
  ],
41
- controllers: [organization_controller_1.OrganizationController],
42
+ controllers: [organization_controller_1.OrganizationController, enterprise_controller_1.EnterpriseController],
42
43
  providers: [
43
44
  organization_service_1.OrganizationService,
44
45
  organization_app_mapping_service_1.OrganizationAppMappingService,
@@ -1 +1 @@
1
- {"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,qDAAiD;AACjD,kFAA8E;AAC9E,8FAAkF;AAClF,sEAAgE;AAChE,iGAA2F;AAC3F,yEAAqE;AACrE,2DAAqD;AACrD,yDAAqD;AACrD,kFAA8E;AAC9E,sEAAkE;AAElE,qEAAiE;AACjE,2DAAuD;AACvD,8EAA0E;AAC1E,kEAA4D;AA4BrD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IA1B5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,sCAAgB;gBAChB,wDAAsB;gBACtB,kCAAc;aACf,CAAC;YACF,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,0BAAW;YACX,4BAAY;SACb;QACD,WAAW,EAAE,CAAC,gDAAsB,CAAC;QACrC,SAAS,EAAE;YACT,0CAAmB;YACnB,gEAA6B;YAC7B,oCAAgB;YAChB,gDAAsB;YACtB,sCAAiB;YACjB,4CAAoB;YACpB;gBACE,OAAO,EAAE,cAAc;gBACvB,QAAQ,EAAE,4BAAY;aACvB;SACF;QACD,OAAO,EAAE,CAAC,0CAAmB,EAAE,gDAAsB,EAAC,sCAAiB,CAAC;KACzE,CAAC;GACW,gBAAgB,CAAG"}
1
+ {"version":3,"file":"enterprise.module.js","sourceRoot":"","sources":["../../../src/module/enterprise/enterprise.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,qDAAiD;AACjD,kFAA8E;AAC9E,8FAAkF;AAClF,sEAAgE;AAChE,iGAA2F;AAC3F,yEAAqE;AACrE,2DAAqD;AACrD,yDAAqD;AACrD,kFAA8E;AAC9E,sEAAkE;AAElE,qEAAiE;AACjE,2DAAuD;AACvD,8EAA0E;AAC1E,kEAA4D;AAC5D,8EAA0E;AA4BnE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IA1B5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,sCAAgB;gBAChB,wDAAsB;gBACtB,kCAAc;aACf,CAAC;YACF,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,0BAAW;YACX,4BAAY;SACb;QACD,WAAW,EAAE,CAAC,gDAAsB,EAAE,4CAAoB,CAAC;QAC3D,SAAS,EAAE;YACT,0CAAmB;YACnB,gEAA6B;YAC7B,oCAAgB;YAChB,gDAAsB;YACtB,sCAAiB;YACjB,4CAAoB;YACpB;gBACE,OAAO,EAAE,cAAc;gBACvB,QAAQ,EAAE,4BAAY;aACvB;SACF;QACD,OAAO,EAAE,CAAC,0CAAmB,EAAE,gDAAsB,EAAC,sCAAiB,CAAC;KACzE,CAAC;GACW,gBAAgB,CAAG"}
@@ -1,6 +1,5 @@
1
1
  export declare class EnterpriseData {
2
2
  id: number;
3
- entity_type: string;
4
3
  code: string;
5
4
  name: string;
6
5
  status: string;
@@ -8,6 +7,5 @@ export declare class EnterpriseData {
8
7
  modified_by: number;
9
8
  created_date: Date;
10
9
  modified_date: Date;
11
- appcode: string;
12
- app_url_name: string;
10
+ slug: string;
13
11
  }
@@ -18,10 +18,6 @@ __decorate([
18
18
  (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'id', type: 'bigint' }),
19
19
  __metadata("design:type", Number)
20
20
  ], EnterpriseData.prototype, "id", void 0);
21
- __decorate([
22
- (0, typeorm_1.Column)({ name: 'entity_type', type: 'varchar', nullable: true, length: 50 }),
23
- __metadata("design:type", String)
24
- ], EnterpriseData.prototype, "entity_type", void 0);
25
21
  __decorate([
26
22
  (0, typeorm_1.Column)({ name: 'code', type: 'varchar', nullable: true, length: 50 }),
27
23
  __metadata("design:type", String)
@@ -43,21 +39,17 @@ __decorate([
43
39
  __metadata("design:type", Number)
44
40
  ], EnterpriseData.prototype, "modified_by", void 0);
45
41
  __decorate([
46
- (0, typeorm_1.Column)({ name: 'created_date', nullable: true }),
42
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_date', nullable: true }),
47
43
  __metadata("design:type", Date)
48
44
  ], EnterpriseData.prototype, "created_date", void 0);
49
45
  __decorate([
50
- (0, typeorm_1.Column)({ name: 'modified_date', nullable: true }),
46
+ (0, typeorm_1.UpdateDateColumn)({ name: 'modified_date', nullable: true }),
51
47
  __metadata("design:type", Date)
52
48
  ], EnterpriseData.prototype, "modified_date", void 0);
53
49
  __decorate([
54
- (0, typeorm_1.Column)({ name: 'appcode', type: 'varchar', nullable: true, length: 50 }),
55
- __metadata("design:type", String)
56
- ], EnterpriseData.prototype, "appcode", void 0);
57
- __decorate([
58
- (0, typeorm_1.Column)({ name: 'app_url_name', type: 'varchar', nullable: true, length: 50 }),
50
+ (0, typeorm_1.Column)({ name: 'slug', type: 'varchar', nullable: true, length: 50 }),
59
51
  __metadata("design:type", String)
60
- ], EnterpriseData.prototype, "app_url_name", void 0);
52
+ ], EnterpriseData.prototype, "slug", void 0);
61
53
  exports.EnterpriseData = EnterpriseData = __decorate([
62
54
  (0, typeorm_1.Entity)({ name: 'sso_enterprise' })
63
55
  ], EnterpriseData);
@@ -1 +1 @@
1
- {"version":3,"file":"enterprise.entity.js","sourceRoot":"","sources":["../../../../src/module/enterprise/entity/enterprise.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiE;AAG1D,IAAM,cAAc,GAApB,MAAM,cAAc;CAiC1B,CAAA;AAjCY,wCAAc;AAEzB;IADC,IAAA,gCAAsB,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;0CAC5C;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;mDACzD;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;4CACzD;AAGb;IADC,IAAA,gB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E,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;4CACzD;yBA1BF,cAAc;IAD1B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;GACtB,cAAc,CA2B1B"}
@@ -2,29 +2,13 @@ export declare class OrganizationData {
2
2
  id: number;
3
3
  enterprise_id: number;
4
4
  code: string;
5
- appcode: string;
6
5
  name: string;
7
6
  status: string;
8
- seq_no: number;
7
+ parent_id: number;
9
8
  created_by: number;
10
9
  modified_by: number;
11
10
  created_date: Date;
12
- parent_id: number;
13
11
  modified_date: Date;
14
- contact_number: string;
15
- emailId: string;
16
- entity_type: string;
17
- primary_contact_name: string;
18
- address: string;
19
- gstin: string;
20
- company_pan_number: string;
21
- bankacc_benef_name: string;
22
- bankacc_bank_name: string;
23
- bankaccAccountNumber: string;
24
- bankacc_account_number: string;
25
- organization_type: string;
26
- is_brand: boolean;
27
- type: string;
28
12
  wbs_code: string;
29
13
  slug: string;
30
14
  }
@@ -26,10 +26,6 @@ __decorate([
26
26
  (0, typeorm_1.Column)({ name: 'code', nullable: true }),
27
27
  __metadata("design:type", String)
28
28
  ], OrganizationData.prototype, "code", void 0);
29
- __decorate([
30
- (0, typeorm_1.Column)({ name: 'appcode', nullable: true }),
31
- __metadata("design:type", String)
32
- ], OrganizationData.prototype, "appcode", void 0);
33
29
  __decorate([
34
30
  (0, typeorm_1.Column)({ name: 'name', nullable: true }),
35
31
  __metadata("design:type", String)
@@ -39,9 +35,9 @@ __decorate([
39
35
  __metadata("design:type", String)
40
36
  ], OrganizationData.prototype, "status", void 0);
41
37
  __decorate([
42
- (0, typeorm_1.Column)({ name: 'seq_no', nullable: true }),
38
+ (0, typeorm_1.Column)({ name: 'parent_id', nullable: true }),
43
39
  __metadata("design:type", Number)
44
- ], OrganizationData.prototype, "seq_no", void 0);
40
+ ], OrganizationData.prototype, "parent_id", void 0);
45
41
  __decorate([
46
42
  (0, typeorm_1.Column)({ name: 'created_by', nullable: true }),
47
43
  __metadata("design:type", Number)
@@ -51,77 +47,13 @@ __decorate([
51
47
  __metadata("design:type", Number)
52
48
  ], OrganizationData.prototype, "modified_by", void 0);
53
49
  __decorate([
54
- (0, typeorm_1.Column)({ name: 'created_date', nullable: true }),
50
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_date', nullable: true }),
55
51
  __metadata("design:type", Date)
56
52
  ], OrganizationData.prototype, "created_date", void 0);
57
53
  __decorate([
58
- (0, typeorm_1.Column)({ name: 'parent_id', nullable: true }),
59
- __metadata("design:type", Number)
60
- ], OrganizationData.prototype, "parent_id", void 0);
61
- __decorate([
62
- (0, typeorm_1.Column)({ name: 'modified_date', nullable: true }),
54
+ (0, typeorm_1.UpdateDateColumn)({ name: 'modified_date', nullable: true }),
63
55
  __metadata("design:type", Date)
64
56
  ], OrganizationData.prototype, "modified_date", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)({ name: 'contact_number', nullable: true }),
67
- __metadata("design:type", String)
68
- ], OrganizationData.prototype, "contact_number", void 0);
69
- __decorate([
70
- (0, typeorm_1.Column)({ name: 'email', nullable: true }),
71
- __metadata("design:type", String)
72
- ], OrganizationData.prototype, "emailId", void 0);
73
- __decorate([
74
- (0, typeorm_1.Column)({ name: 'entity_type', nullable: true }),
75
- __metadata("design:type", String)
76
- ], OrganizationData.prototype, "entity_type", void 0);
77
- __decorate([
78
- (0, typeorm_1.Column)({ name: 'primary_contact_name', nullable: true }),
79
- __metadata("design:type", String)
80
- ], OrganizationData.prototype, "primary_contact_name", void 0);
81
- __decorate([
82
- (0, typeorm_1.Column)({ name: 'address', nullable: true }),
83
- __metadata("design:type", String)
84
- ], OrganizationData.prototype, "address", void 0);
85
- __decorate([
86
- (0, typeorm_1.Column)({ name: 'gstin', nullable: true }),
87
- __metadata("design:type", String)
88
- ], OrganizationData.prototype, "gstin", void 0);
89
- __decorate([
90
- (0, typeorm_1.Column)({ name: 'company_pan_number', nullable: true }),
91
- __metadata("design:type", String)
92
- ], OrganizationData.prototype, "company_pan_number", void 0);
93
- __decorate([
94
- (0, typeorm_1.Column)({ name: 'bankacc_benef_name', nullable: true }),
95
- __metadata("design:type", String)
96
- ], OrganizationData.prototype, "bankacc_benef_name", void 0);
97
- __decorate([
98
- (0, typeorm_1.Column)({ name: 'bankacc_bank_name', nullable: true }),
99
- __metadata("design:type", String)
100
- ], OrganizationData.prototype, "bankacc_bank_name", void 0);
101
- __decorate([
102
- (0, typeorm_1.Column)({ name: 'bankacc_account_number', nullable: true }),
103
- __metadata("design:type", String)
104
- ], OrganizationData.prototype, "bankaccAccountNumber", void 0);
105
- __decorate([
106
- (0, typeorm_1.Column)({ name: 'bankacc_branch_ifsc', nullable: true }),
107
- __metadata("design:type", String)
108
- ], OrganizationData.prototype, "bankacc_account_number", void 0);
109
- __decorate([
110
- (0, typeorm_1.Column)({
111
- name: 'organization_type',
112
- type: 'varchar',
113
- nullable: true,
114
- }),
115
- __metadata("design:type", String)
116
- ], OrganizationData.prototype, "organization_type", void 0);
117
- __decorate([
118
- (0, typeorm_1.Column)({ name: 'is_brand', type: 'boolean', nullable: true }),
119
- __metadata("design:type", Boolean)
120
- ], OrganizationData.prototype, "is_brand", void 0);
121
- __decorate([
122
- (0, typeorm_1.Column)({ name: 'type', nullable: true }),
123
- __metadata("design:type", String)
124
- ], OrganizationData.prototype, "type", void 0);
125
57
  __decorate([
126
58
  (0, typeorm_1.Column)({ name: 'wbs_code', nullable: true }),
127
59
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"organization.entity.js","sourceRoot":"","sources":["../../../../src/module/enterprise/entity/organization.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiE;AAG1D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAwF5B,CAAA;AAxFY,4CAAgB;AAE3B;IADC,IAAA,gCAAsB,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;4CACzC;AAGX;IADC,IAAA,g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AAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC5B;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDAC5B;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAC5B;AAGpB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC7C,IAAI;sDAAC;AAGnB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC7C,IAAI;uDAAC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAC5B;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC5B;2BAnCF,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;GACxB,gBAAgB,CAoC5B"}
@@ -3,6 +3,6 @@ import { Repository } from 'typeorm';
3
3
  export declare class EnterpriseRepository {
4
4
  private readonly enterpriseRepository;
5
5
  constructor(enterpriseRepository: Repository<EnterpriseData>);
6
- save(enterpriseData: EnterpriseData): Promise<EnterpriseData>;
7
- update(enterpriseData: EnterpriseData): Promise<EnterpriseData | null>;
6
+ save(enterpriseData: EnterpriseData, loggedInUser: any): Promise<EnterpriseData>;
7
+ update(enterpriseData: EnterpriseData, loggedInUser: any): Promise<EnterpriseData | null>;
8
8
  }
@@ -21,18 +21,23 @@ let EnterpriseRepository = class EnterpriseRepository {
21
21
  constructor(enterpriseRepository) {
22
22
  this.enterpriseRepository = enterpriseRepository;
23
23
  }
24
- async save(enterpriseData) {
25
- enterpriseData.created_date = new Date();
24
+ async save(enterpriseData, loggedInUser) {
25
+ if (loggedInUser) {
26
+ enterpriseData.created_by = loggedInUser.id;
27
+ enterpriseData.modified_by = loggedInUser.id;
28
+ }
26
29
  return await this.enterpriseRepository.save(enterpriseData);
27
30
  }
28
- async update(enterpriseData) {
31
+ async update(enterpriseData, loggedInUser) {
29
32
  const existingEnterprise = await this.enterpriseRepository.findOne({
30
33
  where: { id: enterpriseData.id },
31
34
  });
32
35
  if (!existingEnterprise) {
33
36
  throw new Error(`Enterprise with id ${enterpriseData.id} not found`);
34
37
  }
35
- enterpriseData.modified_date = new Date();
38
+ if (loggedInUser) {
39
+ enterpriseData.modified_by = loggedInUser.id;
40
+ }
36
41
  await this.enterpriseRepository.update(enterpriseData.id, enterpriseData);
37
42
  return await this.enterpriseRepository.findOne({
38
43
  where: { id: enterpriseData.id },
@@ -1 +1 @@
1
- {"version":3,"file":"enterprise.repository.js","sourceRoot":"","sources":["../../../../src/module/enterprise/repository/enterprise.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,mEAA6D;AAC7D,qCAAqC;AAG9B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,oBAAgD;QAAhD,yBAAoB,GAApB,oBAAoB,CAA4B;IAChE,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,cAA8B;QACvC,cAAc,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;QACzC,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,cAA8B;QACzC,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;YACjE,KAAK,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,EAAE;SACjC,CAAC,CAAC;QACH,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,sBAAsB,cAAc,CAAC,EAAE,YAAY,CAAC,CAAC;QACvE,CAAC;QACD,cAAc,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC;QAC1C,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC1E,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAxBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,kCAAc,CAAC,CAAA;qCACM,oBAAU;GAHxC,oBAAoB,CAwBhC"}
1
+ {"version":3,"file":"enterprise.repository.js","sourceRoot":"","sources":["../../../../src/module/enterprise/repository/enterprise.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,mEAA6D;AAC7D,qCAAqC;AAG9B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,oBAAgD;QAAhD,yBAAoB,GAApB,oBAAoB,CAA4B;IAChE,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,cAA8B,EAAE,YAAiB;QAC1D,IAAI,YAAY,EAAE,CAAC;YACjB,cAAc,CAAC,UAAU,GAAG,YAAY,CAAC,EAAE,CAAC;YAC5C,cAAc,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;QAC/C,CAAC;QACD,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,MAAM,CACV,cAA8B,EAC9B,YAAiB;QAEjB,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;YACjE,KAAK,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,EAAE;SACjC,CAAC,CAAC;QACH,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,sBAAsB,cAAc,CAAC,EAAE,YAAY,CAAC,CAAC;QACvE,CAAC;QACD,IAAI,YAAY,EAAE,CAAC;YACjB,cAAc,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;QAC/C,CAAC;QACD,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;QAC1E,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhCY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,kCAAc,CAAC,CAAA;qCACM,oBAAU;GAHxC,oBAAoB,CAgChC"}
@@ -3,6 +3,6 @@ import { EnterpriseData } from '../entity/enterprise.entity';
3
3
  export declare class EnterpriseService {
4
4
  private readonly enterpriseRepository;
5
5
  constructor(enterpriseRepository: EnterpriseRepository);
6
- create(enterpriseData: EnterpriseData): Promise<EnterpriseData>;
7
- update(enterpriseData: EnterpriseData): Promise<EnterpriseData | null>;
6
+ create(enterpriseData: EnterpriseData, loggedInUser: any): Promise<EnterpriseData>;
7
+ update(enterpriseData: EnterpriseData, loggedInUser: any): Promise<EnterpriseData | null>;
8
8
  }
@@ -16,11 +16,11 @@ let EnterpriseService = class EnterpriseService {
16
16
  constructor(enterpriseRepository) {
17
17
  this.enterpriseRepository = enterpriseRepository;
18
18
  }
19
- async create(enterpriseData) {
20
- return await this.enterpriseRepository.save(enterpriseData);
19
+ async create(enterpriseData, loggedInUser) {
20
+ return await this.enterpriseRepository.save(enterpriseData, loggedInUser);
21
21
  }
22
- async update(enterpriseData) {
23
- return await this.enterpriseRepository.update(enterpriseData);
22
+ async update(enterpriseData, loggedInUser) {
23
+ return await this.enterpriseRepository.update(enterpriseData, loggedInUser);
24
24
  }
25
25
  };
26
26
  exports.EnterpriseService = EnterpriseService;
@@ -1 +1 @@
1
- {"version":3,"file":"enterprise.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/enterprise.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+EAA2E;AAIpE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAE3E,KAAK,CAAC,MAAM,CAAC,cAA8B;QACzC,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,cAA8B;QACzC,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AAVY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEwC,4CAAoB;GAD5D,iBAAiB,CAU7B"}
1
+ {"version":3,"file":"enterprise.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/enterprise.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+EAA2E;AAIpE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAE3E,KAAK,CAAC,MAAM,CACV,cAA8B,EAC9B,YAAiB;QAEjB,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,MAAM,CACV,cAA8B,EAC9B,YAAiB;QAEjB,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IAC9E,CAAC;CACF,CAAA;AAhBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEwC,4CAAoB;GAD5D,iBAAiB,CAgB7B"}
@@ -9,11 +9,11 @@ export declare class OrganizationService {
9
9
  private readonly wbcCodeGenService;
10
10
  private readonly schoolRepository;
11
11
  constructor(organizationRepository: Repository<OrganizationData>, idGen: ClockIDGenService, wbcCodeGenService: WBSCodeGenService, schoolRepository: SchoolRepository);
12
- create(organizationDto: Partial<OrganizationData>, manager?: EntityManager): Promise<OrganizationData>;
12
+ create(organizationDto: Partial<OrganizationData>, loggedInUser?: any, manager?: EntityManager): Promise<OrganizationData>;
13
13
  findAll(manager?: EntityManager): Promise<OrganizationData[]>;
14
14
  findOne(id: number, manager?: EntityManager): Promise<OrganizationData | null>;
15
15
  findById(id: number | undefined): Promise<OrganizationData[]>;
16
- update(id: number, organizationDto: Partial<OrganizationData>, manager?: EntityManager): Promise<OrganizationData | null>;
16
+ update(id: number, organizationDto: Partial<OrganizationData>, loggedInUser?: any, manager?: EntityManager): Promise<OrganizationData | null>;
17
17
  remove(id: number, manager?: EntityManager): Promise<void>;
18
18
  getOrganizationHierarchy(userId: number, appCode: string, orgId: number): Promise<any[]>;
19
19
  }
@@ -27,53 +27,63 @@ let OrganizationService = class OrganizationService {
27
27
  this.wbcCodeGenService = wbcCodeGenService;
28
28
  this.schoolRepository = schoolRepository;
29
29
  }
30
- async create(organizationDto, manager) {
30
+ async create(organizationDto, loggedInUser, manager) {
31
31
  const repo = manager
32
32
  ? manager.getRepository(organization_entity_1.OrganizationData)
33
33
  : this.organizationRepository;
34
- const isBrand = organizationDto.type === 'BRN';
35
- if (isBrand) {
36
- const parentOrgId = organizationDto.parent_id;
37
- if (!parentOrgId) {
38
- throw new Error('Parent Org ID is required to create a brand.');
39
- }
34
+ const parentOrgId = organizationDto.parent_id;
35
+ if (parentOrgId) {
40
36
  const parentOrg = await repo.findOne({
41
37
  where: { id: parentOrgId },
42
38
  });
43
39
  if (!parentOrg) {
44
40
  throw new Error('Parent organization not found.');
45
41
  }
46
- const existingBrands = await repo.find({
42
+ if (!parentOrg.wbs_code) {
43
+ throw new Error('Parent organization must have a WBS code.');
44
+ }
45
+ const existingSubOrgs = await repo.find({
47
46
  where: {
48
- type: 'BRN',
49
47
  parent_id: parentOrgId,
50
48
  },
51
49
  select: ['wbs_code'],
52
50
  });
53
- const brandCodes = existingBrands
54
- .map((b) => b.wbs_code?.split('.')[1])
51
+ const subOrgCodes = existingSubOrgs
52
+ .map((subOrg) => {
53
+ const parts = subOrg.wbs_code?.split('.');
54
+ return parts && parts.length > 1 ? parts[parts.length - 1] : null;
55
+ })
55
56
  .filter(Boolean)
56
57
  .map(Number);
57
- const nextBrnCode = brandCodes.length ? Math.max(...brandCodes) + 1 : 1;
58
- const brnWbsCode = this.wbcCodeGenService.padCode(nextBrnCode);
59
- organizationDto.wbs_code = `${parentOrg.wbs_code}.${brnWbsCode}`;
58
+ const nextSubOrgCode = subOrgCodes.length
59
+ ? Math.max(...subOrgCodes) + 1
60
+ : 1;
61
+ const subOrgWbsCode = this.wbcCodeGenService.padCode(nextSubOrgCode);
62
+ organizationDto.wbs_code = `${parentOrg.wbs_code}.${subOrgWbsCode}`;
60
63
  }
61
64
  else {
62
65
  const existingOrgs = await repo.find({
63
66
  where: {
64
- type: (0, typeorm_2.IsNull)(),
67
+ parent_id: (0, typeorm_2.IsNull)(),
65
68
  },
66
69
  select: ['wbs_code'],
67
70
  });
68
71
  const orgCodes = existingOrgs
69
- .map((org) => org.wbs_code)
70
- .filter(Boolean)
71
- .map(Number);
72
+ .map((org) => {
73
+ if (org.wbs_code?.includes('.')) {
74
+ return null;
75
+ }
76
+ return org.wbs_code ? Number(org.wbs_code) : null;
77
+ })
78
+ .filter((code) => code !== null);
72
79
  const nextOrgCode = orgCodes.length ? Math.max(...orgCodes) + 1 : 1;
73
80
  organizationDto.wbs_code = this.wbcCodeGenService.padCode(nextOrgCode);
74
81
  }
75
82
  organizationDto.code = this.idGen.idGenerator('ORG');
76
- organizationDto.created_date = new Date();
83
+ if (loggedInUser) {
84
+ organizationDto.modified_by = loggedInUser.id;
85
+ organizationDto.created_by = loggedInUser.id;
86
+ }
77
87
  const organization = repo.create(organizationDto);
78
88
  return await repo.save(organization);
79
89
  }
@@ -92,10 +102,77 @@ let OrganizationService = class OrganizationService {
92
102
  async findById(id) {
93
103
  return await this.organizationRepository.find({ where: { id } });
94
104
  }
95
- async update(id, organizationDto, manager) {
105
+ async update(id, organizationDto, loggedInUser, manager) {
96
106
  const repo = manager
97
107
  ? manager.getRepository(organization_entity_1.OrganizationData)
98
108
  : this.organizationRepository;
109
+ const existingOrg = await repo.findOne({ where: { id } });
110
+ if (!existingOrg) {
111
+ throw new Error(`Organization with id ${id} not found.`);
112
+ }
113
+ if (organizationDto.parent_id === id) {
114
+ throw new Error('Organization cannot be its own parent.');
115
+ }
116
+ const parentIdChanged = organizationDto.parent_id !== undefined &&
117
+ organizationDto.parent_id !== existingOrg.parent_id;
118
+ if (parentIdChanged) {
119
+ const newParentId = organizationDto.parent_id;
120
+ if (newParentId) {
121
+ const parentOrg = await repo.findOne({
122
+ where: { id: newParentId },
123
+ });
124
+ if (!parentOrg) {
125
+ throw new Error('Parent organization not found.');
126
+ }
127
+ if (!parentOrg.wbs_code) {
128
+ throw new Error('Parent organization must have a WBS code.');
129
+ }
130
+ if (parentOrg.wbs_code?.startsWith(existingOrg.wbs_code || '')) {
131
+ throw new Error('Cannot set a descendant organization as parent (circular reference).');
132
+ }
133
+ const existingSubOrgs = await repo.find({
134
+ where: {
135
+ parent_id: newParentId,
136
+ },
137
+ select: ['wbs_code', 'id'],
138
+ });
139
+ const subOrgCodes = existingSubOrgs
140
+ .filter((subOrg) => subOrg.id !== id)
141
+ .map((subOrg) => {
142
+ const parts = subOrg.wbs_code?.split('.');
143
+ return parts && parts.length > 1 ? parts[parts.length - 1] : null;
144
+ })
145
+ .filter(Boolean)
146
+ .map(Number);
147
+ const nextSubOrgCode = subOrgCodes.length
148
+ ? Math.max(...subOrgCodes) + 1
149
+ : 1;
150
+ const subOrgWbsCode = this.wbcCodeGenService.padCode(nextSubOrgCode);
151
+ organizationDto.wbs_code = `${parentOrg.wbs_code}.${subOrgWbsCode}`;
152
+ }
153
+ else {
154
+ const existingOrgs = await repo.find({
155
+ where: {
156
+ parent_id: (0, typeorm_2.IsNull)(),
157
+ },
158
+ select: ['wbs_code', 'id'],
159
+ });
160
+ const orgCodes = existingOrgs
161
+ .filter((org) => org.id !== id)
162
+ .map((org) => {
163
+ if (org.wbs_code?.includes('.')) {
164
+ return null;
165
+ }
166
+ return org.wbs_code ? Number(org.wbs_code) : null;
167
+ })
168
+ .filter((code) => code !== null);
169
+ const nextOrgCode = orgCodes.length ? Math.max(...orgCodes) + 1 : 1;
170
+ organizationDto.wbs_code = this.wbcCodeGenService.padCode(nextOrgCode);
171
+ }
172
+ }
173
+ if (loggedInUser) {
174
+ organizationDto.modified_by = loggedInUser.id;
175
+ }
99
176
  await repo.update(id, organizationDto);
100
177
  return await repo.findOne({ where: { id } });
101
178
  }
@@ -1 +1 @@
1
- {"version":3,"file":"organization.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/organization.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,0FAA6E;AAC7E,qCAA4D;AAC5D,uEAAiE;AAEjE,kFAAyE;AACzE,uEAAmE;AAG5D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAEmB,sBAAoD,EACpD,KAAwB,EACxB,iBAAoC,EACpC,gBAAkC;QAHlC,2BAAsB,GAAtB,sBAAsB,CAA8B;QACpD,UAAK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d,OAAe,EACf,KAAa;QAEb,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CACvD,MAAM,EACN,OAAO,EACP,KAAK,CACN,CAAC;IACJ,CAAC;CACF,CAAA;AAtIY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,sCAAgB,CAAC,CAAA;qCACM,oBAAU;QAC3B,0CAAiB;QACL,sCAAiB;QAClB,oCAAgB;GAN1C,mBAAmB,CAsI/B"}
1
+ {"version":3,"file":"organization.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/organization.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,0FAA6E;AAC7E,qCAA4D;AAC5D,uEAAiE;AAEjE,kFAAyE;AACzE,uEAAmE;AAG5D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAEmB,sBAAoD,EACpD,KAAwB,EACxB,iBAAoC,EACpC,gBAAkC;QAHlC,2BAAsB,GAAtB,sBAAsB,CAA8B;QACpD,UAAK,GAAL,KAAK,CAAmB;QACxB,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,eAA0C,EAC1C,YAAkB,EAClB,OAAuB;QAEvB,MAAM,IAAI,GAAG,OAAO;YAClB,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,sCAAgB,CAAC;YACzC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC;QAEhC,MAAM,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC;QAE9C,IAAI,WAAW,EAAE,CAAC;YAEhB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;gBACnC,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;aAC3B,CAAC,CAAC;YAEH,IAAI,CAAC,SAAS,E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