rez_core 6.5.23 → 6.5.26

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 (395) hide show
  1. package/dist/app.module.js +3 -3
  2. package/dist/app.module.js.map +1 -1
  3. package/dist/core.module.js +38 -60
  4. package/dist/core.module.js.map +1 -1
  5. package/dist/migrations/1732612800000-AddEntityJsonGinIndex.d.ts +6 -0
  6. package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js +32 -0
  7. package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js.map +1 -0
  8. package/dist/module/auth/strategies/jwt.strategy.d.ts +1 -2
  9. package/dist/module/auth/strategies/jwt.strategy.js +2 -3
  10. package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
  11. package/dist/module/dashboard/dashboard.module.js +1 -1
  12. package/dist/module/dashboard/dashboard.module.js.map +1 -1
  13. package/dist/module/dashboard/service/dashboard.service.js +3 -2
  14. package/dist/module/dashboard/service/dashboard.service.js.map +1 -1
  15. package/dist/module/enterprise/controller/organization.controller.d.ts +4 -12
  16. package/dist/module/enterprise/controller/organization.controller.js +8 -64
  17. package/dist/module/enterprise/controller/organization.controller.js.map +1 -1
  18. package/dist/module/enterprise/enterprise.module.js +15 -10
  19. package/dist/module/enterprise/enterprise.module.js.map +1 -1
  20. package/dist/module/enterprise/entity/enterprise.entity.d.ts +3 -1
  21. package/dist/module/enterprise/entity/enterprise.entity.js +12 -4
  22. package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -1
  23. package/dist/module/enterprise/entity/organization-app-mapping.entity.d.ts +1 -6
  24. package/dist/module/enterprise/entity/organization-app-mapping.entity.js +4 -21
  25. package/dist/module/enterprise/entity/organization-app-mapping.entity.js.map +1 -1
  26. package/dist/module/enterprise/entity/organization.entity.d.ts +18 -3
  27. package/dist/module/enterprise/entity/organization.entity.js +74 -8
  28. package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
  29. package/dist/module/enterprise/repository/enterprise.repository.d.ts +2 -4
  30. package/dist/module/enterprise/repository/enterprise.repository.js +4 -19
  31. package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -1
  32. package/dist/module/enterprise/service/brand.service.d.ts +3 -0
  33. package/dist/module/enterprise/service/brand.service.js +17 -0
  34. package/dist/module/enterprise/service/brand.service.js.map +1 -1
  35. package/dist/module/enterprise/service/enterprise.service.d.ts +2 -2
  36. package/dist/module/enterprise/service/enterprise.service.js +4 -4
  37. package/dist/module/enterprise/service/enterprise.service.js.map +1 -1
  38. package/dist/module/enterprise/service/organization.service.d.ts +4 -4
  39. package/dist/module/enterprise/service/organization.service.js +24 -101
  40. package/dist/module/enterprise/service/organization.service.js.map +1 -1
  41. package/dist/module/entity_json/controller/entity_json.controller.d.ts +2 -9
  42. package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -1
  43. package/dist/module/entity_json/entity/entityJson.entity.d.ts +2 -1
  44. package/dist/module/entity_json/entity/entityJson.entity.js +5 -1
  45. package/dist/module/entity_json/entity/entityJson.entity.js.map +1 -1
  46. package/dist/module/entity_json/entity_json.module.js +7 -2
  47. package/dist/module/entity_json/entity_json.module.js.map +1 -1
  48. package/dist/module/entity_json/service/entity_json.service.d.ts +2 -10
  49. package/dist/module/entity_json/service/entity_json.service.js +97 -23
  50. package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
  51. package/dist/module/filter/controller/filter.controller.d.ts +12 -0
  52. package/dist/module/filter/controller/filter.controller.js +1 -1
  53. package/dist/module/filter/controller/filter.controller.js.map +1 -1
  54. package/dist/module/filter/filter.module.js +11 -2
  55. package/dist/module/filter/filter.module.js.map +1 -1
  56. package/dist/module/filter/service/filter.service.d.ts +38 -2
  57. package/dist/module/filter/service/filter.service.js +43 -50
  58. package/dist/module/filter/service/filter.service.js.map +1 -1
  59. package/dist/module/filter/service/flatjson-filter.service.d.ts +32 -0
  60. package/dist/module/filter/service/flatjson-filter.service.js +632 -0
  61. package/dist/module/filter/service/flatjson-filter.service.js.map +1 -0
  62. package/dist/module/filter/service/saved-filter.service.d.ts +3 -2
  63. package/dist/module/filter/service/saved-filter.service.js +14 -18
  64. package/dist/module/filter/service/saved-filter.service.js.map +1 -1
  65. package/dist/module/integration/service/integration.service.d.ts +1 -0
  66. package/dist/module/integration/service/integration.service.js +2 -1
  67. package/dist/module/integration/service/integration.service.js.map +1 -1
  68. package/dist/module/integration/service/wrapper.service.js +1 -0
  69. package/dist/module/integration/service/wrapper.service.js.map +1 -1
  70. package/dist/module/layout/controller/layout.controller.d.ts +3 -1
  71. package/dist/module/layout/controller/layout.controller.js +7 -3
  72. package/dist/module/layout/controller/layout.controller.js.map +1 -1
  73. package/dist/module/layout/entity/header-section.entity.d.ts +2 -0
  74. package/dist/module/layout/entity/header-section.entity.js +8 -0
  75. package/dist/module/layout/entity/header-section.entity.js.map +1 -1
  76. package/dist/module/layout/layout.module.js +2 -1
  77. package/dist/module/layout/layout.module.js.map +1 -1
  78. package/dist/module/layout/repository/header-section.repository.d.ts +1 -0
  79. package/dist/module/layout/repository/header-section.repository.js +5 -0
  80. package/dist/module/layout/repository/header-section.repository.js.map +1 -1
  81. package/dist/module/layout/service/header-section.service.d.ts +1 -1
  82. package/dist/module/layout/service/header-section.service.js +1 -1
  83. package/dist/module/layout/service/header-section.service.js.map +1 -1
  84. package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +41 -0
  85. package/dist/module/linked_attributes/controller/linked_attributes.controller.js +90 -0
  86. package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -1
  87. package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.d.ts +13 -0
  88. package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js +64 -0
  89. package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js.map +1 -0
  90. package/dist/module/linked_attributes/linked_attributes.module.js +8 -1
  91. package/dist/module/linked_attributes/linked_attributes.module.js.map +1 -1
  92. package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +65 -1
  93. package/dist/module/linked_attributes/service/linked_attributes.service.js +287 -2
  94. package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -1
  95. package/dist/module/listmaster/service/list-master.service.js +8 -1
  96. package/dist/module/listmaster/service/list-master.service.js.map +1 -1
  97. package/dist/module/meta/controller/meta.controller.d.ts +6 -1
  98. package/dist/module/meta/controller/meta.controller.js +19 -1
  99. package/dist/module/meta/controller/meta.controller.js.map +1 -1
  100. package/dist/module/meta/entity/app-master.entity.d.ts +4 -8
  101. package/dist/module/meta/entity/app-master.entity.js +12 -30
  102. package/dist/module/meta/entity/app-master.entity.js.map +1 -1
  103. package/dist/module/meta/entity/entity-master.entity.d.ts +1 -0
  104. package/dist/module/meta/entity/entity-master.entity.js +8 -1
  105. package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
  106. package/dist/module/meta/entity.module.js +5 -2
  107. package/dist/module/meta/entity.module.js.map +1 -1
  108. package/dist/module/meta/repository/app-master.repository.js +1 -1
  109. package/dist/module/meta/repository/app-master.repository.js.map +1 -1
  110. package/dist/module/meta/service/attribute-master.service.d.ts +6 -1
  111. package/dist/module/meta/service/attribute-master.service.js +22 -2
  112. package/dist/module/meta/service/attribute-master.service.js.map +1 -1
  113. package/dist/module/meta/service/entity-master.service.js +1 -0
  114. package/dist/module/meta/service/entity-master.service.js.map +1 -1
  115. package/dist/module/meta/service/entity-relation.service.d.ts +4 -3
  116. package/dist/module/meta/service/entity-relation.service.js +10 -4
  117. package/dist/module/meta/service/entity-relation.service.js.map +1 -1
  118. package/dist/module/meta/service/entity-service-impl.service.d.ts +1 -1
  119. package/dist/module/meta/service/entity-service-impl.service.js +14 -10
  120. package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
  121. package/dist/module/meta/service/entity-table.service.d.ts +2 -3
  122. package/dist/module/meta/service/entity-table.service.js +19 -23
  123. package/dist/module/meta/service/entity-table.service.js.map +1 -1
  124. package/dist/module/meta/service/populate-meta.service.d.ts +13 -0
  125. package/dist/module/{enterprise → meta}/service/populate-meta.service.js +8 -2
  126. package/dist/module/meta/service/populate-meta.service.js.map +1 -0
  127. package/dist/module/meta/service/resolver.service.d.ts +1 -1
  128. package/dist/module/meta/service/resolver.service.js +6 -3
  129. package/dist/module/meta/service/resolver.service.js.map +1 -1
  130. package/dist/module/module/controller/menu.controller.js +2 -2
  131. package/dist/module/module/controller/menu.controller.js.map +1 -1
  132. package/dist/module/module/controller/module-access.controller.d.ts +4 -3
  133. package/dist/module/module/controller/module-access.controller.js +10 -15
  134. package/dist/module/module/controller/module-access.controller.js.map +1 -1
  135. package/dist/module/module/entity/menu.entity.d.ts +2 -6
  136. package/dist/module/module/entity/menu.entity.js +7 -19
  137. package/dist/module/module/entity/menu.entity.js.map +1 -1
  138. package/dist/module/module/entity/module-access.entity.d.ts +0 -15
  139. package/dist/module/module/entity/module-access.entity.js +0 -50
  140. package/dist/module/module/entity/module-access.entity.js.map +1 -1
  141. package/dist/module/module/entity/module-action.entity.d.ts +1 -4
  142. package/dist/module/module/entity/module-action.entity.js +3 -12
  143. package/dist/module/module/entity/module-action.entity.js.map +1 -1
  144. package/dist/module/module/entity/module.entity.d.ts +5 -3
  145. package/dist/module/module/entity/module.entity.js +18 -8
  146. package/dist/module/module/entity/module.entity.js.map +1 -1
  147. package/dist/module/module/module.module.d.ts +1 -1
  148. package/dist/module/module/module.module.js +7 -5
  149. package/dist/module/module/module.module.js.map +1 -1
  150. package/dist/module/module/repository/menu.repository.d.ts +4 -4
  151. package/dist/module/module/repository/menu.repository.js +27 -17
  152. package/dist/module/module/repository/menu.repository.js.map +1 -1
  153. package/dist/module/module/repository/module-access.repository.d.ts +7 -7
  154. package/dist/module/module/repository/module-access.repository.js +44 -82
  155. package/dist/module/module/repository/module-access.repository.js.map +1 -1
  156. package/dist/module/module/service/menu.service.d.ts +5 -3
  157. package/dist/module/module/service/menu.service.js +12 -9
  158. package/dist/module/module/service/menu.service.js.map +1 -1
  159. package/dist/module/module/service/module-access.service.d.ts +11 -8
  160. package/dist/module/module/service/module-access.service.js +26 -24
  161. package/dist/module/module/service/module-access.service.js.map +1 -1
  162. package/dist/module/notification/entity/notification.entity.d.ts +2 -17
  163. package/dist/module/notification/entity/notification.entity.js +2 -68
  164. package/dist/module/notification/entity/notification.entity.js.map +1 -1
  165. package/dist/module/notification/notification.module.js +2 -0
  166. package/dist/module/notification/notification.module.js.map +1 -1
  167. package/dist/module/notification/service/notification.service.d.ts +3 -1
  168. package/dist/module/notification/service/notification.service.js +5 -2
  169. package/dist/module/notification/service/notification.service.js.map +1 -1
  170. package/dist/module/notification/service/otp.service.js.map +1 -1
  171. package/dist/module/user/controller/login.controller.d.ts +3 -1
  172. package/dist/module/user/controller/login.controller.js +6 -2
  173. package/dist/module/user/controller/login.controller.js.map +1 -1
  174. package/dist/module/user/controller/user.controller.d.ts +2 -0
  175. package/dist/module/user/controller/user.controller.js +13 -0
  176. package/dist/module/user/controller/user.controller.js.map +1 -1
  177. package/dist/module/user/dto/create-user.dto.d.ts +3 -6
  178. package/dist/module/user/dto/create-user.dto.js +11 -17
  179. package/dist/module/user/dto/create-user.dto.js.map +1 -1
  180. package/dist/module/user/entity/role.entity.d.ts +6 -19
  181. package/dist/module/user/entity/role.entity.js +19 -68
  182. package/dist/module/user/entity/role.entity.js.map +1 -1
  183. package/dist/module/user/entity/user-role-mapping.entity.d.ts +0 -10
  184. package/dist/module/user/entity/user-role-mapping.entity.js +1 -33
  185. package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
  186. package/dist/module/user/entity/user-session.entity.js +3 -2
  187. package/dist/module/user/entity/user-session.entity.js.map +1 -1
  188. package/dist/module/user/entity/user.entity.d.ts +5 -19
  189. package/dist/module/user/entity/user.entity.js +15 -69
  190. package/dist/module/user/entity/user.entity.js.map +1 -1
  191. package/dist/module/user/repository/role.repository.d.ts +2 -6
  192. package/dist/module/user/repository/role.repository.js +8 -16
  193. package/dist/module/user/repository/role.repository.js.map +1 -1
  194. package/dist/module/user/repository/user-role-mapping.repository.d.ts +0 -1
  195. package/dist/module/user/repository/user-role-mapping.repository.js +0 -3
  196. package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -1
  197. package/dist/module/user/repository/user.repository.d.ts +2 -4
  198. package/dist/module/user/repository/user.repository.js +7 -19
  199. package/dist/module/user/repository/user.repository.js.map +1 -1
  200. package/dist/module/user/repository/userSession.repository.d.ts +0 -1
  201. package/dist/module/user/repository/userSession.repository.js +0 -3
  202. package/dist/module/user/repository/userSession.repository.js.map +1 -1
  203. package/dist/module/user/service/login.service.d.ts +5 -3
  204. package/dist/module/user/service/login.service.js +42 -43
  205. package/dist/module/user/service/login.service.js.map +1 -1
  206. package/dist/module/user/service/role.service.d.ts +11 -24
  207. package/dist/module/user/service/role.service.js +38 -42
  208. package/dist/module/user/service/role.service.js.map +1 -1
  209. package/dist/module/user/service/user-role-mapping.service.d.ts +0 -2
  210. package/dist/module/user/service/user-role-mapping.service.js +0 -6
  211. package/dist/module/user/service/user-role-mapping.service.js.map +1 -1
  212. package/dist/module/user/service/user-session.service.d.ts +1 -2
  213. package/dist/module/user/service/user-session.service.js +5 -9
  214. package/dist/module/user/service/user-session.service.js.map +1 -1
  215. package/dist/module/user/service/user.service.d.ts +20 -29
  216. package/dist/module/user/service/user.service.js +56 -44
  217. package/dist/module/user/service/user.service.js.map +1 -1
  218. package/dist/module/user/user.module.js +7 -1
  219. package/dist/module/user/user.module.js.map +1 -1
  220. package/dist/module/workflow/repository/action-data.repository.d.ts +1 -1
  221. package/dist/module/workflow/repository/action-data.repository.js +8 -6
  222. package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
  223. package/dist/module/workflow/repository/action.repository.d.ts +1 -1
  224. package/dist/module/workflow/repository/action.repository.js +10 -10
  225. package/dist/module/workflow/repository/action.repository.js.map +1 -1
  226. package/dist/module/workflow/repository/form-master.repository.d.ts +1 -1
  227. package/dist/module/workflow/repository/form-master.repository.js +2 -2
  228. package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
  229. package/dist/module/workflow/service/action-data.service.js +2 -1
  230. package/dist/module/workflow/service/action-data.service.js.map +1 -1
  231. package/dist/module/workflow/service/action.service.js +2 -2
  232. package/dist/module/workflow/service/action.service.js.map +1 -1
  233. package/dist/module/workflow/service/comm-template.service.js +2 -0
  234. package/dist/module/workflow/service/comm-template.service.js.map +1 -1
  235. package/dist/module/workflow/service/entity-modification.service.js +1 -0
  236. package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
  237. package/dist/module/workflow/service/form-master.service.js +2 -2
  238. package/dist/module/workflow/service/form-master.service.js.map +1 -1
  239. package/dist/module/workflow/service/populate-workflow.service.d.ts +1 -1
  240. package/dist/module/workflow/service/populate-workflow.service.js +1 -1
  241. package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
  242. package/dist/module/workflow/service/task.service.js +3 -0
  243. package/dist/module/workflow/service/task.service.js.map +1 -1
  244. package/dist/module/workflow/service/workflow-meta.service.js +7 -2
  245. package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
  246. package/dist/module/workflow/service/workflow.service.js +2 -2
  247. package/dist/module/workflow/service/workflow.service.js.map +1 -1
  248. package/dist/module/workflow/workflow.module.js +0 -2
  249. package/dist/module/workflow/workflow.module.js.map +1 -1
  250. package/dist/module/workflow-automation/service/workflow-automation.service.js +6 -11
  251. package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
  252. package/dist/module/workflow-automation/workflow-automation.module.js +1 -3
  253. package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
  254. package/dist/module/workflow-schedule/service/workflow-schedule.service.js +2 -0
  255. package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
  256. package/dist/table.config.d.ts +3 -2
  257. package/dist/tsconfig.build.tsbuildinfo +1 -1
  258. package/package.json +2 -2
  259. package/src/app.module.ts +5 -5
  260. package/src/core.module.ts +44 -55
  261. package/src/migrations/1732612800000-AddEntityJsonGinIndex.ts +41 -0
  262. package/src/module/auth/strategies/jwt.strategy.ts +2 -4
  263. package/src/module/dashboard/dashboard.module.ts +3 -3
  264. package/src/module/dashboard/service/dashboard.service.ts +3 -2
  265. package/src/module/enterprise/controller/organization.controller.ts +4 -60
  266. package/src/module/enterprise/enterprise.module.ts +18 -16
  267. package/src/module/enterprise/entity/enterprise.entity.ts +11 -5
  268. package/src/module/enterprise/entity/organization-app-mapping.entity.ts +4 -18
  269. package/src/module/enterprise/entity/organization.entity.ts +59 -9
  270. package/src/module/enterprise/repository/enterprise.repository.ts +4 -26
  271. package/src/module/enterprise/service/brand.service.ts +5 -75
  272. package/src/module/enterprise/service/enterprise.service.ts +4 -10
  273. package/src/module/enterprise/service/organization.service.ts +23 -140
  274. package/src/module/entity_json/controller/entity_json.controller.ts +13 -0
  275. package/src/module/entity_json/docs/FlatJson_Filterin_System.md +2804 -0
  276. package/src/module/entity_json/entity/entityJson.entity.ts +4 -1
  277. package/src/module/entity_json/entity_json.module.ts +9 -5
  278. package/src/module/entity_json/service/entity_json.service.ts +232 -49
  279. package/src/module/filter/controller/filter.controller.ts +1 -3
  280. package/src/module/filter/filter.module.ts +12 -3
  281. package/src/module/filter/service/filter.service.ts +130 -73
  282. package/src/module/filter/service/flatjson-filter.service.ts +903 -0
  283. package/src/module/filter/service/saved-filter.service.ts +16 -26
  284. package/src/module/filter/test/flatjson-filter.service.spec.ts +415 -0
  285. package/src/module/integration/service/integration.service.ts +6 -2
  286. package/src/module/integration/service/wrapper.service.ts +1 -0
  287. package/src/module/layout/controller/layout.controller.ts +8 -1
  288. package/src/module/layout/entity/header-section.entity.ts +6 -0
  289. package/src/module/layout/layout.module.ts +1 -1
  290. package/src/module/layout/repository/header-section.repository.ts +6 -0
  291. package/src/module/layout/service/header-section.service.ts +1 -1
  292. package/src/module/linked_attributes/controller/linked_attributes.controller.ts +100 -0
  293. package/src/module/linked_attributes/dto/create-linked-attribute-smart.dto.ts +54 -0
  294. package/src/module/linked_attributes/linked_attributes.module.ts +9 -2
  295. package/src/module/linked_attributes/service/linked_attributes.service.ts +578 -3
  296. package/src/module/linked_attributes/test/linked-attributes.service.spec.ts +244 -0
  297. package/src/module/listmaster/service/list-master.service.ts +9 -1
  298. package/src/module/meta/controller/meta.controller.ts +25 -3
  299. package/src/module/meta/entity/app-master.entity.ts +9 -22
  300. package/src/module/meta/entity/entity-master.entity.ts +9 -3
  301. package/src/module/meta/entity.module.ts +6 -5
  302. package/src/module/meta/repository/app-master.repository.ts +1 -1
  303. package/src/module/meta/service/attribute-master.service.ts +31 -1
  304. package/src/module/meta/service/entity-master.service.ts +1 -0
  305. package/src/module/meta/service/entity-relation.service.ts +10 -6
  306. package/src/module/meta/service/entity-service-impl.service.ts +14 -19
  307. package/src/module/meta/service/entity-table.service.ts +28 -20
  308. package/src/module/meta/service/entity.service.ts +0 -1
  309. package/src/module/{enterprise → meta}/service/populate-meta.service.ts +5 -2
  310. package/src/module/meta/service/resolver.service.ts +4 -0
  311. package/src/module/module/controller/menu.controller.ts +2 -2
  312. package/src/module/module/controller/module-access.controller.ts +11 -16
  313. package/src/module/module/entity/menu.entity.ts +7 -17
  314. package/src/module/module/entity/module-access.entity.ts +1 -41
  315. package/src/module/module/entity/module-action.entity.ts +4 -11
  316. package/src/module/module/entity/module.entity.ts +14 -7
  317. package/src/module/module/module.module.ts +3 -2
  318. package/src/module/module/repository/menu.repository.ts +31 -19
  319. package/src/module/module/repository/module-access.repository.ts +60 -97
  320. package/src/module/module/service/menu.service.ts +13 -11
  321. package/src/module/module/service/module-access.service.ts +38 -26
  322. package/src/module/notification/entity/notification.entity.ts +3 -53
  323. package/src/module/notification/notification.module.ts +2 -0
  324. package/src/module/notification/service/notification.service.ts +1 -0
  325. package/src/module/notification/service/otp.service.ts +2 -3
  326. package/src/module/user/controller/login.controller.ts +8 -7
  327. package/src/module/user/controller/user.controller.ts +9 -0
  328. package/src/module/user/dto/create-user.dto.ts +6 -19
  329. package/src/module/user/entity/role.entity.ts +16 -62
  330. package/src/module/user/entity/user-role-mapping.entity.ts +3 -29
  331. package/src/module/user/entity/user-session.entity.ts +4 -3
  332. package/src/module/user/entity/user.entity.ts +13 -54
  333. package/src/module/user/repository/role.repository.ts +12 -24
  334. package/src/module/user/repository/user-role-mapping.repository.ts +1 -5
  335. package/src/module/user/repository/user.repository.ts +8 -28
  336. package/src/module/user/repository/userSession.repository.ts +1 -5
  337. package/src/module/user/service/login.service.ts +51 -47
  338. package/src/module/user/service/role.service.ts +60 -53
  339. package/src/module/user/service/user-role-mapping.service.ts +1 -23
  340. package/src/module/user/service/user-session.service.ts +6 -12
  341. package/src/module/user/service/user.service.ts +91 -64
  342. package/src/module/user/user.module.ts +5 -3
  343. package/src/module/workflow/repository/action-data.repository.ts +8 -6
  344. package/src/module/workflow/repository/action.repository.ts +11 -11
  345. package/src/module/workflow/repository/form-master.repository.ts +2 -2
  346. package/src/module/workflow/service/action-data.service.ts +2 -3
  347. package/src/module/workflow/service/action.service.ts +2 -2
  348. package/src/module/workflow/service/comm-template.service.ts +2 -0
  349. package/src/module/workflow/service/entity-modification.service.ts +1 -0
  350. package/src/module/workflow/service/form-master.service.ts +2 -2
  351. package/src/module/workflow/service/populate-workflow.service.ts +1 -1
  352. package/src/module/workflow/service/task.service.ts +3 -0
  353. package/src/module/workflow/service/workflow-meta.service.ts +7 -2
  354. package/src/module/workflow/service/workflow.service.ts +2 -2
  355. package/src/module/workflow/workflow.module.ts +0 -2
  356. package/src/module/workflow-automation/service/workflow-automation.service.ts +7 -19
  357. package/src/module/workflow-automation/workflow-automation.module.ts +3 -4
  358. package/src/module/workflow-schedule/service/workflow-schedule.service.ts +2 -0
  359. package/src/resources/dev.properties.yaml +2 -2
  360. package/.claude/settings.local.json +0 -26
  361. package/.idea/250218_nodejs_core.iml +0 -9
  362. package/.idea/codeStyles/Project.xml +0 -59
  363. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  364. package/.idea/copilot.data.migration.agent.xml +0 -6
  365. package/.idea/copilot.data.migration.ask.xml +0 -6
  366. package/.idea/copilot.data.migration.ask2agent.xml +0 -6
  367. package/.idea/copilot.data.migration.edit.xml +0 -6
  368. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  369. package/.idea/misc.xml +0 -6
  370. package/.idea/modules.xml +0 -8
  371. package/.idea/prettier.xml +0 -6
  372. package/.idea/vcs.xml +0 -6
  373. package/dist/constant/status.constant.d.ts +0 -4
  374. package/dist/constant/status.constant.js +0 -9
  375. package/dist/constant/status.constant.js.map +0 -1
  376. package/dist/module/enterprise/controller/enterprise.controller.d.ts +0 -12
  377. package/dist/module/enterprise/controller/enterprise.controller.js +0 -57
  378. package/dist/module/enterprise/controller/enterprise.controller.js.map +0 -1
  379. package/dist/module/enterprise/controller/meta.controller.d.ts +0 -9
  380. package/dist/module/enterprise/controller/meta.controller.js +0 -43
  381. package/dist/module/enterprise/controller/meta.controller.js.map +0 -1
  382. package/dist/module/enterprise/service/brand-profile.service.d.ts +0 -0
  383. package/dist/module/enterprise/service/brand-profile.service.js +0 -1
  384. package/dist/module/enterprise/service/brand-profile.service.js.map +0 -1
  385. package/dist/module/enterprise/service/populate-meta.service.d.ts +0 -9
  386. package/dist/module/enterprise/service/populate-meta.service.js.map +0 -1
  387. package/dist/module/enterprise/service/school.service.d.ts +0 -0
  388. package/dist/module/enterprise/service/school.service.js +0 -1
  389. package/dist/module/enterprise/service/school.service.js.map +0 -1
  390. package/server.log +0 -850
  391. package/src/constant/status.constant.ts +0 -4
  392. package/src/module/enterprise/controller/enterprise.controller.ts +0 -40
  393. package/src/module/enterprise/controller/meta.controller.ts +0 -23
  394. package/src/module/enterprise/service/brand-profile.service.ts +0 -10
  395. package/src/module/enterprise/service/school.service.ts +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"organization-app-mapping.entity.js","sourceRoot":"","sources":["../../../../src/module/enterprise/entity/organization-app-mapping.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgG;AAChG,+DAAyD;AACzD,2EAAgE;AAIzD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAoBlC,CAAA;AApBY,wDAAsB;AAEjC;IADC,IAAA,gCAAsB,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;kDACzC;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DAChB;AAIxB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sCAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC3E,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,sCAAgB;4DAAC;AAG/B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACzB;AAIf;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6BAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACpE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8BACtD,6BAAS;mDAAC;AAGf;IADC,IAAA,gBAAM,EAAC,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;;uDAC1B;iCAnBL,sBAAsB;IAFlC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAC;IAChD,IAAA,gBAAM,EAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;GACnB,sBAAsB,CAoBlC"}
