rez_core 6.5.50 → 6.5.51
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.
- package/.claude/settings.local.json +26 -0
- package/.idea/250218_nodejs_core.iml +9 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/app.module.js +5 -3
- package/dist/app.module.js.map +1 -1
- package/dist/constant/status.constant.d.ts +4 -0
- package/dist/constant/status.constant.js +9 -0
- package/dist/constant/status.constant.js.map +1 -0
- package/dist/core.module.js +63 -38
- package/dist/core.module.js.map +1 -1
- package/dist/module/app_master/app-master.module.d.ts +2 -0
- package/dist/module/app_master/app-master.module.js +28 -0
- package/dist/module/app_master/app-master.module.js.map +1 -0
- package/dist/module/app_master/controller/app-master.controller.js.map +1 -0
- package/dist/module/app_master/entity/app-master.entity.d.ts +17 -0
- package/dist/module/{meta → app_master}/entity/app-master.entity.js +30 -12
- package/dist/module/app_master/entity/app-master.entity.js.map +1 -0
- package/dist/module/{meta → app_master}/repository/app-master.repository.d.ts +2 -2
- package/dist/module/{meta → app_master}/repository/app-master.repository.js +4 -4
- package/dist/module/app_master/repository/app-master.repository.js.map +1 -0
- package/dist/module/app_master/service/app-master.service.js.map +1 -0
- package/dist/module/auth/strategies/jwt.strategy.d.ts +2 -1
- package/dist/module/auth/strategies/jwt.strategy.js +3 -2
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/module/dashboard/dashboard.module.js +1 -1
- package/dist/module/dashboard/dashboard.module.js.map +1 -1
- package/dist/module/dashboard/service/dashboard.service.js +1 -2
- package/dist/module/dashboard/service/dashboard.service.js.map +1 -1
- package/dist/module/enterprise/controller/enterprise.controller.d.ts +12 -0
- package/dist/module/enterprise/controller/enterprise.controller.js +57 -0
- package/dist/module/enterprise/controller/enterprise.controller.js.map +1 -0
- package/dist/module/enterprise/controller/meta.controller.d.ts +9 -0
- package/dist/module/enterprise/controller/meta.controller.js +43 -0
- package/dist/module/enterprise/controller/meta.controller.js.map +1 -0
- package/dist/module/enterprise/controller/organization.controller.d.ts +12 -4
- package/dist/module/enterprise/controller/organization.controller.js +64 -8
- package/dist/module/enterprise/controller/organization.controller.js.map +1 -1
- package/dist/module/enterprise/enterprise.module.js +10 -15
- package/dist/module/enterprise/enterprise.module.js.map +1 -1
- package/dist/module/enterprise/entity/enterprise.entity.d.ts +1 -3
- package/dist/module/enterprise/entity/enterprise.entity.js +4 -12
- package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -1
- package/dist/module/enterprise/entity/organization-app-mapping.entity.d.ts +6 -1
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js +21 -4
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js.map +1 -1
- package/dist/module/enterprise/entity/organization.entity.d.ts +3 -18
- package/dist/module/enterprise/entity/organization.entity.js +8 -74
- package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
- package/dist/module/enterprise/repository/enterprise.repository.d.ts +4 -2
- package/dist/module/enterprise/repository/enterprise.repository.js +19 -4
- package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -1
- package/dist/module/enterprise/service/brand-profile.service.d.ts +0 -0
- package/dist/module/enterprise/service/brand-profile.service.js +1 -0
- package/dist/module/enterprise/service/brand-profile.service.js.map +1 -0
- package/dist/module/enterprise/service/brand.service.d.ts +0 -3
- package/dist/module/enterprise/service/brand.service.js +0 -17
- package/dist/module/enterprise/service/brand.service.js.map +1 -1
- package/dist/module/enterprise/service/enterprise.service.d.ts +2 -2
- package/dist/module/enterprise/service/enterprise.service.js +4 -4
- package/dist/module/enterprise/service/enterprise.service.js.map +1 -1
- package/dist/module/enterprise/service/organization.service.d.ts +4 -4
- package/dist/module/enterprise/service/organization.service.js +101 -24
- package/dist/module/enterprise/service/organization.service.js.map +1 -1
- package/dist/module/enterprise/service/populate-meta.service.d.ts +9 -0
- package/dist/module/{meta → enterprise}/service/populate-meta.service.js +2 -8
- package/dist/module/enterprise/service/populate-meta.service.js.map +1 -0
- package/dist/module/enterprise/service/school.service.d.ts +0 -0
- package/dist/module/enterprise/service/school.service.js +1 -0
- package/dist/module/enterprise/service/school.service.js.map +1 -0
- package/dist/module/entity_json/controller/entity_json.controller.d.ts +9 -2
- package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -1
- package/dist/module/entity_json/entity/entityJson.entity.d.ts +1 -2
- package/dist/module/entity_json/entity/entityJson.entity.js +1 -5
- package/dist/module/entity_json/entity/entityJson.entity.js.map +1 -1
- package/dist/module/entity_json/entity_json.module.js +2 -7
- package/dist/module/entity_json/entity_json.module.js.map +1 -1
- package/dist/module/entity_json/service/entity_json.service.d.ts +10 -2
- package/dist/module/entity_json/service/entity_json.service.js +25 -101
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
- package/dist/module/filter/controller/filter.controller.d.ts +0 -12
- package/dist/module/filter/controller/filter.controller.js +1 -1
- package/dist/module/filter/controller/filter.controller.js.map +1 -1
- package/dist/module/filter/filter.module.js +2 -11
- package/dist/module/filter/filter.module.js.map +1 -1
- package/dist/module/filter/service/filter.service.d.ts +2 -38
- package/dist/module/filter/service/filter.service.js +50 -43
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/filter/service/saved-filter.service.d.ts +2 -3
- package/dist/module/filter/service/saved-filter.service.js +18 -14
- package/dist/module/filter/service/saved-filter.service.js.map +1 -1
- package/dist/module/integration/service/integration.service.d.ts +0 -1
- package/dist/module/integration/service/integration.service.js +1 -2
- package/dist/module/integration/service/integration.service.js.map +1 -1
- package/dist/module/integration/service/wrapper.service.js +0 -1
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/layout/controller/layout.controller.d.ts +1 -3
- package/dist/module/layout/controller/layout.controller.js +3 -7
- package/dist/module/layout/controller/layout.controller.js.map +1 -1
- package/dist/module/layout/entity/header-section.entity.d.ts +0 -2
- package/dist/module/layout/entity/header-section.entity.js +0 -8
- package/dist/module/layout/entity/header-section.entity.js.map +1 -1
- package/dist/module/layout/layout.module.js +1 -2
- package/dist/module/layout/layout.module.js.map +1 -1
- package/dist/module/layout/repository/header-section.repository.d.ts +0 -1
- package/dist/module/layout/repository/header-section.repository.js +0 -5
- package/dist/module/layout/repository/header-section.repository.js.map +1 -1
- package/dist/module/layout/service/header-section.service.d.ts +1 -1
- package/dist/module/layout/service/header-section.service.js +1 -1
- package/dist/module/layout/service/header-section.service.js.map +1 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +0 -41
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js +0 -90
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -1
- package/dist/module/linked_attributes/linked_attributes.module.js +1 -8
- package/dist/module/linked_attributes/linked_attributes.module.js.map +1 -1
- package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +1 -65
- package/dist/module/linked_attributes/service/linked_attributes.service.js +2 -287
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -1
- package/dist/module/listmaster/service/list-master.service.js +1 -8
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/meta/controller/meta.controller.d.ts +1 -6
- package/dist/module/meta/controller/meta.controller.js +1 -19
- package/dist/module/meta/controller/meta.controller.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +0 -1
- package/dist/module/meta/entity/entity-master.entity.js +1 -8
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity.module.js +3 -14
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.d.ts +1 -6
- package/dist/module/meta/service/attribute-master.service.js +2 -22
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-master.service.js +0 -1
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-relation.service.d.ts +3 -4
- package/dist/module/meta/service/entity-relation.service.js +4 -10
- package/dist/module/meta/service/entity-relation.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.d.ts +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +10 -14
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/entity-table.service.d.ts +4 -5
- package/dist/module/meta/service/entity-table.service.js +24 -45
- package/dist/module/meta/service/entity-table.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.d.ts +1 -1
- package/dist/module/meta/service/resolver.service.js +3 -6
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/module/controller/module-access.controller.d.ts +3 -4
- package/dist/module/module/controller/module-access.controller.js +13 -8
- package/dist/module/module/controller/module-access.controller.js.map +1 -1
- package/dist/module/module/entity/menu.entity.d.ts +6 -3
- package/dist/module/module/entity/menu.entity.js +19 -10
- package/dist/module/module/entity/menu.entity.js.map +1 -1
- package/dist/module/module/entity/module-access.entity.d.ts +15 -1
- package/dist/module/module/entity/module-access.entity.js +49 -3
- package/dist/module/module/entity/module-access.entity.js.map +1 -1
- package/dist/module/module/entity/module-action.entity.d.ts +4 -2
- package/dist/module/module/entity/module-action.entity.js +11 -6
- package/dist/module/module/entity/module-action.entity.js.map +1 -1
- package/dist/module/module/entity/module.entity.d.ts +3 -5
- package/dist/module/module/entity/module.entity.js +8 -18
- package/dist/module/module/entity/module.entity.js.map +1 -1
- package/dist/module/module/module.module.d.ts +1 -1
- package/dist/module/module/module.module.js +5 -7
- package/dist/module/module/module.module.js.map +1 -1
- package/dist/module/module/repository/menu.repository.d.ts +3 -3
- package/dist/module/module/repository/menu.repository.js +38 -27
- package/dist/module/module/repository/menu.repository.js.map +1 -1
- package/dist/module/module/repository/module-access.repository.d.ts +6 -6
- package/dist/module/module/repository/module-access.repository.js +96 -48
- package/dist/module/module/repository/module-access.repository.js.map +1 -1
- package/dist/module/module/service/menu.service.d.ts +2 -4
- package/dist/module/module/service/menu.service.js +7 -10
- package/dist/module/module/service/menu.service.js.map +1 -1
- package/dist/module/module/service/module-access.service.d.ts +7 -10
- package/dist/module/module/service/module-access.service.js +22 -24
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/entity/notification.entity.d.ts +17 -2
- package/dist/module/notification/entity/notification.entity.js +68 -2
- package/dist/module/notification/entity/notification.entity.js.map +1 -1
- package/dist/module/notification/notification.module.js +0 -2
- package/dist/module/notification/notification.module.js.map +1 -1
- package/dist/module/notification/service/notification.service.d.ts +1 -3
- package/dist/module/notification/service/notification.service.js +2 -5
- package/dist/module/notification/service/notification.service.js.map +1 -1
- package/dist/module/notification/service/otp.service.js +0 -1
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.d.ts +1 -3
- package/dist/module/user/controller/login.controller.js +2 -6
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/controller/user.controller.d.ts +0 -2
- package/dist/module/user/controller/user.controller.js +0 -13
- package/dist/module/user/controller/user.controller.js.map +1 -1
- package/dist/module/user/dto/create-user.dto.d.ts +6 -3
- package/dist/module/user/dto/create-user.dto.js +17 -11
- package/dist/module/user/dto/create-user.dto.js.map +1 -1
- package/dist/module/user/entity/role.entity.d.ts +18 -6
- package/dist/module/user/entity/role.entity.js +64 -19
- package/dist/module/user/entity/role.entity.js.map +1 -1
- package/dist/module/user/entity/user-role-mapping.entity.d.ts +10 -0
- package/dist/module/user/entity/user-role-mapping.entity.js +33 -1
- package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
- package/dist/module/user/entity/user-session.entity.d.ts +0 -2
- package/dist/module/user/entity/user-session.entity.js +2 -20
- package/dist/module/user/entity/user-session.entity.js.map +1 -1
- package/dist/module/user/entity/user.entity.d.ts +17 -5
- package/dist/module/user/entity/user.entity.js +61 -15
- package/dist/module/user/entity/user.entity.js.map +1 -1
- package/dist/module/user/repository/role.repository.d.ts +7 -2
- package/dist/module/user/repository/role.repository.js +23 -8
- package/dist/module/user/repository/role.repository.js.map +1 -1
- package/dist/module/user/repository/user-role-mapping.repository.d.ts +1 -0
- package/dist/module/user/repository/user-role-mapping.repository.js +3 -0
- package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -1
- package/dist/module/user/repository/user.repository.d.ts +5 -2
- package/dist/module/user/repository/user.repository.js +26 -7
- package/dist/module/user/repository/user.repository.js.map +1 -1
- package/dist/module/user/repository/userSession.repository.d.ts +1 -0
- package/dist/module/user/repository/userSession.repository.js +3 -0
- package/dist/module/user/repository/userSession.repository.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +3 -5
- package/dist/module/user/service/login.service.js +43 -42
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/role.service.d.ts +24 -11
- package/dist/module/user/service/role.service.js +54 -40
- package/dist/module/user/service/role.service.js.map +1 -1
- package/dist/module/user/service/user-role-mapping.service.d.ts +2 -0
- package/dist/module/user/service/user-role-mapping.service.js +6 -0
- package/dist/module/user/service/user-role-mapping.service.js.map +1 -1
- package/dist/module/user/service/user-session.service.d.ts +3 -4
- package/dist/module/user/service/user-session.service.js +10 -11
- package/dist/module/user/service/user-session.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +33 -22
- package/dist/module/user/service/user.service.js +66 -58
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/module/user/user.module.js +2 -7
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.d.ts +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +6 -8
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.d.ts +1 -1
- package/dist/module/workflow/repository/action.repository.js +10 -10
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.d.ts +1 -1
- package/dist/module/workflow/repository/form-master.repository.js +2 -2
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/service/action-data.service.js +1 -2
- package/dist/module/workflow/service/action-data.service.js.map +1 -1
- package/dist/module/workflow/service/action.service.js +2 -2
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/comm-template.service.js +0 -2
- package/dist/module/workflow/service/comm-template.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.js +0 -1
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
- package/dist/module/workflow/service/form-master.service.js +2 -2
- package/dist/module/workflow/service/form-master.service.js.map +1 -1
- package/dist/module/workflow/service/populate-workflow.service.d.ts +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.js +0 -3
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +2 -7
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.js +2 -2
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +2 -0
- package/dist/module/workflow/workflow.module.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +11 -6
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/module/workflow-automation/workflow-automation.module.js +3 -1
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +0 -2
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
- package/dist/table.config.d.ts +3 -5
- package/dist/table.config.js +3 -3
- package/dist/table.config.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/server.log +850 -0
- package/src/app.module.ts +7 -5
- package/src/constant/status.constant.ts +4 -0
- package/src/core.module.ts +58 -44
- package/src/module/app_master/app-master.module.ts +15 -0
- package/src/module/{meta → app_master}/entity/app-master.entity.ts +22 -9
- package/src/module/{meta → app_master}/repository/app-master.repository.ts +3 -3
- package/src/module/auth/strategies/jwt.strategy.ts +4 -2
- package/src/module/dashboard/dashboard.module.ts +3 -3
- package/src/module/dashboard/service/dashboard.service.ts +1 -2
- package/src/module/enterprise/controller/enterprise.controller.ts +40 -0
- package/src/module/enterprise/controller/meta.controller.ts +23 -0
- package/src/module/enterprise/controller/organization.controller.ts +60 -4
- package/src/module/enterprise/enterprise.module.ts +16 -18
- package/src/module/enterprise/entity/enterprise.entity.ts +5 -11
- package/src/module/enterprise/entity/organization-app-mapping.entity.ts +18 -4
- package/src/module/enterprise/entity/organization.entity.ts +9 -59
- package/src/module/enterprise/repository/enterprise.repository.ts +26 -4
- package/src/module/enterprise/service/brand-profile.service.ts +10 -0
- package/src/module/enterprise/service/brand.service.ts +75 -5
- package/src/module/enterprise/service/enterprise.service.ts +10 -4
- package/src/module/enterprise/service/organization.service.ts +140 -23
- package/src/module/{meta → enterprise}/service/populate-meta.service.ts +2 -5
- package/src/module/enterprise/service/school.service.ts +5 -0
- package/src/module/entity_json/controller/entity_json.controller.ts +0 -13
- package/src/module/entity_json/entity/entityJson.entity.ts +1 -4
- package/src/module/entity_json/entity_json.module.ts +5 -9
- package/src/module/entity_json/service/entity_json.service.ts +51 -237
- package/src/module/filter/controller/filter.controller.ts +3 -1
- package/src/module/filter/filter.module.ts +3 -12
- package/src/module/filter/service/filter.service.ts +73 -130
- package/src/module/filter/service/saved-filter.service.ts +26 -16
- package/src/module/integration/service/integration.service.ts +2 -6
- package/src/module/integration/service/wrapper.service.ts +0 -1
- package/src/module/layout/controller/layout.controller.ts +1 -8
- package/src/module/layout/entity/header-section.entity.ts +0 -6
- package/src/module/layout/layout.module.ts +1 -1
- package/src/module/layout/repository/header-section.repository.ts +0 -6
- package/src/module/layout/service/header-section.service.ts +1 -1
- package/src/module/linked_attributes/controller/linked_attributes.controller.ts +0 -100
- package/src/module/linked_attributes/linked_attributes.module.ts +2 -9
- package/src/module/linked_attributes/service/linked_attributes.service.ts +3 -578
- package/src/module/listmaster/service/list-master.service.ts +1 -9
- package/src/module/meta/controller/meta.controller.ts +3 -25
- package/src/module/meta/entity/entity-master.entity.ts +3 -9
- package/src/module/meta/entity.module.ts +6 -20
- package/src/module/meta/service/attribute-master.service.ts +1 -31
- package/src/module/meta/service/entity-master.service.ts +0 -1
- package/src/module/meta/service/entity-relation.service.ts +6 -10
- package/src/module/meta/service/entity-service-impl.service.ts +19 -14
- package/src/module/meta/service/entity-table.service.ts +68 -82
- package/src/module/meta/service/entity.service.ts +1 -0
- package/src/module/meta/service/resolver.service.ts +0 -4
- package/src/module/module/controller/module-access.controller.ts +14 -9
- package/src/module/module/entity/menu.entity.ts +18 -10
- package/src/module/module/entity/module-access.entity.ts +40 -3
- package/src/module/module/entity/module-action.entity.ts +10 -6
- package/src/module/module/entity/module.entity.ts +7 -14
- package/src/module/module/module.module.ts +2 -3
- package/src/module/module/repository/menu.repository.ts +43 -29
- package/src/module/module/repository/module-access.repository.ts +111 -63
- package/src/module/module/service/menu.service.ts +7 -9
- package/src/module/module/service/module-access.service.ts +22 -34
- package/src/module/notification/entity/notification.entity.ts +53 -3
- package/src/module/notification/notification.module.ts +0 -2
- package/src/module/notification/service/notification.service.ts +0 -1
- package/src/module/notification/service/otp.service.ts +4 -3
- package/src/module/user/controller/login.controller.ts +7 -8
- package/src/module/user/controller/user.controller.ts +0 -9
- package/src/module/user/dto/create-user.dto.ts +19 -6
- package/src/module/user/entity/role.entity.ts +59 -16
- package/src/module/user/entity/user-role-mapping.entity.ts +29 -3
- package/src/module/user/entity/user-session.entity.ts +3 -19
- package/src/module/user/entity/user.entity.ts +48 -13
- package/src/module/user/repository/role.repository.ts +32 -12
- package/src/module/user/repository/user-role-mapping.repository.ts +5 -1
- package/src/module/user/repository/user.repository.ts +36 -9
- package/src/module/user/repository/userSession.repository.ts +5 -1
- package/src/module/user/service/login.service.ts +47 -51
- package/src/module/user/service/role.service.ts +64 -63
- package/src/module/user/service/user-role-mapping.service.ts +23 -1
- package/src/module/user/service/user-session.service.ts +14 -11
- package/src/module/user/service/user.service.ts +76 -95
- package/src/module/user/user.module.ts +4 -5
- package/src/module/workflow/repository/action-data.repository.ts +6 -8
- package/src/module/workflow/repository/action.repository.ts +11 -11
- package/src/module/workflow/repository/form-master.repository.ts +2 -2
- package/src/module/workflow/service/action-data.service.ts +3 -2
- package/src/module/workflow/service/action.service.ts +2 -2
- package/src/module/workflow/service/comm-template.service.ts +0 -2
- package/src/module/workflow/service/entity-modification.service.ts +0 -1
- package/src/module/workflow/service/form-master.service.ts +2 -2
- package/src/module/workflow/service/populate-workflow.service.ts +1 -1
- package/src/module/workflow/service/task.service.ts +0 -3
- package/src/module/workflow/service/workflow-meta.service.ts +2 -7
- package/src/module/workflow/service/workflow.service.ts +2 -2
- package/src/module/workflow/workflow.module.ts +2 -0
- package/src/module/workflow-automation/service/workflow-automation.service.ts +19 -7
- package/src/module/workflow-automation/workflow-automation.module.ts +4 -3
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +0 -2
- package/src/resources/dev.properties.yaml +2 -2
- package/src/table.config.ts +3 -3
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.d.ts +0 -6
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js +0 -32
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js.map +0 -1
- package/dist/module/filter/service/flatjson-filter.service.d.ts +0 -32
- package/dist/module/filter/service/flatjson-filter.service.js +0 -632
- package/dist/module/filter/service/flatjson-filter.service.js.map +0 -1
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.d.ts +0 -13
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js +0 -64
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js.map +0 -1
- package/dist/module/meta/controller/app-master.controller.js.map +0 -1
- package/dist/module/meta/entity/app-master.entity.d.ts +0 -13
- package/dist/module/meta/entity/app-master.entity.js.map +0 -1
- package/dist/module/meta/repository/app-master.repository.js.map +0 -1
- package/dist/module/meta/service/app-master.service.js.map +0 -1
- package/dist/module/meta/service/populate-meta.service.d.ts +0 -13
- package/dist/module/meta/service/populate-meta.service.js.map +0 -1
- package/src/migrations/1732612800000-AddEntityJsonGinIndex.ts +0 -41
- package/src/module/entity_json/docs/FlatJson_Filterin_System.md +0 -2804
- package/src/module/filter/service/flatjson-filter.service.ts +0 -903
- package/src/module/filter/test/flatjson-filter.service.spec.ts +0 -415
- package/src/module/linked_attributes/dto/create-linked-attribute-smart.dto.ts +0 -54
- package/src/module/linked_attributes/test/linked-attributes.service.spec.ts +0 -244
- /package/dist/module/{meta → app_master}/controller/app-master.controller.d.ts +0 -0
- /package/dist/module/{meta → app_master}/controller/app-master.controller.js +0 -0
- /package/dist/module/{meta → app_master}/service/app-master.service.d.ts +0 -0
- /package/dist/module/{meta → app_master}/service/app-master.service.js +0 -0
- /package/src/module/{meta → app_master}/controller/app-master.controller.ts +0 -0
- /package/src/module/{meta → app_master}/service/app-master.service.ts +0 -0
|
@@ -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.
|
|
35
|
-
await this.loggerService.log('info', 'EntityJSONService', 'getAttributeForFlatJSON', `Loading attributes for entity: ${entityType},
|
|
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(
|
|
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.
|
|
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
|
-
attribute_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
|
-
attribute_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
|
-
attribute_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(
|
|
81
|
+
mainAttributes.forEach(attr => {
|
|
123
82
|
if (attr.flat_json_key)
|
|
124
83
|
result[attr.flat_json_key] = null;
|
|
125
84
|
});
|
|
126
|
-
relatedAttributes.forEach(
|
|
85
|
+
relatedAttributes.forEach(attr => {
|
|
127
86
|
if (attr.flat_json_key)
|
|
128
87
|
result[attr.flat_json_key] = null;
|
|
129
88
|
});
|
|
130
|
-
linkedAttributes.forEach(
|
|
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(
|
|
148
|
-
dropdown.push(...relatedAttributes.map(
|
|
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(
|
|
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
|
-
|
|
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
|
|
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
|
|
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) {
|
|
@@ -210,7 +147,7 @@ let EntityJSONService = class EntityJSONService {
|
|
|
210
147
|
const mappingValue = mainData?.[sourceKey] ?? null;
|
|
211
148
|
const value = await this.applyLinkedFilterUsingSavedFilter(childEntityType, linkAttr.saved_filter_code, sourceKey, mappingValue, targetKey, loggedInUser, entityId);
|
|
212
149
|
if (value !== null && value !== undefined) {
|
|
213
|
-
flatJson[targetKey] =
|
|
150
|
+
flatJson[targetKey] = value;
|
|
214
151
|
}
|
|
215
152
|
}
|
|
216
153
|
await this.loggerService.log('info', 'EntityJSONService', 'updateEntityJSON', `Saving flat JSON for entity: ${entityType}#${entityId}`);
|
|
@@ -231,40 +168,27 @@ let EntityJSONService = class EntityJSONService {
|
|
|
231
168
|
for (const key of Object.keys(record)) {
|
|
232
169
|
const flatKey = attrMap[key] || key;
|
|
233
170
|
if (flatJson.hasOwnProperty(flatKey)) {
|
|
234
|
-
|
|
235
|
-
flatJson[flatKey] = typeof value === 'string' ? value.toLowerCase() : value;
|
|
171
|
+
flatJson[flatKey] = record[key];
|
|
236
172
|
}
|
|
237
173
|
}
|
|
238
174
|
}
|
|
239
175
|
}
|
|
240
176
|
async applyLinkedFilterUsingSavedFilter(childEntityType, savedFilterCode, childFilterAttribute, mappingValue, targetAttribute, loggedInUser, entity_id) {
|
|
241
|
-
if (!savedFilterCode &&
|
|
242
|
-
(mappingValue === null || mappingValue === undefined))
|
|
177
|
+
if (!savedFilterCode && (mappingValue === null || mappingValue === undefined))
|
|
243
178
|
return null;
|
|
244
179
|
const dto = {
|
|
245
180
|
entity_type: childEntityType,
|
|
246
181
|
savedFilterCode,
|
|
247
182
|
page: 1,
|
|
248
183
|
size: 1,
|
|
249
|
-
loggedInUser
|
|
250
184
|
};
|
|
251
|
-
if (mappingValue !== null &&
|
|
252
|
-
mappingValue !== undefined &&
|
|
253
|
-
mappingValue !== '') {
|
|
185
|
+
if (mappingValue !== null && mappingValue !== undefined && mappingValue !== '') {
|
|
254
186
|
dto.quickFilter = [
|
|
255
|
-
{
|
|
256
|
-
filter_attribute: childFilterAttribute,
|
|
257
|
-
filter_operator: 'equal',
|
|
258
|
-
filter_value: mappingValue,
|
|
259
|
-
},
|
|
187
|
+
{ filter_attribute: childFilterAttribute, filter_operator: 'equal', filter_value: mappingValue },
|
|
260
188
|
];
|
|
261
189
|
}
|
|
262
190
|
dto.quickFilter = [
|
|
263
|
-
{
|
|
264
|
-
filter_attribute: 'parent_id',
|
|
265
|
-
filter_operator: 'equal',
|
|
266
|
-
filter_value: [entity_id],
|
|
267
|
-
},
|
|
191
|
+
{ filter_attribute: 'parent_id', filter_operator: 'equal', filter_value: [entity_id] },
|
|
268
192
|
];
|
|
269
193
|
const result = await this.filterService.applyFilter(dto);
|
|
270
194
|
const rows = result?.data?.entity_list || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity_json.service.js","sourceRoot":"","sources":["../../../../src/module/entity_json/service/entity_json.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,oGAA+F;AAC/F,uFAAiF;AACjF,qFAA+E;AAC/E,gGAAwF;AACxF,oFAAuE;AACvE,qCAAqC;AACrC,mEAA+D;AAC/D,wEAAoE;
|
|
1
|
+
{"version":3,"file":"entity_json.service.js","sourceRoot":"","sources":["../../../../src/module/entity_json/service/entity_json.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE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,CAAC;YAC/E,GAAG,CAAC,WAAW,GAAG;gBAChB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE;aACjG,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,WAAW,GAAG;YAChB,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,SAAS,CAAC,EAAE;SACvF,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,IAAI,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtE,CAAC;CACF,CAAA;AAtOY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+CAAiB,CAAC,CAAC,CAAA;qCALf,oBAAU;QACP,oCAAc;QACP,4CAAoB;QAE3B,8BAAa;QAET,+CAAiB;GAR5C,iBAAiB,CAsO7B"}
|
|
@@ -27,18 +27,6 @@ export declare class FilterController {
|
|
|
27
27
|
entity_list: never[];
|
|
28
28
|
pagination: {};
|
|
29
29
|
};
|
|
30
|
-
} | {
|
|
31
|
-
success: boolean;
|
|
32
|
-
data: {
|
|
33
|
-
entity_tabs: any;
|
|
34
|
-
entity_list: any;
|
|
35
|
-
pagination: {
|
|
36
|
-
total: any;
|
|
37
|
-
page: any;
|
|
38
|
-
size: any;
|
|
39
|
-
totalPages: any;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
30
|
}>;
|
|
43
31
|
getFilterById(id: string): Promise<{
|
|
44
32
|
filter_attribute: string;
|
|
@@ -26,7 +26,7 @@ let FilterController = class FilterController {
|
|
|
26
26
|
const loggedInUser = req.user.userData;
|
|
27
27
|
const { page: _p, size: _s, ...otherQueryParams } = queryParams;
|
|
28
28
|
const { entity_type, quickFilter, savedFilterCode, attributeFilter, tabs, sortby, } = body;
|
|
29
|
-
return this.filterService.
|
|
29
|
+
return this.filterService.applyFilterWrapper({
|
|
30
30
|
entity_type,
|
|
31
31
|
quickFilter,
|
|
32
32
|
savedFilterCode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.controller.js","sourceRoot":"","sources":["../../../../src/module/filter/controller/filter.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,8DAA0D;AAC1D,0EAAqE;AACrE,2DAAgE;AAGzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YACmB,aAA4B,EAE5B,kBAAsC;QAFtC,kBAAa,GAAb,aAAa,CAAe;QAE5B,uBAAkB,GAAlB,kBAAkB,CAAoB;IACtD,CAAC;IAKE,AAAN,KAAK,CAAC,WAAW,CACP,IAAS,EACY,OAAO,CAAC,EACR,OAAO,EAAE,EAC/B,GAA4B,EAC1B,WAAmC,EACvB,SAAkB,EACpB,OAAgB,EACjB,OAAgB;QAElC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAGvC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC;QAEhE,MAAM,EACJ,WAAW,EACX,WAAW,EACX,eAAe,EACf,eAAe,EACf,IAAI,EACJ,MAAM,GACP,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"filter.controller.js","sourceRoot":"","sources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-filter-detail.entit
|
|
|
14
14
|
const saved_filter_master_entity_1 = require("./entity/saved-filter-master.entity");
|
|
15
15
|
const saved_filter_repository_1 = require("./repository/saved-filter.repository");
|
|
16
16
|
const entity_module_1 = require("../meta/entity.module");
|
|
17
|
-
const entity_json_module_1 = require("../entity_json/entity_json.module");
|
|
18
17
|
const filter_service_1 = require("./service/filter.service");
|
|
19
18
|
const filter_controller_1 = require("./controller/filter.controller");
|
|
20
19
|
const filter_evaluator_service_1 = require("./service/filter-evaluator.service");
|
|
21
20
|
const saved_filter_detail_repository_1 = require("./repository/saved.filter-detail.repository");
|
|
22
|
-
const flatjson_filter_service_1 = require("./service/flatjson-filter.service");
|
|
23
|
-
const config_1 = require("@nestjs/config");
|
|
24
|
-
const utils_module_1 = require("../../utils/utils.module");
|
|
25
21
|
let FilterModule = class FilterModule {
|
|
26
22
|
};
|
|
27
23
|
exports.FilterModule = FilterModule;
|
|
@@ -29,10 +25,7 @@ exports.FilterModule = FilterModule = __decorate([
|
|
|
29
25
|
(0, common_1.Module)({
|
|
30
26
|
imports: [
|
|
31
27
|
typeorm_1.TypeOrmModule.forFeature([saved_filter_detail_entity_1.SavedFilterDetail, saved_filter_master_entity_1.SavedFilterMaster]),
|
|
32
|
-
(0, common_1.forwardRef)(() => entity_module_1.EntityModule)
|
|
33
|
-
(0, common_1.forwardRef)(() => entity_json_module_1.EntityJSONModule),
|
|
34
|
-
config_1.ConfigModule,
|
|
35
|
-
utils_module_1.UtilsModule,
|
|
28
|
+
(0, common_1.forwardRef)(() => entity_module_1.EntityModule)
|
|
36
29
|
],
|
|
37
30
|
controllers: [filter_controller_1.FilterController],
|
|
38
31
|
providers: [
|
|
@@ -40,15 +33,13 @@ exports.FilterModule = FilterModule = __decorate([
|
|
|
40
33
|
saved_filter_repository_1.SavedFilterRepositoryService,
|
|
41
34
|
filter_service_1.FilterService,
|
|
42
35
|
filter_evaluator_service_1.FilterEvaluatorService,
|
|
43
|
-
saved_filter_detail_repository_1.SavedFilterDetailRepository
|
|
44
|
-
flatjson_filter_service_1.FlatjsonFilterService,
|
|
36
|
+
saved_filter_detail_repository_1.SavedFilterDetailRepository
|
|
45
37
|
],
|
|
46
38
|
exports: [
|
|
47
39
|
'SavedFilterService',
|
|
48
40
|
saved_filter_repository_1.SavedFilterRepositoryService,
|
|
49
41
|
filter_service_1.FilterService,
|
|
50
42
|
filter_evaluator_service_1.FilterEvaluatorService,
|
|
51
|
-
flatjson_filter_service_1.FlatjsonFilterService,
|
|
52
43
|
],
|
|
53
44
|
})
|
|
54
45
|
], FilterModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.module.js","sourceRoot":"","sources":["../../../src/module/filter/filter.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,yEAAoE;AACpE,oFAAwE;AACxE,oFAAwE;AACxE,kFAAoF;AACpF,yDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"filter.module.js","sourceRoot":"","sources":["../../../src/module/filter/filter.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,yEAAoE;AACpE,oFAAwE;AACxE,oFAAwE;AACxE,kFAAoF;AACpF,yDAAqD;AACrD,6DAAyD;AACzD,sEAAkE;AAClE,iFAA4E;AAC5E,gGAA0F;AAsBnF,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IApBxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,8CAAiB,EAAE,8CAAiB,CAAC,CAAC;YAChE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;SAC/B;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE;YACT,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,yCAAkB,EAAE;YAC/D,sDAA4B;YAC5B,8BAAa;YACb,iDAAsB;YACtB,4DAA2B;SAC5B;QACD,OAAO,EAAE;YACP,oBAAoB;YACpB,sDAA4B;YAC5B,8BAAa;YACb,iDAAsB;SACvB;KACF,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -8,55 +8,19 @@ import { LoggingService } from 'src/utils/service/loggingUtil.service';
|
|
|
8
8
|
import { ConfigService } from '@nestjs/config';
|
|
9
9
|
import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
|
|
10
10
|
import { EntityManager } from 'typeorm';
|
|
11
|
-
import { FlatjsonFilterService } from './flatjson-filter.service';
|
|
12
11
|
export declare class FilterService {
|
|
13
12
|
private entityManager;
|
|
14
13
|
private readonly attributeMasterService;
|
|
15
14
|
private readonly entityMasterService;
|
|
16
|
-
private readonly entityRelationService;
|
|
17
15
|
private readonly savedFilterService;
|
|
16
|
+
private readonly entityRelationService;
|
|
18
17
|
private readonly resolverService;
|
|
19
18
|
protected readonly loggingService: LoggingService;
|
|
20
19
|
private readonly configService;
|
|
21
20
|
private readonly reflectionHelper;
|
|
22
|
-
|
|
23
|
-
constructor(entityManager: EntityManager, attributeMasterService: AttributeMasterService, entityMasterService: EntityMasterService, entityRelationService: EntityRelationService, savedFilterService: SavedFilterService, resolverService: ResolverService, loggingService: LoggingService, configService: ConfigService, reflectionHelper: ReflectionHelper, flatjsonFilterService: FlatjsonFilterService);
|
|
21
|
+
constructor(entityManager: EntityManager, attributeMasterService: AttributeMasterService, entityMasterService: EntityMasterService, savedFilterService: SavedFilterService, entityRelationService: EntityRelationService, resolverService: ResolverService, loggingService: LoggingService, configService: ConfigService, reflectionHelper: ReflectionHelper);
|
|
24
22
|
schema: any;
|
|
25
23
|
private gettab_value_counts;
|
|
26
|
-
applyFilterWithRouting(dto: FilterRequestDto): Promise<{
|
|
27
|
-
success: boolean;
|
|
28
|
-
data: {
|
|
29
|
-
entity_tabs: any[];
|
|
30
|
-
entity_list: any[];
|
|
31
|
-
pagination: {
|
|
32
|
-
total: number;
|
|
33
|
-
page: number;
|
|
34
|
-
size: number;
|
|
35
|
-
totalPages: number;
|
|
36
|
-
hasNextPage: boolean;
|
|
37
|
-
hasPreviousPage: boolean;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
} | {
|
|
41
|
-
success: boolean;
|
|
42
|
-
data: {
|
|
43
|
-
entity_tabs: never[];
|
|
44
|
-
entity_list: never[];
|
|
45
|
-
pagination: {};
|
|
46
|
-
};
|
|
47
|
-
} | {
|
|
48
|
-
success: boolean;
|
|
49
|
-
data: {
|
|
50
|
-
entity_tabs: any;
|
|
51
|
-
entity_list: any;
|
|
52
|
-
pagination: {
|
|
53
|
-
total: any;
|
|
54
|
-
page: any;
|
|
55
|
-
size: any;
|
|
56
|
-
totalPages: any;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
}>;
|
|
60
24
|
applyFilterWrapper(dto: FilterRequestDto): Promise<{
|
|
61
25
|
success: boolean;
|
|
62
26
|
data: {
|
|
@@ -24,19 +24,17 @@ const loggingUtil_service_1 = require("../../../utils/service/loggingUtil.servic
|
|
|
24
24
|
const config_1 = require("@nestjs/config");
|
|
25
25
|
const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
|
|
26
26
|
const typeorm_1 = require("typeorm");
|
|
27
|
-
const flatjson_filter_service_1 = require("./flatjson-filter.service");
|
|
28
27
|
let FilterService = class FilterService {
|
|
29
|
-
constructor(entityManager, attributeMasterService, entityMasterService,
|
|
28
|
+
constructor(entityManager, attributeMasterService, entityMasterService, savedFilterService, entityRelationService, resolverService, loggingService, configService, reflectionHelper) {
|
|
30
29
|
this.entityManager = entityManager;
|
|
31
30
|
this.attributeMasterService = attributeMasterService;
|
|
32
31
|
this.entityMasterService = entityMasterService;
|
|
33
|
-
this.entityRelationService = entityRelationService;
|
|
34
32
|
this.savedFilterService = savedFilterService;
|
|
33
|
+
this.entityRelationService = entityRelationService;
|
|
35
34
|
this.resolverService = resolverService;
|
|
36
35
|
this.loggingService = loggingService;
|
|
37
36
|
this.configService = configService;
|
|
38
37
|
this.reflectionHelper = reflectionHelper;
|
|
39
|
-
this.flatjsonFilterService = flatjsonFilterService;
|
|
40
38
|
this.schema = this.configService.get('DB_SCHEMA');
|
|
41
39
|
}
|
|
42
40
|
async gettab_value_counts(tableName, column, whereClauses) {
|
|
@@ -79,30 +77,6 @@ let FilterService = class FilterService {
|
|
|
79
77
|
})),
|
|
80
78
|
];
|
|
81
79
|
}
|
|
82
|
-
async applyFilterWithRouting(dto) {
|
|
83
|
-
const useFlatjson = dto.queryParams?.use_flatjson === 'true';
|
|
84
|
-
if (useFlatjson) {
|
|
85
|
-
await this.loggingService.log('info', 'FilterService', 'applyFilterWithRouting', `Using FLATJSON filtering for ${dto.entity_type}`);
|
|
86
|
-
const result = await this.flatjsonFilterService.applyFlatjsonFilter(dto);
|
|
87
|
-
return {
|
|
88
|
-
success: true,
|
|
89
|
-
data: {
|
|
90
|
-
entity_tabs: result.tabCounts || [],
|
|
91
|
-
entity_list: result.data,
|
|
92
|
-
pagination: {
|
|
93
|
-
total: result.total,
|
|
94
|
-
page: result.page,
|
|
95
|
-
size: result.size,
|
|
96
|
-
totalPages: result.totalPages,
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
await this.loggingService.log('info', 'FilterService', 'applyFilterWithRouting', `Using TRADITIONAL filtering for ${dto.entity_type}`);
|
|
103
|
-
return this.applyFilterWrapper(dto);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
80
|
async applyFilterWrapper(dto) {
|
|
107
81
|
const { entity_type, quickFilter = [], savedFilterCode, attributeFilter = [], loggedInUser, } = dto;
|
|
108
82
|
const savedFilters = await this.getSavedFilters(savedFilterCode ?? undefined);
|
|
@@ -172,7 +146,7 @@ let FilterService = class FilterService {
|
|
|
172
146
|
}
|
|
173
147
|
async applyFilter(dto) {
|
|
174
148
|
const { entity_type, quickFilter, savedFilterCode, attributeFilter, tabs, sortby, loggedInUser, queryParams, customLevelType, customLevelId, customAppCode, } = dto;
|
|
175
|
-
const { level_type, level_id, id: user_id,
|
|
149
|
+
const { level_type, level_id, id: user_id, enterprise_id, } = loggedInUser || {};
|
|
176
150
|
const entityMeta = await this.entityMasterService.getEntityData(entity_type, loggedInUser);
|
|
177
151
|
const tableName = entityMeta?.data_source;
|
|
178
152
|
if (!tableName) {
|
|
@@ -230,7 +204,7 @@ let FilterService = class FilterService {
|
|
|
230
204
|
entity_type !== 'TEM' &&
|
|
231
205
|
level_type &&
|
|
232
206
|
level_id &&
|
|
233
|
-
|
|
207
|
+
enterprise_id &&
|
|
234
208
|
!customLevelType &&
|
|
235
209
|
!customLevelId) {
|
|
236
210
|
baseWhere.push({
|
|
@@ -301,6 +275,43 @@ let FilterService = class FilterService {
|
|
|
301
275
|
}) || [];
|
|
302
276
|
let filteredTabs = await this.getFilteredTabs(layout, showList, entityMeta, baseWhere, tabs, loggedInUser);
|
|
303
277
|
const dataWhere = [...baseWhere];
|
|
278
|
+
if (tabs?.columnName && tabs?.value) {
|
|
279
|
+
const tabAttrMeta = attributeMetaMap[tabs.columnName];
|
|
280
|
+
const tabValue = tabs.value.toLowerCase();
|
|
281
|
+
if (tabValue === 'others') {
|
|
282
|
+
const valuesToExclude = showList
|
|
283
|
+
.filter((v) => v.label.toLowerCase() !== 'all')
|
|
284
|
+
.map((v) => v.value);
|
|
285
|
+
if (valuesToExclude.length > 0) {
|
|
286
|
+
for (const value of valuesToExclude) {
|
|
287
|
+
const resolvedId = await this.resolverService.getResolvedId(loggedInUser, tabs.columnName, value, entity_type);
|
|
288
|
+
if (resolvedId) {
|
|
289
|
+
const tabCondition = this.buildCondition({
|
|
290
|
+
filter_attribute: tabs.columnName,
|
|
291
|
+
filter_operator: 'not_equal',
|
|
292
|
+
filter_value: [resolvedId],
|
|
293
|
+
skip_id: true,
|
|
294
|
+
}, tabAttrMeta);
|
|
295
|
+
if (tabCondition)
|
|
296
|
+
dataWhere.push(tabCondition);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
else if (tabValue !== 'all') {
|
|
302
|
+
const resolvedId = await this.resolverService.getResolvedId(loggedInUser, tabs.columnName, tabs.value, entity_type);
|
|
303
|
+
if (resolvedId) {
|
|
304
|
+
const tabCondition = this.buildCondition({
|
|
305
|
+
filter_attribute: tabs.columnName,
|
|
306
|
+
filter_operator: 'equal',
|
|
307
|
+
filter_value: [resolvedId],
|
|
308
|
+
skip_id: true,
|
|
309
|
+
}, tabAttrMeta);
|
|
310
|
+
if (tabCondition)
|
|
311
|
+
dataWhere.push(tabCondition);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
304
315
|
let qb = this.entityManager
|
|
305
316
|
.createQueryBuilder()
|
|
306
317
|
.select('e.*')
|
|
@@ -331,6 +342,7 @@ let FilterService = class FilterService {
|
|
|
331
342
|
return formattedRow;
|
|
332
343
|
};
|
|
333
344
|
const formattedEntityList = entity_list.map(formatDatesInRow);
|
|
345
|
+
const resolvedEntityList = await Promise.all(formattedEntityList.map((row) => this.resolverService.getResolvedData(loggedInUser, row, entity_type)));
|
|
334
346
|
const resolvedTabs = await Promise.all(filteredTabs.map(async (tab) => {
|
|
335
347
|
const tabAttrKey = layout?.attribute || tabs?.columnName;
|
|
336
348
|
if (!tabAttrKey ||
|
|
@@ -338,7 +350,8 @@ let FilterService = class FilterService {
|
|
|
338
350
|
tab.tab_value?.toLowerCase() === 'others') {
|
|
339
351
|
return tab;
|
|
340
352
|
}
|
|
341
|
-
|
|
353
|
+
const resolvedVal = await this.resolverService.getResolvedValue(loggedInUser, tabAttrKey, tab.tab_value, entity_type);
|
|
354
|
+
return { ...tab, tab_value: resolvedVal ?? tab.tab_value };
|
|
342
355
|
}));
|
|
343
356
|
const countQb = this.entityManager
|
|
344
357
|
.createQueryBuilder()
|
|
@@ -352,7 +365,7 @@ let FilterService = class FilterService {
|
|
|
352
365
|
success: true,
|
|
353
366
|
data: {
|
|
354
367
|
entity_tabs: resolvedTabs,
|
|
355
|
-
entity_list:
|
|
368
|
+
entity_list: resolvedEntityList,
|
|
356
369
|
pagination: {
|
|
357
370
|
total,
|
|
358
371
|
page,
|
|
@@ -892,23 +905,17 @@ let FilterService = class FilterService {
|
|
|
892
905
|
exports.FilterService = FilterService;
|
|
893
906
|
exports.FilterService = FilterService = __decorate([
|
|
894
907
|
(0, common_1.Injectable)(),
|
|
895
|
-
__param(
|
|
896
|
-
__param(
|
|
897
|
-
__param(
|
|
898
|
-
__param(4, (0, common_1.Inject)('SavedFilterService')),
|
|
899
|
-
__param(5, (0, common_1.Inject)((0, common_1.forwardRef)(() => resolver_service_1.ResolverService))),
|
|
900
|
-
__param(6, (0, common_1.Inject)((0, common_1.forwardRef)(() => loggingUtil_service_1.LoggingService))),
|
|
901
|
-
__param(8, (0, common_1.Inject)((0, common_1.forwardRef)(() => reflection_helper_service_1.ReflectionHelper))),
|
|
902
|
-
__param(9, (0, common_1.Inject)((0, common_1.forwardRef)(() => flatjson_filter_service_1.FlatjsonFilterService))),
|
|
908
|
+
__param(3, (0, common_1.Inject)('SavedFilterService')),
|
|
909
|
+
__param(4, (0, common_1.Inject)('EntityRelationService')),
|
|
910
|
+
__param(6, (0, common_1.Inject)()),
|
|
903
911
|
__metadata("design:paramtypes", [typeorm_1.EntityManager,
|
|
904
912
|
attribute_master_service_1.AttributeMasterService,
|
|
905
913
|
entity_master_service_1.EntityMasterService,
|
|
906
|
-
entity_relation_service_1.EntityRelationService,
|
|
907
914
|
saved_filter_service_1.SavedFilterService,
|
|
915
|
+
entity_relation_service_1.EntityRelationService,
|
|
908
916
|
resolver_service_1.ResolverService,
|
|
909
917
|
loggingUtil_service_1.LoggingService,
|
|
910
918
|
config_1.ConfigService,
|
|
911
|
-
reflection_helper_service_1.ReflectionHelper
|
|
912
|
-
flatjson_filter_service_1.FlatjsonFilterService])
|
|
919
|
+
reflection_helper_service_1.ReflectionHelper])
|
|
913
920
|
], FilterService);
|
|
914
921
|
//# sourceMappingURL=filter.service.js.map
|