rez_core 6.5.26 → 6.5.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/.claude/settings.local.json +26 -0
  2. package/.idea/250218_nodejs_core.iml +9 -0
  3. package/.idea/codeStyles/Project.xml +59 -0
  4. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  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 +8 -0
  12. package/.idea/prettier.xml +6 -0
  13. package/.idea/vcs.xml +6 -0
  14. package/dist/app.module.js +3 -3
  15. package/dist/app.module.js.map +1 -1
  16. package/dist/constant/status.constant.d.ts +4 -0
  17. package/dist/constant/status.constant.js +9 -0
  18. package/dist/constant/status.constant.js.map +1 -0
  19. package/dist/core.module.js +60 -38
  20. package/dist/core.module.js.map +1 -1
  21. package/dist/module/auth/strategies/jwt.strategy.d.ts +2 -1
  22. package/dist/module/auth/strategies/jwt.strategy.js +3 -2
  23. package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
  24. package/dist/module/dashboard/dashboard.module.js +1 -1
  25. package/dist/module/dashboard/dashboard.module.js.map +1 -1
  26. package/dist/module/dashboard/service/dashboard.service.js +2 -3
  27. package/dist/module/dashboard/service/dashboard.service.js.map +1 -1
  28. package/dist/module/enterprise/controller/enterprise.controller.d.ts +12 -0
  29. package/dist/module/enterprise/controller/enterprise.controller.js +57 -0
  30. package/dist/module/enterprise/controller/enterprise.controller.js.map +1 -0
  31. package/dist/module/enterprise/controller/meta.controller.d.ts +9 -0
  32. package/dist/module/enterprise/controller/meta.controller.js +43 -0
  33. package/dist/module/enterprise/controller/meta.controller.js.map +1 -0
  34. package/dist/module/enterprise/controller/organization.controller.d.ts +12 -4
  35. package/dist/module/enterprise/controller/organization.controller.js +64 -8
  36. package/dist/module/enterprise/controller/organization.controller.js.map +1 -1
  37. package/dist/module/enterprise/enterprise.module.js +10 -15
  38. package/dist/module/enterprise/enterprise.module.js.map +1 -1
  39. package/dist/module/enterprise/entity/enterprise.entity.d.ts +1 -3
  40. package/dist/module/enterprise/entity/enterprise.entity.js +4 -12
  41. package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -1
  42. package/dist/module/enterprise/entity/organization-app-mapping.entity.d.ts +6 -1
  43. package/dist/module/enterprise/entity/organization-app-mapping.entity.js +21 -4
  44. package/dist/module/enterprise/entity/organization-app-mapping.entity.js.map +1 -1
  45. package/dist/module/enterprise/entity/organization.entity.d.ts +3 -18
  46. package/dist/module/enterprise/entity/organization.entity.js +8 -74
  47. package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
  48. package/dist/module/enterprise/repository/enterprise.repository.d.ts +4 -2
  49. package/dist/module/enterprise/repository/enterprise.repository.js +19 -4
  50. package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -1
  51. package/dist/module/enterprise/service/brand-profile.service.d.ts +0 -0
  52. package/dist/module/enterprise/service/brand-profile.service.js +1 -0
  53. package/dist/module/enterprise/service/brand-profile.service.js.map +1 -0
  54. package/dist/module/enterprise/service/brand.service.d.ts +0 -3
  55. package/dist/module/enterprise/service/brand.service.js +0 -17
  56. package/dist/module/enterprise/service/brand.service.js.map +1 -1
  57. package/dist/module/enterprise/service/enterprise.service.d.ts +2 -2
  58. package/dist/module/enterprise/service/enterprise.service.js +4 -4
  59. package/dist/module/enterprise/service/enterprise.service.js.map +1 -1
  60. package/dist/module/enterprise/service/organization.service.d.ts +4 -4
  61. package/dist/module/enterprise/service/organization.service.js +101 -24
  62. package/dist/module/enterprise/service/organization.service.js.map +1 -1
  63. package/dist/module/enterprise/service/populate-meta.service.d.ts +9 -0
  64. package/dist/module/{meta → enterprise}/service/populate-meta.service.js +2 -8
  65. package/dist/module/enterprise/service/populate-meta.service.js.map +1 -0
  66. package/dist/module/enterprise/service/school.service.d.ts +0 -0
  67. package/dist/module/enterprise/service/school.service.js +1 -0
  68. package/dist/module/enterprise/service/school.service.js.map +1 -0
  69. package/dist/module/entity_json/controller/entity_json.controller.d.ts +9 -2
  70. package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -1
  71. package/dist/module/entity_json/entity/entityJson.entity.d.ts +1 -2
  72. package/dist/module/entity_json/entity/entityJson.entity.js +1 -5
  73. package/dist/module/entity_json/entity/entityJson.entity.js.map +1 -1
  74. package/dist/module/entity_json/entity_json.module.js +2 -7
  75. package/dist/module/entity_json/entity_json.module.js.map +1 -1
  76. package/dist/module/entity_json/service/entity_json.service.d.ts +10 -2
  77. package/dist/module/entity_json/service/entity_json.service.js +23 -97
  78. package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
  79. package/dist/module/filter/controller/filter.controller.d.ts +0 -12
  80. package/dist/module/filter/controller/filter.controller.js +1 -1
  81. package/dist/module/filter/controller/filter.controller.js.map +1 -1
  82. package/dist/module/filter/filter.module.js +2 -11
  83. package/dist/module/filter/filter.module.js.map +1 -1
  84. package/dist/module/filter/service/filter.service.d.ts +2 -38
  85. package/dist/module/filter/service/filter.service.js +50 -43
  86. package/dist/module/filter/service/filter.service.js.map +1 -1
  87. package/dist/module/filter/service/saved-filter.service.d.ts +2 -3
  88. package/dist/module/filter/service/saved-filter.service.js +18 -14
  89. package/dist/module/filter/service/saved-filter.service.js.map +1 -1
  90. package/dist/module/integration/service/integration.service.d.ts +0 -1
  91. package/dist/module/integration/service/integration.service.js +1 -2
  92. package/dist/module/integration/service/integration.service.js.map +1 -1
  93. package/dist/module/integration/service/wrapper.service.js +0 -1
  94. package/dist/module/integration/service/wrapper.service.js.map +1 -1
  95. package/dist/module/layout/controller/layout.controller.d.ts +1 -3
  96. package/dist/module/layout/controller/layout.controller.js +3 -7
  97. package/dist/module/layout/controller/layout.controller.js.map +1 -1
  98. package/dist/module/layout/entity/header-section.entity.d.ts +0 -2
  99. package/dist/module/layout/entity/header-section.entity.js +0 -8
  100. package/dist/module/layout/entity/header-section.entity.js.map +1 -1
  101. package/dist/module/layout/layout.module.js +1 -2
  102. package/dist/module/layout/layout.module.js.map +1 -1
  103. package/dist/module/layout/repository/header-section.repository.d.ts +0 -1
  104. package/dist/module/layout/repository/header-section.repository.js +0 -5
  105. package/dist/module/layout/repository/header-section.repository.js.map +1 -1
  106. package/dist/module/layout/service/header-section.service.d.ts +1 -1
  107. package/dist/module/layout/service/header-section.service.js +1 -1
  108. package/dist/module/layout/service/header-section.service.js.map +1 -1
  109. package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +0 -41
  110. package/dist/module/linked_attributes/controller/linked_attributes.controller.js +0 -90
  111. package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -1
  112. package/dist/module/linked_attributes/linked_attributes.module.js +1 -8
  113. package/dist/module/linked_attributes/linked_attributes.module.js.map +1 -1
  114. package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +1 -65
  115. package/dist/module/linked_attributes/service/linked_attributes.service.js +2 -287
  116. package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -1
  117. package/dist/module/listmaster/service/list-master.service.js +1 -8
  118. package/dist/module/listmaster/service/list-master.service.js.map +1 -1
  119. package/dist/module/meta/controller/meta.controller.d.ts +1 -6
  120. package/dist/module/meta/controller/meta.controller.js +1 -19
  121. package/dist/module/meta/controller/meta.controller.js.map +1 -1
  122. package/dist/module/meta/entity/app-master.entity.d.ts +8 -4
  123. package/dist/module/meta/entity/app-master.entity.js +30 -12
  124. package/dist/module/meta/entity/app-master.entity.js.map +1 -1
  125. package/dist/module/meta/entity/entity-master.entity.d.ts +0 -1
  126. package/dist/module/meta/entity/entity-master.entity.js +1 -8
  127. package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
  128. package/dist/module/meta/entity.module.js +2 -5
  129. package/dist/module/meta/entity.module.js.map +1 -1
  130. package/dist/module/meta/repository/app-master.repository.js +1 -1
  131. package/dist/module/meta/repository/app-master.repository.js.map +1 -1
  132. package/dist/module/meta/service/attribute-master.service.d.ts +1 -6
  133. package/dist/module/meta/service/attribute-master.service.js +2 -22
  134. package/dist/module/meta/service/attribute-master.service.js.map +1 -1
  135. package/dist/module/meta/service/entity-master.service.js +0 -1
  136. package/dist/module/meta/service/entity-master.service.js.map +1 -1
  137. package/dist/module/meta/service/entity-relation.service.d.ts +3 -4
  138. package/dist/module/meta/service/entity-relation.service.js +4 -10
  139. package/dist/module/meta/service/entity-relation.service.js.map +1 -1
  140. package/dist/module/meta/service/entity-service-impl.service.d.ts +1 -1
  141. package/dist/module/meta/service/entity-service-impl.service.js +10 -14
  142. package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
  143. package/dist/module/meta/service/entity-table.service.d.ts +3 -2
  144. package/dist/module/meta/service/entity-table.service.js +23 -19
  145. package/dist/module/meta/service/entity-table.service.js.map +1 -1
  146. package/dist/module/meta/service/resolver.service.d.ts +1 -1
  147. package/dist/module/meta/service/resolver.service.js +3 -6
  148. package/dist/module/meta/service/resolver.service.js.map +1 -1
  149. package/dist/module/module/controller/menu.controller.js +2 -2
  150. package/dist/module/module/controller/menu.controller.js.map +1 -1
  151. package/dist/module/module/controller/module-access.controller.d.ts +3 -4
  152. package/dist/module/module/controller/module-access.controller.js +15 -10
  153. package/dist/module/module/controller/module-access.controller.js.map +1 -1
  154. package/dist/module/module/entity/menu.entity.d.ts +6 -4
  155. package/dist/module/module/entity/menu.entity.js +16 -12
  156. package/dist/module/module/entity/menu.entity.js.map +1 -1
  157. package/dist/module/module/entity/module-access.entity.d.ts +15 -0
  158. package/dist/module/module/entity/module-access.entity.js +50 -0
  159. package/dist/module/module/entity/module-access.entity.js.map +1 -1
  160. package/dist/module/module/entity/module-action.entity.d.ts +4 -2
  161. package/dist/module/module/entity/module-action.entity.js +11 -6
  162. package/dist/module/module/entity/module-action.entity.js.map +1 -1
  163. package/dist/module/module/entity/module.entity.d.ts +3 -5
  164. package/dist/module/module/entity/module.entity.js +8 -18
  165. package/dist/module/module/entity/module.entity.js.map +1 -1
  166. package/dist/module/module/module.module.d.ts +1 -1
  167. package/dist/module/module/module.module.js +5 -7
  168. package/dist/module/module/module.module.js.map +1 -1
  169. package/dist/module/module/repository/menu.repository.d.ts +4 -4
  170. package/dist/module/module/repository/menu.repository.js +17 -27
  171. package/dist/module/module/repository/menu.repository.js.map +1 -1
  172. package/dist/module/module/repository/module-access.repository.d.ts +7 -7
  173. package/dist/module/module/repository/module-access.repository.js +86 -48
  174. package/dist/module/module/repository/module-access.repository.js.map +1 -1
  175. package/dist/module/module/service/menu.service.d.ts +3 -5
  176. package/dist/module/module/service/menu.service.js +9 -12
  177. package/dist/module/module/service/menu.service.js.map +1 -1
  178. package/dist/module/module/service/module-access.service.d.ts +8 -11
  179. package/dist/module/module/service/module-access.service.js +24 -26
  180. package/dist/module/module/service/module-access.service.js.map +1 -1
  181. package/dist/module/notification/entity/notification.entity.d.ts +17 -2
  182. package/dist/module/notification/entity/notification.entity.js +68 -2
  183. package/dist/module/notification/entity/notification.entity.js.map +1 -1
  184. package/dist/module/notification/notification.module.js +0 -2
  185. package/dist/module/notification/notification.module.js.map +1 -1
  186. package/dist/module/notification/service/notification.service.d.ts +1 -3
  187. package/dist/module/notification/service/notification.service.js +2 -5
  188. package/dist/module/notification/service/notification.service.js.map +1 -1
  189. package/dist/module/notification/service/otp.service.js.map +1 -1
  190. package/dist/module/user/controller/login.controller.d.ts +1 -3
  191. package/dist/module/user/controller/login.controller.js +2 -6
  192. package/dist/module/user/controller/login.controller.js.map +1 -1
  193. package/dist/module/user/controller/user.controller.d.ts +0 -2
  194. package/dist/module/user/controller/user.controller.js +0 -13
  195. package/dist/module/user/controller/user.controller.js.map +1 -1
  196. package/dist/module/user/dto/create-user.dto.d.ts +6 -3
  197. package/dist/module/user/dto/create-user.dto.js +17 -11
  198. package/dist/module/user/dto/create-user.dto.js.map +1 -1
  199. package/dist/module/user/entity/role.entity.d.ts +18 -6
  200. package/dist/module/user/entity/role.entity.js +64 -19
  201. package/dist/module/user/entity/role.entity.js.map +1 -1
  202. package/dist/module/user/entity/user-role-mapping.entity.d.ts +10 -0
  203. package/dist/module/user/entity/user-role-mapping.entity.js +33 -1
  204. package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
  205. package/dist/module/user/entity/user-session.entity.d.ts +0 -2
  206. package/dist/module/user/entity/user-session.entity.js +2 -20
  207. package/dist/module/user/entity/user-session.entity.js.map +1 -1
  208. package/dist/module/user/entity/user.entity.d.ts +17 -5
  209. package/dist/module/user/entity/user.entity.js +61 -15
  210. package/dist/module/user/entity/user.entity.js.map +1 -1
  211. package/dist/module/user/repository/role.repository.d.ts +6 -2
  212. package/dist/module/user/repository/role.repository.js +16 -8
  213. package/dist/module/user/repository/role.repository.js.map +1 -1
  214. package/dist/module/user/repository/user-role-mapping.repository.d.ts +1 -0
  215. package/dist/module/user/repository/user-role-mapping.repository.js +3 -0
  216. package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -1
  217. package/dist/module/user/repository/user.repository.d.ts +4 -2
  218. package/dist/module/user/repository/user.repository.js +19 -7
  219. package/dist/module/user/repository/user.repository.js.map +1 -1
  220. package/dist/module/user/repository/userSession.repository.d.ts +1 -0
  221. package/dist/module/user/repository/userSession.repository.js +3 -0
  222. package/dist/module/user/repository/userSession.repository.js.map +1 -1
  223. package/dist/module/user/service/login.service.d.ts +3 -5
  224. package/dist/module/user/service/login.service.js +43 -42
  225. package/dist/module/user/service/login.service.js.map +1 -1
  226. package/dist/module/user/service/role.service.d.ts +24 -11
  227. package/dist/module/user/service/role.service.js +42 -38
  228. package/dist/module/user/service/role.service.js.map +1 -1
  229. package/dist/module/user/service/user-role-mapping.service.d.ts +2 -0
  230. package/dist/module/user/service/user-role-mapping.service.js +6 -0
  231. package/dist/module/user/service/user-role-mapping.service.js.map +1 -1
  232. package/dist/module/user/service/user-session.service.d.ts +3 -4
  233. package/dist/module/user/service/user-session.service.js +10 -11
  234. package/dist/module/user/service/user-session.service.js.map +1 -1
  235. package/dist/module/user/service/user.service.d.ts +29 -20
  236. package/dist/module/user/service/user.service.js +44 -56
  237. package/dist/module/user/service/user.service.js.map +1 -1
  238. package/dist/module/user/user.module.js +1 -7
  239. package/dist/module/user/user.module.js.map +1 -1
  240. package/dist/module/workflow/repository/action-data.repository.d.ts +1 -1
  241. package/dist/module/workflow/repository/action-data.repository.js +6 -8
  242. package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
  243. package/dist/module/workflow/repository/action.repository.d.ts +1 -1
  244. package/dist/module/workflow/repository/action.repository.js +10 -10
  245. package/dist/module/workflow/repository/action.repository.js.map +1 -1
  246. package/dist/module/workflow/repository/form-master.repository.d.ts +1 -1
  247. package/dist/module/workflow/repository/form-master.repository.js +2 -2
  248. package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
  249. package/dist/module/workflow/service/action-data.service.js +1 -2
  250. package/dist/module/workflow/service/action-data.service.js.map +1 -1
  251. package/dist/module/workflow/service/action.service.js +2 -2
  252. package/dist/module/workflow/service/action.service.js.map +1 -1
  253. package/dist/module/workflow/service/comm-template.service.js +0 -2
  254. package/dist/module/workflow/service/comm-template.service.js.map +1 -1
  255. package/dist/module/workflow/service/entity-modification.service.js +0 -1
  256. package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
  257. package/dist/module/workflow/service/form-master.service.js +2 -2
  258. package/dist/module/workflow/service/form-master.service.js.map +1 -1
  259. package/dist/module/workflow/service/populate-workflow.service.d.ts +1 -1
  260. package/dist/module/workflow/service/populate-workflow.service.js +1 -1
  261. package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
  262. package/dist/module/workflow/service/task.service.js +0 -3
  263. package/dist/module/workflow/service/task.service.js.map +1 -1
  264. package/dist/module/workflow/service/workflow-meta.service.js +2 -7
  265. package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
  266. package/dist/module/workflow/service/workflow.service.js +2 -2
  267. package/dist/module/workflow/service/workflow.service.js.map +1 -1
  268. package/dist/module/workflow/workflow.module.js +2 -0
  269. package/dist/module/workflow/workflow.module.js.map +1 -1
  270. package/dist/module/workflow-automation/service/workflow-automation.service.js +11 -6
  271. package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
  272. package/dist/module/workflow-automation/workflow-automation.module.js +3 -1
  273. package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
  274. package/dist/module/workflow-schedule/service/workflow-schedule.service.js +0 -2
  275. package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
  276. package/dist/table.config.d.ts +2 -3
  277. package/dist/tsconfig.build.tsbuildinfo +1 -1
  278. package/package.json +2 -2
  279. package/server.log +850 -0
  280. package/src/app.module.ts +5 -5
  281. package/src/constant/status.constant.ts +4 -0
  282. package/src/core.module.ts +55 -44
  283. package/src/module/auth/strategies/jwt.strategy.ts +4 -2
  284. package/src/module/dashboard/dashboard.module.ts +3 -3
  285. package/src/module/dashboard/service/dashboard.service.ts +2 -3
  286. package/src/module/enterprise/controller/enterprise.controller.ts +40 -0
  287. package/src/module/enterprise/controller/meta.controller.ts +23 -0
  288. package/src/module/enterprise/controller/organization.controller.ts +60 -4
  289. package/src/module/enterprise/enterprise.module.ts +16 -18
  290. package/src/module/enterprise/entity/enterprise.entity.ts +5 -11
  291. package/src/module/enterprise/entity/organization-app-mapping.entity.ts +18 -4
  292. package/src/module/enterprise/entity/organization.entity.ts +9 -59
  293. package/src/module/enterprise/repository/enterprise.repository.ts +26 -4
  294. package/src/module/enterprise/service/brand-profile.service.ts +10 -0
  295. package/src/module/enterprise/service/brand.service.ts +75 -5
  296. package/src/module/enterprise/service/enterprise.service.ts +10 -4
  297. package/src/module/enterprise/service/organization.service.ts +140 -23
  298. package/src/module/{meta → enterprise}/service/populate-meta.service.ts +2 -5
  299. package/src/module/enterprise/service/school.service.ts +5 -0
  300. package/src/module/entity_json/controller/entity_json.controller.ts +0 -13
  301. package/src/module/entity_json/entity/entityJson.entity.ts +1 -4
  302. package/src/module/entity_json/entity_json.module.ts +5 -9
  303. package/src/module/entity_json/service/entity_json.service.ts +49 -232
  304. package/src/module/filter/controller/filter.controller.ts +3 -1
  305. package/src/module/filter/filter.module.ts +3 -12
  306. package/src/module/filter/service/filter.service.ts +73 -130
  307. package/src/module/filter/service/saved-filter.service.ts +26 -16
  308. package/src/module/integration/service/integration.service.ts +2 -6
  309. package/src/module/integration/service/wrapper.service.ts +0 -1
  310. package/src/module/layout/controller/layout.controller.ts +1 -8
  311. package/src/module/layout/entity/header-section.entity.ts +0 -6
  312. package/src/module/layout/layout.module.ts +1 -1
  313. package/src/module/layout/repository/header-section.repository.ts +0 -6
  314. package/src/module/layout/service/header-section.service.ts +1 -1
  315. package/src/module/linked_attributes/controller/linked_attributes.controller.ts +0 -100
  316. package/src/module/linked_attributes/linked_attributes.module.ts +2 -9
  317. package/src/module/linked_attributes/service/linked_attributes.service.ts +3 -578
  318. package/src/module/listmaster/service/list-master.service.ts +1 -9
  319. package/src/module/meta/controller/meta.controller.ts +3 -25
  320. package/src/module/meta/entity/app-master.entity.ts +22 -9
  321. package/src/module/meta/entity/entity-master.entity.ts +3 -9
  322. package/src/module/meta/entity.module.ts +5 -6
  323. package/src/module/meta/repository/app-master.repository.ts +1 -1
  324. package/src/module/meta/service/attribute-master.service.ts +1 -31
  325. package/src/module/meta/service/entity-master.service.ts +0 -1
  326. package/src/module/meta/service/entity-relation.service.ts +6 -10
  327. package/src/module/meta/service/entity-service-impl.service.ts +19 -14
  328. package/src/module/meta/service/entity-table.service.ts +20 -28
  329. package/src/module/meta/service/entity.service.ts +1 -0
  330. package/src/module/meta/service/resolver.service.ts +0 -4
  331. package/src/module/module/controller/menu.controller.ts +2 -2
  332. package/src/module/module/controller/module-access.controller.ts +16 -11
  333. package/src/module/module/entity/menu.entity.ts +14 -10
  334. package/src/module/module/entity/module-access.entity.ts +41 -1
  335. package/src/module/module/entity/module-action.entity.ts +10 -6
  336. package/src/module/module/entity/module.entity.ts +7 -14
  337. package/src/module/module/module.module.ts +2 -3
  338. package/src/module/module/repository/menu.repository.ts +19 -31
  339. package/src/module/module/repository/module-access.repository.ts +100 -63
  340. package/src/module/module/service/menu.service.ts +11 -13
  341. package/src/module/module/service/module-access.service.ts +26 -38
  342. package/src/module/notification/entity/notification.entity.ts +53 -3
  343. package/src/module/notification/notification.module.ts +0 -2
  344. package/src/module/notification/service/notification.service.ts +0 -1
  345. package/src/module/notification/service/otp.service.ts +3 -2
  346. package/src/module/user/controller/login.controller.ts +7 -8
  347. package/src/module/user/controller/user.controller.ts +0 -9
  348. package/src/module/user/dto/create-user.dto.ts +19 -6
  349. package/src/module/user/entity/role.entity.ts +59 -16
  350. package/src/module/user/entity/user-role-mapping.entity.ts +29 -3
  351. package/src/module/user/entity/user-session.entity.ts +3 -19
  352. package/src/module/user/entity/user.entity.ts +48 -13
  353. package/src/module/user/repository/role.repository.ts +24 -12
  354. package/src/module/user/repository/user-role-mapping.repository.ts +5 -1
  355. package/src/module/user/repository/user.repository.ts +28 -8
  356. package/src/module/user/repository/userSession.repository.ts +5 -1
  357. package/src/module/user/service/login.service.ts +47 -51
  358. package/src/module/user/service/role.service.ts +53 -60
  359. package/src/module/user/service/user-role-mapping.service.ts +23 -1
  360. package/src/module/user/service/user-session.service.ts +14 -11
  361. package/src/module/user/service/user.service.ts +64 -91
  362. package/src/module/user/user.module.ts +3 -5
  363. package/src/module/workflow/repository/action-data.repository.ts +6 -8
  364. package/src/module/workflow/repository/action.repository.ts +11 -11
  365. package/src/module/workflow/repository/form-master.repository.ts +2 -2
  366. package/src/module/workflow/service/action-data.service.ts +3 -2
  367. package/src/module/workflow/service/action.service.ts +2 -2
  368. package/src/module/workflow/service/comm-template.service.ts +0 -2
  369. package/src/module/workflow/service/entity-modification.service.ts +0 -1
  370. package/src/module/workflow/service/form-master.service.ts +2 -2
  371. package/src/module/workflow/service/populate-workflow.service.ts +1 -1
  372. package/src/module/workflow/service/task.service.ts +0 -3
  373. package/src/module/workflow/service/workflow-meta.service.ts +2 -7
  374. package/src/module/workflow/service/workflow.service.ts +2 -2
  375. package/src/module/workflow/workflow.module.ts +2 -0
  376. package/src/module/workflow-automation/service/workflow-automation.service.ts +19 -7
  377. package/src/module/workflow-automation/workflow-automation.module.ts +4 -3
  378. package/src/module/workflow-schedule/service/workflow-schedule.service.ts +0 -2
  379. package/src/resources/dev.properties.yaml +2 -2
  380. package/dist/migrations/1732612800000-AddEntityJsonGinIndex.d.ts +0 -6
  381. package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js +0 -32
  382. package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js.map +0 -1
  383. package/dist/module/filter/service/flatjson-filter.service.d.ts +0 -32
  384. package/dist/module/filter/service/flatjson-filter.service.js +0 -632
  385. package/dist/module/filter/service/flatjson-filter.service.js.map +0 -1
  386. package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.d.ts +0 -13
  387. package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js +0 -64
  388. package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js.map +0 -1
  389. package/dist/module/meta/service/populate-meta.service.d.ts +0 -13
  390. package/dist/module/meta/service/populate-meta.service.js.map +0 -1
  391. package/src/migrations/1732612800000-AddEntityJsonGinIndex.ts +0 -41
  392. package/src/module/entity_json/docs/FlatJson_Filterin_System.md +0 -2804
  393. package/src/module/filter/service/flatjson-filter.service.ts +0 -903
  394. package/src/module/filter/test/flatjson-filter.service.spec.ts +0 -415
  395. package/src/module/linked_attributes/dto/create-linked-attribute-smart.dto.ts +0 -54
  396. package/src/module/linked_attributes/test/linked-attributes.service.spec.ts +0 -244