1
+ {"version":3,"file":"organization-app-mapping.entity.js","sourceRoot":"","sources":["../../../../src/module/enterprise/entity/organization-app-mapping.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiE;AAG1D,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CASlC,CAAA;AATY,wDAAsB;AAEjC;IADC,IAAA,gCAAsB,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;kDACzC;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DAC5B;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC5B;iCARL,sBAAsB;IADlC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAC;GACpC,sBAAsB,CASlC"}
@@ -1,15 +1,30 @@
1
- import { EnterpriseData } from './enterprise.entity';
2
1
  export declare class OrganizationData {
3
2
  id: number;
4
- enterprise_id: EnterpriseData;
3
+ enterprise_id: number;
5
4
  code: string;
5
+ appcode: string;
6
6
  name: string;
7
7
  status: string;
8
- parent_id: number;
8
+ seq_no: number;
9
9
  created_by: number;
10
10
  modified_by: number;
11
11
  created_date: Date;
12
+ parent_id: number;
12
13
  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;
13
28
  wbs_code: string;
14
29
  slug: string;
15
30
  }
@@ -11,7 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.OrganizationData = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const enterprise_entity_1 = require("./enterprise.entity");
15
14
  let OrganizationData = class OrganizationData {
16
15
  };
17
16
  exports.OrganizationData = OrganizationData;
@@ -20,14 +19,17 @@ __decorate([
20
19
  __metadata("design:type", Number)
21
20
  ], OrganizationData.prototype, "id", void 0);
22
21
  __decorate([
23
- (0, typeorm_1.ManyToOne)(() => enterprise_entity_1.EnterpriseData, { nullable: true, onDelete: 'SET NULL' }),
24
- (0, typeorm_1.JoinColumn)({ name: 'enterprise_id', referencedColumnName: 'id' }),
25
- __metadata("design:type", enterprise_entity_1.EnterpriseData)
22
+ (0, typeorm_1.Column)({ name: 'enterprise_id', type: 'int' }),
23
+ __metadata("design:type", Number)
26
24
  ], OrganizationData.prototype, "enterprise_id", void 0);
27
25
  __decorate([
28
26
  (0, typeorm_1.Column)({ name: 'code', nullable: true }),
29
27
  __metadata("design:type", String)
30
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);
31
33
  __decorate([
32
34
  (0, typeorm_1.Column)({ name: 'name', nullable: true }),
33
35
  __metadata("design:type", String)
@@ -37,9 +39,9 @@ __decorate([
37
39
  __metadata("design:type", String)
38
40
  ], OrganizationData.prototype, "status", void 0);
39
41
  __decorate([
40
- (0, typeorm_1.Column)({ name: 'parent_id', nullable: true }),
42
+ (0, typeorm_1.Column)({ name: 'seq_no', nullable: true }),
41
43
  __metadata("design:type", Number)
42
- ], OrganizationData.prototype, "parent_id", void 0);
44
+ ], OrganizationData.prototype, "seq_no", void 0);
43
45
  __decorate([
44
46
  (0, typeorm_1.Column)({ name: 'created_by', nullable: true }),
45
47
  __metadata("design:type", Number)
@@ -49,13 +51,77 @@ __decorate([
49
51
  __metadata("design:type", Number)
50
52
  ], OrganizationData.prototype, "modified_by", void 0);
51
53
  __decorate([
52
- (0, typeorm_1.CreateDateColumn)({ name: 'created_date', nullable: true }),
54
+ (0, typeorm_1.Column)({ name: 'created_date', nullable: true }),
53
55
  __metadata("design:type", Date)
54
56
  ], OrganizationData.prototype, "created_date", void 0);
55
57
  __decorate([
56
- (0, typeorm_1.UpdateDateColumn)({ name: 'modified_date', nullable: true }),
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 }),
57
63
  __metadata("design:type", Date)
58
64
  ], 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);
59
125
  __decorate([
60
126
  (0, typeorm_1.Column)({ name: 'wbs_code', nullable: true }),
61
127
  __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,qCAA4H;AAC5H,2DAAqD;AAG9C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAqC5B,CAAA;AArCY,4CAAgB;AAE3B;IADC,IAAA,gCAAsB,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;4CACzC;AAIX;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kCAAc,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAC,CAAC;IACvE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,oBAAoB,EAAE,IAAI,EA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;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACzB;AAO/B;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;2DACwB;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAC5C;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC5B;AAGb;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;2BAvFF,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;GACxB,gBAAgB,CAwF5B"}
@@ -3,8 +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, loggedInUser: any): Promise<EnterpriseData>;
7
- update(enterpriseData: EnterpriseData, loggedInUser: any): Promise<EnterpriseData | null>;
8
- findEnterpriseBySubdomain(slug: string): Promise<EnterpriseData | null>;
9
- findById(id: number): Promise<EnterpriseData | null>;
6
+ save(enterpriseData: EnterpriseData): Promise<EnterpriseData>;
7
+ update(enterpriseData: EnterpriseData): Promise<EnterpriseData | null>;
10
8
  }
@@ -21,38 +21,23 @@ let EnterpriseRepository = class EnterpriseRepository {
21
21
  constructor(enterpriseRepository) {
22
22
  this.enterpriseRepository = enterpriseRepository;
23
23
  }
24
- async save(enterpriseData, loggedInUser) {
25
- if (loggedInUser) {
26
- enterpriseData.created_by = loggedInUser.id;
27
- enterpriseData.modified_by = loggedInUser.id;
28
- }
24
+ async save(enterpriseData) {
25
+ enterpriseData.created_date = new Date();
29
26
  return await this.enterpriseRepository.save(enterpriseData);
30
27
  }
31
- async update(enterpriseData, loggedInUser) {
28
+ async update(enterpriseData) {
32
29
  const existingEnterprise = await this.enterpriseRepository.findOne({
33
30
  where: { id: enterpriseData.id },
34
31
  });
35
32
  if (!existingEnterprise) {
36
33
  throw new Error(`Enterprise with id ${enterpriseData.id} not found`);
37
34
  }
38
- if (loggedInUser) {
39
- enterpriseData.modified_by = loggedInUser.id;
40
- }
35
+ enterpriseData.modified_date = new Date();
41
36
  await this.enterpriseRepository.update(enterpriseData.id, enterpriseData);
42
37
  return await this.enterpriseRepository.findOne({
43
38
  where: { id: enterpriseData.id },
44
39
  });
45
40
  }
46
- async findEnterpriseBySubdomain(slug) {
47
- return await this.enterpriseRepository.findOne({
48
- where: { slug },
49
- });
50
- }
51
- async findById(id) {
52
- return await this.enterpriseRepository.findOne({
53
- where: { id },
54
- });
55
- }
56
41
  };
57
42
  exports.EnterpriseRepository = EnterpriseRepository;
58
43
  exports.EnterpriseRepository = EnterpriseRepository = __decorate([
@@ -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,EAAE,YAAiB;QAC1D,IAAI,YAAY,EAAE,CAAC;YACjB,cAAc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mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,kCAAc,CAAC,CAAA;qCACM,oBAAU;GAHxC,oBAAoB,CA8ChC"}
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"}
@@ -0,0 +1,3 @@
1
+ import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
2
+ export declare class BrandService extends EntityServiceImpl {
3
+ }
@@ -1 +1,18 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.BrandService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
12
+ let BrandService = class BrandService extends entity_service_impl_service_1.EntityServiceImpl {
13
+ };
14
+ exports.BrandService = BrandService;
15
+ exports.BrandService = BrandService = __decorate([
16
+ (0, common_1.Injectable)()
17
+ ], BrandService);
1
18
  //# sourceMappingURL=brand.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"brand.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/brand.service.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"brand.service.js","sourceRoot":"","sources":["../../../../src/module/enterprise/service/brand.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,gGAAwF;AAGjF,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,+CAAiB;CAAG,CAAA;AAAzC,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAA6B"}
@@ -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, loggedInUser: any): Promise<EnterpriseData>;
7
- update(enterpriseData: EnterpriseData, loggedInUser: any): Promise<EnterpriseData | null>;
6
+ create(enterpriseData: EnterpriseData): Promise<EnterpriseData>;
7
+ update(enterpriseData: EnterpriseData): 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, loggedInUser) {
20
- return await this.enterpriseRepository.save(enterpriseData, loggedInUser);
19
+ async create(enterpriseData) {
20
+ return await this.enterpriseRepository.save(enterpriseData);
21
21
  }
22
- async update(enterpriseData, loggedInUser) {
23
- return await this.enterpriseRepository.update(enterpriseData, loggedInUser);
22
+ async update(enterpriseData) {
23
+ return await this.enterpriseRepository.update(enterpriseData);
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,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"}
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"}
@@ -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;
9
8
  private readonly idGen;
10
9
  private readonly wbcCodeGenService;
11
- constructor(organizationRepository: Repository<OrganizationData>, schoolRepository: SchoolRepository, idGen: ClockIDGenService, wbcCodeGenService: WBSCodeGenService);
12
- create(organizationDto: Partial<OrganizationData>, loggedInUser?: any, manager?: EntityManager): Promise<OrganizationData>;
10
+ private readonly schoolRepository;
11
+ constructor(organizationRepository: Repository<OrganizationData>, idGen: ClockIDGenService, wbcCodeGenService: WBSCodeGenService, schoolRepository: SchoolRepository);
12
+ create(organizationDto: Partial<OrganizationData>, 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>, loggedInUser?: any, manager?: EntityManager): Promise<OrganizationData | null>;
16
+ update(id: number, organizationDto: Partial<OrganizationData>, 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,69 +21,59 @@ 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, schoolRepository, idGen, wbcCodeGenService) {
24
+ constructor(organizationRepository, idGen, wbcCodeGenService, schoolRepository) {
25
25
  this.organizationRepository = organizationRepository;
26
- this.schoolRepository = schoolRepository;
27
26
  this.idGen = idGen;
28
27
  this.wbcCodeGenService = wbcCodeGenService;
28
+ this.schoolRepository = schoolRepository;
29
29
  }
30
- async create(organizationDto, loggedInUser, manager) {
30
+ async create(organizationDto, manager) {
31
31
  const repo = manager
32
32
  ? manager.getRepository(organization_entity_1.OrganizationData)
33
33
  : this.organizationRepository;
34
- const parentOrgId = organizationDto.parent_id;
35
- if (parentOrgId) {
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
+ }
36
40
  const parentOrg = await repo.findOne({
37
41
  where: { id: parentOrgId },
38
42
  });
39
43
  if (!parentOrg) {
40
44
  throw new Error('Parent organization not found.');
41
45
  }
42
- if (!parentOrg.wbs_code) {
43
- throw new Error('Parent organization must have a WBS code.');
44
- }
45
- const existingSubOrgs = await repo.find({
46
+ const existingBrands = await repo.find({
46
47
  where: {
48
+ type: 'BRN',
47
49
  parent_id: parentOrgId,
48
50
  },
49
51
  select: ['wbs_code'],
50
52
  });
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
- })
53
+ const brandCodes = existingBrands
54
+ .map((b) => b.wbs_code?.split('.')[1])
56
55
  .filter(Boolean)
57
56
  .map(Number);
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}`;
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}`;
63
60
  }
64
61
  else {
65
62
  const existingOrgs = await repo.find({
66
63
  where: {
67
- parent_id: (0, typeorm_2.IsNull)(),
64
+ type: (0, typeorm_2.IsNull)(),
68
65
  },
69
66
  select: ['wbs_code'],
70
67
  });
71
68
  const orgCodes = existingOrgs
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);
69
+ .map((org) => org.wbs_code)
70
+ .filter(Boolean)
71
+ .map(Number);
79
72
  const nextOrgCode = orgCodes.length ? Math.max(...orgCodes) + 1 : 1;
80
73
  organizationDto.wbs_code = this.wbcCodeGenService.padCode(nextOrgCode);
81
74
  }
82
75
  organizationDto.code = this.idGen.idGenerator('ORG');
83
- if (loggedInUser) {
84
- organizationDto.modified_by = loggedInUser.id;
85
- organizationDto.created_by = loggedInUser.id;
86
- }
76
+ organizationDto.created_date = new Date();
87
77
  const organization = repo.create(organizationDto);
88
78
  return await repo.save(organization);
89
79
  }
@@ -102,77 +92,10 @@ let OrganizationService = class OrganizationService {
102
92
  async findById(id) {
103
93
  return await this.organizationRepository.find({ where: { id } });
104
94
  }
105
- async update(id, organizationDto, loggedInUser, manager) {
95
+ async update(id, organizationDto, manager) {
106
96
  const repo = manager
107
97
  ? manager.getRepository(organization_entity_1.OrganizationData)
108
98
  : 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
- }
176
99
  await repo.update(id, organizationDto);
177
100
  return await repo.findOne({ where: { id } });
178
101
  }
@@ -191,8 +114,8 @@ exports.OrganizationService = OrganizationService = __decorate([
191
114
  (0, common_1.Injectable)(),
192
115
  __param(0, (0, typeorm_1.InjectRepository)(organization_entity_1.OrganizationData)),
193
116
  __metadata("design:paramtypes", [typeorm_2.Repository,
194
- school_repository_1.SchoolRepository,
195
117
  clockIDGenUtil_service_1.ClockIDGenService,
196
- wbsCodeGen_service_1.WBSCodeGenService])
118
+ wbsCodeGen_service_1.WBSCodeGenService,
119
+ school_repository_1.SchoolRepository])
197
120
  ], OrganizationService);
198
121
  //# 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,gBAAkC,EAClC,KAAwB,EACxB,iBAAoC;QAHpC,2BAAsB,GAAtB,sBAAsB,CAA8B;QACpD,qBAAgB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AmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,sCAAgB,CAAC,CAAA;qCACM,oBAAU;QAChB,oCAAgB;QAC3B,0CAAiB;QACL,sCAAiB;GAN5C,mBAAmB,CA2P/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,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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AAO,CAAC,aAAa,CAAC,sCAAgB,CAAC;YACzC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC;QAEhC,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,CAAC,CAAC;QACvC,OAAO,MAAM,IAAI,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"}
@@ -4,15 +4,8 @@ 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[] | 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
- }>;
7
+ }, mode?: 'flat_json' | 'dropdown'): Promise<any>;
15
8
  updateEntityJson(entityId: string, entityType: string, req: Request & {
16
9
  user: any;
17
- }): Promise<Record<string, null> | null>;
10
+ }): Promise<any>;
18
11
  }
