rez_core 4.0.167 → 4.0.171
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/.prettierrc +3 -3
- package/README.md +99 -99
- package/dist/app.module.js +9 -0
- package/dist/app.module.js.map +1 -1
- package/dist/config/bull.config.d.ts +10 -0
- package/dist/config/bull.config.js +66 -0
- package/dist/config/bull.config.js.map +1 -0
- package/dist/config/config.module.js +2 -2
- package/dist/config/config.module.js.map +1 -1
- package/dist/config/database.config.d.ts +1 -1
- package/dist/config/database.config.js +12 -16
- package/dist/config/database.config.js.map +1 -1
- package/dist/module/auth/guards/role.guard.js +3 -3
- package/dist/module/auth/services/auth.service.js +3 -3
- package/dist/module/auth/services/auth.service.js.map +1 -1
- package/dist/module/enterprise/entity/organization.entity.js +1 -1
- package/dist/module/enterprise/repository/school.repository.js +3 -3
- package/dist/module/enterprise/repository/school.repository.js.map +1 -1
- package/dist/module/entity_json/controller/entity_json.controller.d.ts +8 -0
- package/dist/module/entity_json/controller/entity_json.controller.js +42 -0
- package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -0
- package/dist/module/entity_json/entity_json.module.d.ts +2 -0
- package/dist/module/entity_json/entity_json.module.js +26 -0
- package/dist/module/entity_json/entity_json.module.js.map +1 -0
- package/dist/module/entity_json/service/entity_json.service.d.ts +7 -0
- package/dist/module/entity_json/service/entity_json.service.js +80 -0
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -0
- package/dist/module/filter/repository/saved-filter.repository.js +4 -4
- package/dist/module/filter/service/filter-evaluator.service.js +3 -3
- package/dist/module/filter/service/filter-evaluator.service.js.map +1 -1
- package/dist/module/filter/service/filter.service.d.ts +1 -4
- package/dist/module/filter/service/filter.service.js +39 -69
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/integration/entity/integration-config.entity.js +6 -6
- package/dist/module/integration/entity/integration-config.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-source.entity.js +4 -4
- package/dist/module/integration/entity/integration-source.entity.js.map +1 -1
- package/dist/module/integration/entity/user-integration.entity.js +4 -4
- package/dist/module/integration/entity/user-integration.entity.js.map +1 -1
- package/dist/module/integration/examples/usage.example.js +9 -9
- package/dist/module/integration/service/integration.service.js +1 -1
- package/dist/module/integration/service/wrapper.service.d.ts +3 -1
- package/dist/module/integration/service/wrapper.service.js +67 -65
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +5 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js +29 -0
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.d.ts +9 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js +70 -0
- package/dist/module/linked_attributes/entity/linked_attribute.entity.js.map +1 -0
- package/dist/module/linked_attributes/linked_attributes.module.d.ts +2 -0
- package/dist/module/linked_attributes/linked_attributes.module.js +29 -0
- package/dist/module/linked_attributes/linked_attributes.module.js.map +1 -0
- package/dist/module/linked_attributes/repository/linked_attribute.repository.d.ts +6 -0
- package/dist/module/linked_attributes/repository/linked_attribute.repository.js +31 -0
- package/dist/module/linked_attributes/repository/linked_attribute.repository.js.map +1 -0
- package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +5 -0
- package/dist/module/linked_attributes/service/linked_attributes.service.js +34 -0
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -0
- package/dist/module/listmaster/entity/list-master-items.entity.js +3 -3
- package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -1
- package/dist/module/listmaster/entity/list-master.entity.js +4 -4
- package/dist/module/listmaster/entity/list-master.entity.js.map +1 -1
- package/dist/module/listmaster/service/list-master-item.service.js +3 -3
- package/dist/module/listmaster/service/list-master-item.service.js.map +1 -1
- package/dist/module/mapper/entity/field-mapper.entity.js +6 -6
- package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -1
- package/dist/module/mapper/service/field-mapper.service.js +7 -7
- package/dist/module/mapper/service/field-mapper.service.js.map +1 -1
- package/dist/module/mapper/service/mapper.service.js +4 -4
- package/dist/module/mapper/service/mapper.service.js.map +1 -1
- package/dist/module/meta/controller/attribute-master.controller.d.ts +4 -1
- package/dist/module/meta/controller/attribute-master.controller.js +15 -2
- package/dist/module/meta/controller/attribute-master.controller.js.map +1 -1
- package/dist/module/meta/entity/app-master.entity.d.ts +2 -2
- package/dist/module/meta/entity/app-master.entity.js +4 -4
- package/dist/module/meta/entity/entity-master.entity.js +1 -1
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity/view-master.entity.js +1 -1
- package/dist/module/meta/entity/view-master.entity.js.map +1 -1
- package/dist/module/meta/entity.module.js +7 -0
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/repository/attribute-master.repository.js +2 -2
- package/dist/module/meta/repository/attribute-master.repository.js.map +1 -1
- package/dist/module/meta/repository/entity-attribute-update.repository.d.ts +6 -0
- package/dist/module/meta/repository/entity-attribute-update.repository.js +44 -0
- package/dist/module/meta/repository/entity-attribute-update.repository.js.map +1 -0
- package/dist/module/meta/repository/entity-master.repository.js +2 -2
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.js +1 -1
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-attribute-update.service.d.ts +7 -0
- package/dist/module/meta/service/entity-attribute-update.service.js +36 -0
- package/dist/module/meta/service/entity-attribute-update.service.js.map +1 -0
- package/dist/module/meta/service/entity-dynamic.service.js +27 -27
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/meta/service/entity-list.service.js +3 -3
- package/dist/module/meta/service/entity-master.service.js +4 -4
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-relation.service.js +13 -13
- package/dist/module/meta/service/entity-relation.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +3 -3
- package/dist/module/meta/service/media-data.service.js +9 -9
- package/dist/module/meta/service/media-data.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.js +19 -19
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/module/repository/menu.repository.js +12 -12
- package/dist/module/notification/entity/otp.entity.js +1 -1
- package/dist/module/notification/entity/otp.entity.js.map +1 -1
- package/dist/module/notification/service/notification.service.js +9 -9
- package/dist/module/user/controller/login.controller.js +18 -18
- package/dist/module/user/entity/user-role-mapping.entity.js +1 -1
- package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
- package/dist/module/user/service/login.service.js +1 -1
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/role.service.js +4 -4
- package/dist/module/user/service/user-session.service.js +4 -4
- package/dist/module/user/service/user-session.service.js.map +1 -1
- package/dist/module/workflow/entity/action-category.entity.d.ts +1 -1
- package/dist/module/workflow/entity/action-category.entity.js +1 -1
- package/dist/module/workflow/entity/action-data.entity.js +1 -1
- package/dist/module/workflow/entity/action-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/action.entity.d.ts +1 -0
- package/dist/module/workflow/entity/action.entity.js +5 -1
- package/dist/module/workflow/entity/action.entity.js.map +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +5 -4
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.js +21 -21
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/comm-template.repository.js +7 -7
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.js +3 -3
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.js +23 -23
- package/dist/module/workflow/repository/stage-movement.repository.js +17 -17
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage.repository.js +8 -8
- package/dist/module/workflow/repository/task.repository.d.ts +3 -1
- package/dist/module/workflow/repository/task.repository.js +10 -5
- package/dist/module/workflow/repository/task.repository.js.map +1 -1
- package/dist/module/workflow/service/action-template-mapping.service.js +22 -22
- package/dist/module/workflow/service/action.service.js +13 -13
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.js +6 -6
- package/dist/module/workflow/service/populate-workflow.service.js +8 -8
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/stage-group.service.js +6 -6
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.js +4 -4
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.js +68 -54
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-list-master.service.js +16 -16
- package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +53 -51
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.js +5 -5
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow-automation/controller/workflow-automation.controller.d.ts +6 -0
- package/dist/module/workflow-automation/controller/workflow-automation.controller.js +16 -0
- package/dist/module/workflow-automation/controller/workflow-automation.controller.js.map +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.d.ts +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation.entity.d.ts +2 -0
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js +8 -0
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.d.ts +16 -0
- package/dist/module/workflow-automation/service/schedule-handler.service.js +109 -0
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -0
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.d.ts +1 -1
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +1 -1
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +13 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +115 -6
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/module/workflow-automation/workflow-automation.module.js +14 -1
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
- package/dist/module/workflow-schedule/constants/schedule.constants.d.ts +27 -0
- package/dist/module/workflow-schedule/constants/schedule.constants.js +31 -0
- package/dist/module/workflow-schedule/constants/schedule.constants.js.map +1 -0
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.d.ts +83 -0
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js +220 -0
- package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js.map +1 -0
- package/dist/module/workflow-schedule/dto/create-schedule.dto.d.ts +32 -0
- package/dist/module/workflow-schedule/dto/create-schedule.dto.js +163 -0
- package/dist/module/workflow-schedule/dto/create-schedule.dto.js.map +1 -0
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.d.ts +35 -0
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js +124 -0
- package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js.map +1 -0
- package/dist/module/workflow-schedule/dto/update-schedule.dto.d.ts +19 -0
- package/dist/module/workflow-schedule/dto/update-schedule.dto.js +106 -0
- package/dist/module/workflow-schedule/dto/update-schedule.dto.js.map +1 -0
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.d.ts +30 -0
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js +113 -0
- package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js.map +1 -0
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.d.ts +34 -0
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js +118 -0
- package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js.map +1 -0
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.d.ts +44 -0
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js +3 -0
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js.map +1 -0
- package/dist/module/workflow-schedule/processors/schedule.processor.d.ts +31 -0
- package/dist/module/workflow-schedule/processors/schedule.processor.js +409 -0
- package/dist/module/workflow-schedule/processors/schedule.processor.js.map +1 -0
- package/dist/module/workflow-schedule/service/workflow-schedule.service.d.ts +44 -0
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +434 -0
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -0
- package/dist/module/workflow-schedule/workflow-schedule.module.d.ts +2 -0
- package/dist/module/workflow-schedule/workflow-schedule.module.js +44 -0
- package/dist/module/workflow-schedule/workflow-schedule.module.js.map +1 -0
- package/dist/table.config.js +5 -1
- package/dist/table.config.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/service/loggingUtil.service.d.ts +9 -2
- package/dist/utils/service/loggingUtil.service.js +65 -14
- package/dist/utils/service/loggingUtil.service.js.map +1 -1
- package/dist/utils/service/reflection-helper.service.js +3 -3
- package/dist/utils/service/reflection-helper.service.js.map +1 -1
- package/dist/utils/utils.module.js +2 -0
- package/dist/utils/utils.module.js.map +1 -1
- package/docs/modules/event-driven-integration-design.md +91 -91
- package/docs/modules/integration.md +250 -250
- package/eslint.config.mjs +34 -34
- package/nest-cli.json +14 -14
- package/package.json +124 -120
- package/src/app.controller.ts +12 -12
- package/src/app.module.ts +62 -52
- package/src/app.service.ts +8 -8
- package/src/config/bull.config.ts +69 -0
- package/src/config/config.module.ts +18 -17
- package/src/config/database.config.ts +23 -48
- package/src/constant/global.constant.ts +67 -67
- package/src/core.module.ts +81 -81
- package/src/decorators/roles.decorator.ts +7 -7
- package/src/dtos/response.dto.ts +6 -6
- package/src/dtos/response.ts +5 -5
- package/src/index.ts +1 -1
- package/src/module/auth/auth.module.ts +49 -49
- package/src/module/auth/controller/auth.controller.ts +28 -28
- package/src/module/auth/guards/google-auth.guard.ts +9 -9
- package/src/module/auth/guards/jwt.guard.ts +22 -22
- package/src/module/auth/guards/role.guard.ts +68 -68
- package/src/module/auth/services/auth.service.ts +50 -50
- package/src/module/auth/services/jwt.service.ts +11 -11
- package/src/module/auth/strategies/google.strategy.ts +54 -54
- package/src/module/auth/strategies/jwt.strategy.ts +58 -58
- package/src/module/auth/strategies/local.strategy.ts +13 -13
- package/src/module/dashboard/controller/dashboard.controller.ts +36 -36
- package/src/module/dashboard/dashboard.module.ts +21 -21
- package/src/module/dashboard/entity/dashboard_page_data.entity.ts +27 -27
- package/src/module/dashboard/entity/widget_master.entity.ts +18 -18
- package/src/module/dashboard/repository/dashboard.repository.ts +42 -42
- package/src/module/dashboard/service/dashboard.service.ts +73 -73
- package/src/module/dev/dev.module.ts +12 -12
- package/src/module/dev/service/dev.service.ts +7 -7
- package/src/module/enterprise/controller/organization.controller.ts +36 -36
- package/src/module/enterprise/enterprise.module.ts +30 -30
- package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
- package/src/module/enterprise/entity/organization-app-mapping.entity.ts +13 -13
- package/src/module/enterprise/entity/organization.entity.ts +92 -92
- package/src/module/enterprise/repository/enterprise.repository.ts +31 -31
- package/src/module/enterprise/repository/organization.repository.ts +26 -26
- package/src/module/enterprise/repository/school.repository.ts +278 -278
- package/src/module/enterprise/service/brand.service.ts +5 -5
- package/src/module/enterprise/service/enterprise.service.ts +16 -16
- package/src/module/enterprise/service/organization-app-mapping.service.ts +4 -4
- package/src/module/enterprise/service/organization.service.ts +145 -145
- package/src/module/entity_json/controller/entity_json.controller.ts +21 -0
- package/src/module/entity_json/entity_json.module.ts +13 -0
- package/src/module/entity_json/service/entity_json.service.ts +88 -0
- package/src/module/filter/controller/filter.controller.ts +84 -84
- package/src/module/filter/dto/filter-request.dto.ts +38 -38
- package/src/module/filter/entity/saved-filter-detail.entity.ts +41 -41
- package/src/module/filter/entity/saved-filter-master.entity.ts +23 -23
- package/src/module/filter/filter.module.ts +31 -31
- package/src/module/filter/repository/saved-filter.repository.ts +168 -168
- package/src/module/filter/service/filter-evaluator.service.ts +86 -86
- package/src/module/filter/service/filter.service.ts +1005 -1053
- package/src/module/filter/service/saved-filter.service.ts +170 -170
- package/src/module/ics/controller/ics.controller.ts +21 -21
- package/src/module/ics/dto/ics.dto.ts +55 -55
- package/src/module/ics/ics.module.ts +13 -13
- package/src/module/ics/service/ics.service.ts +57 -57
- package/src/module/integration/controller/calender-event.controller.ts +31 -31
- package/src/module/integration/controller/integration.controller.ts +662 -662
- package/src/module/integration/controller/wrapper.controller.ts +37 -37
- package/src/module/integration/dto/create-config.dto.ts +526 -526
- package/src/module/integration/entity/integration-config.entity.ts +112 -112
- package/src/module/integration/entity/integration-entity-mapper.entity.ts +14 -14
- package/src/module/integration/entity/integration-source.entity.ts +17 -17
- package/src/module/integration/entity/user-integration.entity.ts +71 -71
- package/src/module/integration/examples/usage.example.ts +338 -338
- package/src/module/integration/factories/base.factory.ts +7 -7
- package/src/module/integration/factories/email.factory.ts +49 -49
- package/src/module/integration/factories/integration.factory.ts +121 -121
- package/src/module/integration/factories/sms.factory.ts +51 -51
- package/src/module/integration/factories/telephone.factory.ts +41 -41
- package/src/module/integration/factories/whatsapp.factory.ts +56 -56
- package/src/module/integration/integration.module.ts +110 -110
- package/src/module/integration/service/calendar-event.service.ts +118 -118
- package/src/module/integration/service/integration-entity-mapper.service.ts +17 -17
- package/src/module/integration/service/integration-queue.service.ts +229 -229
- package/src/module/integration/service/integration.service.ts +2633 -2633
- package/src/module/integration/service/oauth.service.ts +224 -224
- package/src/module/integration/service/wrapper.service.ts +700 -494
- package/src/module/integration/strategies/email/gmail-api.strategy.ts +280 -280
- package/src/module/integration/strategies/email/outlook-api.strategy.ts +44 -44
- package/src/module/integration/strategies/email/outlook.strategy.ts +64 -64
- package/src/module/integration/strategies/email/sendgrid-api.strategy.ts +260 -260
- package/src/module/integration/strategies/integration.strategy.ts +97 -97
- package/src/module/integration/strategies/sms/gupshup-sms.strategy.ts +146 -146
- package/src/module/integration/strategies/sms/msg91-sms.strategy.ts +164 -164
- package/src/module/integration/strategies/sms/tubelight-sms.strategy.ts +163 -163
- package/src/module/integration/strategies/telephone/ozonetel-voice.strategy.ts +238 -238
- package/src/module/integration/strategies/telephone/tubelight-voice.strategy.ts +210 -210
- package/src/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.ts +359 -359
- package/src/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.ts +372 -372
- package/src/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.ts +403 -403
- package/src/module/integration/strategies/whatsapp/whatsapp.strategy.ts +57 -57
- package/src/module/layout/controller/layout.controller.ts +47 -47
- package/src/module/layout/entity/header-items.entity.ts +28 -28
- package/src/module/layout/entity/header-section.entity.ts +19 -19
- package/src/module/layout/layout.module.ts +21 -21
- package/src/module/layout/repository/header-items.repository.ts +18 -18
- package/src/module/layout/repository/header-section.repository.ts +22 -22
- package/src/module/layout/service/header-section.service.ts +25 -25
- package/src/module/layout_preference/controller/layout_preference.controller.ts +73 -73
- package/src/module/layout_preference/entity/layout_preference.entity.ts +28 -28
- package/src/module/layout_preference/layout_preference.module.ts +22 -22
- package/src/module/layout_preference/repository/layout_preference.repository.ts +65 -65
- package/src/module/layout_preference/service/layout_preference.service.ts +191 -191
- package/src/module/lead/controller/lead.controller.ts +30 -30
- package/src/module/lead/lead.module.ts +14 -14
- package/src/module/lead/repository/lead.repository.ts +41 -41
- package/src/module/lead/service/lead.service.ts +54 -54
- package/src/module/linked_attributes/controller/linked_attributes.controller.ts +10 -0
- package/src/module/linked_attributes/entity/linked_attribute.entity.ts +48 -0
- package/src/module/linked_attributes/linked_attributes.module.ts +16 -0
- package/src/module/linked_attributes/repository/linked_attribute.repository.ts +12 -0
- package/src/module/linked_attributes/service/linked_attributes.service.ts +22 -0
- package/src/module/listmaster/controller/list-master.controller.ts +230 -230
- package/src/module/listmaster/entity/list-master-items.entity.ts +43 -43
- package/src/module/listmaster/entity/list-master.entity.ts +33 -33
- package/src/module/listmaster/listmaster.module.ts +46 -46
- package/src/module/listmaster/repository/list-master-items.repository.ts +169 -169
- package/src/module/listmaster/repository/list-master.repository.ts +46 -46
- package/src/module/listmaster/service/list-master-engine.ts +19 -19
- package/src/module/listmaster/service/list-master-extension.interface.ts +4 -4
- package/src/module/listmaster/service/list-master-item.service.ts +292 -292
- package/src/module/listmaster/service/list-master-registry.ts +15 -15
- package/src/module/listmaster/service/list-master.service.ts +535 -535
- package/src/module/mapper/controller/field-mapper.controller.ts +76 -76
- package/src/module/mapper/controller/mapper.controller.ts +20 -20
- package/src/module/mapper/dto/field-mapper.dto.ts +14 -14
- package/src/module/mapper/entity/field-lovs.entity.ts +19 -19
- package/src/module/mapper/entity/field-mapper.entity.ts +53 -53
- package/src/module/mapper/entity/mapper.entity.ts +16 -16
- package/src/module/mapper/mapper.module.ts +34 -34
- package/src/module/mapper/repository/field-lovs.repository.ts +35 -35
- package/src/module/mapper/repository/field-mapper.repository.ts +42 -42
- package/src/module/mapper/repository/mapper.repository.ts +15 -15
- package/src/module/mapper/service/field-mapper.service.ts +271 -266
- package/src/module/mapper/service/mapper.service.ts +79 -79
- package/src/module/master/controller/master.controller.ts +74 -74
- package/src/module/master/service/master.service.ts +483 -483
- package/src/module/meta/controller/app-master.controller.ts +38 -38
- package/src/module/meta/controller/attribute-master.controller.ts +74 -66
- package/src/module/meta/controller/entity-dynamic.controller.ts +125 -125
- package/src/module/meta/controller/entity-master.controller.ts +28 -28
- package/src/module/meta/controller/entity-relation.controller.ts +36 -36
- package/src/module/meta/controller/entity.controller.ts +392 -392
- package/src/module/meta/controller/entity.public.controller.ts +75 -75
- package/src/module/meta/controller/media.controller.ts +107 -107
- package/src/module/meta/controller/meta.controller.ts +96 -96
- package/src/module/meta/controller/view-master.controller.ts +86 -86
- package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
- package/src/module/meta/dto/entity-tab.dto.ts +4 -4
- package/src/module/meta/dto/entity-table.dto.ts +9 -9
- package/src/module/meta/entity/app-master.entity.ts +34 -34
- package/src/module/meta/entity/attribute-master.entity.ts +89 -89
- package/src/module/meta/entity/base-entity.entity.ts +75 -75
- package/src/module/meta/entity/entity-master.entity.ts +85 -85
- package/src/module/meta/entity/entity-relation-data.entity.ts +29 -29
- package/src/module/meta/entity/entity-relation.entity.ts +23 -23
- package/src/module/meta/entity/entity-table-column.entity.ts +61 -61
- package/src/module/meta/entity/entity-table.entity.ts +50 -50
- package/src/module/meta/entity/media-data.entity.ts +32 -32
- package/src/module/meta/entity/preference.entity.ts +62 -62
- package/src/module/meta/entity/view-master.entity.ts +41 -41
- package/src/module/meta/entity.module.ts +166 -158
- package/src/module/meta/repository/app-master.repository.ts +20 -20
- package/src/module/meta/repository/attribute-master.repository.ts +118 -118
- package/src/module/meta/repository/entity-attribute-update.repository.ts +44 -0
- package/src/module/meta/repository/entity-master.repository.ts +69 -69
- package/src/module/meta/repository/entity-table-column.repository.ts +39 -39
- package/src/module/meta/repository/entity-table.repository.ts +53 -53
- package/src/module/meta/repository/media-data.repository.ts +50 -50
- package/src/module/meta/repository/preference.repository.ts +20 -20
- package/src/module/meta/repository/user-app-mapping.repository.ts +28 -28
- package/src/module/meta/repository/view-master.repository.ts +42 -42
- package/src/module/meta/service/app-master.service.ts +37 -37
- package/src/module/meta/service/attribute-master.service.ts +126 -126
- package/src/module/meta/service/common.service.ts +9 -9
- package/src/module/meta/service/entity-attribute-update.service.ts +29 -0
- package/src/module/meta/service/entity-dynamic.service.ts +819 -819
- package/src/module/meta/service/entity-list.service.ts +205 -205
- package/src/module/meta/service/entity-master.service.ts +169 -169
- package/src/module/meta/service/entity-realation-data.service.ts +9 -9
- package/src/module/meta/service/entity-relation.service.ts +69 -69
- package/src/module/meta/service/entity-service-impl.service.ts +525 -525
- package/src/module/meta/service/entity-table-column.service.ts +39 -39
- package/src/module/meta/service/entity-table.service.ts +150 -150
- package/src/module/meta/service/entity-validation.service.ts +187 -187
- package/src/module/meta/service/entity.service.ts +67 -67
- package/src/module/meta/service/field-group.service.ts +103 -103
- package/src/module/meta/service/media-data.service.ts +507 -507
- package/src/module/meta/service/populate-meta.service.ts +193 -193
- package/src/module/meta/service/preference.service.ts +16 -16
- package/src/module/meta/service/resolver.service.ts +267 -267
- package/src/module/meta/service/section-master.service.ts +104 -104
- package/src/module/meta/service/update-form-json.service.ts +22 -22
- package/src/module/meta/service/user-app-mapping.service.ts +17 -17
- package/src/module/meta/service/view-master.service.ts +127 -127
- package/src/module/microservice-client/microservice-clients.module.ts +13 -13
- package/src/module/microservice-client/service/microservice-client-factory.ts +37 -37
- package/src/module/microservice-client/service/microservice-clients.ts +4 -4
- package/src/module/module/controller/menu.controller.ts +15 -15
- package/src/module/module/controller/module-access.controller.ts +134 -134
- package/src/module/module/entity/menu.entity.ts +43 -43
- package/src/module/module/entity/module-access.entity.ts +25 -25
- package/src/module/module/entity/module-action.entity.ts +17 -17
- package/src/module/module/entity/module.entity.ts +52 -52
- package/src/module/module/module.module.ts +42 -42
- package/src/module/module/repository/menu.repository.ts +184 -184
- package/src/module/module/repository/module-access.repository.ts +344 -344
- package/src/module/module/service/menu.service.ts +82 -82
- package/src/module/module/service/module-access.service.ts +209 -209
- package/src/module/notification/controller/notification.controller.ts +58 -58
- package/src/module/notification/controller/otp.controller.ts +117 -117
- package/src/module/notification/entity/notification.entity.ts +26 -26
- package/src/module/notification/entity/otp.entity.ts +28 -28
- package/src/module/notification/firebase-admin.config.ts +22 -22
- package/src/module/notification/notification.module.ts +69 -69
- package/src/module/notification/repository/otp.repository.ts +27 -27
- package/src/module/notification/service/email.service.ts +127 -127
- package/src/module/notification/service/notification.service.ts +163 -163
- package/src/module/notification/service/otp.service.ts +132 -132
- package/src/module/third-party-module/entity/third-party-api-registry.entity.ts +52 -52
- package/src/module/third-party-module/repository/third-party-api-registry.repository.ts +20 -20
- package/src/module/third-party-module/service/api-registry.service.ts +13 -13
- package/src/module/third-party-module/third-party.module.ts +12 -12
- package/src/module/user/controller/login.controller.ts +197 -197
- package/src/module/user/controller/user.controller.ts +40 -40
- package/src/module/user/dto/create-user.dto.ts +62 -62
- package/src/module/user/dto/update-user.dto.ts +4 -4
- package/src/module/user/entity/role.entity.ts +33 -33
- package/src/module/user/entity/user-role-mapping.entity.ts +38 -38
- package/src/module/user/entity/user-session.entity.ts +73 -73
- package/src/module/user/entity/user.entity.ts +59 -59
- package/src/module/user/repository/role.repository.ts +96 -96
- package/src/module/user/repository/user-role-mapping.repository.ts +126 -126
- package/src/module/user/repository/user.repository.ts +50 -50
- package/src/module/user/repository/userSession.repository.ts +33 -33
- package/src/module/user/service/login.service.ts +304 -304
- package/src/module/user/service/role.service.ts +189 -189
- package/src/module/user/service/user-role-mapping.service.ts +98 -98
- package/src/module/user/service/user-session.service.ts +168 -168
- package/src/module/user/service/user.service.ts +365 -365
- package/src/module/user/user.module.ts +65 -65
- package/src/module/workflow/controller/action-category.controller.ts +54 -54
- package/src/module/workflow/controller/action-resource-mapping.controller.ts +23 -23
- package/src/module/workflow/controller/action-template-mapping.controller.ts +35 -35
- package/src/module/workflow/controller/action.controller.ts +111 -111
- package/src/module/workflow/controller/activity-log.controller.ts +55 -55
- package/src/module/workflow/controller/comm-template.controller.ts +43 -43
- package/src/module/workflow/controller/entity-modification.controller.ts +35 -35
- package/src/module/workflow/controller/form-master.controller.ts +43 -43
- package/src/module/workflow/controller/stage-group.controller.ts +48 -48
- package/src/module/workflow/controller/stage.controller.ts +50 -50
- package/src/module/workflow/controller/task.controller.ts +77 -77
- package/src/module/workflow/controller/workflow-list-master.controller.ts +44 -44
- package/src/module/workflow/controller/workflow-meta.controller.ts +80 -80
- package/src/module/workflow/controller/workflow.controller.ts +67 -67
- package/src/module/workflow/entity/action-category.entity.ts +38 -38
- package/src/module/workflow/entity/action-data.entity.ts +55 -55
- package/src/module/workflow/entity/action-resources-mapping.entity.ts +29 -29
- package/src/module/workflow/entity/action-template-mapping.entity.ts +17 -17
- package/src/module/workflow/entity/action.entity.ts +53 -50
- package/src/module/workflow/entity/activity-log.entity.ts +43 -43
- package/src/module/workflow/entity/comm-template.entity.ts +43 -43
- package/src/module/workflow/entity/entity-modification.entity.ts +38 -38
- package/src/module/workflow/entity/form.entity.ts +25 -25
- package/src/module/workflow/entity/stage-action-mapping.entity.ts +17 -17
- package/src/module/workflow/entity/stage-group.entity.ts +23 -23
- package/src/module/workflow/entity/stage-movement-data.entity.ts +38 -38
- package/src/module/workflow/entity/stage.entity.ts +20 -20
- package/src/module/workflow/entity/task-data.entity.ts +88 -88
- package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -30
- package/src/module/workflow/entity/workflow-data.entity.ts +11 -11
- package/src/module/workflow/entity/workflow-level-mapping.entity.ts +18 -18
- package/src/module/workflow/entity/workflow.entity.ts +20 -20
- package/src/module/workflow/repository/action-category.repository.ts +79 -79
- package/src/module/workflow/repository/action-data.repository.ts +334 -333
- package/src/module/workflow/repository/action.repository.ts +323 -323
- package/src/module/workflow/repository/activity-log.repository.ts +148 -148
- package/src/module/workflow/repository/comm-template.repository.ts +149 -149
- package/src/module/workflow/repository/form-master.repository.ts +59 -59
- package/src/module/workflow/repository/stage-group.repository.ts +176 -176
- package/src/module/workflow/repository/stage-movement.repository.ts +244 -244
- package/src/module/workflow/repository/stage.repository.ts +172 -172
- package/src/module/workflow/repository/task.repository.ts +134 -126
- package/src/module/workflow/repository/workflow.repository.ts +42 -42
- package/src/module/workflow/service/action-category.service.ts +33 -33
- package/src/module/workflow/service/action-data.service.ts +62 -62
- package/src/module/workflow/service/action-resources-mapping.service.ts +10 -10
- package/src/module/workflow/service/action-template-mapping.service.ts +106 -106
- package/src/module/workflow/service/action.service.ts +279 -279
- package/src/module/workflow/service/activity-log.service.ts +107 -107
- package/src/module/workflow/service/comm-template.service.ts +180 -180
- package/src/module/workflow/service/entity-modification.service.ts +67 -67
- package/src/module/workflow/service/form-master.service.ts +35 -35
- package/src/module/workflow/service/populate-workflow.service.ts +303 -303
- package/src/module/workflow/service/stage-action-mapping.service.ts +5 -5
- package/src/module/workflow/service/stage-group.service.ts +319 -319
- package/src/module/workflow/service/stage.service.ts +199 -199
- package/src/module/workflow/service/task.service.ts +569 -560
- package/src/module/workflow/service/workflow-list-master.service.ts +60 -60
- package/src/module/workflow/service/workflow-meta.service.ts +654 -640
- package/src/module/workflow/service/workflow.service.ts +205 -205
- package/src/module/workflow/workflow.module.ts +176 -176
- package/src/module/workflow-automation/controller/workflow-automation.controller.ts +43 -21
- package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +26 -26
- package/src/module/workflow-automation/entity/workflow-automation.entity.ts +40 -35
- package/src/module/workflow-automation/interface/action.decorator.ts +7 -7
- package/src/module/workflow-automation/interface/action.interface.ts +5 -5
- package/src/module/workflow-automation/service/action-registery.service.ts +35 -35
- package/src/module/workflow-automation/service/schedule-handler.service.ts +150 -0
- package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +214 -214
- package/src/module/workflow-automation/service/workflow-automation.service.ts +508 -347
- package/src/module/workflow-automation/workflow-automation.module.ts +47 -34
- package/src/module/workflow-schedule/INSTALLATION.md +244 -0
- package/src/module/workflow-schedule/README.md +422 -0
- package/src/module/workflow-schedule/constants/schedule.constants.ts +48 -0
- package/src/module/workflow-schedule/controller/workflow-schedule.controller.ts +255 -0
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_GUIDE.md +510 -0
- package/src/module/workflow-schedule/docs/CLAUDE_CODE_PROMPT.md +362 -0
- package/src/module/workflow-schedule/docs/RUN_CLAUDE_CODE.sh +68 -0
- package/src/module/workflow-schedule/dto/create-schedule.dto.ts +147 -0
- package/src/module/workflow-schedule/dto/get-execution-logs.dto.ts +119 -0
- package/src/module/workflow-schedule/dto/update-schedule.dto.ts +96 -0
- package/src/module/workflow-schedule/entities/scheduled-workflow.entity.ts +148 -0
- package/src/module/workflow-schedule/entities/workflow-execution-log.entity.ts +154 -0
- package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +53 -0
- package/src/module/workflow-schedule/processors/schedule.processor.ts +584 -0
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +600 -0
- package/src/module/workflow-schedule/workflow-schedule.module.ts +43 -0
- package/src/resources/dev.properties.yaml +30 -31
- package/src/resources/local.properties.yaml +27 -27
- package/src/resources/properties.module.ts +12 -12
- package/src/resources/properties.yaml.ts +11 -11
- package/src/resources/uat.properties.yaml +31 -31
- package/src/table.config.ts +130 -126
- package/src/utils/dto/excel-data.dto.ts +14 -14
- package/src/utils/dto/excelsheet-data.dto.ts +5 -5
- package/src/utils/service/base64util.service.ts +18 -18
- package/src/utils/service/clockIDGenUtil.service.ts +21 -21
- package/src/utils/service/codeGenerator.service.ts +22 -22
- package/src/utils/service/dateUtil.service.ts +17 -17
- package/src/utils/service/encryptUtil.service.ts +97 -97
- package/src/utils/service/excel-helper.service.ts +72 -72
- package/src/utils/service/excelUtil.service.ts +15 -15
- package/src/utils/service/file-util.service.ts +11 -11
- package/src/utils/service/json-util.service.ts +23 -23
- package/src/utils/service/loggingUtil.service.ts +88 -34
- package/src/utils/service/reflection-helper.service.ts +62 -62
- package/src/utils/service/wbsCodeGen.service.ts +8 -8
- package/src/utils/utils.module.ts +27 -25
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +24 -24
- package/.claude/settings.local.json +0 -26
- package/.idea/250218_nodejs_core.iml +0 -9
- package/.idea/codeStyles/Project.xml +0 -59
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/copilot.data.migration.agent.xml +0 -6
- package/.idea/copilot.data.migration.ask.xml +0 -6
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/copilot.data.migration.edit.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/server.log +0 -850
|
@@ -38,7 +38,7 @@ let ActionDataRepository = class ActionDataRepository extends entity_service_imp
|
|
|
38
38
|
const minSequence = Math.min(...action.map((a) => a.sequence));
|
|
39
39
|
if (action.length > 0) {
|
|
40
40
|
for (const act of action) {
|
|
41
|
-
const is_mandatory = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id =
|
|
41
|
+
const is_mandatory = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id = ? and organization_id = ? LIMIT 1;`, [act.action_requirement, loggedInUser.organization_id]);
|
|
42
42
|
const isFirst = act.sequence == minSequence;
|
|
43
43
|
const actionData = this.actionDataRepo.create({
|
|
44
44
|
stage_id: act.stage_id,
|
|
@@ -72,11 +72,12 @@ let ActionDataRepository = class ActionDataRepository extends entity_service_imp
|
|
|
72
72
|
status: global_constant_1.FORM_STATUS_TO_BE_SENT,
|
|
73
73
|
action_id: act.id,
|
|
74
74
|
created_date: istDate,
|
|
75
|
+
pdf_template: act.pdf_template
|
|
75
76
|
};
|
|
76
77
|
const createdEntity = await super.createEntity(data, loggedInUser);
|
|
77
|
-
let relationData = await this.dataSource.query(`SELECT * FROM frm_entity_relation WHERE source_entity_type =
|
|
78
|
+
let relationData = await this.dataSource.query(`SELECT * FROM frm_entity_relation WHERE source_entity_type = ? AND target_entity_type = ?`, [createdEntity.mapped_entity_type, createdEntity.entity_type]);
|
|
78
79
|
if (relationData) {
|
|
79
|
-
await this.dataSource.query(`INSERT INTO frm_entity_relation_data (organization_id, source_entity_id, source_entity_type, target_entity_id, target_entity_type, relation_type) VALUES (
|
|
80
|
+
await this.dataSource.query(`INSERT INTO frm_entity_relation_data (organization_id, source_entity_id, source_entity_type, target_entity_id, target_entity_type, relation_type) VALUES (?, ?, ?, ?, ?,?)`, [
|
|
80
81
|
loggedInUser.organization_id,
|
|
81
82
|
createdEntity.mapped_entity_id,
|
|
82
83
|
createdEntity.mapped_entity_type,
|
|
@@ -173,7 +174,7 @@ let ActionDataRepository = class ActionDataRepository extends entity_service_imp
|
|
|
173
174
|
for (const task of tasksForPrevAction) {
|
|
174
175
|
task.modified_date = new Date();
|
|
175
176
|
task.is_done = false;
|
|
176
|
-
const pendingListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'in_progress' AND organization_id =
|
|
177
|
+
const pendingListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'in_progress' AND organization_id = ? AND listtype = 'TKST' LIMIT 1;`, [organization_id]);
|
|
177
178
|
task.status = pendingListMasterItemId[0]?.id ?? task.status;
|
|
178
179
|
await this.TaskRepository.update(task.id, task);
|
|
179
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-data.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/action-data.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,qEAAgE;AAChE,qCAA2D;AAE3D,iEAA4D;AAC5D,gGAAwF;AACxF,uEAAsE;AACtE,2CAA+C;AAC/C,iCAA0B;AAC1B,6HAA4H;AAGrH,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,+CAAiB;IACzD,YAEmB,cAA4C,EAC5C,UAAsB,EAItB,cAA0C,EAC1C,aAA4B,EAC5B,+BAAgE;QAEjF,KAAK,EAAE,CAAC;QATS,mBAAc,GAAd,cAAc,CAA8B;QAC5C,eAAU,GAAV,UAAU,CAAY;QAItB,mBAAc,GAAd,cAAc,CAA4B;QAC1C,kBAAa,GAAb,aAAa,CAAe;QAC5B,oCAA+B,GAA/B,+BAA+B,CAAiC;IAGnF,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,MAAW,EACX,YAAsB,EACtB,gBAAgB,EAChB,kBAAkB;QAElB,IAAI,CAAC,MAAM,EAAE,MAAM;YAAE,OAAO;QAG5B,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE/D,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;gBACzB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC9C,
|
|
1
|
+
{"version":3,"file":"action-data.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/action-data.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,qEAAgE;AAChE,qCAA2D;AAE3D,iEAA4D;AAC5D,gGAAwF;AACxF,uEAAsE;AACtE,2CAA+C;AAC/C,iCAA0B;AAC1B,6HAA4H;AAGrH,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,+CAAiB;IACzD,YAEmB,cAA4C,EAC5C,UAAsB,EAItB,cAA0C,EAC1C,aAA4B,EAC5B,+BAAgE;QAEjF,KAAK,EAAE,CAAC;QATS,mBAAc,GAAd,cAAc,CAA8B;QAC5C,eAAU,GAAV,UAAU,CAAY;QAItB,mBAAc,GAAd,cAAc,CAA4B;QAC1C,kBAAa,GAAb,aAAa,CAAe;QAC5B,oCAA+B,GAA/B,+BAA+B,CAAiC;IAGnF,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,MAAW,EACX,YAAsB,EACtB,gBAAgB,EAChB,kBAAkB;QAElB,IAAI,CAAC,MAAM,EAAE,MAAM;YAAE,OAAO;QAG5B,MAAM,WAAW,GAAG,I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AM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAEvD,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;YACvC,MAAM,IAAI,4BAAmB,CAC3B,yDAAyD,CAC1D,CAAC;QACJ,CAAC;QAED,IAAI,YAAoB,CAAC;QAEzB,IAAI,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC/C,YAAY,GAAG,OAAO,CAAC;QACzB,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAEtD,YAAY,GAAG,WAAW,QAAQ,IAAI,SAAS,EAAE,CAAC;QACpD,CAAC;aAAM,CAAC;YACN,YAAY,GAAG,OAAO,CAAC;QACzB,CAAC;QAED,MAAM,OAAO,GAAG,GAAG,YAAY,SAAS,kBAAkB,IAAI,gBAAgB,IAAI,OAAO,EAAE,CAAC;QAE5F,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AAhUY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,qCAAgB,CAAC,CAAA;IAKlC,WAAA,IAAA,0BAAgB,EAAC,iCAAc,CAAC,CAAA;qCAJA,oBAAU;QACd,oBAAU;QAIN,oBAAU;QACX,sBAAa;QACK,oEAA+B;GAVxE,oBAAoB,CAgUhC"}
|
|
@@ -24,10 +24,10 @@ let ActionRepository = class ActionRepository {
|
|
|
24
24
|
}
|
|
25
25
|
async getReasonCode(loggedInUser) {
|
|
26
26
|
const { organization_id } = loggedInUser;
|
|
27
|
-
const result = await this.dataSource.query(`
|
|
28
|
-
SELECT name, type
|
|
29
|
-
FROM frm_list_master
|
|
30
|
-
WHERE organization_id =
|
|
27
|
+
const result = await this.dataSource.query(`
|
|
28
|
+
SELECT name, type
|
|
29
|
+
FROM frm_list_master
|
|
30
|
+
WHERE organization_id = ? AND source = 'master'
|
|
31
31
|
`, [organization_id]);
|
|
32
32
|
const formatted = result.map((item) => ({
|
|
33
33
|
label: item.name,
|
|
@@ -40,10 +40,10 @@ let ActionRepository = class ActionRepository {
|
|
|
40
40
|
if (!list_type) {
|
|
41
41
|
throw new common_1.BadRequestException('list_type is required');
|
|
42
42
|
}
|
|
43
|
-
const result = await this.dataSource.query(`
|
|
44
|
-
SELECT name, id
|
|
45
|
-
FROM frm_list_master_items
|
|
46
|
-
WHERE listtype =
|
|
43
|
+
const result = await this.dataSource.query(`
|
|
44
|
+
SELECT name, id
|
|
45
|
+
FROM frm_list_master_items
|
|
46
|
+
WHERE listtype = ? AND organization_id = ?
|
|
47
47
|
`, [list_type, organization_id]);
|
|
48
48
|
return result.map((row) => ({
|
|
49
49
|
label: row.name,
|
|
@@ -52,19 +52,19 @@ let ActionRepository = class ActionRepository {
|
|
|
52
52
|
}
|
|
53
53
|
async getActions(loggedInUser, stage_id) {
|
|
54
54
|
const { organization_id } = loggedInUser;
|
|
55
|
-
const stageActions = await this.dataSource.query(`
|
|
56
|
-
SELECT id, action_id
|
|
57
|
-
FROM frm_wf_stage_action_mapping
|
|
58
|
-
WHERE stage_id =
|
|
55
|
+
const stageActions = await this.dataSource.query(`
|
|
56
|
+
SELECT id, action_id
|
|
57
|
+
FROM frm_wf_stage_action_mapping
|
|
58
|
+
WHERE stage_id = ?
|
|
59
59
|
`, [stage_id]);
|
|
60
60
|
if (!stageActions?.length)
|
|
61
61
|
return [];
|
|
62
62
|
const actionIds = stageActions.map((sa) => sa.action_id);
|
|
63
63
|
const mappingIds = stageActions.map((sa) => sa.id);
|
|
64
|
-
const templateMappings = await this.dataSource.query(`
|
|
65
|
-
SELECT stg_act_mapping_id, template_code
|
|
66
|
-
FROM frm_wf_action_template_mapping
|
|
67
|
-
WHERE stg_act_mapping_id IN (${mappingIds.map(() => '?').join(',')})
|
|
64
|
+
const templateMappings = await this.dataSource.query(`
|
|
65
|
+
SELECT stg_act_mapping_id, template_code
|
|
66
|
+
FROM frm_wf_action_template_mapping
|
|
67
|
+
WHERE stg_act_mapping_id IN (${mappingIds.map(() => '?').join(',')})
|
|
68
68
|
`, mappingIds);
|
|
69
69
|
const templateCodes = templateMappings.map((tm) => tm.template_code);
|
|
70
70
|
const templateCodeToName = {};
|
|
@@ -127,10 +127,10 @@ let ActionRepository = class ActionRepository {
|
|
|
127
127
|
return enrichedResult;
|
|
128
128
|
}
|
|
129
129
|
async getDependentActions(loggedInUser, stage_id, action_id) {
|
|
130
|
-
const stageActions = await this.dataSource.query(`
|
|
131
|
-
SELECT action_id
|
|
132
|
-
FROM frm_wf_stage_action_mapping
|
|
133
|
-
WHERE stage_id =
|
|
130
|
+
const stageActions = await this.dataSource.query(`
|
|
131
|
+
SELECT action_id
|
|
132
|
+
FROM frm_wf_stage_action_mapping
|
|
133
|
+
WHERE stage_id = ?
|
|
134
134
|
`, [stage_id]);
|
|
135
135
|
if (!stageActions?.length)
|
|
136
136
|
return [];
|
|
@@ -155,7 +155,7 @@ let ActionRepository = class ActionRepository {
|
|
|
155
155
|
return enrichedResult;
|
|
156
156
|
}
|
|
157
157
|
async getAction(organization_id, stage_id, mapped_entity_id, mapped_entity_type) {
|
|
158
|
-
const stageActions = await this.dataSource.query(`SELECT id, action_id FROM frm_wf_stage_action_mapping WHERE stage_id =
|
|
158
|
+
const stageActions = await this.dataSource.query(`SELECT id, action_id FROM frm_wf_stage_action_mapping WHERE stage_id = ?`, [stage_id]);
|
|
159
159
|
if (!stageActions?.length) {
|
|
160
160
|
return [
|
|
161
161
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/action.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,6CAAmD;AACnD,q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AiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,aAAa,GAAG,MAAM,IAAI,CAAC,UAAU;aAClC,kBAAkB,EAAE;aACpB,MAAM,CAAC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;aACtD,IAAI,CAAC,eAAe,EAAE,GAAG,CAAC;aAC1B,QAAQ,CAAC,wBAAwB,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;aACpE,UAAU,EAAE,CAAC;QAGhB,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACjD,KAAK,EAAE,GAAG,CAAC,SAAS;YACpB,KAAK,EAAE,GAAG,CAAC,WAAW;SACvB,CAAC,CAAC,CAAC;QAEJ,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,SAAS,CACb,eAAuB,EACvB,QAAgB,EAChB,gBAAwB,EACxB,kBAA0B;QAG1B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC9C,
|
|
1
|
+
{"version":3,"file":"action.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/action.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,6CAAmD;AACnD,qCAAiD;AACjD,2DAAuD;AAIhD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEmB,gBAA0C,EAC1C,UAAsB;QADtB,qBAAgB,GAAhB,gBAAgB,CAA0B;QAC1C,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,aAAa,CAAC,YAAsB;QACxC,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QACzC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACxC;;;;QAIE,EACF,CAAC,eAAe,CAAC,CAClB,CAAC;QAEF,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AAE,GAAG,CAAC,IAAI;gBACd,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,IAAI,EAAE,GAAG,CAAC,oBAAoB;gBAC9B,WAAW;gBACX,mBAAmB,EAAE,GAAG,CAAC,mBAAmB;gBAC5C,UAAU,EAAE,GAAG,CAAC,aAAa,KAAK,CAAC;gBACnC,UAAU,EAAE,IAAI,EAAE,UAAU,IAAI,KAAK;gBACrC,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,KAAK;gBAC/B,YAAY,EAAE,IAAI,EAAE,YAAY,IAAI,KAAK;aAC1C,CAAC;QACJ,CAAC,CAAC,CAAC;QAGH,cAAc,CAAC,IAAI,CAAC;YAClB,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,SAAS;SACV,CAAC,CAAC;QAEV,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAtTY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,4BAAY,CAAC,CAAA;qCACI,oBAAU;QAChB,oBAAU;GAJ9B,gBAAgB,CAsT5B"}
|
|
@@ -30,18 +30,18 @@ let CommTemplateRepository = class CommTemplateRepository {
|
|
|
30
30
|
const { organization_id, level_id, level_type } = loggedInUser;
|
|
31
31
|
let is_template;
|
|
32
32
|
if (action_id) {
|
|
33
|
-
const [actionResult] = await this.dataSource.query(`SELECT is_template
|
|
34
|
-
FROM frm_wf_action
|
|
35
|
-
WHERE id =
|
|
33
|
+
const [actionResult] = await this.dataSource.query(`SELECT is_template
|
|
34
|
+
FROM frm_wf_action
|
|
35
|
+
WHERE id = ? AND organization_id = ?
|
|
36
36
|
LIMIT 1`, [action_id, organization_id]);
|
|
37
37
|
if (!actionResult) {
|
|
38
38
|
throw new Error('Invalid action_id');
|
|
39
39
|
}
|
|
40
40
|
is_template = actionResult.is_template;
|
|
41
|
-
await this.dataSource.query(`UPDATE frm_wf_comm_template
|
|
42
|
-
SET is_template =
|
|
43
|
-
WHERE mapped_entity_type =
|
|
44
|
-
AND organization_id =
|
|
41
|
+
await this.dataSource.query(`UPDATE frm_wf_comm_template
|
|
42
|
+
SET is_template = ?
|
|
43
|
+
WHERE mapped_entity_type = ?
|
|
44
|
+
AND organization_id = ? AND level_id = ? AND level_type=?`, [is_template, entity_type, organization_id, level_id, level_type]);
|
|
45
45
|
}
|
|
46
46
|
const whereCondition = {
|
|
47
47
|
organization_id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comm-template.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/comm-template.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAiD;AACjD,yEAA8D;AAC9D,2FAAyE;AACzE,8EAA8E;AAGvE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,sBAAgD,EAEhD,oBAAgD,EAChD,gBAAkC,EAClC,UAAsB;QAJtB,2BAAsB,GAAtB,sBAAsB,CAA0B;QAEhD,yBAAoB,GAApB,oBAAoB,CAA4B;QAChD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CACtB,WAAmB,EACnB,SAAkB,EAClB,YAAa;QAEb,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,YAAY,CAAC;QAE/D,IAAI,WAA+B,CAAC;QAGpC,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAChD;;;eAGO,EACP,CAAC,SAAS,EAAE,eAAe,CAAC,CAC7B,CAAC;YAEF,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;YAED,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;YAEvC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzB;;;
|
|
1
|
+
{"version":3,"file":"comm-template.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/comm-template.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAiD;AACjD,yEAA8D;AAC9D,2FAAyE;AACzE,8EAA8E;AAGvE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,sBAAgD,EAEhD,oBAAgD,EAChD,gBAAkC,EAClC,UAAsB;QAJtB,2BAAsB,GAAtB,sBAAsB,CAA0B;QAEhD,yBAAoB,GAApB,oBAAoB,CAA4B;QAChD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CACtB,WAAmB,EACnB,SAAkB,EAClB,YAAa;QAEb,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,YAAY,CAAC;QAE/D,IAAI,WAA+B,CAAC;QAGpC,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAChD;;;eAGO,EACP,CAAC,SAAS,EAAE,eAAe,CAAC,CAC7B,CAAC;YAEF,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;YAED,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;YAEvC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzB;;;iEAGyD,EACzD,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,CAAC,CAClE,CAAC;QACJ,CAAC;QAED,MAAM,cAAc,GAAQ;YAE1B,eAAe;YACf,QAAQ;YACR,UAAU;SACX,CAAC;QAEF,IAAI,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,CAAC;YACpB,KAAK,EAAE;gBACL,WAAW;gBACX,WAAW,EAAE,QAAQ,CAAC,EAAE;aACzB;SACF,CAAC,CAAC;QAGH,IAAI,gBAAgB,GAAU,EAAE,CAAC;QACjC,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,gBAAgB,GAAG,MAAM,OAAO,CAAC,GAAG,CAClC,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBAE5B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAC3D,GAAG,CAAC,QAAQ,EACZ,YAAY,CACb,CAAC;gBACF,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CACH,CAAC;QACJ,CAAC;QAGD,OAAO;YACL,GAAG,QAAQ;YACX,WAAW,EAAE,gBAAgB;SAC9B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,0CAA0C,CAAC,IAAY,EAAE,QAAgB,EAC9B,UAAkB,EAAE,OAAe;QAClF,OAAO,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC;YAC/C,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAC;SAC7C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5IY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,8CAAc,CAAC,CAAA;qCADQ,oBAAU;QAEZ,oBAAU;QACd,qCAAgB;QACtB,oBAAU;GAP9B,sBAAsB,CA4IlC"}
|
|
@@ -17,9 +17,9 @@ let FormMasterRepository = class FormMasterRepository {
|
|
|
17
17
|
this.dataSource = dataSource;
|
|
18
18
|
}
|
|
19
19
|
async getForms(organization_id, source_entity_type) {
|
|
20
|
-
const forms = await this.dataSource.query(`SELECT fm.id as fm_id, fm.name as fm_form_name
|
|
21
|
-
FROM frm_entity_view fm
|
|
22
|
-
WHERE fm.organization_id =
|
|
20
|
+
const forms = await this.dataSource.query(`SELECT fm.id as fm_id, fm.name as fm_form_name
|
|
21
|
+
FROM frm_entity_view fm
|
|
22
|
+
WHERE fm.organization_id = ? AND fm.mapped_entity_type = ?`, [organization_id, source_entity_type]);
|
|
23
23
|
const formatted = forms.map((form) => ({
|
|
24
24
|
label: form.fm_form_name,
|
|
25
25
|
value: form.fm_id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-master.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/form-master.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AAExB,qCAAiD;AAK1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAGtC,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,eAAuB,EAAE,kBAA0B;QAChE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACvC;;
|
|
1
|
+
{"version":3,"file":"form-master.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/form-master.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AAExB,qCAAiD;AAK1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAGtC,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,eAAuB,EAAE,kBAA0B;QAChE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACvC;;kEAE4D,EAC5D,CAAC,eAAe,EAAE,kBAAkB,CAAC,CACtC,CAAC;QAEF,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC;YAC1C,KAAK,EAAE,IAAI,CAAC,YAAY;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC,CAAC;QAEJ,OAAO,SAAS,CAAC;IACnB,CAAC;IASD,KAAK,CAAC,UAAU,CAAC,aAAkB,EAAE,YAAsB;QAczD,OAAO,uEAAuE,CAAC;IACjF,CAAC;CACF,CAAA;AA9CY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAGoB,oBAAU;GAF9B,oBAAoB,CA8ChC"}
|
|
@@ -67,33 +67,33 @@ let StageGroupRepository = class StageGroupRepository {
|
|
|
67
67
|
if (!stageGroups.length)
|
|
68
68
|
return [];
|
|
69
69
|
const stageGroupIds = stageGroups.map((sg) => sg.id);
|
|
70
|
-
const stagesRaw = await this.dataSource.query(`
|
|
71
|
-
SELECT
|
|
72
|
-
frm_wf_stage.*
|
|
73
|
-
FROM frm_wf_stage
|
|
74
|
-
WHERE frm_wf_stage.stage_group_id IN (${stageGroupIds.map(() => '?').join(',')})
|
|
75
|
-
AND frm_wf_stage.organization_id =
|
|
76
|
-
ORDER BY frm_wf_stage.sequence ASC
|
|
70
|
+
const stagesRaw = await this.dataSource.query(`
|
|
71
|
+
SELECT
|
|
72
|
+
frm_wf_stage.*
|
|
73
|
+
FROM frm_wf_stage
|
|
74
|
+
WHERE frm_wf_stage.stage_group_id IN (${stageGroupIds.map(() => '?').join(',')})
|
|
75
|
+
AND frm_wf_stage.organization_id = ?
|
|
76
|
+
ORDER BY frm_wf_stage.sequence ASC
|
|
77
77
|
`, [...stageGroupIds, loggedInUser.organization_id]);
|
|
78
78
|
const stageIds = stagesRaw.map((s) => s.id);
|
|
79
|
-
const taskCounts = await this.dataSource.query(`
|
|
80
|
-
SELECT stage_id, COUNT(*) AS task_count
|
|
81
|
-
FROM frm_wf_task_data
|
|
82
|
-
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND is_system=0 AND mapped_entity_id =
|
|
83
|
-
GROUP BY stage_id
|
|
79
|
+
const taskCounts = await this.dataSource.query(`
|
|
80
|
+
SELECT stage_id, COUNT(*) AS task_count
|
|
81
|
+
FROM frm_wf_task_data
|
|
82
|
+
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND is_system=0 AND mapped_entity_id = ?
|
|
83
|
+
GROUP BY stage_id
|
|
84
84
|
`, [...stageIds, lead_id]);
|
|
85
|
-
const meetingCounts = await this.dataSource.query(`
|
|
86
|
-
SELECT stage_id, COUNT(*) AS meeting_count
|
|
87
|
-
FROM crm_lead_meeting
|
|
88
|
-
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id =
|
|
89
|
-
GROUP BY stage_id
|
|
85
|
+
const meetingCounts = await this.dataSource.query(`
|
|
86
|
+
SELECT stage_id, COUNT(*) AS meeting_count
|
|
87
|
+
FROM crm_lead_meeting
|
|
88
|
+
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = ?
|
|
89
|
+
GROUP BY stage_id
|
|
90
90
|
`, [...stageIds, lead_id]);
|
|
91
|
-
const sendCommCounts = await this.dataSource.query(`
|
|
92
|
-
SELECT stage_id, COUNT(*) AS send_comm_count
|
|
93
|
-
FROM crm_lead_communication
|
|
94
|
-
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id =
|
|
95
|
-
AND type IN ('SEND', 'LOG')
|
|
96
|
-
GROUP BY stage_id
|
|
91
|
+
const sendCommCounts = await this.dataSource.query(`
|
|
92
|
+
SELECT stage_id, COUNT(*) AS send_comm_count
|
|
93
|
+
FROM crm_lead_communication
|
|
94
|
+
WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = ?
|
|
95
|
+
AND type IN ('SEND', 'LOG')
|
|
96
|
+
GROUP BY stage_id
|
|
97
97
|
`, [...stageIds, lead_id]);
|
|
98
98
|
const taskCountMap = new Map(taskCounts.map((row) => [Number(row.stage_id), Number(row.task_count)]));
|
|
99
99
|
const meetingCountMap = new Map(meetingCounts.map((row) => [
|
|
@@ -107,24 +107,24 @@ let StageMovementRepository = class StageMovementRepository {
|
|
|
107
107
|
return nextStageGroupFirstStage || null;
|
|
108
108
|
}
|
|
109
109
|
async getAllActionByStageId(stageId) {
|
|
110
|
-
const result = await this.dataSource.query(`
|
|
111
|
-
SELECT
|
|
112
|
-
a.*,
|
|
113
|
-
m.id AS mapping_id,
|
|
114
|
-
m.stage_id,
|
|
115
|
-
ac.code AS action_category_code
|
|
116
|
-
FROM frm_wf_action a
|
|
117
|
-
LEFT JOIN frm_wf_stage_action_mapping m ON a.id = m.action_id
|
|
118
|
-
LEFT JOIN frm_wf_action_category ac ON a.action_category = ac.id
|
|
119
|
-
WHERE m.stage_id =
|
|
110
|
+
const result = await this.dataSource.query(`
|
|
111
|
+
SELECT
|
|
112
|
+
a.*,
|
|
113
|
+
m.id AS mapping_id,
|
|
114
|
+
m.stage_id,
|
|
115
|
+
ac.code AS action_category_code
|
|
116
|
+
FROM frm_wf_action a
|
|
117
|
+
LEFT JOIN frm_wf_stage_action_mapping m ON a.id = m.action_id
|
|
118
|
+
LEFT JOIN frm_wf_action_category ac ON a.action_category = ac.id
|
|
119
|
+
WHERE m.stage_id = ?
|
|
120
120
|
`, [stageId]);
|
|
121
121
|
for (const item of result) {
|
|
122
122
|
if (item.action_category_code === 'SDFM') {
|
|
123
|
-
const actionData = await this.dataSource.query(`
|
|
124
|
-
SELECT arm.form_id
|
|
125
|
-
FROM frm_wf_action_resources_mapping arm
|
|
126
|
-
WHERE arm.stg_act_mapping_id =
|
|
127
|
-
LIMIT 1
|
|
123
|
+
const actionData = await this.dataSource.query(`
|
|
124
|
+
SELECT arm.form_id
|
|
125
|
+
FROM frm_wf_action_resources_mapping arm
|
|
126
|
+
WHERE arm.stg_act_mapping_id = ? and form_id IS NOT NULL
|
|
127
|
+
LIMIT 1
|
|
128
128
|
`, [item.mapping_id]);
|
|
129
129
|
item.form_id = actionData[0]?.form_id || null;
|
|
130
130
|
}
|
|
@@ -134,14 +134,14 @@ let StageMovementRepository = class StageMovementRepository {
|
|
|
134
134
|
async saveActionData(action, loggedInUser) {
|
|
135
135
|
if (action.length > 0) {
|
|
136
136
|
for (const act of action) {
|
|
137
|
-
await this.dataSource.query(`INSERT INTO frm_wf_action_data (stage_id, user_id, action_id) VALUES (
|
|
137
|
+
await this.dataSource.query(`INSERT INTO frm_wf_action_data (stage_id, user_id, action_id) VALUES (?, ?, ?)`, [act.stage_id, loggedInUser.id, act.id]);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
async saveTaskData(actionData, loggedInUser) {
|
|
142
142
|
if (actionData.length > 0) {
|
|
143
143
|
for (const action of actionData) {
|
|
144
|
-
await this.dataSource.query(`INSERT INTO frm_wf_task_data (action_id, user_id) VALUES (
|
|
144
|
+
await this.dataSource.query(`INSERT INTO frm_wf_task_data (action_id, user_id) VALUES (?, ?)`, [action.id, loggedInUser.id]);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-movement.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage-movement.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAA2D;AAC3D,2FAAqF;AACrF,qEAA0D;AAC1D,yDAA+C;AAKxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAEmB,wBAAgE,EAEhE,cAAsC,EAEtC,SAA4B,EAC5B,UAAsB;QALtB,6BAAwB,GAAxB,wBAAwB,CAAwC;QAEhE,mBAAc,GAAd,cAAc,CAAwB;QAEtC,cAAS,GAAT,SAAS,CAAmB;QAC5B,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,aAAa,CAAC,EAClB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GAKjB;QAEC,IAAI,oBAAoB,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC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-movement.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage-movement.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAA2D;AAC3D,2FAAqF;AACrF,qEAA0D;AAC1D,yDAA+C;AAKxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAEmB,wBAAgE,EAEhE,cAAsC,EAEtC,SAA4B,EAC5B,UAAsB;QALtB,6BAAwB,GAAxB,wBAAwB,CAAwC;QAEhE,mBAAc,GAAd,cAAc,CAAwB;QAEtC,cAAS,GAAT,SAAS,CAAmB;QAC5B,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,aAAa,CAAC,EAClB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GAKjB;QAEC,IAAI,oBAAoB,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC;YACrE,KAAK,EAAE;gBACL,iBAAiB,EAAE,YAAY,CAAC,UAAU;gBAC1C,eAAe,EAAE,YAAY,CAAC,QAAQ;aACvC;SACF,CAAC,CAAC;QAGH,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,oBAAoB,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC;gBACjE,KAAK,EAAE;oBACL,iBAAiB,EAAE,KAAK;oBACxB,eAAe,EAAE,YAAY,CAAC,eAAe;iBAC9C;aACF,CAAC,CAAC;QACL,CAAC;QAGD,IAAI,CAAC,oBAAoB;YAAE,OAAO,IAAI,CAAC;QAGvC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YACnD,KAAK,EAAE;gBACL,WAAW,EAAE,oBAAoB,CAAC,WAAW;aAC9C;YACD,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE;SACrB,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAG7B,MA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HmB,oBAAU;QAEpB,oBAAU;QAEf,oBAAU;QACT,oBAAU;GAR9B,uBAAuB,CAwOnC"}
|
|
@@ -62,14 +62,14 @@ let StageRepository = class StageRepository {
|
|
|
62
62
|
if (!stageGroup) {
|
|
63
63
|
return [];
|
|
64
64
|
}
|
|
65
|
-
const rows = await this.dataSource.query(`
|
|
66
|
-
SELECT
|
|
67
|
-
g.id as stage_group_id, g.name as stage_group_name, g.workflow_id,
|
|
68
|
-
s.*
|
|
69
|
-
FROM frm_wf_stage_group g
|
|
70
|
-
INNER JOIN frm_wf_stage s ON s.stage_group_id = g.id
|
|
71
|
-
WHERE g.workflow_id =
|
|
72
|
-
ORDER BY g.id, s.id
|
|
65
|
+
const rows = await this.dataSource.query(`
|
|
66
|
+
SELECT
|
|
67
|
+
g.id as stage_group_id, g.name as stage_group_name, g.workflow_id,
|
|
68
|
+
s.*
|
|
69
|
+
FROM frm_wf_stage_group g
|
|
70
|
+
INNER JOIN frm_wf_stage s ON s.stage_group_id = g.id
|
|
71
|
+
WHERE g.workflow_id = ? AND g.organization_id = ? AND g.id = ?
|
|
72
|
+
ORDER BY g.id, s.id
|
|
73
73
|
`, [stageGroup.workflow_id, organization_id, stage_group_id]);
|
|
74
74
|
if (!rows || rows.length === 0) {
|
|
75
75
|
return [];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { TaskDataEntity } from '../entity/task-data.entity';
|
|
2
2
|
import { DataSource, Repository } from 'typeorm';
|
|
3
|
+
import { EntityDynamicService } from 'src/module/meta/service/entity-dynamic.service';
|
|
3
4
|
export declare class TaskRepository {
|
|
4
5
|
private readonly TaskRepository;
|
|
6
|
+
private readonly entityDynamicService;
|
|
5
7
|
private readonly dataSource;
|
|
6
|
-
constructor(TaskRepository: Repository<TaskDataEntity>, dataSource: DataSource);
|
|
8
|
+
constructor(TaskRepository: Repository<TaskDataEntity>, entityDynamicService: EntityDynamicService, dataSource: DataSource);
|
|
7
9
|
getAllTaskByUserIdAndStageId(condition: any): Promise<TaskDataEntity[]>;
|
|
8
10
|
saveActionDataInTask(action: any, loggedInUser: any, mapped_entity_id: number, mapped_entity_type: string): Promise<any>;
|
|
9
11
|
updateTaskStatus(loggedInUser: any, mapped_entity_type: any, mapped_entity_id: any, stage_id: any, action_id: any): Promise<any>;
|
|
@@ -17,9 +17,11 @@ const common_1 = require("@nestjs/common");
|
|
|
17
17
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
18
|
const task_data_entity_1 = require("../entity/task-data.entity");
|
|
19
19
|
const typeorm_2 = require("typeorm");
|
|
20
|
+
const entity_dynamic_service_1 = require("../../meta/service/entity-dynamic.service");
|
|
20
21
|
let TaskRepository = class TaskRepository {
|
|
21
|
-
constructor(TaskRepository, dataSource) {
|
|
22
|
+
constructor(TaskRepository, entityDynamicService, dataSource) {
|
|
22
23
|
this.TaskRepository = TaskRepository;
|
|
24
|
+
this.entityDynamicService = entityDynamicService;
|
|
23
25
|
this.dataSource = dataSource;
|
|
24
26
|
}
|
|
25
27
|
async getAllTaskByUserIdAndStageId(condition) {
|
|
@@ -33,11 +35,11 @@ let TaskRepository = class TaskRepository {
|
|
|
33
35
|
async saveActionDataInTask(action, loggedInUser, mapped_entity_id, mapped_entity_type) {
|
|
34
36
|
if (!action?.length)
|
|
35
37
|
return;
|
|
36
|
-
const todoListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'in_progress' and organization_id =
|
|
37
|
-
const leadData = await this.dataSource.query(`SELECT * FROM crm_lead WHERE id =
|
|
38
|
+
const todoListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'in_progress' and organization_id = ? and listtype = 'TKST' LIMIT 1;`, [loggedInUser.organization_id]);
|
|
39
|
+
const leadData = await this.dataSource.query(`SELECT * FROM crm_lead WHERE id = ?`, [mapped_entity_id]);
|
|
38
40
|
if (action.length > 0) {
|
|
39
41
|
for (const act of action) {
|
|
40
|
-
const is_mandatory = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id =
|
|
42
|
+
const is_mandatory = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id = ? and organization_id = ? LIMIT 1;`, [act.action_requirement, loggedInUser.organization_id]);
|
|
41
43
|
const now = new Date();
|
|
42
44
|
const dueDateTime = new Date(now);
|
|
43
45
|
dueDateTime.setDate(dueDateTime.getDate() + 2);
|
|
@@ -53,6 +55,7 @@ let TaskRepository = class TaskRepository {
|
|
|
53
55
|
const due_date = istFormatterDate.format(dueDateTime);
|
|
54
56
|
const due_time = istFormatterTime.format(dueDateTime);
|
|
55
57
|
console.log({ due_date, due_time });
|
|
58
|
+
const taskCode = await this.entityDynamicService.getCode('TASK', loggedInUser);
|
|
56
59
|
const taskData = this.TaskRepository.create({
|
|
57
60
|
stage_id: act.stage_id,
|
|
58
61
|
user_id: loggedInUser.id,
|
|
@@ -71,6 +74,7 @@ let TaskRepository = class TaskRepository {
|
|
|
71
74
|
status: todoListMasterItemId[0]?.id,
|
|
72
75
|
category: act?.action_category_code,
|
|
73
76
|
task_owner: leadData[0]?.lead_owner,
|
|
77
|
+
code: taskCode,
|
|
74
78
|
});
|
|
75
79
|
await this.TaskRepository.save(taskData);
|
|
76
80
|
}
|
|
@@ -85,7 +89,7 @@ let TaskRepository = class TaskRepository {
|
|
|
85
89
|
});
|
|
86
90
|
if (!task)
|
|
87
91
|
return;
|
|
88
|
-
const completedListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'completed' and organization_id =
|
|
92
|
+
const completedListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'completed' and organization_id = ? and listtype = 'TKST' LIMIT 1;`, [loggedInUser.organization_id]);
|
|
89
93
|
task.modified_by = loggedInUser.id;
|
|
90
94
|
task.modified_date = new Date();
|
|
91
95
|
task.is_done = true;
|
|
@@ -98,6 +102,7 @@ exports.TaskRepository = TaskRepository = __decorate([
|
|
|
98
102
|
(0, common_1.Injectable)(),
|
|
99
103
|
__param(0, (0, typeorm_1.InjectRepository)(task_data_entity_1.TaskDataEntity)),
|
|
100
104
|
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
105
|
+
entity_dynamic_service_1.EntityDynamicService,
|
|
101
106
|
typeorm_2.DataSource])
|
|
102
107
|
], TaskRepository);
|
|
103
108
|
//# sourceMappingURL=task.repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/task.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,iEAA4D;AAC5D,qCAAiD;
|
|
1
|
+
{"version":3,"file":"task.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/task.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,iEAA4D;AAC5D,qCAAiD;AACjD,sFAAsF;AAG/E,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,cAA0C,EAC1C,oBAA0C,EAC1C,UAAsB;QAFtB,mBAAc,GAAd,cAAc,CAA4B;QAC1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,4BAA4B,CAAC,SAAS;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YAC5C,KAAK,EAAE;gBACL,GAAG,SAAS;aACb;SACF,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,MAAW,EACX,YAAY,EACZ,gBAAwB,EACxB,kBAA0B;QAE1B,IAAI,CAAC,MAAM,EAAE,MAAM;YAAE,OAAO;QAE5B,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACtD,wHAAwH,EACxH,CAAC,YAAY,CAAC,eAAe,CAAC,C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AAI,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,yBAAyB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAE/C,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AA9HY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,iCAAc,CAAC,CAAA;qCACA,oBAAU;QACJ,6CAAoB;QAC9B,oBAAU;GAL9B,cAAc,CA8H1B"}
|
|
@@ -21,26 +21,26 @@ let ActionTemplateMappingService = class ActionTemplateMappingService extends en
|
|
|
21
21
|
async getTemplateByMode(stage_id, action_id, loggedInUser, mode) {
|
|
22
22
|
let stageAction = [];
|
|
23
23
|
if (action_id != 0) {
|
|
24
|
-
stageAction = await this.dataSource.query(`
|
|
25
|
-
SELECT id FROM frm_wf_stage_action_mapping
|
|
26
|
-
WHERE action_id =
|
|
24
|
+
stageAction = await this.dataSource.query(`
|
|
25
|
+
SELECT id FROM frm_wf_stage_action_mapping
|
|
26
|
+
WHERE action_id = ?
|
|
27
27
|
`, [action_id]);
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
30
|
let modeId = mode;
|
|
31
31
|
if (!modeId) {
|
|
32
|
-
const rows = await this.dataSource.query(`
|
|
33
|
-
SELECT id
|
|
34
|
-
FROM frm_list_master_items
|
|
35
|
-
WHERE organization_id =
|
|
36
|
-
AND listtype = "MOD" AND code =
|
|
32
|
+
const rows = await this.dataSource.query(`
|
|
33
|
+
SELECT id
|
|
34
|
+
FROM frm_list_master_items
|
|
35
|
+
WHERE organization_id = ?
|
|
36
|
+
AND listtype = "MOD" AND code = ?
|
|
37
37
|
`, [loggedInUser.organization_id, 'email']);
|
|
38
38
|
modeId = rows?.[0]?.id ?? 0;
|
|
39
39
|
}
|
|
40
|
-
const commTemplates = await this.dataSource.query(`
|
|
41
|
-
SELECT code as value, name as label , id
|
|
42
|
-
FROM frm_wf_comm_template
|
|
43
|
-
WHERE mode =
|
|
40
|
+
const commTemplates = await this.dataSource.query(`
|
|
41
|
+
SELECT code as value, name as label , id
|
|
42
|
+
FROM frm_wf_comm_template
|
|
43
|
+
WHERE mode = ? AND organization_id = ? AND level_type = ? AND level_id = ? AND status IN (SELECT id FROM frm_list_master_items WHERE code = "STATUS_ACTIVE" AND organization_id = ?)
|
|
44
44
|
`, [
|
|
45
45
|
modeId,
|
|
46
46
|
loggedInUser.organization_id,
|
|
@@ -54,23 +54,23 @@ let ActionTemplateMappingService = class ActionTemplateMappingService extends en
|
|
|
54
54
|
return [];
|
|
55
55
|
const stgActMappingId = stageAction[0].id;
|
|
56
56
|
if (!mode) {
|
|
57
|
-
const getModeFromAction = await this.dataSource.query(`
|
|
58
|
-
SELECT mode FROM frm_wf_action
|
|
59
|
-
WHERE id =
|
|
57
|
+
const getModeFromAction = await this.dataSource.query(`
|
|
58
|
+
SELECT mode FROM frm_wf_action
|
|
59
|
+
WHERE id = ?
|
|
60
60
|
`, [action_id]);
|
|
61
61
|
mode = getModeFromAction[0]?.mode;
|
|
62
62
|
}
|
|
63
|
-
const templates = await this.dataSource.query(`
|
|
64
|
-
SELECT template_code FROM frm_wf_action_resources_mapping
|
|
65
|
-
WHERE stg_act_mapping_id =
|
|
63
|
+
const templates = await this.dataSource.query(`
|
|
64
|
+
SELECT template_code FROM frm_wf_action_resources_mapping
|
|
65
|
+
WHERE stg_act_mapping_id = ?
|
|
66
66
|
`, [stgActMappingId]);
|
|
67
67
|
const templateCodes = templates.map((t) => t.template_code);
|
|
68
68
|
if (!templateCodes.length)
|
|
69
69
|
return [];
|
|
70
|
-
const commTemplates = await this.dataSource.query(`
|
|
71
|
-
SELECT code as value, name as label , id
|
|
72
|
-
FROM frm_wf_comm_template
|
|
73
|
-
WHERE code IN (
|
|
70
|
+
const commTemplates = await this.dataSource.query(`
|
|
71
|
+
SELECT code as value, name as label , id
|
|
72
|
+
FROM frm_wf_comm_template
|
|
73
|
+
WHERE code IN (?) AND mode = ? AND organization_id = ? AND level_type = ? AND level_id = ? AND status IN (SELECT id FROM frm_list_master_items WHERE code = "STATUS_ACTIVE" AND organization_id = ?)
|
|
74
74
|
`, [
|
|
75
75
|
templateCodes,
|
|
76
76
|
mode,
|