@@ -5,15 +5,15 @@ import { WBSCodeGenService } from 'src/utils/service/wbsCodeGen.service';
5
5
  import { SchoolRepository } from '../repository/school.repository';
6
6
  export declare class OrganizationService {
7
7
  private readonly organizationRepository;
8
+ private readonly schoolRepository;
8
9
  private readonly idGen;
9
10
  private readonly wbcCodeGenService;
10
- private readonly schoolRepository;
11
- constructor(organizationRepository: Repository<OrganizationData>, idGen: ClockIDGenService, wbcCodeGenService: WBSCodeGenService, schoolRepository: SchoolRepository);
12
- create(organizationDto: Partial<OrganizationData>, manager?: EntityManager): Promise<OrganizationData>;
11
+ constructor(organizationRepository: Repository<OrganizationData>, schoolRepository: SchoolRepository, idGen: ClockIDGenService, wbcCodeGenService: WBSCodeGenService);
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
  }
@@ -21,59 +21,69 @@ const organization_entity_1 = require("../entity/organization.entity");
21
21
  const wbsCodeGen_service_1 = require("../../../utils/service/wbsCodeGen.service");
22
22
  const school_repository_1 = require("../repository/school.repository");
23
23
  let OrganizationService = class OrganizationService {
24
- constructor(organizationRepository, idGen, wbcCodeGenService, schoolRepository) {
24
+ constructor(organizationRepository, schoolRepository, idGen, wbcCodeGenService) {
25
25
  this.organizationRepository = organizationRepository;
26
+ this.schoolRepository = schoolRepository;
26
27
  this.idGen = idGen;
27
28
  this.wbcCodeGenService = wbcCodeGenService;
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
  }
@@ -114,8 +191,8 @@ exports.OrganizationService = OrganizationService = __decorate([
114
191
  (0, common_1.Injectable)(),
115
192
  __param(0, (0, typeorm_1.InjectRepository)(organization_entity_1.OrganizationData)),
116
193
  __metadata("design:paramtypes", [typeorm_2.Repository,
194
+ school_repository_1.SchoolRepository,
117
195
  clockIDGenUtil_service_1.ClockIDGenService,
118
- wbsCodeGen_service_1.WBSCodeGenService,
119
- school_repository_1.SchoolRepository])
196
+ wbsCodeGen_service_1.WBSCodeGenService])
120
197
  ], OrganizationService);