@@ -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;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"}
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"}
@@ -4,7 +4,8 @@ export declare class EntityJson {
4
4
  entity_id: number;
5
5
  json_data: Record<string, any>;
6
6
  created_by: number;
7
- updated_by: number;
7
+ organization_id: number;
8
8
  created_at: Date;
9
9
  updated_at: Date;
10
+ updated_by: string;
10
11
  }
@@ -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, "updated_by", void 0);
42
+ ], EntityJson.prototype, "organization_id", void 0);
43
43
  __decorate([
44
44
  (0, typeorm_1.CreateDateColumn)({ type: 'timestamp', nullable: true }),
45
45
  __metadata("design:type", Date)
@@ -48,6 +48,10 @@ __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);
51
55
  exports.EntityJson = EntityJson = __decorate([
52
56
  (0, typeorm_1.Entity)('frm_entity_json'),
53
57
  (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;CA0BtB,CAAA;AA1BY,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;;8CACrB;AAGnB;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;qBAzBN,UAAU;IAFtB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;IACzB,IAAA,gBAAM,EAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;GACxB,UAAU,CA0BtB"}
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,EAAE,CAAC;;8CACnC;qBA5BR,UAAU;IAFtB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;IACzB,IAAA,gBAAM,EAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;GACxB,UAAU,CA6BtB"}
@@ -21,10 +21,15 @@ let EntityJSONModule = class EntityJSONModule {
21
21
  exports.EntityJSONModule = EntityJSONModule;
22
22
  exports.EntityJSONModule = EntityJSONModule = __decorate([
23
23
  (0, common_1.Module)({
24
- imports: [entity_module_1.EntityModule, typeorm_1.TypeOrmModule.forFeature([entityJson_entity_1.EntityJson]), filter_module_1.FilterModule, utils_module_1.UtilsModule],
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
+ ],
25
30
  controllers: [entity_json_controller_1.EntityJSONController],
26
31
  providers: [entity_json_service_1.EntityJSONService, entityJson_repository_1.EntityJSONRepository],
27
- exports: [],
32
+ exports: [entity_json_service_1.EntityJSONService],
28
33
  })
29
34
  ], EntityJSONModule);
30
35
  //# sourceMappingURL=entity_json.module.js.map