arco-support-request 0.0.89 → 0.0.91
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/arco-support-request.d.ts +32 -0
- package/arco-support-request.metadata.json +1 -0
- package/bundles/arco-support-request.umd.js +11763 -0
- package/bundles/arco-support-request.umd.js.map +1 -0
- package/bundles/arco-support-request.umd.min.js +2 -0
- package/bundles/arco-support-request.umd.min.js.map +1 -0
- package/esm2015/arco-support-request.js +33 -0
- package/esm2015/lib/Pipe/allpipe.pipe.js +110 -0
- package/esm2015/lib/Pipe/translate.pipe.js +31 -0
- package/esm2015/lib/arco-support-request.component.js +18 -0
- package/esm2015/lib/arco-support-request.module.js +20 -0
- package/esm2015/lib/arco-support-request.service.js +19 -0
- package/esm2015/lib/core/global.service.js +1813 -0
- package/esm2015/lib/core/handlebar-helper-register.js +217 -0
- package/esm2015/lib/core/static/jwt.js +8 -0
- package/esm2015/lib/entity-type-setup/activities-create/activities-create.component.js +128 -0
- package/esm2015/lib/entity-type-setup/activities-view/activities-view.component.js +49 -0
- package/esm2015/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.js +373 -0
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.js +867 -0
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.js +85 -0
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.js +1077 -0
- package/esm2015/lib/entity-type-setup/interface/entityTypeInterface.js +51 -0
- package/esm2015/lib/entity-type-setup/interface/eventEnum.js +84 -0
- package/esm2015/lib/entity-type-setup/page-form-instance.js +65 -0
- package/esm2015/lib/entity-type-setup/page.interface.classes.js +40 -0
- package/esm2015/lib/entity-type-setup/service/entity-type-setup.service.js +1894 -0
- package/esm2015/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.js +321 -0
- package/esm2015/lib/search.pipe.js +19 -0
- package/esm2015/lib/support-request/action/action.component.js +104 -0
- package/esm2015/lib/support-request/case-list/case-list.component.js +438 -0
- package/esm2015/lib/support-request/home/home.component.js +23 -0
- package/esm2015/lib/support-request/pagination/pagination.component.js +34 -0
- package/esm2015/lib/support-request/request-flow/request-flow.component.js +729 -0
- package/esm2015/lib/support-request/self-service-flow/self-service-flow.component.js +86 -0
- package/esm2015/lib/support-request/support-request-create/support-request-create.component.js +273 -0
- package/esm2015/lib/support-request/support-request-details/support-request-details.component.js +631 -0
- package/esm2015/lib/support-request/support-request-index/support-request-index.component.js +16 -0
- package/esm2015/lib/support-request/support-request-routing.module.js +22 -0
- package/esm2015/lib/support-request/support-request.module.js +98 -0
- package/esm2015/lib/support-request/support-request.service.js +107 -0
- package/esm2015/lib/support-request/supportRequestInterface.js +2 -0
- package/esm2015/lib/task/Interfaces/TaskInterface.js +7 -0
- package/esm2015/lib/task/Services/task.service.js +251 -0
- package/esm2015/lib/templates/attachmentsetup/attachment-interface.js +2 -0
- package/esm2015/lib/templates/attachmentsetup/attachment.service.js +196 -0
- package/esm2015/lib/templates/grid/grid-datatype/grid-datatype.component.js +37 -0
- package/esm2015/lib/templates/grid/grid-service.service.js +163 -0
- package/esm2015/lib/templates/grid/grid.component.js +604 -0
- package/esm2015/lib/templates/grid/inner-grid/inner-grid.component.js +15 -0
- package/esm2015/lib/templates/interface_enum/common-Interface.js +2 -0
- package/esm2015/lib/templates/interface_enum/common-enum.js +164 -0
- package/esm2015/lib/ticket/_interfaces/model.js +2 -0
- package/esm2015/lib/ticket/_ticket-services/ticket-api.service.js +232 -0
- package/esm2015/public-api.js +9 -0
- package/fesm2015/arco-support-request.js +11156 -0
- package/fesm2015/arco-support-request.js.map +1 -0
- package/lib/Pipe/allpipe.pipe.d.ts +19 -0
- package/lib/Pipe/translate.pipe.d.ts +7 -0
- package/lib/arco-support-request.component.d.ts +5 -0
- package/lib/arco-support-request.module.d.ts +2 -0
- package/lib/arco-support-request.service.d.ts +9 -0
- package/lib/core/global.service.d.ts +99 -0
- package/lib/core/handlebar-helper-register.d.ts +1 -0
- package/lib/core/static/jwt.d.ts +7 -0
- package/lib/entity-type-setup/activities-create/activities-create.component.d.ts +30 -0
- package/lib/entity-type-setup/activities-view/activities-view.component.d.ts +16 -0
- package/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.d.ts +67 -0
- package/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.d.ts +88 -0
- package/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.d.ts +11 -0
- package/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.d.ts +70 -0
- package/lib/entity-type-setup/interface/entityTypeInterface.d.ts +917 -0
- package/lib/entity-type-setup/interface/eventEnum.d.ts +161 -0
- package/lib/entity-type-setup/page-form-instance.d.ts +13 -0
- package/lib/entity-type-setup/page.interface.classes.d.ts +33 -0
- package/lib/entity-type-setup/service/entity-type-setup.service.d.ts +616 -0
- package/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.d.ts +86 -0
- package/lib/search.pipe.d.ts +4 -0
- package/lib/support-request/action/action.component.d.ts +31 -0
- package/lib/support-request/case-list/case-list.component.d.ts +100 -0
- package/lib/support-request/home/home.component.d.ts +6 -0
- package/lib/support-request/pagination/pagination.component.d.ts +18 -0
- package/lib/support-request/request-flow/request-flow.component.d.ts +152 -0
- package/lib/support-request/self-service-flow/self-service-flow.component.d.ts +32 -0
- package/lib/support-request/support-request-create/support-request-create.component.d.ts +55 -0
- package/lib/support-request/support-request-details/support-request-details.component.d.ts +138 -0
- package/lib/support-request/support-request-index/support-request-index.component.d.ts +5 -0
- package/lib/support-request/support-request-routing.module.d.ts +2 -0
- package/lib/support-request/support-request.module.d.ts +2 -0
- package/lib/support-request/support-request.service.d.ts +35 -0
- package/lib/support-request/supportRequestInterface.d.ts +6 -0
- package/lib/task/Interfaces/TaskInterface.d.ts +132 -0
- package/lib/task/Services/task.service.d.ts +75 -0
- package/lib/templates/attachmentsetup/attachment-interface.d.ts +90 -0
- package/lib/templates/attachmentsetup/attachment.service.d.ts +61 -0
- package/lib/templates/grid/grid-datatype/grid-datatype.component.d.ts +11 -0
- package/lib/templates/grid/grid-service.service.d.ts +46 -0
- package/lib/templates/grid/grid.component.d.ts +218 -0
- package/lib/templates/grid/inner-grid/inner-grid.component.d.ts +5 -0
- package/lib/templates/interface_enum/common-Interface.d.ts +97 -0
- package/lib/templates/interface_enum/common-enum.d.ts +134 -0
- package/lib/ticket/_interfaces/model.d.ts +192 -0
- package/lib/ticket/_ticket-services/ticket-api.service.d.ts +81 -0
- package/package.json +22 -11
- package/{src/public-api.ts → public-api.d.ts} +1 -6
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -18
- package/src/lib/Pipe/allpipe.pipe.ts +0 -127
- package/src/lib/Pipe/handlebar-helper-register.ts +0 -249
- package/src/lib/Pipe/translate.pipe.ts +0 -32
- package/src/lib/all-routing.ts +0 -61
- package/src/lib/arco-support-request.component.spec.ts +0 -25
- package/src/lib/arco-support-request.component.ts +0 -20
- package/src/lib/arco-support-request.module.ts +0 -19
- package/src/lib/arco-support-request.service.spec.ts +0 -16
- package/src/lib/arco-support-request.service.ts +0 -16
- package/src/lib/commonstyles/new-style-rtl.css +0 -380
- package/src/lib/commonstyles/styles.scss +0 -4334
- package/src/lib/core/encodeurl.service.ts +0 -23
- package/src/lib/core/global.service.ts +0 -1859
- package/src/lib/core/handlebar-helper-register.ts +0 -247
- package/src/lib/core/httpcancel.service.ts +0 -21
- package/src/lib/core/loader.service.ts +0 -19
- package/src/lib/core/loading-provider.service.ts +0 -64
- package/src/lib/core/managehttp.interceptor.ts +0 -49
- package/src/lib/core/static/jwt.ts +0 -7
- package/src/lib/core/token.service.ts +0 -37
- package/src/lib/entity-type-setup/activities-create/activities-create.component.html +0 -69
- package/src/lib/entity-type-setup/activities-create/activities-create.component.scss +0 -13
- package/src/lib/entity-type-setup/activities-create/activities-create.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/activities-create/activities-create.component.ts +0 -143
- package/src/lib/entity-type-setup/activities-view/activities-view.component.html +0 -19
- package/src/lib/entity-type-setup/activities-view/activities-view.component.scss +0 -3
- package/src/lib/entity-type-setup/activities-view/activities-view.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/activities-view/activities-view.component.ts +0 -53
- package/src/lib/entity-type-setup/activity-template/activity-template.component.html +0 -73
- package/src/lib/entity-type-setup/activity-template/activity-template.component.scss +0 -0
- package/src/lib/entity-type-setup/activity-template/activity-template.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/activity-template/activity-template.component.ts +0 -208
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.html +0 -356
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.scss +0 -50
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.ts +0 -346
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.html +0 -92
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.scss +0 -90
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.ts +0 -74
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.html +0 -57
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.scss +0 -16
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.ts +0 -59
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.html +0 -102
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.scss +0 -3
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.ts +0 -498
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.html +0 -408
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.scss +0 -123
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.ts +0 -1073
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.ts +0 -84
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.html +0 -194
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.scss +0 -81
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.ts +0 -1526
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.html +0 -137
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.scss +0 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.ts +0 -1353
- package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.html +0 -329
- package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.scss +0 -0
- package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.ts +0 -520
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.html +0 -609
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.scss +0 -99
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.ts +0 -784
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.html +0 -632
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.scss +0 -261
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.ts +0 -765
- package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.html +0 -368
- package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.scss +0 -0
- package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.ts +0 -334
- package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.html +0 -500
- package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.scss +0 -0
- package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.ts +0 -862
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.html +0 -139
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.scss +0 -14
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.ts +0 -347
- package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.html +0 -150
- package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.scss +0 -27
- package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.ts +0 -384
- package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.html +0 -305
- package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.scss +0 -31
- package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.ts +0 -572
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.html +0 -610
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.scss +0 -50
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.ts +0 -633
- package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.html +0 -609
- package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.scss +0 -4
- package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.ts +0 -702
- package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.html +0 -530
- package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.scss +0 -12
- package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.ts +0 -767
- package/src/lib/entity-type-setup/entity-type-setup-routing.module.ts +0 -92
- package/src/lib/entity-type-setup/entity-type-setup.module.ts +0 -114
- package/src/lib/entity-type-setup/events/events.component.html +0 -211
- package/src/lib/entity-type-setup/events/events.component.scss +0 -61
- package/src/lib/entity-type-setup/events/events.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/events/events.component.ts +0 -517
- package/src/lib/entity-type-setup/field-type/field-type.component.html +0 -447
- package/src/lib/entity-type-setup/field-type/field-type.component.scss +0 -0
- package/src/lib/entity-type-setup/field-type/field-type.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/field-type/field-type.component.ts +0 -531
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.html +0 -152
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.scss +0 -24
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.ts +0 -35
- package/src/lib/entity-type-setup/instruction/instruction.component.html +0 -239
- package/src/lib/entity-type-setup/instruction/instruction.component.scss +0 -18
- package/src/lib/entity-type-setup/instruction/instruction.component.ts +0 -450
- package/src/lib/entity-type-setup/interface/entityTypeInterface.ts +0 -1046
- package/src/lib/entity-type-setup/interface/eventEnum.ts +0 -191
- package/src/lib/entity-type-setup/issue-group/issue-group.component.html +0 -77
- package/src/lib/entity-type-setup/issue-group/issue-group.component.scss +0 -0
- package/src/lib/entity-type-setup/issue-group/issue-group.component.ts +0 -221
- package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.html +0 -192
- package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.scss +0 -10
- package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.ts +0 -418
- package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.html +0 -42
- package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.scss +0 -8
- package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.ts +0 -52
- package/src/lib/entity-type-setup/my-task/my-task.component.html +0 -599
- package/src/lib/entity-type-setup/my-task/my-task.component.scss +0 -0
- package/src/lib/entity-type-setup/my-task/my-task.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/my-task/my-task.component.ts +0 -770
- package/src/lib/entity-type-setup/page-form-instance.ts +0 -73
- package/src/lib/entity-type-setup/page.interface.classes.ts +0 -43
- package/src/lib/entity-type-setup/service/dropdown.directive.ts +0 -12
- package/src/lib/entity-type-setup/service/entity-type-setup.service.ts +0 -2901
- package/src/lib/entity-type-setup/task-crete/task-crete.component.html +0 -61
- package/src/lib/entity-type-setup/task-crete/task-crete.component.scss +0 -0
- package/src/lib/entity-type-setup/task-crete/task-crete.component.ts +0 -117
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.html +0 -95
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.scss +0 -23
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.ts +0 -213
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.html +0 -240
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.scss +0 -14
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.spec.ts +0 -25
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.ts +0 -404
- package/src/lib/search.pipe.spec.ts +0 -8
- package/src/lib/search.pipe.ts +0 -21
- package/src/lib/support-request/action/action.component.html +0 -122
- package/src/lib/support-request/action/action.component.scss +0 -6
- package/src/lib/support-request/action/action.component.ts +0 -179
- package/src/lib/support-request/case-list/case-list.component.html +0 -280
- package/src/lib/support-request/case-list/case-list.component.scss +0 -187
- package/src/lib/support-request/case-list/case-list.component.ts +0 -519
- package/src/lib/support-request/home/home.component.html +0 -16
- package/src/lib/support-request/home/home.component.scss +0 -4
- package/src/lib/support-request/home/home.component.ts +0 -23
- package/src/lib/support-request/pagination/pagination.component.html +0 -71
- package/src/lib/support-request/pagination/pagination.component.scss +0 -77
- package/src/lib/support-request/pagination/pagination.component.ts +0 -29
- package/src/lib/support-request/request-flow/request-flow.component.html +0 -536
- package/src/lib/support-request/request-flow/request-flow.component.scss +0 -2
- package/src/lib/support-request/request-flow/request-flow.component.ts +0 -914
- package/src/lib/support-request/self-service-flow/self-service-flow.component.html +0 -64
- package/src/lib/support-request/self-service-flow/self-service-flow.component.scss +0 -2
- package/src/lib/support-request/self-service-flow/self-service-flow.component.ts +0 -105
- package/src/lib/support-request/support-request-create/support-request-create.component.html +0 -105
- package/src/lib/support-request/support-request-create/support-request-create.component.scss +0 -54
- package/src/lib/support-request/support-request-create/support-request-create.component.ts +0 -319
- package/src/lib/support-request/support-request-details/support-request-details.component.html +0 -553
- package/src/lib/support-request/support-request-details/support-request-details.component.scss +0 -338
- package/src/lib/support-request/support-request-details/support-request-details.component.ts +0 -849
- package/src/lib/support-request/support-request-index/support-request-index.component.html +0 -4
- package/src/lib/support-request/support-request-index/support-request-index.component.scss +0 -0
- package/src/lib/support-request/support-request-index/support-request-index.component.ts +0 -16
- package/src/lib/support-request/support-request-list/support-request-list.component.html +0 -455
- package/src/lib/support-request/support-request-list/support-request-list.component.scss +0 -0
- package/src/lib/support-request/support-request-list/support-request-list.component.ts +0 -869
- package/src/lib/support-request/support-request-routing.module.ts +0 -21
- package/src/lib/support-request/support-request.module.ts +0 -103
- package/src/lib/support-request/support-request.service.ts +0 -148
- package/src/lib/support-request/supportRequestInterface.ts +0 -6
- package/src/lib/task/Interfaces/TaskInterface.ts +0 -164
- package/src/lib/task/Services/task.service.spec.ts +0 -16
- package/src/lib/task/Services/task.service.ts +0 -354
- package/src/lib/task/task-routing.module.ts +0 -12
- package/src/lib/task/task.module.ts +0 -23
- package/src/lib/template/template.component.html +0 -22
- package/src/lib/template/template.component.scss +0 -0
- package/src/lib/template/template.component.spec.ts +0 -25
- package/src/lib/template/template.component.ts +0 -24
- package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.html +0 -83
- package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.scss +0 -0
- package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.ts +0 -120
- package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.html +0 -134
- package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.scss +0 -0
- package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.ts +0 -185
- package/src/lib/templates/attachmentsetup/attachment-api.ts +0 -55
- package/src/lib/templates/attachmentsetup/attachment-interface.ts +0 -100
- package/src/lib/templates/attachmentsetup/attachment.service.ts +0 -233
- package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.html +0 -97
- package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.scss +0 -10
- package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.ts +0 -367
- package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.html +0 -49
- package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.scss +0 -0
- package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.ts +0 -226
- package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.html +0 -140
- package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.scss +0 -8
- package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.ts +0 -176
- package/src/lib/templates/card/card.component.html +0 -56
- package/src/lib/templates/card/card.component.scss +0 -0
- package/src/lib/templates/card/card.component.spec.ts +0 -25
- package/src/lib/templates/card/card.component.ts +0 -306
- package/src/lib/templates/dashboard/dashboard.component.html +0 -333
- package/src/lib/templates/dashboard/dashboard.component.scss +0 -16
- package/src/lib/templates/dashboard/dashboard.component.ts +0 -2290
- package/src/lib/templates/details/details.component.html +0 -233
- package/src/lib/templates/details/details.component.scss +0 -0
- package/src/lib/templates/details/details.component.spec.ts +0 -25
- package/src/lib/templates/details/details.component.ts +0 -15
- package/src/lib/templates/detailstwo/detailstwo.component.html +0 -694
- package/src/lib/templates/detailstwo/detailstwo.component.scss +0 -0
- package/src/lib/templates/detailstwo/detailstwo.component.spec.ts +0 -25
- package/src/lib/templates/detailstwo/detailstwo.component.ts +0 -15
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.html +0 -1
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.scss +0 -0
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.spec.ts +0 -25
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.ts +0 -15
- package/src/lib/templates/grid/grid-datatype/grid-datatype.component.ts +0 -39
- package/src/lib/templates/grid/grid-service.service.ts +0 -236
- package/src/lib/templates/grid/grid.component.html +0 -358
- package/src/lib/templates/grid/grid.component.scss +0 -118
- package/src/lib/templates/grid/grid.component.spec.ts +0 -25
- package/src/lib/templates/grid/grid.component.ts +0 -638
- package/src/lib/templates/grid/inner-grid/inner-grid.component.html +0 -1
- package/src/lib/templates/grid/inner-grid/inner-grid.component.scss +0 -0
- package/src/lib/templates/grid/inner-grid/inner-grid.component.spec.ts +0 -25
- package/src/lib/templates/grid/inner-grid/inner-grid.component.ts +0 -15
- package/src/lib/templates/home/home.component.html +0 -251
- package/src/lib/templates/home/home.component.scss +0 -20
- package/src/lib/templates/home/home.component.spec.ts +0 -25
- package/src/lib/templates/home/home.component.ts +0 -15
- package/src/lib/templates/interface_enum/common-Interface.ts +0 -114
- package/src/lib/templates/interface_enum/common-enum.ts +0 -159
- package/src/lib/templates/interface_enum/icon-class.ts +0 -1149
- package/src/lib/templates/leftside/leftside.component.html +0 -77
- package/src/lib/templates/leftside/leftside.component.scss +0 -0
- package/src/lib/templates/leftside/leftside.component.spec.ts +0 -25
- package/src/lib/templates/leftside/leftside.component.ts +0 -238
- package/src/lib/templates/login/login.component.html +0 -93
- package/src/lib/templates/login/login.component.scss +0 -110
- package/src/lib/templates/login/login.component.spec.ts +0 -25
- package/src/lib/templates/login/login.component.ts +0 -142
- package/src/lib/templates/main-content/main-content.component.html +0 -31
- package/src/lib/templates/main-content/main-content.component.scss +0 -6
- package/src/lib/templates/main-content/main-content.component.spec.ts +0 -25
- package/src/lib/templates/main-content/main-content.component.ts +0 -24
- package/src/lib/templates/menu-item/child-menu/child-menu.component.html +0 -5
- package/src/lib/templates/menu-item/child-menu/child-menu.component.scss +0 -3
- package/src/lib/templates/menu-item/child-menu/child-menu.component.ts +0 -22
- package/src/lib/templates/menu-item/menu-item.component.html +0 -25
- package/src/lib/templates/menu-item/menu-item.component.scss +0 -11
- package/src/lib/templates/menu-item/menu-item.component.ts +0 -29
- package/src/lib/templates/pagination/pagination.component.html +0 -71
- package/src/lib/templates/pagination/pagination.component.scss +0 -73
- package/src/lib/templates/pagination/pagination.component.ts +0 -29
- package/src/lib/templates/pie-chart/pie-chart.component.html +0 -0
- package/src/lib/templates/pie-chart/pie-chart.component.scss +0 -0
- package/src/lib/templates/pie-chart/pie-chart.component.ts +0 -14
- package/src/lib/templates/pipe/multiple-search.pipe.ts +0 -28
- package/src/lib/templates/pipe/simple-search.pipe.ts +0 -18
- package/src/lib/templates/pipe/translate.pipe.ts +0 -31
- package/src/lib/templates/request-flow-dash/request-flow-dash.component.html +0 -16
- package/src/lib/templates/request-flow-dash/request-flow-dash.component.scss +0 -0
- package/src/lib/templates/request-flow-dash/request-flow-dash.component.spec.ts +0 -25
- package/src/lib/templates/request-flow-dash/request-flow-dash.component.ts +0 -59
- package/src/lib/templates/table/table.component.html +0 -310
- package/src/lib/templates/table/table.component.scss +0 -0
- package/src/lib/templates/table/table.component.spec.ts +0 -25
- package/src/lib/templates/table/table.component.ts +0 -52
- package/src/lib/templates/template.service.ts +0 -43
- package/src/lib/templates/templates-routing.module.ts +0 -21
- package/src/lib/templates/templates.module.ts +0 -80
- package/src/lib/templates/topnav/topnav.component.html +0 -172
- package/src/lib/templates/topnav/topnav.component.scss +0 -10
- package/src/lib/templates/topnav/topnav.component.spec.ts +0 -25
- package/src/lib/templates/topnav/topnav.component.ts +0 -59
- package/src/lib/ticket/_interfaces/master-models.ts +0 -66
- package/src/lib/ticket/_interfaces/model.ts +0 -252
- package/src/lib/ticket/_ticket-services/ticket-api.service.ts +0 -319
- package/src/lib/ticket/_ticket-services/ticket-master-api.service.ts +0 -169
- package/src/lib/ticket/_ticket-services/ticket-priority.service.ts +0 -86
- package/src/lib/ticket/_ticket-services/ticketchannel.service.ts +0 -107
- package/src/lib/ticket/ticket-routing.module.ts +0 -12
- package/src/lib/ticket/ticket.module.ts +0 -29
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.ts
DELETED
|
@@ -1,1526 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { FormGroup, FormBuilder } from '@angular/forms';
|
|
3
|
-
import { PageDetailsRow, PageGroup } from '../../page.interface.classes';
|
|
4
|
-
import { PageForm } from '../../page-form-instance';
|
|
5
|
-
import { EntityTypeSetupService } from '../../service/entity-type-setup.service';
|
|
6
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
7
|
-
import {
|
|
8
|
-
EntityTypeFieldVM,
|
|
9
|
-
EntityTypeFormCVM,
|
|
10
|
-
EntityTypeFormUVM,
|
|
11
|
-
EntityTypeFormVM,
|
|
12
|
-
EntityTypeSetUpVM,
|
|
13
|
-
FieldValidators,
|
|
14
|
-
} from '../../interface/entityTypeInterface';
|
|
15
|
-
import {
|
|
16
|
-
eFieldValidatorType,
|
|
17
|
-
E_DataType,
|
|
18
|
-
} from '../../../templates/interface_enum/common-enum';
|
|
19
|
-
import { Observable } from 'rxjs';
|
|
20
|
-
import { Validators } from '@angular/forms';
|
|
21
|
-
import Swal from 'sweetalert2';
|
|
22
|
-
import * as Handlebars from 'handlebars';
|
|
23
|
-
import { errorMessageType, GlobalService } from '../../../core/global.service';
|
|
24
|
-
import { TranslatePipe } from '../../../Pipe/translate.pipe';
|
|
25
|
-
import { registerHandlebarHelperMethods } from '../../../core/handlebar-helper-register';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@Component({
|
|
29
|
-
selector: 'app-entity-dynamic-form',
|
|
30
|
-
templateUrl: './entity-dynamic-form.component.html',
|
|
31
|
-
styleUrls: ['./entity-dynamic-form.component.scss'],
|
|
32
|
-
})
|
|
33
|
-
export class EntityDynamicFormComponent implements OnInit {
|
|
34
|
-
constructor(
|
|
35
|
-
private entityTypeSetup: EntityTypeSetupService,
|
|
36
|
-
private router: Router,
|
|
37
|
-
private fb: FormBuilder,
|
|
38
|
-
private route: ActivatedRoute,
|
|
39
|
-
public globelService : GlobalService,
|
|
40
|
-
) { }
|
|
41
|
-
|
|
42
|
-
ngOnInit(): void {
|
|
43
|
-
// this.route.paramMap.subscribe(res => {
|
|
44
|
-
// this.EntityTypeId = Number(res.get('EntityType') || "");
|
|
45
|
-
// this.EntityFormId = Number(res.get('EntityForm') || "");
|
|
46
|
-
// registerHandlebarHelperMethods();
|
|
47
|
-
if (this.EntityTypeId) {
|
|
48
|
-
this.getEntityTypeDetails();
|
|
49
|
-
this.getFieldListByEntityType();
|
|
50
|
-
// this.getListView();
|
|
51
|
-
this.getAllRules();
|
|
52
|
-
// this.dynamicFormGroup = this.getFieldFormGroup();
|
|
53
|
-
this.buildReactiveForm();
|
|
54
|
-
}
|
|
55
|
-
if (this.EntityFormId) {
|
|
56
|
-
if (this.ActivityTemplateForm && this.ViewType == 'ActivityTemplate')
|
|
57
|
-
this.getActivityTemplateForms();
|
|
58
|
-
else {
|
|
59
|
-
this.getEntityForm();
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
ngOnChanges(changes) {
|
|
66
|
-
if (changes['EntityFormId']) {
|
|
67
|
-
|
|
68
|
-
if (this.EntityFormId) {
|
|
69
|
-
this.getEntityForm();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@Input() ParameterData:any=null;
|
|
75
|
-
|
|
76
|
-
@Input() EntityFormId: number;
|
|
77
|
-
@Input() EntityTypeId: number;
|
|
78
|
-
@Input() EntityType: number;
|
|
79
|
-
@Input() FormStatus: number;
|
|
80
|
-
|
|
81
|
-
@Input() EntityTypeForm: EntityTypeFormVM;
|
|
82
|
-
|
|
83
|
-
@Input() ActivityTemplateForm: any;
|
|
84
|
-
|
|
85
|
-
@Input() ViewType: string;
|
|
86
|
-
|
|
87
|
-
EntityFieldList: EntityTypeFieldVM[] = [];
|
|
88
|
-
|
|
89
|
-
// EntityTypeId: number;
|
|
90
|
-
// EntityFormId: number;
|
|
91
|
-
|
|
92
|
-
EntityTypeDetail: EntityTypeSetUpVM;
|
|
93
|
-
getEntityTypeDetails() {
|
|
94
|
-
|
|
95
|
-
this.entityTypeSetup.getSingleEntityTypeSetupById(this.EntityTypeId)
|
|
96
|
-
.subscribe(
|
|
97
|
-
(res: any) => {
|
|
98
|
-
|
|
99
|
-
this.EntityTypeDetail = res;
|
|
100
|
-
this.EntityType = this.EntityTypeDetail.EntityType;
|
|
101
|
-
|
|
102
|
-
if (this.ActivityTemplateForm && this.ViewType == 'ActivityTemplate')
|
|
103
|
-
this.getActivityTemplateForms();
|
|
104
|
-
else {
|
|
105
|
-
if (this.EntityTypeDetail.TemplateId) {
|
|
106
|
-
this.getAllDefaultEntityTypeForm(this.EntityTypeDetail.TemplateId);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
this.setStaticActivityForm();
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
(error) => {
|
|
115
|
-
|
|
116
|
-
console.log(error);
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
saveDesignForm() {
|
|
122
|
-
|
|
123
|
-
let formvalue = this._PageForm.form.value;
|
|
124
|
-
|
|
125
|
-
let obj = {
|
|
126
|
-
PageGroup: this.pageGroups,
|
|
127
|
-
defaultPageGroups: this.EntityTypeDetail.TemplateId,
|
|
128
|
-
PageGroupValues: formvalue,
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
let pagedesign = JSON.stringify(obj);
|
|
132
|
-
// let pagedesign = JSON.stringify(this.pageGroups);
|
|
133
|
-
// this.EntityTypeForm.FormData = pagedesign;
|
|
134
|
-
|
|
135
|
-
if (this.EntityTypeForm && this.EntityTypeForm.RecId) {
|
|
136
|
-
const data: EntityTypeFormUVM = {
|
|
137
|
-
RecId: this.EntityTypeForm.RecId,
|
|
138
|
-
EntityTypeId: this.EntityTypeForm.EntityTypeRecId,
|
|
139
|
-
FieldId: this.EntityTypeForm.FieldId,
|
|
140
|
-
FieldControlType: this.EntityTypeForm.FieldControlType,
|
|
141
|
-
DataSourceLink: this.EntityTypeForm.DataSourceLink,
|
|
142
|
-
CascadeFieldId: this.EntityTypeForm.CascadeFieldId,
|
|
143
|
-
IsVisible: this.EntityTypeForm.IsVisible,
|
|
144
|
-
OrderId: this.EntityTypeForm.OrderId,
|
|
145
|
-
FormType: this.EntityTypeForm.FormType,
|
|
146
|
-
FormData: pagedesign,
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
this.entityTypeSetup.putEntityTypeForm(data).subscribe((res) => {
|
|
150
|
-
Swal.fire(this.translatePipe.transform('Form Design'), this.translatePipe.transform('Form Design Updated Successfully'), 'success');
|
|
151
|
-
this.getEntityForm();
|
|
152
|
-
});
|
|
153
|
-
} else {
|
|
154
|
-
const data: EntityTypeFormCVM = {
|
|
155
|
-
EntityTypeId: this.EntityTypeId,
|
|
156
|
-
FieldId: null,
|
|
157
|
-
FieldControlType: null,
|
|
158
|
-
DataSourceLink: null,
|
|
159
|
-
CascadeFieldId: null,
|
|
160
|
-
IsVisible: true,
|
|
161
|
-
OrderId: null,
|
|
162
|
-
FormData: pagedesign,
|
|
163
|
-
FormType: null,
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
this.entityTypeSetup.postEntityTypeForm(data).subscribe((res: any) => {
|
|
167
|
-
|
|
168
|
-
this.EntityFormId = res.RecId;
|
|
169
|
-
this.getEntityForm();
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
getFieldListByEntityType() {
|
|
175
|
-
|
|
176
|
-
this.entityTypeSetup.getAllEntityTypeField(null, this.EntityTypeId)
|
|
177
|
-
.subscribe((res: any) => {
|
|
178
|
-
|
|
179
|
-
this.EntityFieldList = res.Data;
|
|
180
|
-
// this.getListView();
|
|
181
|
-
|
|
182
|
-
this.setStaticActivityForm();
|
|
183
|
-
// this.TempFieldValidators();
|
|
184
|
-
},
|
|
185
|
-
(error) => {
|
|
186
|
-
|
|
187
|
-
console.log(error);
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
EntityFieldListsWithTable:any[] =[];
|
|
192
|
-
|
|
193
|
-
getListView() {
|
|
194
|
-
this.entityTypeSetup.getlistview(this.EntityTypeId)
|
|
195
|
-
.subscribe((res: any) => {
|
|
196
|
-
|
|
197
|
-
this.EntityFieldListsWithTable = res.Data;
|
|
198
|
-
let i = -9999;
|
|
199
|
-
this.EntityFieldListsWithTable.map(x => {
|
|
200
|
-
i++;
|
|
201
|
-
if(this.EntityFieldList.some(y=>y.Description != x.Description)) {
|
|
202
|
-
let _temp: EntityTypeFieldVM = {
|
|
203
|
-
Description: x.Description,
|
|
204
|
-
RecId: i,
|
|
205
|
-
DataType: E_DataType.string,
|
|
206
|
-
Label: x.Label,
|
|
207
|
-
IsTableField:true,
|
|
208
|
-
showDetilsForm:true,
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
this.EntityFieldList.push(_temp)
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
getEntityForm() {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this.entityTypeSetup.getSingleEntityTypeFormById(this.EntityFormId)
|
|
224
|
-
.subscribe(
|
|
225
|
-
(res: any) => {
|
|
226
|
-
|
|
227
|
-
this.EntityTypeForm = res;
|
|
228
|
-
if (this.EntityTypeForm && this.EntityTypeForm.FormData) {
|
|
229
|
-
let _FormData = JSON.parse(this.EntityTypeForm.FormData);
|
|
230
|
-
|
|
231
|
-
if (_FormData.PageGroup) {
|
|
232
|
-
if (Array.isArray(_FormData.PageGroup)) {
|
|
233
|
-
this.pageGroups = _FormData.PageGroup;
|
|
234
|
-
}
|
|
235
|
-
} else {
|
|
236
|
-
if (Array.isArray(_FormData.PageGroup)) {
|
|
237
|
-
this.pageGroups = _FormData;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (_FormData.PageGroupValues)
|
|
242
|
-
this.PageGroupValues = _FormData.PageGroupValues;
|
|
243
|
-
else this.PageGroupValues = {};
|
|
244
|
-
this.buildReactiveForm();
|
|
245
|
-
// this.onFormInit(this.EntityTypeForm);
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
(error) => {
|
|
250
|
-
|
|
251
|
-
console.log(error);
|
|
252
|
-
}
|
|
253
|
-
);
|
|
254
|
-
}
|
|
255
|
-
/* #region ActivityTemplate */
|
|
256
|
-
|
|
257
|
-
getActivityTemplateForms() {
|
|
258
|
-
let _FormData = this.ActivityTemplateForm;
|
|
259
|
-
|
|
260
|
-
if (_FormData.PageGroup) {
|
|
261
|
-
this.pageGroups = _FormData.PageGroup;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
if (_FormData.defaultPageGroups) {
|
|
265
|
-
this.defaultPageGroups = _FormData.defaultPageGroups;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
if (_FormData.PageGroupValues)
|
|
269
|
-
this.PageGroupValues = _FormData.PageGroupValues;
|
|
270
|
-
else this.PageGroupValues = {};
|
|
271
|
-
this.buildReactiveForm();
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/* #endregion */
|
|
275
|
-
|
|
276
|
-
setDefaultFormData() { }
|
|
277
|
-
|
|
278
|
-
pageGroups: PageDetailsRow[] = [];
|
|
279
|
-
defaultPageGroups: PageDetailsRow[] = [];
|
|
280
|
-
PageGroupValues: any = {};
|
|
281
|
-
|
|
282
|
-
addRow() {
|
|
283
|
-
|
|
284
|
-
this.pageGroups.push(new PageDetailsRow());
|
|
285
|
-
let row = this.pageGroups[this.pageGroups.length - 1];
|
|
286
|
-
this.addGroup(row);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
addGroup(row: PageDetailsRow) {
|
|
290
|
-
|
|
291
|
-
let group = new PageGroup();
|
|
292
|
-
row.Groups.push(group);
|
|
293
|
-
this.buildReactiveForm();
|
|
294
|
-
this.setGroupWidth(row);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
setGroupWidth(row: PageDetailsRow) {
|
|
298
|
-
for (let index = 0; index < row.Groups.length; index++) {
|
|
299
|
-
let Width = 100 / row.Groups.length;
|
|
300
|
-
row.Groups[index].Width = Width;
|
|
301
|
-
row.Groups[index].Height = Width;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
_PageForm: PageForm = new PageForm(new FormGroup({}));
|
|
306
|
-
dynamicFormGroup: FormGroup;
|
|
307
|
-
submitted: boolean;
|
|
308
|
-
|
|
309
|
-
validationError(name: string, errorName: string) {
|
|
310
|
-
if (name && errorName)
|
|
311
|
-
return this.dynamicFormGroup.get(name).errors[errorName] ? true : false;
|
|
312
|
-
else return this.dynamicFormGroup.get(name).errors ? true : false;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
getType(_dataType: E_DataType | number) {
|
|
316
|
-
switch (_dataType) {
|
|
317
|
-
case E_DataType.int:
|
|
318
|
-
case E_DataType.decimal:
|
|
319
|
-
return 'number';
|
|
320
|
-
case E_DataType.date:
|
|
321
|
-
return 'date';
|
|
322
|
-
case E_DataType.dateTime:
|
|
323
|
-
return 'datetime-local';
|
|
324
|
-
case E_DataType.timespan:
|
|
325
|
-
return 'time';
|
|
326
|
-
case E_DataType.bool:
|
|
327
|
-
return 'checkbox';
|
|
328
|
-
case E_DataType.string:
|
|
329
|
-
return 'text';
|
|
330
|
-
case E_DataType.image:
|
|
331
|
-
return 'file';
|
|
332
|
-
|
|
333
|
-
default:
|
|
334
|
-
return 'text';
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
changeTextEvent(event) {
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
SelectedFiles: any = null;
|
|
343
|
-
selectedFileItem: any = null;
|
|
344
|
-
|
|
345
|
-
changeFile(event: any, item) {
|
|
346
|
-
|
|
347
|
-
this.selectedFileItem = item;
|
|
348
|
-
this.SelectedFiles = event.target.files;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
selectRowIndex: any;
|
|
352
|
-
selectGroupIndex: any;
|
|
353
|
-
|
|
354
|
-
addNestedGroup(rowIndex, groupIndex) {
|
|
355
|
-
|
|
356
|
-
this.selectRowIndex = rowIndex;
|
|
357
|
-
this.selectGroupIndex = groupIndex;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
groupSetting(rowIndex, groupIndex) {
|
|
361
|
-
|
|
362
|
-
this.selectRowIndex = rowIndex;
|
|
363
|
-
this.selectGroupIndex = groupIndex;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
deleteGroup(rowIndex, groupIndex) {
|
|
367
|
-
|
|
368
|
-
this.selectRowIndex = rowIndex;
|
|
369
|
-
this.selectGroupIndex = groupIndex;
|
|
370
|
-
|
|
371
|
-
this.pageGroups[this.selectRowIndex].Groups.splice(
|
|
372
|
-
this.selectGroupIndex,
|
|
373
|
-
1
|
|
374
|
-
);
|
|
375
|
-
if (this.pageGroups[this.selectRowIndex].Groups.length == 0)
|
|
376
|
-
this.pageGroups.splice(this.selectRowIndex, 1);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
/* #region DataFIleds */
|
|
380
|
-
|
|
381
|
-
showDataFiledPopup: boolean = false;
|
|
382
|
-
openDataField(rowIndex, groupIndex) {
|
|
383
|
-
|
|
384
|
-
this.selectRowIndex = rowIndex;
|
|
385
|
-
this.selectGroupIndex = groupIndex;
|
|
386
|
-
this.showDataFiledPopup = true;
|
|
387
|
-
// this.dataFieldPopup = true;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
closeDataField() {
|
|
391
|
-
|
|
392
|
-
this.showDataFiledPopup = false;
|
|
393
|
-
|
|
394
|
-
// this.dataFieldPopup = false;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
submitDataFields(Fields: EntityTypeFieldVM[]) {
|
|
398
|
-
|
|
399
|
-
// if (Fields && Fields.length > 0)
|
|
400
|
-
for (let index = 0; index < Fields.length; index++) {
|
|
401
|
-
this.pageGroups[this.selectRowIndex].Groups[
|
|
402
|
-
this.selectGroupIndex
|
|
403
|
-
].Fields.push(Fields[index]);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
this.buildReactiveForm();
|
|
407
|
-
this.showDataFiledPopup = false;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
/* #endregion */
|
|
411
|
-
|
|
412
|
-
/* #region Field Actions */
|
|
413
|
-
|
|
414
|
-
deleteField(fieldIndex, groupIndex, rowIndex) {
|
|
415
|
-
|
|
416
|
-
this.pageGroups[rowIndex].Groups[groupIndex].Fields.splice(fieldIndex, 1);
|
|
417
|
-
this.buildReactiveForm();
|
|
418
|
-
}
|
|
419
|
-
downField(fieldIndex, groupIndex, rowIndex) {
|
|
420
|
-
|
|
421
|
-
if (
|
|
422
|
-
fieldIndex !=
|
|
423
|
-
this.pageGroups[rowIndex].Groups[groupIndex].Fields.length - 1
|
|
424
|
-
)
|
|
425
|
-
moveItem(
|
|
426
|
-
this.pageGroups[rowIndex].Groups[groupIndex].Fields,
|
|
427
|
-
fieldIndex,
|
|
428
|
-
fieldIndex + 1
|
|
429
|
-
);
|
|
430
|
-
this.buildReactiveForm();
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
upField(fieldIndex, groupIndex, rowIndex) {
|
|
434
|
-
|
|
435
|
-
if (fieldIndex != 0)
|
|
436
|
-
moveItem(
|
|
437
|
-
this.pageGroups[rowIndex].Groups[groupIndex].Fields,
|
|
438
|
-
fieldIndex,
|
|
439
|
-
fieldIndex - 1
|
|
440
|
-
);
|
|
441
|
-
this.buildReactiveForm();
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/* #endregion */
|
|
445
|
-
|
|
446
|
-
/* #region DynamicViewPopup */
|
|
447
|
-
|
|
448
|
-
showDynamicViewPopup: boolean = false;
|
|
449
|
-
openDynamicViewPopup() {
|
|
450
|
-
|
|
451
|
-
this.showDynamicViewPopup = true;
|
|
452
|
-
}
|
|
453
|
-
closeDynamicViewPopup() {
|
|
454
|
-
this.showDynamicViewPopup = false;
|
|
455
|
-
}
|
|
456
|
-
/* #endregion */
|
|
457
|
-
|
|
458
|
-
getAllFields() {
|
|
459
|
-
let fields: EntityTypeFieldVM[] = [];
|
|
460
|
-
|
|
461
|
-
for (let index = 0; index < this.pageGroups.length; index++) {
|
|
462
|
-
let Groups = this.pageGroups[index].Groups;
|
|
463
|
-
for (let i = 0; i < Groups.length; i++) {
|
|
464
|
-
fields.push(...Groups[i].Fields);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
for (let index = 0; index < this.defaultPageGroups.length; index++) {
|
|
469
|
-
let Groups = this.defaultPageGroups[index].Groups;
|
|
470
|
-
for (let i = 0; i < Groups.length; i++) {
|
|
471
|
-
fields.push(...Groups[i].Fields);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
return fields;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
buildReactiveForm() {
|
|
479
|
-
|
|
480
|
-
let fields: EntityTypeFieldVM[] = this.getAllFields();
|
|
481
|
-
|
|
482
|
-
this._PageForm = new PageForm(this.createFormGroup(fields));
|
|
483
|
-
|
|
484
|
-
this.BindDesignFormData();
|
|
485
|
-
this.setFieldsInPageGroupsForm();
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
setFieldsInPageGroupsForm() {
|
|
490
|
-
|
|
491
|
-
if (!(this.EntityFieldList && this.EntityFieldList.length > 0))
|
|
492
|
-
return
|
|
493
|
-
|
|
494
|
-
this.pageGroups.map((PG) => {
|
|
495
|
-
PG.Groups.map((group) => {
|
|
496
|
-
group.Fields = group.Fields.map(PGF => this.EntityFieldList.find(f => f.Description === PGF.Description) || PGF);
|
|
497
|
-
})
|
|
498
|
-
})
|
|
499
|
-
this.defaultPageGroups.map((PG) => {
|
|
500
|
-
PG.Groups.map((group) => {
|
|
501
|
-
group.Fields = group.Fields.map(PGF => this.EntityFieldList.find(f => f.Description === PGF.Description) || PGF);
|
|
502
|
-
})
|
|
503
|
-
})
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
createFormGroup(fields: EntityTypeFieldVM[]) {
|
|
509
|
-
let form = this.fb.group({});
|
|
510
|
-
if (Array.isArray(fields) && fields.length > 0) {
|
|
511
|
-
for (const field of fields) {
|
|
512
|
-
|
|
513
|
-
const value = null;
|
|
514
|
-
if (field.IsMandatory)
|
|
515
|
-
form.addControl(
|
|
516
|
-
field.Description,
|
|
517
|
-
this.fb.control(value, Validators.required)
|
|
518
|
-
);
|
|
519
|
-
else form.addControl(field.Description, this.fb.control(value));
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
return form;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
getFieldFormValue(field) {
|
|
526
|
-
return this._PageForm.form.get(field);
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
getAllDefaultEntityTypeForm(EntityTypeId) {
|
|
530
|
-
|
|
531
|
-
this.entityTypeSetup.getActiveEntityForm(EntityTypeId).subscribe(
|
|
532
|
-
(res: any) => {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
if (res && res.FormData) {
|
|
536
|
-
let _FormData = JSON.parse(res.FormData);
|
|
537
|
-
|
|
538
|
-
if (_FormData.PageGroup) {
|
|
539
|
-
if (Array.isArray(_FormData.PageGroup)) {
|
|
540
|
-
this.defaultPageGroups = _FormData.PageGroup;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
this.buildReactiveForm();
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
|
-
(error) => {
|
|
548
|
-
|
|
549
|
-
Swal.fire(this.translatePipe.transform('Template form'), this.translatePipe.transform('Template form not found'), 'warning');
|
|
550
|
-
console.log(error);
|
|
551
|
-
}
|
|
552
|
-
);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
BindDesignFormData() {
|
|
556
|
-
|
|
557
|
-
// let _data ={
|
|
558
|
-
// textbox:"ASASAS",
|
|
559
|
-
// textboxNumber:"1234",
|
|
560
|
-
// DateField:"06/13/2021",
|
|
561
|
-
// DateTime:"06/13/2025",
|
|
562
|
-
// textArea:"xzxx cscc",
|
|
563
|
-
// Bolean:true
|
|
564
|
-
// };
|
|
565
|
-
this._PageForm.form.patchValue(this.PageGroupValues);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
FieldChangeEvent(FieldData: EntityTypeFieldVM, RestData: any) {
|
|
569
|
-
|
|
570
|
-
let _rulesField = null;
|
|
571
|
-
if (this.AllRules && this.AllRules.FieldRules) {
|
|
572
|
-
_rulesField = this.AllRules.FieldRules;
|
|
573
|
-
_rulesField = _rulesField.filter(x => (x.EntityTypeRecId == this.EntityTypeId || x.EntityTypeRecId == this.EntityTypeDetail.TemplateId));
|
|
574
|
-
} else {
|
|
575
|
-
return;
|
|
576
|
-
}
|
|
577
|
-
let _currentFieldRule = _rulesField.filter(x => x.Field == FieldData.Description)[0]
|
|
578
|
-
|
|
579
|
-
if (_currentFieldRule && _currentFieldRule.Rules) {
|
|
580
|
-
let rulesData = JSON.parse(_currentFieldRule.Rules);
|
|
581
|
-
|
|
582
|
-
if (Array.isArray(rulesData)) {
|
|
583
|
-
|
|
584
|
-
let _rulesData = rulesData.filter((x) => {
|
|
585
|
-
if (x.CurrentEntityTypeId) {
|
|
586
|
-
if (x.CurrentEntityTypeId.includes(this.EntityTypeId))
|
|
587
|
-
return x;
|
|
588
|
-
}
|
|
589
|
-
else
|
|
590
|
-
return x;
|
|
591
|
-
});
|
|
592
|
-
|
|
593
|
-
for (let rI = 0; rI < _rulesData.length; rI++) {
|
|
594
|
-
this._fieldrulesImplement(_rulesData[rI], RestData,FieldData)
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
else
|
|
598
|
-
this._fieldrulesImplement(rulesData, RestData,FieldData)
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
_fieldrulesImplement(rulesData, RestData,FieldData: EntityTypeFieldVM) {
|
|
607
|
-
|
|
608
|
-
if (!rulesData || !rulesData.Condtion) {
|
|
609
|
-
return
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
let _condition = true;
|
|
613
|
-
|
|
614
|
-
for (let index = 0; index < rulesData.Condtion.length; index++) {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
let _con = rulesData.Condtion[index];
|
|
618
|
-
|
|
619
|
-
let _Icondition = false;
|
|
620
|
-
|
|
621
|
-
let _fieldValue = this._PageForm.form.value[_con.Field];
|
|
622
|
-
if (FieldData.DataType == E_DataType.bool)
|
|
623
|
-
_fieldValue = _fieldValue.toString()
|
|
624
|
-
|
|
625
|
-
if (_con.FieldType && _con.FieldType == "Value") {
|
|
626
|
-
let _handleData = this._PageForm.form.value;
|
|
627
|
-
_handleData.data = RestData;
|
|
628
|
-
_handleData.currentLang = this.globelService.CurrentLanguage;
|
|
629
|
-
if (this.ParameterData)
|
|
630
|
-
_handleData.params = this.ParameterData;
|
|
631
|
-
_fieldValue = this.hanbleBarHtml(_con.Field, _handleData)
|
|
632
|
-
}
|
|
633
|
-
let value = (_con.Value == "FieldValue" ? this._PageForm.form.value[_con.ValueTwo] : _con.ValueTwo)
|
|
634
|
-
|
|
635
|
-
switch (_con.Type) {
|
|
636
|
-
case "Equal": {
|
|
637
|
-
_Icondition = (_fieldValue == value ? true : false)
|
|
638
|
-
break
|
|
639
|
-
}
|
|
640
|
-
case "NotEqual": {
|
|
641
|
-
_Icondition = (_fieldValue != value ? true : false)
|
|
642
|
-
break
|
|
643
|
-
}
|
|
644
|
-
case "LessThen": {
|
|
645
|
-
_Icondition = (_fieldValue < value ? true : false)
|
|
646
|
-
break
|
|
647
|
-
}
|
|
648
|
-
case "LessThenEqual": {
|
|
649
|
-
_Icondition = (_fieldValue < value ? true : false)
|
|
650
|
-
break
|
|
651
|
-
}
|
|
652
|
-
case "GreaterThen": {
|
|
653
|
-
_Icondition = (_fieldValue + " >" + value ? true : false)
|
|
654
|
-
break
|
|
655
|
-
}
|
|
656
|
-
case "GreaterThenEqual": {
|
|
657
|
-
_Icondition = (_fieldValue >= value ? true : false)
|
|
658
|
-
break
|
|
659
|
-
}
|
|
660
|
-
case "IsNull": {
|
|
661
|
-
_Icondition = (_fieldValue == null ? true : false)
|
|
662
|
-
break
|
|
663
|
-
}
|
|
664
|
-
case "IsNotNull": {
|
|
665
|
-
_Icondition = (_fieldValue != null ? true : false)
|
|
666
|
-
break
|
|
667
|
-
}
|
|
668
|
-
case "IsEmpty": {
|
|
669
|
-
_Icondition = (_fieldValue == '' ? true : false)
|
|
670
|
-
break
|
|
671
|
-
}
|
|
672
|
-
case "IsNotEmpty": {
|
|
673
|
-
_Icondition = (_fieldValue != '' ? true : false)
|
|
674
|
-
break
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
// String Data
|
|
678
|
-
case "Length": {
|
|
679
|
-
_Icondition = (_fieldValue.length == value ? true : false)
|
|
680
|
-
break
|
|
681
|
-
}
|
|
682
|
-
case "Contains": { //Contains
|
|
683
|
-
_Icondition = (_fieldValue.includes(value) ? true : false)
|
|
684
|
-
break
|
|
685
|
-
}
|
|
686
|
-
case "NotContains": { //Contains
|
|
687
|
-
_Icondition = (!(_fieldValue.includes(value)) ? true : false)
|
|
688
|
-
break
|
|
689
|
-
}
|
|
690
|
-
case "StartsWith": {
|
|
691
|
-
_Icondition = (_fieldValue.startsWith(value) ? true : false)
|
|
692
|
-
break
|
|
693
|
-
}
|
|
694
|
-
case "EndsWith": {
|
|
695
|
-
_Icondition = (_fieldValue.endsWith(value) ? true : false)
|
|
696
|
-
break
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
default:
|
|
700
|
-
_Icondition = false
|
|
701
|
-
break
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
if (index > 0) {
|
|
706
|
-
if (rulesData.CondtionOperator == 1) {
|
|
707
|
-
_condition = (_condition && _Icondition ? true : false)
|
|
708
|
-
}
|
|
709
|
-
else {
|
|
710
|
-
_condition = (_condition || _Icondition ? true : false)
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
else {
|
|
714
|
-
_condition = _Icondition;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
if (_condition) {
|
|
722
|
-
|
|
723
|
-
this.OnRulesApply(rulesData, RestData)
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
hanbleBarHtml(_code, data?) {
|
|
730
|
-
|
|
731
|
-
if (!data || (typeof data != 'object'))
|
|
732
|
-
data = {};
|
|
733
|
-
data.Local = localStorage;
|
|
734
|
-
data.Cookies = this.Cookies;
|
|
735
|
-
data.System = this.globelService.SystemConfigs;
|
|
736
|
-
if (_code && data) {
|
|
737
|
-
let template = Handlebars.compile(_code);
|
|
738
|
-
let result = template(data);
|
|
739
|
-
return result
|
|
740
|
-
}
|
|
741
|
-
else {
|
|
742
|
-
return _code
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
get Cookies() {
|
|
748
|
-
let cookies = document.cookie.split(';');
|
|
749
|
-
let cookie = {};
|
|
750
|
-
for (let i = 0; i < cookies.length; i++) {
|
|
751
|
-
let hash = (cookies[i].split('='));
|
|
752
|
-
let _key = hash[0].toString().replace(" ", "");
|
|
753
|
-
cookie[_key] = hash[1];
|
|
754
|
-
}
|
|
755
|
-
return cookie;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
onFormInit(FormData, RestData?: any) {
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
if (FormData.RulesData) {
|
|
766
|
-
let _formInitRule = JSON.parse(FormData.RulesData);
|
|
767
|
-
|
|
768
|
-
let onInitRules = _formInitRule.filter(x => x.Type == "OnInit")
|
|
769
|
-
|
|
770
|
-
for (let index = 0; index < onInitRules.length; index++) {
|
|
771
|
-
|
|
772
|
-
// let rulesData = _formInitRule.filter(x => x.Type == "OnInit")[0];
|
|
773
|
-
let rulesData = onInitRules[index];
|
|
774
|
-
if (!rulesData) {
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
let _condition = true;
|
|
779
|
-
|
|
780
|
-
for (let index = 0; index < rulesData.Condtion.length; index++) {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
let _con = rulesData.Condtion[index];
|
|
784
|
-
|
|
785
|
-
let _Icondition = false;
|
|
786
|
-
|
|
787
|
-
let _fieldValue = this._PageForm.form.value[_con.Field];
|
|
788
|
-
if (_con.FieldType && _con.FieldType == "Value") {
|
|
789
|
-
let _handleData = this._PageForm.form.value;
|
|
790
|
-
_handleData.data = RestData;
|
|
791
|
-
_handleData.currentLang = this.globelService.CurrentLanguage;
|
|
792
|
-
if (this.ParameterData)
|
|
793
|
-
_handleData.params = this.ParameterData;
|
|
794
|
-
_fieldValue = this.hanbleBarHtml(_con.Field, _handleData)
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
let value = (_con.Value == "FieldValue" ? this._PageForm.form.value[_con.ValueTwo] : _con.ValueTwo);
|
|
798
|
-
switch (_con.Type) {
|
|
799
|
-
case 'Equal': {
|
|
800
|
-
_Icondition =
|
|
801
|
-
_fieldValue == value ? true : false;
|
|
802
|
-
break;
|
|
803
|
-
}
|
|
804
|
-
case 'NotEqual': {
|
|
805
|
-
_Icondition =
|
|
806
|
-
_fieldValue != value ? true : false;
|
|
807
|
-
break;
|
|
808
|
-
}
|
|
809
|
-
case 'LessThen': {
|
|
810
|
-
_Icondition =
|
|
811
|
-
_fieldValue < value ? true : false;
|
|
812
|
-
break;
|
|
813
|
-
}
|
|
814
|
-
case 'LessThenEqual': {
|
|
815
|
-
_Icondition =
|
|
816
|
-
_fieldValue < value ? true : false;
|
|
817
|
-
break;
|
|
818
|
-
}
|
|
819
|
-
case 'GreaterThen': {
|
|
820
|
-
_Icondition =
|
|
821
|
-
_fieldValue + ' >' + value
|
|
822
|
-
? true
|
|
823
|
-
: false;
|
|
824
|
-
break;
|
|
825
|
-
}
|
|
826
|
-
case 'GreaterThenEqual': {
|
|
827
|
-
_Icondition =
|
|
828
|
-
_fieldValue >= value ? true : false;
|
|
829
|
-
break;
|
|
830
|
-
}
|
|
831
|
-
case 'IsNull': {
|
|
832
|
-
_Icondition =
|
|
833
|
-
_fieldValue == null ? true : false;
|
|
834
|
-
break;
|
|
835
|
-
}
|
|
836
|
-
case 'IsNotNull': {
|
|
837
|
-
_Icondition =
|
|
838
|
-
_fieldValue != null ? true : false;
|
|
839
|
-
break;
|
|
840
|
-
}
|
|
841
|
-
case "IsEmpty": {
|
|
842
|
-
_Icondition = (_fieldValue == '' ? true : false)
|
|
843
|
-
break
|
|
844
|
-
}
|
|
845
|
-
case "IsNotEmpty": {
|
|
846
|
-
_Icondition = (_fieldValue != '' ? true : false)
|
|
847
|
-
break
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
// String Data
|
|
851
|
-
case "Length": {
|
|
852
|
-
_Icondition = (_fieldValue.length == value ? true : false)
|
|
853
|
-
break
|
|
854
|
-
}
|
|
855
|
-
case "Contains": { //Contains
|
|
856
|
-
_Icondition = (_fieldValue.includes(value) ? true : false)
|
|
857
|
-
break
|
|
858
|
-
}
|
|
859
|
-
case "NotContains": { //Contains
|
|
860
|
-
_Icondition = (!(_fieldValue.includes(value)) ? true : false)
|
|
861
|
-
break
|
|
862
|
-
}
|
|
863
|
-
case "StartsWith": {
|
|
864
|
-
_Icondition = (_fieldValue.startsWith(value) ? true : false)
|
|
865
|
-
break
|
|
866
|
-
}
|
|
867
|
-
case "EndsWith": {
|
|
868
|
-
_Icondition = (_fieldValue.endsWith(value) ? true : false)
|
|
869
|
-
break
|
|
870
|
-
}
|
|
871
|
-
default:
|
|
872
|
-
_Icondition = false;
|
|
873
|
-
break;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
if (index > 0) {
|
|
877
|
-
if (rulesData.CondtionOperator == 1) {
|
|
878
|
-
_condition = _condition && _Icondition ? true : false;
|
|
879
|
-
} else {
|
|
880
|
-
_condition = _condition || _Icondition ? true : false;
|
|
881
|
-
}
|
|
882
|
-
} else {
|
|
883
|
-
_condition = _Icondition;
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
if (_condition) {
|
|
889
|
-
this.OnRulesApply(rulesData, RestData)
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
OnRulesApply(rulesData, RestData) {
|
|
898
|
-
let rulesList = rulesData;
|
|
899
|
-
if (rulesData.action) rulesList = rulesData.action;
|
|
900
|
-
|
|
901
|
-
for (let index = 0; index < rulesList.length; index++) {
|
|
902
|
-
let rules = rulesList[index];
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
if (rules.Condition == 'ClearFieldValue') {
|
|
906
|
-
this._PageForm.form.get(rules.Field).setValue('', { entitySelf:true });
|
|
907
|
-
this.setDDLFieldDesc(rules.Field,"");
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
if (rules.Condition == 'SetFieldValue') {
|
|
911
|
-
let _rulesValue = rules.Value
|
|
912
|
-
try {
|
|
913
|
-
let _handleData = this._PageForm.form.value;
|
|
914
|
-
_handleData.data = RestData;
|
|
915
|
-
_handleData.currentLang = this.globelService.CurrentLanguage;
|
|
916
|
-
if (this.ParameterData)
|
|
917
|
-
_handleData.params = this.ParameterData;
|
|
918
|
-
let _rulesValueArr:any[] =rules.Value.split('<br>');
|
|
919
|
-
|
|
920
|
-
_rulesValue = this.hanbleBarHtml(_rulesValueArr[0], _handleData)
|
|
921
|
-
this._PageForm.form.get(rules.Field).setValue(_rulesValue, { entitySelf:true });
|
|
922
|
-
|
|
923
|
-
if(_rulesValueArr.length>1) {
|
|
924
|
-
let _rulesValueDes = this.hanbleBarHtml(_rulesValueArr[1], _handleData)
|
|
925
|
-
this.setDDLFieldDesc(rules.Field,_rulesValueDes)
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
// if (RestData && Object.keys(RestData).length > 0)
|
|
930
|
-
// _rulesValue = this.hanbleBarHtml(rules.Value, RestData)
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
}
|
|
935
|
-
catch (err) {
|
|
936
|
-
alert("SetFieldValueerr -"+ err);
|
|
937
|
-
console.log(err);
|
|
938
|
-
// this._PageForm.form.get(rules.Field).setValue(_rulesValue, { onlySelf: true });
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
if (rules.Condition == 'CopyFieldValue') {
|
|
943
|
-
if (rules.Value)
|
|
944
|
-
this._PageForm.form
|
|
945
|
-
.get(rules.Value)
|
|
946
|
-
.setValue(this._PageForm.form.get(rules.Field).value, {
|
|
947
|
-
onlySelf: true,
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
if (rules.Condition == 'RemoveValidation') {
|
|
952
|
-
this._PageForm.form.controls[rules.Field].setValidators([]);
|
|
953
|
-
this._PageForm.form.controls[rules.Field].updateValueAndValidity();
|
|
954
|
-
|
|
955
|
-
this.fieldValidation.map(x => {
|
|
956
|
-
if (x.Field == rules.Field) {
|
|
957
|
-
x.Validators = [];
|
|
958
|
-
}
|
|
959
|
-
});
|
|
960
|
-
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
if (rules.Condition == 'AddValidation') {
|
|
964
|
-
|
|
965
|
-
if (rules.Type == 'Required') {
|
|
966
|
-
this._PageForm.form.controls[rules.Field].setValidators([Validators.required,]);
|
|
967
|
-
this._PageForm.form.controls[rules.Field].updateValueAndValidity();
|
|
968
|
-
}
|
|
969
|
-
if (rules.Type == 'MinMax') {
|
|
970
|
-
let validateArry = [Validators.required];
|
|
971
|
-
if (rules.Value) validateArry.push(Validators.min(rules.Value));
|
|
972
|
-
if (rules.ValueTwo)
|
|
973
|
-
validateArry.push(Validators.max(rules.ValueTwo));
|
|
974
|
-
|
|
975
|
-
this._PageForm.form.controls[rules.Field].setValidators(
|
|
976
|
-
validateArry
|
|
977
|
-
);
|
|
978
|
-
this._PageForm.form.controls[
|
|
979
|
-
rules.Field
|
|
980
|
-
].updateValueAndValidity();
|
|
981
|
-
}
|
|
982
|
-
if (rules.Type == 'MinLength') {
|
|
983
|
-
let validateArry = [Validators.required];
|
|
984
|
-
if (rules.Value)
|
|
985
|
-
validateArry.push(Validators.minLength(rules.Value));
|
|
986
|
-
|
|
987
|
-
this._PageForm.form.controls[rules.Field].setValidators(
|
|
988
|
-
validateArry
|
|
989
|
-
);
|
|
990
|
-
this._PageForm.form.controls[
|
|
991
|
-
rules.Field
|
|
992
|
-
].updateValueAndValidity();
|
|
993
|
-
}
|
|
994
|
-
if (rules.Type == 'MaxLength') {
|
|
995
|
-
let validateArry = [Validators.required];
|
|
996
|
-
if (rules.Value)
|
|
997
|
-
validateArry.push(Validators.maxLength(rules.Value));
|
|
998
|
-
|
|
999
|
-
this._PageForm.form.controls[rules.Field].setValidators(
|
|
1000
|
-
validateArry
|
|
1001
|
-
);
|
|
1002
|
-
this._PageForm.form.controls[
|
|
1003
|
-
rules.Field
|
|
1004
|
-
].updateValueAndValidity();
|
|
1005
|
-
}
|
|
1006
|
-
if (rules.Type == 'Pattern') {
|
|
1007
|
-
if (rules.Value)
|
|
1008
|
-
this._PageForm.form.controls[rules.Field].setValidators([Validators.pattern(rules.Value)]);
|
|
1009
|
-
this._PageForm.form.controls[rules.Field].updateValueAndValidity()
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
this.setValidationOnField(rules.Field, rules.ValidationMessage, rules.ValidationMessageAr, rules.Type)
|
|
1013
|
-
|
|
1014
|
-
if (this.fieldValidation.filter(x => x.Field == rules.Field).length < 1) {
|
|
1015
|
-
this.fieldValidation.push({ Field: rules.Field, Validators: [] })
|
|
1016
|
-
}
|
|
1017
|
-
this.fieldValidation.map(x => {
|
|
1018
|
-
if (x.Field == rules.Field) {
|
|
1019
|
-
if (rules.Type == 'Required') {
|
|
1020
|
-
x.Validators.push(Validators.required);
|
|
1021
|
-
}
|
|
1022
|
-
else if (rules.Type == 'MinMax') {
|
|
1023
|
-
if (rules.Value)
|
|
1024
|
-
x.Validators.push(Validators.min(rules.Value));
|
|
1025
|
-
if (rules.ValueTwo)
|
|
1026
|
-
x.Validators.push(Validators.max(rules.ValueTwo));
|
|
1027
|
-
}
|
|
1028
|
-
else if (rules.Type == 'MinLength') {
|
|
1029
|
-
if (rules.Value)
|
|
1030
|
-
x.Validators.push(Validators.minLength(rules.Value));
|
|
1031
|
-
}
|
|
1032
|
-
else if (rules.Type == 'MaxLength') {
|
|
1033
|
-
if (rules.Value)
|
|
1034
|
-
x.Validators.push(Validators.maxLength(rules.Value));
|
|
1035
|
-
}
|
|
1036
|
-
else if (rules.Type == 'Pattern') {
|
|
1037
|
-
if (rules.Value)
|
|
1038
|
-
x.Validators.push(Validators.pattern(rules.Value));
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
});
|
|
1042
|
-
|
|
1043
|
-
let _Validators = this.fieldValidation.filter(x => x.Field == rules.Field)[0].Validators;
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
this._PageForm.form.controls[rules.Field].setValidators(_Validators);
|
|
1047
|
-
this._PageForm.form.controls[rules.Field].updateValueAndValidity();
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
if (rules.Condition == 'IsEditable') {
|
|
1053
|
-
if (rules.Value == 'true') {
|
|
1054
|
-
this.setReadOnlyOnField(rules.Field, true)
|
|
1055
|
-
}
|
|
1056
|
-
else if (rules.Value == 'false') {
|
|
1057
|
-
this.setReadOnlyOnField(rules.Field, false)
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
if (rules.Condition == 'IsVisible') {
|
|
1061
|
-
if (rules.Value == 'true') {
|
|
1062
|
-
this.setIsHideOnField(rules.Field, false)
|
|
1063
|
-
}
|
|
1064
|
-
else if (rules.Value == 'false') {
|
|
1065
|
-
this.setIsHideOnField(rules.Field, true)
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
if (rules.Condition == 'Datasource') {
|
|
1069
|
-
this.getDatasoureData(rules.Value,rules.ValueTwo,rules.ValueThree);
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
getDatasoureData(EntityFormId,Fields,Triggr){
|
|
1076
|
-
|
|
1077
|
-
this.entityTypeSetup.getSingleEntityTypeFormById(EntityFormId)
|
|
1078
|
-
.subscribe(
|
|
1079
|
-
(res: any) => {
|
|
1080
|
-
|
|
1081
|
-
let _EntityTypeForm = res;
|
|
1082
|
-
if(_EntityTypeForm.DataSource) {
|
|
1083
|
-
let RestData =JSON.parse( _EntityTypeForm.DataSource)
|
|
1084
|
-
|
|
1085
|
-
let _hanbleBardata:any ={};
|
|
1086
|
-
_hanbleBardata.FormData = this._PageForm.form.value;
|
|
1087
|
-
|
|
1088
|
-
RestData.URL = this.hanbleBarHtml(RestData.URL,_hanbleBardata);
|
|
1089
|
-
RestData.Body = this.hanbleBarHtml(RestData.Body,_hanbleBardata);
|
|
1090
|
-
RestData.QueryStrings = RestData.QueryStrings.map(x => {
|
|
1091
|
-
|
|
1092
|
-
x.Value = this.hanbleBarHtml(x.Value,_hanbleBardata);
|
|
1093
|
-
|
|
1094
|
-
if(x.Value)
|
|
1095
|
-
return x
|
|
1096
|
-
});
|
|
1097
|
-
|
|
1098
|
-
RestData.Headers = RestData.Headers.map(x => {
|
|
1099
|
-
x.Value = this.hanbleBarHtml(x.Value,_hanbleBardata);
|
|
1100
|
-
return x
|
|
1101
|
-
});
|
|
1102
|
-
|
|
1103
|
-
this.entityTypeSetup.dynamicAPi(RestData)
|
|
1104
|
-
.subscribe((res: any) => {
|
|
1105
|
-
|
|
1106
|
-
let _data: any = res;
|
|
1107
|
-
if (RestData.ResponseView) {
|
|
1108
|
-
let _rview = RestData.ResponseView.split(".");
|
|
1109
|
-
_rview.forEach(x => {
|
|
1110
|
-
_data = _data[x];
|
|
1111
|
-
});
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
try {
|
|
1115
|
-
if(Fields){
|
|
1116
|
-
let _Fields = JSON.parse(JSON.parse(Fields));
|
|
1117
|
-
_Fields.forEach(x => {
|
|
1118
|
-
|
|
1119
|
-
let _value = _data[x.Value];
|
|
1120
|
-
let currentfield = this.EntityFieldList.filter(y => y.Description == x.Field)[0];
|
|
1121
|
-
|
|
1122
|
-
if(currentfield.DataType == E_DataType.date || currentfield.DataType == E_DataType.dateTime){
|
|
1123
|
-
if(_data[x.Value]){
|
|
1124
|
-
_value = new Date(_data[x.Value]);
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
this._PageForm.form.get(x.Field).setValue(_value, { entitySelf: true });
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
if(Triggr){
|
|
1132
|
-
let _TriggrFields = JSON.parse(JSON.parse(Triggr));
|
|
1133
|
-
_TriggrFields.forEach(x => {
|
|
1134
|
-
|
|
1135
|
-
let _Triggrfield = this.EntityFieldList.filter(y => y.Description == x.Field)[0]
|
|
1136
|
-
if (_Triggrfield)
|
|
1137
|
-
this.FieldChangeEvent(_Triggrfield, null)
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
catch (err) {
|
|
1142
|
-
|
|
1143
|
-
alert(err)
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
},
|
|
1147
|
-
(error) => {
|
|
1148
|
-
|
|
1149
|
-
console.log(error);
|
|
1150
|
-
Swal.fire(errorMessageType(error));
|
|
1151
|
-
});
|
|
1152
|
-
}
|
|
1153
|
-
},
|
|
1154
|
-
|
|
1155
|
-
(error) => {
|
|
1156
|
-
|
|
1157
|
-
console.log(error);
|
|
1158
|
-
}
|
|
1159
|
-
);
|
|
1160
|
-
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
AllRules: any = null;
|
|
1165
|
-
getAllRules() {
|
|
1166
|
-
|
|
1167
|
-
this.entityTypeSetup.getAllRulesWithTemplateData(this.EntityTypeId).subscribe(
|
|
1168
|
-
(res: any) => {
|
|
1169
|
-
|
|
1170
|
-
this.AllRules = res;
|
|
1171
|
-
},
|
|
1172
|
-
(error) => {
|
|
1173
|
-
|
|
1174
|
-
}
|
|
1175
|
-
);
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
setValidationOnField(Field, ValidationMessage, ValidationMessageAr, Type) {
|
|
1179
|
-
this.pageGroups.map((PG) => {
|
|
1180
|
-
|
|
1181
|
-
PG.Groups.map((group) => {
|
|
1182
|
-
group.Fields.map((PGF) => {
|
|
1183
|
-
if (PGF.Description == Field) {
|
|
1184
|
-
let temp = { MsgEn: ValidationMessage, MsgAr: ValidationMessageAr, Type: Type }
|
|
1185
|
-
if (PGF.ValidationMessage) {
|
|
1186
|
-
if (PGF.ValidationMessage.filter(x => (x.Type == temp.Type && x.MsgEn == temp.MsgEn)).length < 1)
|
|
1187
|
-
PGF.ValidationMessage.push(temp)
|
|
1188
|
-
}
|
|
1189
|
-
else
|
|
1190
|
-
PGF.ValidationMessage = [temp];
|
|
1191
|
-
|
|
1192
|
-
}
|
|
1193
|
-
})
|
|
1194
|
-
})
|
|
1195
|
-
|
|
1196
|
-
})
|
|
1197
|
-
this.defaultPageGroups.map((PG) => {
|
|
1198
|
-
|
|
1199
|
-
PG.Groups.map((group) => {
|
|
1200
|
-
group.Fields.map((PGF) => {
|
|
1201
|
-
if (PGF.Description == Field) {
|
|
1202
|
-
let temp = { MsgEn: ValidationMessage, MsgAr: ValidationMessageAr, Type: Type }
|
|
1203
|
-
if (PGF.ValidationMessage) {
|
|
1204
|
-
if (PGF.ValidationMessage.filter(x => (x.Type == temp.Type && x.MsgEn == temp.MsgEn)).length < 1)
|
|
1205
|
-
PGF.ValidationMessage.push(temp)
|
|
1206
|
-
}
|
|
1207
|
-
else
|
|
1208
|
-
PGF.ValidationMessage = [temp];
|
|
1209
|
-
|
|
1210
|
-
}
|
|
1211
|
-
})
|
|
1212
|
-
})
|
|
1213
|
-
|
|
1214
|
-
})
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
setReadOnlyOnField(Field, IsReadonly: boolean) {
|
|
1220
|
-
this.pageGroups.map((PG) => {
|
|
1221
|
-
|
|
1222
|
-
PG.Groups.map((group) => {
|
|
1223
|
-
group.Fields.map((PGF) => {
|
|
1224
|
-
if (PGF.Description == Field) {
|
|
1225
|
-
PGF.IsReadonly = IsReadonly
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
})
|
|
1229
|
-
})
|
|
1230
|
-
|
|
1231
|
-
})
|
|
1232
|
-
this.defaultPageGroups.map((PG) => {
|
|
1233
|
-
|
|
1234
|
-
PG.Groups.map((group) => {
|
|
1235
|
-
group.Fields.map((PGF) => {
|
|
1236
|
-
if (PGF.Description == Field) {
|
|
1237
|
-
PGF.IsReadonly = IsReadonly
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
})
|
|
1241
|
-
})
|
|
1242
|
-
|
|
1243
|
-
})
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
setIsHideOnField(Field, IsHide: boolean) {
|
|
1247
|
-
this.pageGroups.map((PG) => {
|
|
1248
|
-
|
|
1249
|
-
PG.Groups.map((group) => {
|
|
1250
|
-
group.Fields.map((PGF) => {
|
|
1251
|
-
if (PGF.Description == Field) {
|
|
1252
|
-
PGF.IsHide = IsHide
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
})
|
|
1256
|
-
})
|
|
1257
|
-
|
|
1258
|
-
})
|
|
1259
|
-
this.defaultPageGroups.map((PG) => {
|
|
1260
|
-
|
|
1261
|
-
PG.Groups.map((group) => {
|
|
1262
|
-
group.Fields.map((PGF) => {
|
|
1263
|
-
if (PGF.Description == Field) {
|
|
1264
|
-
PGF.IsHide = IsHide
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
})
|
|
1268
|
-
})
|
|
1269
|
-
|
|
1270
|
-
})
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
setDDLFieldDesc(Field, value) {
|
|
1275
|
-
this.pageGroups.map((PG) => {
|
|
1276
|
-
|
|
1277
|
-
PG.Groups.map((group) => {
|
|
1278
|
-
group.Fields.map((PGF) => {
|
|
1279
|
-
if (PGF.Description == Field) {
|
|
1280
|
-
PGF.showSelectedValues = value
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
})
|
|
1284
|
-
})
|
|
1285
|
-
|
|
1286
|
-
})
|
|
1287
|
-
this.defaultPageGroups.map((PG) => {
|
|
1288
|
-
|
|
1289
|
-
PG.Groups.map((group) => {
|
|
1290
|
-
group.Fields.map((PGF) => {
|
|
1291
|
-
if (PGF.Description == Field) {
|
|
1292
|
-
PGF.showSelectedValues = value
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
})
|
|
1296
|
-
})
|
|
1297
|
-
|
|
1298
|
-
})
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
// getAllValidators(Field) {
|
|
1302
|
-
|
|
1303
|
-
// let validators =[];
|
|
1304
|
-
// this.EntityFieldList.map((field)=> {
|
|
1305
|
-
// if(field.Description ==Field && field.IsMandatory ) {
|
|
1306
|
-
// let rulesObj = {
|
|
1307
|
-
// Condition: "AddValidation",
|
|
1308
|
-
// Field: Field,
|
|
1309
|
-
// Type: 'Required',
|
|
1310
|
-
// Value: '',
|
|
1311
|
-
// ValueTwo: '',
|
|
1312
|
-
// ValidationMessage: null,
|
|
1313
|
-
// ValidationMessageAr: null,
|
|
1314
|
-
// };
|
|
1315
|
-
// validators.push(rulesObj)
|
|
1316
|
-
|
|
1317
|
-
// }
|
|
1318
|
-
// });
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
// if (this.EntityTypeForm.RulesData) { // OnInit Rules
|
|
1322
|
-
// let _formInitRule = JSON.parse(this.EntityTypeForm.RulesData);
|
|
1323
|
-
// let onInitRules = _formInitRule.filter(x => x.Type == "OnInit")
|
|
1324
|
-
// onInitRules.map((rules) => {
|
|
1325
|
-
|
|
1326
|
-
// let rulesData = JSON.parse(rules.Rules);
|
|
1327
|
-
|
|
1328
|
-
// if (Array.isArray(rulesData)) {
|
|
1329
|
-
// let _rulesData = rulesData.filter((x) => {
|
|
1330
|
-
// if (x.CurrentEntityTypeId) {
|
|
1331
|
-
// if (x.CurrentEntityTypeId.includes(this.EntityTypeId))
|
|
1332
|
-
// return x;
|
|
1333
|
-
// }
|
|
1334
|
-
// else
|
|
1335
|
-
// return x;
|
|
1336
|
-
// });
|
|
1337
|
-
|
|
1338
|
-
// _rulesData.map((ruleD) => {
|
|
1339
|
-
// ruleD.action.map((action) => {
|
|
1340
|
-
// if (action.Condition == "AddValidation" && action.Field == Field) {
|
|
1341
|
-
// validators.push(action);
|
|
1342
|
-
// }
|
|
1343
|
-
// });
|
|
1344
|
-
// });
|
|
1345
|
-
|
|
1346
|
-
// }
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
// });
|
|
1350
|
-
// }
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
// this.AllRules.FieldRules.map((rules) => {
|
|
1354
|
-
|
|
1355
|
-
// let rulesData = JSON.parse(rules.Rules);
|
|
1356
|
-
|
|
1357
|
-
// if (Array.isArray(rulesData)) {
|
|
1358
|
-
// let _rulesData = rulesData.filter((x) => {
|
|
1359
|
-
// if (x.CurrentEntityTypeId) {
|
|
1360
|
-
// if (x.CurrentEntityTypeId.includes(this.EntityTypeId))
|
|
1361
|
-
// return x;
|
|
1362
|
-
// }
|
|
1363
|
-
// else
|
|
1364
|
-
// return x;
|
|
1365
|
-
// });
|
|
1366
|
-
|
|
1367
|
-
// _rulesData.map((ruleD) => {
|
|
1368
|
-
// ruleD.action.map((action) => {
|
|
1369
|
-
// if(action.Condition=="AddValidation" && action.Field ==Field) {
|
|
1370
|
-
// validators.push(action);
|
|
1371
|
-
// }
|
|
1372
|
-
// });
|
|
1373
|
-
// });
|
|
1374
|
-
|
|
1375
|
-
// }
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
// });
|
|
1379
|
-
|
|
1380
|
-
// return validators
|
|
1381
|
-
|
|
1382
|
-
// }
|
|
1383
|
-
|
|
1384
|
-
// setMultipleValidation(Field) {
|
|
1385
|
-
// let setVaidators = [];
|
|
1386
|
-
// let allValidation = this.getAllValidators(Field);
|
|
1387
|
-
// allValidation.map((rules) => {
|
|
1388
|
-
// if (rules.Type == 'Required') {
|
|
1389
|
-
// setVaidators.push(Validators.required)
|
|
1390
|
-
// }
|
|
1391
|
-
// else if (rules.Type == 'MinMax') {
|
|
1392
|
-
// if (rules.Value) setVaidators.push(Validators.min(rules.Value));
|
|
1393
|
-
// if (rules.ValueTwo)
|
|
1394
|
-
// setVaidators.push(Validators.max(rules.ValueTwo));
|
|
1395
|
-
// }
|
|
1396
|
-
// if (rules.Type == 'MinLength') {
|
|
1397
|
-
// if (rules.Value)
|
|
1398
|
-
// setVaidators.push(Validators.minLength(rules.Value));
|
|
1399
|
-
// }
|
|
1400
|
-
// if (rules.Type == 'MaxLength') {
|
|
1401
|
-
// if (rules.Value)
|
|
1402
|
-
// setVaidators.push(Validators.maxLength(rules.Value));
|
|
1403
|
-
// }
|
|
1404
|
-
// if (rules.Type == 'Pattern') {
|
|
1405
|
-
// setVaidators.push(Validators.pattern(rules.Value))
|
|
1406
|
-
// }
|
|
1407
|
-
|
|
1408
|
-
// });
|
|
1409
|
-
|
|
1410
|
-
// this._PageForm.form.controls[Field].setValidators(setVaidators);
|
|
1411
|
-
// this._PageForm.form.controls[Field].updateValueAndValidity()
|
|
1412
|
-
|
|
1413
|
-
// }
|
|
1414
|
-
|
|
1415
|
-
fieldValidation: FieldValidators[] = [];
|
|
1416
|
-
|
|
1417
|
-
TempFieldValidators() {
|
|
1418
|
-
this.EntityFieldList.map((field) => {
|
|
1419
|
-
if (field.IsMandatory) {
|
|
1420
|
-
this.fieldValidation.push({ Field: field.Description, Validators: [Validators.required] })
|
|
1421
|
-
}
|
|
1422
|
-
});
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
/* #region SMS-Activity */
|
|
1428
|
-
|
|
1429
|
-
setStaticActivityForm() {
|
|
1430
|
-
|
|
1431
|
-
if(this.EntityTypeForm && this.EntityTypeForm.Status !=1)
|
|
1432
|
-
return
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
if (this.EntityFieldList.length > 0 && this.EntityTypeDetail && this.EntityTypeDetail.EntityType == 30 && (this.EntityTypeDetail.ActionType == "1" || this.EntityTypeDetail.ActionType == "2") ) {
|
|
1436
|
-
|
|
1437
|
-
this.pageGroups = [];
|
|
1438
|
-
this.addRow();
|
|
1439
|
-
|
|
1440
|
-
this.selectRowIndex = 0;
|
|
1441
|
-
this.selectGroupIndex = 0;
|
|
1442
|
-
|
|
1443
|
-
if(this.EntityTypeDetail.ActionType == "1"){
|
|
1444
|
-
this.setSMSActivityStaticForm();
|
|
1445
|
-
}
|
|
1446
|
-
if(this.EntityTypeDetail.ActionType == "2"){
|
|
1447
|
-
this.setEmailActivityStaticForm();
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
setSMSActivityStaticForm() {
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
let _Fields = [];
|
|
1457
|
-
let _MobileNumber = this.EntityFieldList.filter(x => x.Description == "MobileNumber");
|
|
1458
|
-
if (!_MobileNumber || _MobileNumber.length == 0) {
|
|
1459
|
-
Swal.fire(this.translatePipe.transform("MobileNumber Field not found"));
|
|
1460
|
-
return
|
|
1461
|
-
}
|
|
1462
|
-
_Fields.push(_MobileNumber[0]);
|
|
1463
|
-
|
|
1464
|
-
let _Message = this.EntityFieldList.filter(x => x.Description == "Message");
|
|
1465
|
-
if (!_Message || _Message.length == 0) {
|
|
1466
|
-
Swal.fire(this.translatePipe.transform("Message Field not found"));
|
|
1467
|
-
return
|
|
1468
|
-
}
|
|
1469
|
-
_Fields.push(_Message[0]);
|
|
1470
|
-
|
|
1471
|
-
this.submitDataFields(_Fields)
|
|
1472
|
-
this.saveDesignForm()
|
|
1473
|
-
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
/* #endregion */
|
|
1477
|
-
|
|
1478
|
-
/* #region Email-Activity */
|
|
1479
|
-
setEmailActivityStaticForm() {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
let _Fields = [];
|
|
1483
|
-
let _To = this.EntityFieldList.filter(x => x.Description == "To");
|
|
1484
|
-
if (!_To || _To.length == 0) {
|
|
1485
|
-
Swal.fire(this.translatePipe.transform("To Field not found"));
|
|
1486
|
-
return
|
|
1487
|
-
}
|
|
1488
|
-
_Fields.push(_To[0]);
|
|
1489
|
-
|
|
1490
|
-
let _CC = this.EntityFieldList.filter(x => x.Description == "CC");
|
|
1491
|
-
if (!_CC || _CC.length == 0) {
|
|
1492
|
-
Swal.fire(this.translatePipe.transform("CC Field not found"));
|
|
1493
|
-
return
|
|
1494
|
-
}
|
|
1495
|
-
_Fields.push(_CC[0]);
|
|
1496
|
-
|
|
1497
|
-
let _Subject = this.EntityFieldList.filter(x => x.Description == "Subject");
|
|
1498
|
-
if (!_Subject || _Subject.length == 0) {
|
|
1499
|
-
Swal.fire(this.translatePipe.transform("Subject Field not found"));
|
|
1500
|
-
return
|
|
1501
|
-
}
|
|
1502
|
-
_Fields.push(_Subject[0]);
|
|
1503
|
-
|
|
1504
|
-
let _Message = this.EntityFieldList.filter(x => x.Description == "Message");
|
|
1505
|
-
if (!_Message || _Message.length == 0) {
|
|
1506
|
-
Swal.fire(this.translatePipe.transform("Message Field not found "));
|
|
1507
|
-
return
|
|
1508
|
-
}
|
|
1509
|
-
_Fields.push(_Message[0]);
|
|
1510
|
-
|
|
1511
|
-
this.submitDataFields(_Fields)
|
|
1512
|
-
this.saveDesignForm()
|
|
1513
|
-
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
/* #endregion */
|
|
1517
|
-
|
|
1518
|
-
translatePipe = new TranslatePipe(this.globelService);
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
export function moveItem(data: any[], from: number, to: number) {
|
|
1522
|
-
let f = data.splice(from, 1)[0];
|
|
1523
|
-
data.splice(to, 0, f);
|
|
1524
|
-
return data;
|
|
1525
|
-
}
|
|
1526
|
-
|