121
198
  //# sourceMappingURL=organization.service.js.map
@@ -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,GAAL,KAAK,CAAmB;QACxB,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,eAA0C,EAC1C,OAAuB;QAEvB,MAAM,IAAI,GAAG,OAAO;YAClB,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,sCAAgB,CAAC;YACzC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC;QAEhC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,KAAK,KAAK,CAAC;QAE/C,IAAI,OAAO,EAAE,CAAC;YAEZ,MAAM,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC;YAE9C,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAClE,CAAC;YAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;gBACnC,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;aAC3B,CAAC,CAAC;YAEH,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;YAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC;gBACrC,KAAK,EAAE;oBACL,IAAI,EAAE,KAAK;oBAC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AI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,MAAM,IAAI,GAAG,OAAO;YAClB,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,sCAAgB,CAAC;YACzC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC;QAEhC,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,wBAAwB,CAC5B,MAAc,EACd,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,gBAAkC,EAClC,KAAwB,EACxB,iBAAoC;QAHpC,2BAAsB,GAAtB,sBAAsB,CAA8B;QACpD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,UAAK,GAAL,KAAK,CAAmB;QACxB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,eAA0C,EAC1C,YAAk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iB;GAN5C,mBAAmB,CA2P/B"}
@@ -0,0 +1,9 @@
1
+ import { ReflectionHelper } from 'src/utils/service/reflection-helper.service';
2
+ export declare class PopulateMetaService {
3
+ private readonly reflectionHelper;
4
+ constructor(reflectionHelper: ReflectionHelper);
5
+ populateMetaData(organization_id: number): Promise<{
6
+ message: string;
7
+ status: string;
8
+ } | undefined>;
9
+ }
@@ -11,13 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PopulateMetaService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
- const typeorm_1 = require("typeorm");
15
- const entity_service_impl_service_1 = require("./entity-service-impl.service");
16
14
  const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
17
15
  let PopulateMetaService = class PopulateMetaService {
18
- constructor(dataSource, entityServiceImpl, reflectionHelper) {
19
- this.dataSource = dataSource;
20
- this.entityServiceImpl = entityServiceImpl;
16
+ constructor(reflectionHelper) {
21
17
  this.reflectionHelper = reflectionHelper;
22
18
  }
23
19
  async populateMetaData(organization_id) {
@@ -193,8 +189,6 @@ let PopulateMetaService = class PopulateMetaService {
193
189
  exports.PopulateMetaService = PopulateMetaService;
194
190
  exports.PopulateMetaService = PopulateMetaService = __decorate([
195
191
  (0, common_1.Injectable)(),
196
- __metadata("design:paramtypes", [typeorm_1.DataSource,
197
- entity_service_impl_service_1.EntityServiceImpl,
198
- reflection_helper_service_1.ReflectionHelper])
192
+ __metadata("design:paramtypes", [reflection_helper_service_1.ReflectionHelper])
199
193
  ], PopulateMetaService);
200
194
  //# sourceMappingURL=populate-meta.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"populate-meta.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/populate-meta.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,gGAA+E;AAGxE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,gBAAkC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,CAAC;YAE7D,MAAM,KAAK,GAAG,YAAY,CAAC,EAAE,CAAC;YAE9B,MAAM,kBAAkB,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC;gBAC1D,KAAK,EAAE;oBACL,eAAe,EAAE,CAAC,CAAC;oBACnB,UAAU,EAAE,KAAK;oBACjB,QAAQ,EAAE,CAAC,CAAC;oBACZ,kBAAkB,EAAE,kBAAkB;oBACtC,YAAY,EAAE,YAAY;iBAC3B;aACF,CAAC,CAAC;YAEH,IAAI,gBAAgB,GAAG,EAAW,CAAC;YAEnC,KAAK,MAAM,MAAM,IAAI,kBAAkB,EAAE,CAAC;gBACxC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;gBAClE,MAAM,SAAS,GAAG;oBAChB,GAAG,UAAU;oBACb,eAAe;oBACf,SAAS,EAAE,KAAK;oBAChB,UAAU,EAAE,KAAK;oBACjB,QAAQ,EAAE,eAAe;oBACzB,kBAAkB,EAAE,kBAAkB;oBACtC,YAAY,EAAE,YAAY;iBAC3B,CAAC;gBACF,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACnC,CAAC;YAED,MAAM,qBAAqB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACrD,CAAC;QAED,OAAO;YACL,OAAO,EAAE,iCAAiC;YAC1C,MAAM,EAAE,SAAS;SAClB,CAAC;IACJ,CAAC;CACF,CAAA;AAtNY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAG0B,4CAAgB;GAF1C,mBAAmB,CAsN/B"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=school.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"school.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/school.service.ts"],"names":[],"mappings":""}
@@ -4,8 +4,15 @@ export declare class EntityJSONController {
4
4
  constructor(entityJSONService: EntityJSONService);
5
5
  getEntityJson(entityType: string, req: Request & {
6
6
  user: any;
7
- }, mode?: 'flat_json' | 'dropdown'): Promise<any>;
7
+ }, mode?: 'flat_json' | 'dropdown'): Promise<any[] | Record<string, null> | {
8
+ flat_json: Record<string, null>;
9
+ attributes: {
10
+ mainAttributes: import("../../meta/entity/attribute-master.entity").AttributeMaster[];
11
+ relatedAttributes: import("../../meta/entity/attribute-master.entity").AttributeMaster[];
12
+ linkedAttributes: any[];
13
+ };
14
+ }>;
8
15
  updateEntityJson(entityId: string, entityType: string, req: Request & {
9
16
  user: any;
10
- }): Promise<any>;
17
+ }): Promise<Record<string, null> | null>;
11
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"entity_json.controller.js","sourceRoot":"","sources":["../../../../src/module/entity_json/controller/entity_json.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,wEAAmE;AACnE,2DAAgE;AAGzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAI/D,AAAN,KAAK,CAAC,aAAa,CACI,UAAkB,EAChC,GAA4B,EACpB,IAA+B;QAE9C,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,CACnD,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CACD,QAAgB,EACd,UAAkB,EAChC,GAA4B;QAEnC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QAExC,OAAO,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAC5C,UAAU,EACV,MAAM,CAAC,QAAQ,CAAC,EAChB,YAAY,CACb,CAAC;IACJ,CAAC;CAcF,CAAA;AA9CY,oDAAoB;AAKzB;IAFL,IAAA,YAAG,EAAC,cAAc,CAAC;IACnB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;;;;yDAQf;AAIK;IAFL,IAAA,aAAI,EAAC,wBAAwB,CAAC;IAC9B,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IACjB,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;4DASP;+BAhCU,oBAAoB;IADhC,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAEwB,uCAAiB;GADtD,oBAAoB,CA8ChC"}
1
+ {"version":3,"file":"entity_json.controller.js","sourceRoot":"","sources":["../../../../src/module/entity_json/controller/entity_json.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,wEAAmE;AACnE,2DAAgE;AAGzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAI/D,AAAN,KAAK,CAAC,aAAa,CACI,UAAkB,EAChC,GAA4B,EACpB,IAA+B;QAE9C,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,CACnD,UAAU,EACV,YAAY,EACZ,IAAI,CACL,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CACD,QAAgB,EACd,UAAkB,EAChC,GAA4B;QAEnC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QAExC,OAAO,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAC5C,UAAU,EACV,MAAM,CAAC,QAAQ,CAAC,EAChB,YAAY,CACb,CAAC;IACJ,CAAC;CACF,CAAA;AAjCY,oDAAoB;AAKzB;IAFL,IAAA,YAAG,EAAC,cAAc,CAAC;IACnB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;;;;yDAQf;AAIK;IAFL,IAAA,aAAI,EAAC,wBAAwB,CAAC;IAC9B,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IACjB,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;4DASP;+BAhCU,oBAAoB;IADhC,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAEwB,uCAAiB;GADtD,oBAAoB,CAiChC"}
@@ -4,8 +4,7 @@ export declare class EntityJson {
4
4
  entity_id: number;
5
5
  json_data: Record<string, any>;
6
6
  created_by: number;
7
- organization_id: number;
7
+ updated_by: number;
8
8
  created_at: Date;
9
9
  updated_at: Date;
10
- updated_by: string;
11
10
  }
@@ -39,7 +39,7 @@ __decorate([
39
39
  __decorate([
40
40
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
41
41
  __metadata("design:type", Number)
42
- ], EntityJson.prototype, "organization_id", void 0);
42
+ ], EntityJson.prototype, "updated_by", void 0);
43
43
  __decorate([
44
44
  (0, typeorm_1.CreateDateColumn)({ type: 'timestamp', nullable: true }),
45
45
  __metadata("design:type", Date)
@@ -48,10 +48,6 @@ __decorate([
48
48
  (0, typeorm_1.UpdateDateColumn)({ type: 'timestamp', nullable: true }),
49
49
  __metadata("design:type", Date)
50
50
  ], EntityJson.prototype, "updated_at", void 0);
51
- __decorate([
52
- (0, typeorm_1.UpdateDateColumn)({ type: 'varchar', nullable: true }),
53
- __metadata("design:type", String)
54
- ], EntityJson.prototype, "updated_by", void 0);
55
51
  exports.EntityJson = EntityJson = __decorate([
56
52
  (0, typeorm_1.Entity)('frm_entity_json'),
57
53
  (0, typeorm_1.Unique)(['entity_type', 'entity_id'])
@@ -1 +1 @@
1
- {"version":3,"file":"entityJson.entity.js","sourceRoot":"","sources":["../../../../src/module/entity_json/entity/entityJson.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAQiB;AAIV,IAAM,UAAU,GAAhB,MAAM,UAAU;CA6BtB,CAAA;AA7BY,gCAAU;AAErB;IADC,IAAA,gCAAsB,GAAE;;sCACd;AAIX;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;+CACrB;AAIpB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;6CACN;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CACX;AAG/B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACrB;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAChB;AAGxB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC5C,IAAI;8CAAC;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC5C,IAAI;8CAAC;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,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AAE,WAAW,CAAC,CAAC;GACxB,UAAU,CA0BtB"}
@@ -21,15 +21,10 @@ let EntityJSONModule = class EntityJSONModule {
21
21
  exports.EntityJSONModule = EntityJSONModule;
22
22
  exports.EntityJSONModule = EntityJSONModule = __decorate([
23
23
  (0, common_1.Module)({
24
- imports: [
25
- (0, common_1.forwardRef)(() => entity_module_1.EntityModule),
26
- typeorm_1.TypeOrmModule.forFeature([entityJson_entity_1.EntityJson]),
27
- (0, common_1.forwardRef)(() => filter_module_1.FilterModule),
28
- utils_module_1.UtilsModule,
29
- ],
24
+ imports: [entity_module_1.EntityModule, typeorm_1.TypeOrmModule.forFeature([entityJson_entity_1.EntityJson]), filter_module_1.FilterModule, utils_module_1.UtilsModule],
30
25
  controllers: [entity_json_controller_1.EntityJSONController],
31
26
  providers: [entity_json_service_1.EntityJSONService, entityJson_repository_1.EntityJSONRepository],
32
- exports: [entity_json_service_1.EntityJSONService],
27
+ exports: [],
33
28
  })
34
29
  ], EntityJSONModule);
35
30
  //# sourceMappingURL=entity_json.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity_json.module.js","sourceRoot":"","sources":["../../../src/module/entity_json/entity_json.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,yDAAqD;AACrD,6CAAgD;AAChD,uEAAkE;AAClE,gFAA2E;AAC3E,2DAAuD;AACvD,2DAAqD;AACrD,kEAAwD;AACxD,2EAAuE;AAahE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAX5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,uBAAa,CAAC,UAAU,CAAC,CAAC,8BAAU,CAAC,CAAC;YACtC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,0BAAW;SACZ;QACD,WAAW,EAAE,CAAC,6CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,uCAAiB,EAAE,4CAAoB,CAAC;QACpD,OAAO,EAAE,CAAC,uCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
1
+ {"version":3,"file":"entity_json.module.js","sourceRoot":"","sources":["../../../src/module/entity_json/entity_json.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAAqD;AACrD,6CAAgD;AAChD,uEAAkE;AAClE,gFAA2E;AAC3E,2DAAuD;AACvD,2DAAqD;AACrD,kEAAwD;AACxD,2EAAuE;AAShE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAN5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,4BAAY,EAAE,uBAAa,CAAC,UAAU,CAAC,CAAC,8BAAU,CAAC,CAAC,EAAC,4BAAY,EAAC,0BAAW,CAAC;QACxF,WAAW,EAAE,CAAC,6CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,uCAAiB,EAAC,4CAAoB,CAAC;QACnD,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,gBAAgB,CAAG"}
@@ -1,3 +1,4 @@
1
+ import { AttributeMaster } from 'src/module/meta/entity/attribute-master.entity';
1
2
  import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
2
3
  import { LoggingService } from 'src/utils/service/loggingUtil.service';
3
4
  import { DataSource } from 'typeorm';
@@ -10,8 +11,15 @@ export declare class EntityJSONService {
10
11
  private readonly filterService;
11
12
  private readonly entityServiceImpl;
12
13
  constructor(dataSource: DataSource, loggerService: LoggingService, EntityJSONRepository: EntityJSONRepository, filterService: FilterService, entityServiceImpl: EntityServiceImpl);
13
- getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown' | 'all' | 'filter_attribute'): Promise<any>;
14
- updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<any>;
14
+ getAttributeForFlatJSON(entityType: string, loggedInUser: any, flag?: 'flat_json' | 'dropdown' | 'all'): Promise<any[] | Record<string, null> | {
15
+ flat_json: Record<string, null>;
16
+ attributes: {
17
+ mainAttributes: AttributeMaster[];
18
+ relatedAttributes: AttributeMaster[];
19
+ linkedAttributes: any[];
20
+ };
21
+ }>;
22
+ updateEntityJSON(entityType: string, entityId: number, loggedInUser: any): Promise<Record<string, null> | null>;
15
23
  private mergeEntityDataIntoFlatJson;
16
24
  private applyLinkedFilterUsingSavedFilter;
17
25
  }
@@ -31,18 +31,12 @@ let EntityJSONService = class EntityJSONService {
31
31
  this.entityServiceImpl = entityServiceImpl;
32
32
  }
33
33
  async getAttributeForFlatJSON(entityType, loggedInUser, flag) {
34
- const entId = loggedInUser.enterprise_id;
35
- await this.loggerService.log('info', 'EntityJSONService', 'getAttributeForFlatJSON', `Loading attributes for entity: ${entityType}, org: ${entId}`);
34
+ const entId = loggedInUser.entId;
35
+ await this.loggerService.log('info', 'EntityJSONService', 'getAttributeForFlatJSON', `Loading attributes for entity: ${entityType}, ent: ${entId}`);
36
36
  const mainAttributes = await this.dataSource
37
37
  .getRepository(attribute_master_entity_1.AttributeMaster)
38
38
  .createQueryBuilder('attr')
39
- .select([
40
- 'attr.id',
41
- 'attr.name',
42
- 'attr.flat_json_key',
43
- 'attr.attribute_key',
44
- 'attr.data_type',
45
- ])
39
+ .select(['attr.id', 'attr.name', 'attr.flat_json_key', 'attr.attribute_key'])
46
40
  .where('attr.mapped_entity_type = :entityType', { entityType })
47
41
  .andWhere('attr.enterprise_id = :entId', { entId })
48
42
  .getMany();
@@ -55,23 +49,14 @@ let EntityJSONService = class EntityJSONService {
55
49
  .andWhere('rel.enterprise_id = :entId', { entId })
56
50
  .andWhere('rel.relation_type = :relationType', { relationType: 'ONE_TO_ONE' })
57
51
  .getRawMany();
58
- const relatedTypesList = relatedEntityTypes.map((x) => x.rel_target_entity_type);
52
+ const relatedTypesList = relatedEntityTypes.map(x => x.rel_target_entity_type);
59
53
  await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Found ${relatedTypesList.length} ONE-TO-ONE related entity types`);
60
54
  const relatedAttributes = relatedTypesList.length
61
55
  ? await this.dataSource
62
56
  .getRepository(attribute_master_entity_1.AttributeMaster)
63
57
  .createQueryBuilder('attr')
64
- .select([
65
- 'attr.id',
66
- 'attr.name',
67
- 'attr.flat_json_key',
68
- 'attr.mapped_entity_type',
69
- 'attr.attribute_key',
70
- 'attr.data_type',
71
- ])
72
- .where('attr.mapped_entity_type IN (:...types)', {
73
- types: relatedTypesList,
74
- })
58
+ .select(['attr.id', 'attr.name', 'attr.flat_json_key', 'attr.mapped_entity_type', 'attr.attribute_key'])
59
+ .where('attr.mapped_entity_type IN (:...types)', { types: relatedTypesList })
75
60
  .andWhere('attr.enterprise_id = :entId', { entId })
76
61
  .getMany()
77
62
  : [];
@@ -87,83 +72,41 @@ let EntityJSONService = class EntityJSONService {
87
72
  'fla.saved_filter_code AS saved_filter_code',
88
73
  'attr.name AS name',
89
74
  'attr.id AS id',
90
- 'attr.data_type AS data_type',
91
75
  ])
92
76
  .where('attr.enterprise_id = :entId', { entId })
93
77
  .getRawMany();
94
78
  await this.loggerService.log('debug', 'EntityJSONService', 'getAttributeForFlatJSON', `Loaded ${linkedAttributes.length} linked attributes`);
95
- if (flag === 'filter_attribute') {
96
- const filterAttributes = [];
97
- filterAttributes.push(...mainAttributes.map((a) => ({
98
- id: a.id,
99
- name: a.name,
100
- data_type: a.data_type,
101
- flat_json_key: a.flat_json_key,
102
- source: 'main',
103
- })));
104
- filterAttributes.push(...relatedAttributes.map((a) => ({
105
- id: a.id,
106
- name: a.name,
107
- data_type: a.data_type,
108
- flat_json_key: a.flat_json_key,
109
- source: 'related',
110
- })));
111
- filterAttributes.push(...linkedAttributes.map((l) => ({
112
- id: l.id,
113
- name: l.name,
114
- data_type: l.data_type,
115
- flat_json_key: l.target_attribute_key,
116
- source: 'linked',
117
- })));
118
- return filterAttributes;
119
- }
120
79
  if (flag === 'flat_json' || flag === 'all') {
121
80
  const result = {};
122
- mainAttributes.forEach((attr) => {
81
+ mainAttributes.forEach(attr => {
123
82
  if (attr.flat_json_key)
124
83
  result[attr.flat_json_key] = null;
125
84
  });
126
- relatedAttributes.forEach((attr) => {
85
+ relatedAttributes.forEach(attr => {
127
86
  if (attr.flat_json_key)
128
87
  result[attr.flat_json_key] = null;
129
88
  });
130
- linkedAttributes.forEach((link) => {
89
+ linkedAttributes.forEach(link => {
131
90
  if (link.target_attribute_key)
132
91
  result[link.target_attribute_key] = null;
133
92
  });
134
93
  if (flag === 'all') {
135
- return {
136
- flat_json: result,
137
- attributes: {
138
- mainAttributes,
139
- relatedAttributes,
140
- linkedAttributes,
141
- },
142
- };
94
+ return { flat_json: result, attributes: { mainAttributes, relatedAttributes, linkedAttributes } };
143
95
  }
144
96
  return result;
145
97
  }
146
98
  const dropdown = [];
147
- dropdown.push(...mainAttributes.map((a) => ({ label: a.name, value: a.flat_json_key })));
148
- dropdown.push(...relatedAttributes.map((a) => ({
149
- label: a.name,
150
- value: a.flat_json_key,
151
- })));
99
+ dropdown.push(...mainAttributes.map(a => ({ label: a.name, value: a.flat_json_key })));
100
+ dropdown.push(...relatedAttributes.map(a => ({ label: a.name, value: a.flat_json_key })));
152
101
  if (linkedAttributes.length > 0) {
153
- dropdown.push(...linkedAttributes.map((a) => ({
154
- label: a.name,
155
- value: a.target_attribute_key,
156
- })));
102
+ dropdown.push(...linkedAttributes.map(a => ({ label: a.name, value: a.attribute_key })));
157
103
  }
158
104
  return dropdown;
159
105
  }
160
106
  async updateEntityJSON(entityType, entityId, loggedInUser) {
161
107
  await this.loggerService.log('info', 'EntityJSONService', 'updateEntityJSON', `Building flat JSON for entity: ${entityType}#${entityId}`);
162
108
  const response = await this.getAttributeForFlatJSON(entityType, loggedInUser, 'all');
163
- if (!response ||
164
- !('flat_json' in response) ||
165
- !('attributes' in response) ||
166
- !response.attributes) {
109
+ if (!response || !('flat_json' in response) || !('attributes' in response) || !response.attributes) {
167
110
  await this.loggerService.log('error', 'EntityJSONService', 'updateEntityJSON', `getAttributeForFlatJSON() did not return expected structure`);
168
111
  return null;
169
112
  }
@@ -176,29 +119,23 @@ let EntityJSONService = class EntityJSONService {
176
119
  linkedAttributes: attributes.linkedAttributes || [],
177
120
  };
178
121
  const attrMap = {};
179
- const allAttrs = [
180
- ...safeAttributes.mainAttributes,
181
- ...safeAttributes.relatedAttributes,
182
- ];
183
- allAttrs.forEach((attr) => {
122
+ const allAttrs = [...safeAttributes.mainAttributes, ...safeAttributes.relatedAttributes];
123
+ allAttrs.forEach(attr => {
184
124
  if (attr.attribute_key)
185
125
  attrMap[attr.attribute_key] = attr.flat_json_key || attr.attribute_key;
186
126
  });
187
- const mainData = await this.entityServiceImpl.getResolvedEntityData(entityType, entityId, loggedInUser, true);
127
+ const mainData = await this.entityServiceImpl.getResolvedEntityData(entityType, entityId, loggedInUser);
188
128
  this.mergeEntityDataIntoFlatJson(flatJson, mainData, attrMap);
189
129
  const relations = await this.dataSource
190
130
  .getRepository('frm_entity_relation_data')
191
131
  .createQueryBuilder('erd')
192
- .select([
193
- 'erd.target_entity_id AS target_entity_id',
194
- 'erd.target_entity_type AS target_entity_type',
195
- ])
132
+ .select(['erd.target_entity_id AS target_entity_id', 'erd.target_entity_type AS target_entity_type'])
196
133
  .where('erd.source_entity_type = :entityType', { entityType })
197
134
  .andWhere('erd.source_entity_id = :entityId', { entityId })
198
135
  .andWhere('erd.relation_type = :rt', { rt: 'ONE_TO_ONE' })
199
136
  .getRawMany();
200
137
  for (const rel of relations) {
201
- const relatedData = await this.entityServiceImpl.getResolvedEntityData(rel.target_entity_type, rel.target_entity_id, loggedInUser, true);
138
+ const relatedData = await this.entityServiceImpl.getResolvedEntityData(rel.target_entity_type, rel.target_entity_id, loggedInUser);
202
139
  this.mergeEntityDataIntoFlatJson(flatJson, relatedData, attrMap);
203
140
  }
204
141
  for (const linkAttr of safeAttributes.linkedAttributes) {
@@ -237,8 +174,7 @@ let EntityJSONService = class EntityJSONService {
237
174
  }
238
175
  }
239
176
  async applyLinkedFilterUsingSavedFilter(childEntityType, savedFilterCode, childFilterAttribute, mappingValue, targetAttribute, loggedInUser, entity_id) {
240
- if (!savedFilterCode &&
241
- (mappingValue === null || mappingValue === undefined))
177
+ if (!savedFilterCode && (mappingValue === null || mappingValue === undefined))
242
178
  return null;
243
179
  const dto = {
244
180
  entity_type: childEntityType,
@@ -246,23 +182,13 @@ let EntityJSONService = class EntityJSONService {
246
182
  page: 1,
247
183
  size: 1,
248
184
  };
249
- if (mappingValue !== null &&
250
- mappingValue !== undefined &&
251
- mappingValue !== '') {
185
+ if (mappingValue !== null && mappingValue !== undefined && mappingValue !== '') {
252
186
  dto.quickFilter = [
253
- {
254
- filter_attribute: childFilterAttribute,
255
- filter_operator: 'equal',
256
- filter_value: mappingValue,
257
- },
187
+ { filter_attribute: childFilterAttribute, filter_operator: 'equal', filter_value: mappingValue },
258
188
  ];
259
189
  }
260
190
  dto.quickFilter = [
261
- {
262
- filter_attribute: 'parent_id',
263
- filter_operator: 'equal',
264
- filter_value: [entity_id],
265
- },
191
+ { filter_attribute: 'parent_id', filter_operator: 'equal', filter_value: [entity_id] },
266
192
  ];
267
193
  const result = await this.filterService.applyFilter(dto);
268
194
  const rows = result?.data?.entity_list || [];