arco-support-request 0.0.62 → 0.0.65
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/karma.conf.js +44 -0
- package/ng-package.json +18 -0
- package/package.json +11 -22
- package/src/lib/Pipe/allpipe.pipe.ts +127 -0
- package/src/lib/Pipe/handlebar-helper-register.ts +197 -0
- package/src/lib/Pipe/translate.pipe.ts +32 -0
- package/src/lib/all-routing.ts +61 -0
- package/src/lib/arco-support-request.component.spec.ts +25 -0
- package/src/lib/arco-support-request.component.ts +20 -0
- package/src/lib/arco-support-request.module.ts +19 -0
- package/src/lib/arco-support-request.service.spec.ts +16 -0
- package/src/lib/arco-support-request.service.ts +16 -0
- package/src/lib/commonstyles/new-style-rtl.css +381 -0
- package/src/lib/commonstyles/styles.scss +3984 -0
- package/src/lib/core/encodeurl.service.ts +23 -0
- package/src/lib/core/global.service.ts +1810 -0
- package/src/lib/core/handlebar-helper-register.ts +213 -0
- package/src/lib/core/httpcancel.service.ts +21 -0
- package/src/lib/core/loader.service.ts +19 -0
- package/src/lib/core/loading-provider.service.ts +64 -0
- package/src/lib/core/managehttp.interceptor.ts +49 -0
- package/src/lib/core/static/jwt.ts +7 -0
- package/src/lib/core/token.service.ts +37 -0
- package/src/lib/entity-type-setup/activities-create/activities-create.component.html +68 -0
- package/src/lib/entity-type-setup/activities-create/activities-create.component.scss +0 -0
- package/src/lib/entity-type-setup/activities-create/activities-create.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/activities-create/activities-create.component.ts +121 -0
- package/src/lib/entity-type-setup/activities-view/activities-view.component.html +19 -0
- package/src/lib/entity-type-setup/activities-view/activities-view.component.scss +3 -0
- package/src/lib/entity-type-setup/activities-view/activities-view.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/activities-view/activities-view.component.ts +53 -0
- package/src/lib/entity-type-setup/activity-template/activity-template.component.html +73 -0
- 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 +25 -0
- package/src/lib/entity-type-setup/activity-template/activity-template.component.ts +208 -0
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.html +356 -0
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.scss +50 -0
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.ts +346 -0
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.html +92 -0
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.scss +90 -0
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/commom-condition/commom-condition.component.ts +74 -0
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.html +57 -0
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.scss +16 -0
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.ts +59 -0
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.html +102 -0
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.scss +3 -0
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.ts +498 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.html +408 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.scss +123 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.ts +1051 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.ts +84 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.html +194 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.scss +81 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.ts +1466 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.html +137 -0
- 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 +25 -0
- package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.ts +1232 -0
- package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.html +329 -0
- 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 +25 -0
- package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.ts +520 -0
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.html +609 -0
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.scss +99 -0
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.ts +784 -0
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.html +632 -0
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.scss +261 -0
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.ts +765 -0
- package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.html +368 -0
- 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 +25 -0
- package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.ts +334 -0
- package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.html +500 -0
- 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 +25 -0
- package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.ts +862 -0
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.html +139 -0
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.scss +14 -0
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.ts +347 -0
- package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.html +150 -0
- package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.scss +27 -0
- package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.ts +384 -0
- package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.html +305 -0
- package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.scss +31 -0
- package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.ts +572 -0
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.html +610 -0
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.scss +50 -0
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.ts +633 -0
- package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.html +609 -0
- package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.scss +4 -0
- package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.ts +702 -0
- package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.html +530 -0
- package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.scss +12 -0
- package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.ts +767 -0
- package/src/lib/entity-type-setup/entity-type-setup-routing.module.ts +92 -0
- package/src/lib/entity-type-setup/entity-type-setup.module.ts +114 -0
- package/src/lib/entity-type-setup/events/events.component.html +211 -0
- package/src/lib/entity-type-setup/events/events.component.scss +61 -0
- package/src/lib/entity-type-setup/events/events.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/events/events.component.ts +517 -0
- package/src/lib/entity-type-setup/field-type/field-type.component.html +447 -0
- 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 +25 -0
- package/src/lib/entity-type-setup/field-type/field-type.component.ts +531 -0
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.html +152 -0
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.scss +24 -0
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.ts +35 -0
- package/src/lib/entity-type-setup/instruction/instruction.component.html +239 -0
- package/src/lib/entity-type-setup/instruction/instruction.component.scss +18 -0
- package/src/lib/entity-type-setup/instruction/instruction.component.ts +450 -0
- package/src/lib/entity-type-setup/interface/entityTypeInterface.ts +1045 -0
- package/src/lib/entity-type-setup/interface/eventEnum.ts +191 -0
- package/src/lib/entity-type-setup/issue-group/issue-group.component.html +77 -0
- 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 +221 -0
- package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.html +192 -0
- package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.scss +10 -0
- package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.ts +418 -0
- package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.html +42 -0
- package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.scss +8 -0
- package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.ts +52 -0
- package/src/lib/entity-type-setup/my-task/my-task.component.html +599 -0
- 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 +25 -0
- package/src/lib/entity-type-setup/my-task/my-task.component.ts +770 -0
- package/src/lib/entity-type-setup/page-form-instance.ts +73 -0
- package/src/lib/entity-type-setup/page.interface.classes.ts +43 -0
- package/src/lib/entity-type-setup/service/dropdown.directive.ts +12 -0
- package/src/lib/entity-type-setup/service/entity-type-setup.service.ts +2821 -0
- package/src/lib/entity-type-setup/task-crete/task-crete.component.html +61 -0
- 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 +117 -0
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.html +95 -0
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.scss +23 -0
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/ticket-create/ticket-create.component.ts +213 -0
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.html +222 -0
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.scss +14 -0
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.spec.ts +25 -0
- package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.ts +328 -0
- package/src/lib/search.pipe.spec.ts +8 -0
- package/src/lib/search.pipe.ts +21 -0
- package/src/lib/support-request/action/action.component.html +122 -0
- package/src/lib/support-request/action/action.component.scss +6 -0
- package/src/lib/support-request/action/action.component.ts +179 -0
- package/src/lib/support-request/case-list/case-list.component.html +220 -0
- package/src/lib/support-request/case-list/case-list.component.scss +208 -0
- package/src/lib/support-request/case-list/case-list.component.ts +433 -0
- package/src/lib/support-request/home/home.component.html +16 -0
- package/src/lib/support-request/home/home.component.scss +4 -0
- package/src/lib/support-request/home/home.component.ts +23 -0
- package/src/lib/support-request/pagination/pagination.component.html +71 -0
- package/src/lib/support-request/pagination/pagination.component.scss +77 -0
- package/src/lib/support-request/pagination/pagination.component.ts +29 -0
- package/src/lib/support-request/request-flow/request-flow.component.html +330 -0
- package/src/lib/support-request/request-flow/request-flow.component.scss +2 -0
- package/src/lib/support-request/request-flow/request-flow.component.ts +846 -0
- package/src/lib/support-request/self-service-flow/self-service-flow.component.html +64 -0
- package/src/lib/support-request/self-service-flow/self-service-flow.component.scss +2 -0
- package/src/lib/support-request/self-service-flow/self-service-flow.component.ts +87 -0
- package/src/lib/support-request/support-request-create/support-request-create.component.html +103 -0
- package/src/lib/support-request/support-request-create/support-request-create.component.scss +39 -0
- package/src/lib/support-request/support-request-create/support-request-create.component.ts +319 -0
- package/src/lib/support-request/support-request-details/support-request-details.component.html +268 -0
- package/src/lib/support-request/support-request-details/support-request-details.component.scss +319 -0
- package/src/lib/support-request/support-request-details/support-request-details.component.ts +678 -0
- package/src/lib/support-request/support-request-index/support-request-index.component.html +4 -0
- 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 +16 -0
- package/src/lib/support-request/support-request-list/support-request-list.component.html +455 -0
- 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 +869 -0
- package/src/lib/support-request/support-request-routing.module.ts +21 -0
- package/src/lib/support-request/support-request.module.ts +103 -0
- package/src/lib/support-request/support-request.service.ts +145 -0
- package/src/lib/support-request/supportRequestInterface.ts +6 -0
- package/src/lib/task/Interfaces/TaskInterface.ts +164 -0
- package/src/lib/task/Services/task.service.spec.ts +16 -0
- package/src/lib/task/Services/task.service.ts +354 -0
- package/src/lib/task/task-routing.module.ts +12 -0
- package/src/lib/task/task.module.ts +23 -0
- package/src/lib/template/template.component.html +22 -0
- package/src/lib/template/template.component.scss +0 -0
- package/src/lib/template/template.component.spec.ts +25 -0
- package/src/lib/template/template.component.ts +24 -0
- package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.html +83 -0
- package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.scss +0 -0
- package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.ts +120 -0
- package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.html +134 -0
- package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.scss +0 -0
- package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.ts +185 -0
- package/src/lib/templates/attachmentsetup/attachment-api.ts +55 -0
- package/src/lib/templates/attachmentsetup/attachment-interface.ts +100 -0
- package/src/lib/templates/attachmentsetup/attachment.service.ts +233 -0
- package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.html +97 -0
- package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.scss +10 -0
- package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.ts +367 -0
- package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.html +49 -0
- package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.scss +0 -0
- package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.ts +226 -0
- package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.html +140 -0
- package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.scss +8 -0
- package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.ts +176 -0
- package/src/lib/templates/card/card.component.html +56 -0
- package/src/lib/templates/card/card.component.scss +0 -0
- package/src/lib/templates/card/card.component.spec.ts +25 -0
- package/src/lib/templates/card/card.component.ts +306 -0
- package/src/lib/templates/dashboard/dashboard.component.html +333 -0
- package/src/lib/templates/dashboard/dashboard.component.scss +16 -0
- package/src/lib/templates/dashboard/dashboard.component.ts +2290 -0
- package/src/lib/templates/details/details.component.html +233 -0
- package/src/lib/templates/details/details.component.scss +0 -0
- package/src/lib/templates/details/details.component.spec.ts +25 -0
- package/src/lib/templates/details/details.component.ts +15 -0
- package/src/lib/templates/detailstwo/detailstwo.component.html +694 -0
- package/src/lib/templates/detailstwo/detailstwo.component.scss +0 -0
- package/src/lib/templates/detailstwo/detailstwo.component.spec.ts +25 -0
- package/src/lib/templates/detailstwo/detailstwo.component.ts +15 -0
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.html +1 -0
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.scss +0 -0
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.spec.ts +25 -0
- package/src/lib/templates/dyanamic-page/dyanamic-page.component.ts +15 -0
- package/src/lib/templates/grid/grid-datatype/grid-datatype.component.ts +39 -0
- package/src/lib/templates/grid/grid-service.service.ts +140 -0
- package/src/lib/templates/grid/grid.component.html +270 -0
- package/src/lib/templates/grid/grid.component.scss +99 -0
- package/src/lib/templates/grid/grid.component.spec.ts +25 -0
- package/src/lib/templates/grid/grid.component.ts +458 -0
- package/src/lib/templates/grid/inner-grid/inner-grid.component.html +1 -0
- 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 +25 -0
- package/src/lib/templates/grid/inner-grid/inner-grid.component.ts +15 -0
- package/src/lib/templates/home/home.component.html +251 -0
- package/src/lib/templates/home/home.component.scss +20 -0
- package/src/lib/templates/home/home.component.spec.ts +25 -0
- package/src/lib/templates/home/home.component.ts +15 -0
- package/src/lib/templates/interface_enum/common-Interface.ts +107 -0
- package/src/lib/templates/interface_enum/common-enum.ts +147 -0
- package/src/lib/templates/interface_enum/icon-class.ts +1149 -0
- package/src/lib/templates/leftside/leftside.component.html +77 -0
- package/src/lib/templates/leftside/leftside.component.scss +0 -0
- package/src/lib/templates/leftside/leftside.component.spec.ts +25 -0
- package/src/lib/templates/leftside/leftside.component.ts +238 -0
- package/src/lib/templates/login/login.component.html +93 -0
- package/src/lib/templates/login/login.component.scss +110 -0
- package/src/lib/templates/login/login.component.spec.ts +25 -0
- package/src/lib/templates/login/login.component.ts +142 -0
- package/src/lib/templates/main-content/main-content.component.html +31 -0
- package/src/lib/templates/main-content/main-content.component.scss +6 -0
- package/src/lib/templates/main-content/main-content.component.spec.ts +25 -0
- package/src/lib/templates/main-content/main-content.component.ts +24 -0
- package/src/lib/templates/menu-item/child-menu/child-menu.component.html +5 -0
- package/src/lib/templates/menu-item/child-menu/child-menu.component.scss +3 -0
- package/src/lib/templates/menu-item/child-menu/child-menu.component.ts +22 -0
- package/src/lib/templates/menu-item/menu-item.component.html +25 -0
- package/src/lib/templates/menu-item/menu-item.component.scss +11 -0
- package/src/lib/templates/menu-item/menu-item.component.ts +29 -0
- package/src/lib/templates/pagination/pagination.component.html +71 -0
- package/src/lib/templates/pagination/pagination.component.scss +73 -0
- package/src/lib/templates/pagination/pagination.component.ts +29 -0
- 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 +14 -0
- package/src/lib/templates/pipe/multiple-search.pipe.ts +28 -0
- package/src/lib/templates/pipe/simple-search.pipe.ts +18 -0
- package/src/lib/templates/pipe/translate.pipe.ts +31 -0
- package/src/lib/templates/request-flow-dash/request-flow-dash.component.html +16 -0
- 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 +25 -0
- package/src/lib/templates/request-flow-dash/request-flow-dash.component.ts +59 -0
- package/src/lib/templates/table/table.component.html +310 -0
- package/src/lib/templates/table/table.component.scss +0 -0
- package/src/lib/templates/table/table.component.spec.ts +25 -0
- package/src/lib/templates/table/table.component.ts +52 -0
- package/src/lib/templates/template.service.ts +43 -0
- package/src/lib/templates/templates-routing.module.ts +21 -0
- package/src/lib/templates/templates.module.ts +80 -0
- package/src/lib/templates/topnav/topnav.component.html +172 -0
- package/src/lib/templates/topnav/topnav.component.scss +10 -0
- package/src/lib/templates/topnav/topnav.component.spec.ts +25 -0
- package/src/lib/templates/topnav/topnav.component.ts +59 -0
- package/src/lib/ticket/_interfaces/master-models.ts +66 -0
- package/src/lib/ticket/_interfaces/model.ts +252 -0
- package/src/lib/ticket/_ticket-services/ticket-api.service.ts +319 -0
- package/src/lib/ticket/_ticket-services/ticket-master-api.service.ts +169 -0
- package/src/lib/ticket/_ticket-services/ticket-priority.service.ts +86 -0
- package/src/lib/ticket/_ticket-services/ticketchannel.service.ts +107 -0
- package/src/lib/ticket/ticket-routing.module.ts +12 -0
- package/src/lib/ticket/ticket.module.ts +29 -0
- package/{public-api.d.ts → src/public-api.ts} +6 -1
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +25 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/arco-support-request.d.ts +0 -32
- package/arco-support-request.metadata.json +0 -1
- package/bundles/arco-support-request.umd.js +0 -10898
- package/bundles/arco-support-request.umd.js.map +0 -1
- package/bundles/arco-support-request.umd.min.js +0 -2
- package/bundles/arco-support-request.umd.min.js.map +0 -1
- package/esm2015/arco-support-request.js +0 -33
- package/esm2015/lib/Pipe/allpipe.pipe.js +0 -110
- package/esm2015/lib/Pipe/translate.pipe.js +0 -31
- package/esm2015/lib/arco-support-request.component.js +0 -18
- package/esm2015/lib/arco-support-request.module.js +0 -20
- package/esm2015/lib/arco-support-request.service.js +0 -19
- package/esm2015/lib/core/global.service.js +0 -1747
- package/esm2015/lib/core/handlebar-helper-register.js +0 -182
- package/esm2015/lib/core/static/jwt.js +0 -8
- package/esm2015/lib/entity-type-setup/activities-create/activities-create.component.js +0 -105
- package/esm2015/lib/entity-type-setup/activities-view/activities-view.component.js +0 -46
- package/esm2015/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.js +0 -367
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.js +0 -850
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.js +0 -85
- package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.js +0 -957
- package/esm2015/lib/entity-type-setup/interface/entityTypeInterface.js +0 -51
- package/esm2015/lib/entity-type-setup/interface/eventEnum.js +0 -84
- package/esm2015/lib/entity-type-setup/page-form-instance.js +0 -65
- package/esm2015/lib/entity-type-setup/page.interface.classes.js +0 -40
- package/esm2015/lib/entity-type-setup/service/entity-type-setup.service.js +0 -1833
- package/esm2015/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.js +0 -276
- package/esm2015/lib/search.pipe.js +0 -19
- package/esm2015/lib/support-request/action/action.component.js +0 -104
- package/esm2015/lib/support-request/case-list/case-list.component.js +0 -381
- package/esm2015/lib/support-request/home/home.component.js +0 -23
- package/esm2015/lib/support-request/pagination/pagination.component.js +0 -34
- package/esm2015/lib/support-request/request-flow/request-flow.component.js +0 -662
- package/esm2015/lib/support-request/self-service-flow/self-service-flow.component.js +0 -78
- package/esm2015/lib/support-request/support-request-create/support-request-create.component.js +0 -270
- package/esm2015/lib/support-request/support-request-details/support-request-details.component.js +0 -502
- package/esm2015/lib/support-request/support-request-index/support-request-index.component.js +0 -16
- package/esm2015/lib/support-request/support-request-routing.module.js +0 -22
- package/esm2015/lib/support-request/support-request.module.js +0 -98
- package/esm2015/lib/support-request/support-request.service.js +0 -105
- package/esm2015/lib/support-request/supportRequestInterface.js +0 -2
- package/esm2015/lib/task/Interfaces/TaskInterface.js +0 -7
- package/esm2015/lib/task/Services/task.service.js +0 -251
- package/esm2015/lib/templates/Pipe/translate.pipe.js +0 -31
- package/esm2015/lib/templates/attachmentsetup/attachment-interface.js +0 -2
- package/esm2015/lib/templates/attachmentsetup/attachment.service.js +0 -196
- package/esm2015/lib/templates/grid/grid-datatype/grid-datatype.component.js +0 -37
- package/esm2015/lib/templates/grid/grid-service.service.js +0 -85
- package/esm2015/lib/templates/grid/grid.component.js +0 -436
- package/esm2015/lib/templates/grid/inner-grid/inner-grid.component.js +0 -15
- package/esm2015/lib/templates/interface_enum/common-Interface.js +0 -2
- package/esm2015/lib/templates/interface_enum/common-enum.js +0 -153
- package/esm2015/lib/ticket/_interfaces/model.js +0 -2
- package/esm2015/lib/ticket/_ticket-services/ticket-api.service.js +0 -232
- package/esm2015/public-api.js +0 -9
- package/fesm2015/arco-support-request.js +0 -10298
- package/fesm2015/arco-support-request.js.map +0 -1
- package/lib/Pipe/allpipe.pipe.d.ts +0 -19
- package/lib/Pipe/translate.pipe.d.ts +0 -7
- package/lib/arco-support-request.component.d.ts +0 -5
- package/lib/arco-support-request.module.d.ts +0 -2
- package/lib/arco-support-request.service.d.ts +0 -9
- package/lib/core/global.service.d.ts +0 -78
- package/lib/core/handlebar-helper-register.d.ts +0 -1
- package/lib/core/static/jwt.d.ts +0 -7
- package/lib/entity-type-setup/activities-create/activities-create.component.d.ts +0 -30
- package/lib/entity-type-setup/activities-view/activities-view.component.d.ts +0 -16
- package/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.d.ts +0 -67
- package/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.d.ts +0 -88
- package/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.d.ts +0 -11
- package/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.d.ts +0 -69
- package/lib/entity-type-setup/interface/entityTypeInterface.d.ts +0 -916
- package/lib/entity-type-setup/interface/eventEnum.d.ts +0 -161
- package/lib/entity-type-setup/page-form-instance.d.ts +0 -13
- package/lib/entity-type-setup/page.interface.classes.d.ts +0 -33
- package/lib/entity-type-setup/service/entity-type-setup.service.d.ts +0 -604
- package/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.d.ts +0 -66
- package/lib/search.pipe.d.ts +0 -4
- package/lib/support-request/action/action.component.d.ts +0 -31
- package/lib/support-request/case-list/case-list.component.d.ts +0 -86
- package/lib/support-request/home/home.component.d.ts +0 -6
- package/lib/support-request/pagination/pagination.component.d.ts +0 -18
- package/lib/support-request/request-flow/request-flow.component.d.ts +0 -142
- package/lib/support-request/self-service-flow/self-service-flow.component.d.ts +0 -31
- package/lib/support-request/support-request-create/support-request-create.component.d.ts +0 -55
- package/lib/support-request/support-request-details/support-request-details.component.d.ts +0 -116
- package/lib/support-request/support-request-index/support-request-index.component.d.ts +0 -5
- package/lib/support-request/support-request-routing.module.d.ts +0 -2
- package/lib/support-request/support-request.module.d.ts +0 -2
- package/lib/support-request/support-request.service.d.ts +0 -35
- package/lib/support-request/supportRequestInterface.d.ts +0 -6
- package/lib/task/Interfaces/TaskInterface.d.ts +0 -132
- package/lib/task/Services/task.service.d.ts +0 -75
- package/lib/templates/Pipe/translate.pipe.d.ts +0 -7
- package/lib/templates/attachmentsetup/attachment-interface.d.ts +0 -90
- package/lib/templates/attachmentsetup/attachment.service.d.ts +0 -61
- package/lib/templates/grid/grid-datatype/grid-datatype.component.d.ts +0 -11
- package/lib/templates/grid/grid-service.service.d.ts +0 -40
- package/lib/templates/grid/grid.component.d.ts +0 -155
- package/lib/templates/grid/inner-grid/inner-grid.component.d.ts +0 -5
- package/lib/templates/interface_enum/common-Interface.d.ts +0 -90
- package/lib/templates/interface_enum/common-enum.d.ts +0 -129
- package/lib/ticket/_interfaces/model.d.ts +0 -192
- package/lib/ticket/_ticket-services/ticket-api.service.d.ts +0 -81
package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.ts
ADDED
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
import { Component, Input, OnInit, Output, EventEmitter, SimpleChanges } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
EntityTypeFieldVM,
|
|
4
|
+
ILookUpJsonFieldData,
|
|
5
|
+
} from '../../interface/entityTypeInterface';
|
|
6
|
+
import { FormGroup, FormBuilder } from '@angular/forms';
|
|
7
|
+
import { E_DataType } from '../../../templates/interface_enum/common-enum';
|
|
8
|
+
import { EntityTypeSetupService } from '../../service/entity-type-setup.service';
|
|
9
|
+
import { Observable } from 'rxjs';
|
|
10
|
+
import { PageForm } from '../../page-form-instance';
|
|
11
|
+
import {
|
|
12
|
+
IRestConfig,
|
|
13
|
+
ISearchCriteria } from '../../../templates/interface_enum/common-Interface';
|
|
14
|
+
import Swal from 'sweetalert2';
|
|
15
|
+
import { GlobalService } from '../../../core/global.service';
|
|
16
|
+
import { TranslatePipe } from '../../../Pipe/translate.pipe';
|
|
17
|
+
import { FilterPipe, UniqueFilterPipe } from '../../../Pipe/allpipe.pipe';
|
|
18
|
+
import * as Handlebars from 'handlebars';
|
|
19
|
+
declare var $: any;
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'app-entity-dynamic-field',
|
|
23
|
+
templateUrl: './entity-dynamic-field.component.html',
|
|
24
|
+
styleUrls: ['./entity-dynamic-field.component.scss'],
|
|
25
|
+
})
|
|
26
|
+
export class EntityDynamicFieldComponent implements OnInit {
|
|
27
|
+
constructor(
|
|
28
|
+
private entityTypeSetup: EntityTypeSetupService,
|
|
29
|
+
public globalService: GlobalService,
|
|
30
|
+
) {}
|
|
31
|
+
|
|
32
|
+
ngOnInit(): void {
|
|
33
|
+
|
|
34
|
+
this.entityTypeSetup.onPlaceHolderSelect.subscribe((x) => {
|
|
35
|
+
if (x && x.placeholder) this.clks(x.placeholder,x.Type);
|
|
36
|
+
});
|
|
37
|
+
this.OnSelectRequestorValue();
|
|
38
|
+
// this.setDDLValueOnEditMode()
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
this.getListFieldData()
|
|
42
|
+
// this.generateDropDownFields()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
46
|
+
|
|
47
|
+
if(changes && changes.fieldsList && changes.fieldsList.firstChange==false) {
|
|
48
|
+
|
|
49
|
+
this.OnSelectRequestorValue("ngOnChanges");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@Input() RequestorField: any = null;
|
|
55
|
+
@Input() RequestorFieldValue: any = null;
|
|
56
|
+
|
|
57
|
+
@Input() ParameterData:any=null;
|
|
58
|
+
|
|
59
|
+
@Input() fieldsList: EntityTypeFieldVM[] = [];
|
|
60
|
+
@Input() dynamicFormGroup: FormGroup;
|
|
61
|
+
@Input() pageForm: PageForm;
|
|
62
|
+
@Input() PageGroupValues: any = {};
|
|
63
|
+
@Input() submitted: boolean;
|
|
64
|
+
@Input() Type: string = 'Design';
|
|
65
|
+
@Input() rowIndex: number;
|
|
66
|
+
@Input() groupIndex: number;
|
|
67
|
+
@Input() ActionType: any;
|
|
68
|
+
|
|
69
|
+
@Input() EntityType: number;
|
|
70
|
+
|
|
71
|
+
@Output() FieldChangeEvent: any = new EventEmitter<{
|
|
72
|
+
FieldData: any;
|
|
73
|
+
RestData: any;
|
|
74
|
+
}>();
|
|
75
|
+
@Output() deleteField: any = new EventEmitter<{
|
|
76
|
+
fieldIndex: number;
|
|
77
|
+
groupIndex: number;
|
|
78
|
+
rowIndex: number;
|
|
79
|
+
}>();
|
|
80
|
+
@Output() downField: any = new EventEmitter<{
|
|
81
|
+
fieldIndex: number;
|
|
82
|
+
groupIndex: number;
|
|
83
|
+
rowIndex: number;
|
|
84
|
+
}>();
|
|
85
|
+
@Output() upField: any = new EventEmitter<{
|
|
86
|
+
fieldIndex: number;
|
|
87
|
+
groupIndex: number;
|
|
88
|
+
rowIndex: number;
|
|
89
|
+
}>();
|
|
90
|
+
|
|
91
|
+
_dataType = E_DataType;
|
|
92
|
+
|
|
93
|
+
dropDown$ = Object.assign({});
|
|
94
|
+
dropDownColumn$: any[] = [];
|
|
95
|
+
generateDropDownFields() {
|
|
96
|
+
for (const iterator of this.fieldsList) {
|
|
97
|
+
if (iterator.DataType == E_DataType.dropdown) {
|
|
98
|
+
this.dropDown$[iterator.Description] = new Observable((obx) => {
|
|
99
|
+
if (iterator.FieldData) {
|
|
100
|
+
var jsonItem = JSON.parse(iterator.FieldData);
|
|
101
|
+
if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
|
|
102
|
+
const url = jsonItem.api.url;
|
|
103
|
+
this.entityTypeSetup.getDyamicUrl(url).subscribe((ress: any) => {
|
|
104
|
+
|
|
105
|
+
let res = ress;
|
|
106
|
+
if (ress && ress?.entities) res = ress.entities;
|
|
107
|
+
if (ress && ress?.Data) res = ress.Data;
|
|
108
|
+
if (ress && ress?.templates) res = ress.templates;
|
|
109
|
+
if (ress && ress?.Data && ress?.Data?.Data) res = ress.Data.Data;
|
|
110
|
+
|
|
111
|
+
if (res && Array.isArray(res) && res.length > 0) {
|
|
112
|
+
obx.next(
|
|
113
|
+
res.map((x) =>
|
|
114
|
+
Object.assign({
|
|
115
|
+
Id: x[jsonItem.api.valueField],
|
|
116
|
+
Description: x[jsonItem.api.textField],
|
|
117
|
+
})
|
|
118
|
+
)
|
|
119
|
+
);
|
|
120
|
+
} else if (
|
|
121
|
+
Object.keys(res).length > 0 &&
|
|
122
|
+
Object.keys(res).includes('List')
|
|
123
|
+
) {
|
|
124
|
+
obx.next(
|
|
125
|
+
res['List'].map((x) =>
|
|
126
|
+
Object.assign({
|
|
127
|
+
Id: x[jsonItem.api.valueField],
|
|
128
|
+
Description: x[jsonItem.api.textField],
|
|
129
|
+
})
|
|
130
|
+
)
|
|
131
|
+
);
|
|
132
|
+
} else obx.next([]);
|
|
133
|
+
});
|
|
134
|
+
} else {
|
|
135
|
+
if (
|
|
136
|
+
jsonItem.options &&
|
|
137
|
+
Array.isArray(jsonItem.options) &&
|
|
138
|
+
jsonItem.options.length > 0
|
|
139
|
+
) {
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
obx.next(
|
|
143
|
+
jsonItem.options.map((x) =>
|
|
144
|
+
Object.assign({
|
|
145
|
+
Id: x.value,
|
|
146
|
+
Description: x.text,
|
|
147
|
+
})
|
|
148
|
+
)
|
|
149
|
+
);
|
|
150
|
+
} else obx.next([]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
validationError(name: string, errorName: string) {
|
|
159
|
+
if (name && errorName)
|
|
160
|
+
return this.dynamicFormGroup.get(name).errors[errorName] ? true : false;
|
|
161
|
+
else return this.dynamicFormGroup.get(name).errors ? true : false;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
getType(_dataType: E_DataType | number) {
|
|
165
|
+
switch (_dataType) {
|
|
166
|
+
case E_DataType.int:
|
|
167
|
+
case E_DataType.decimal:
|
|
168
|
+
return 'number';
|
|
169
|
+
case E_DataType.date:
|
|
170
|
+
return 'date';
|
|
171
|
+
case E_DataType.dateTime:
|
|
172
|
+
return 'datetime-local';
|
|
173
|
+
case E_DataType.timespan:
|
|
174
|
+
return 'time';
|
|
175
|
+
case E_DataType.bool:
|
|
176
|
+
return 'checkbox';
|
|
177
|
+
case E_DataType.string:
|
|
178
|
+
return 'text';
|
|
179
|
+
case E_DataType.image:
|
|
180
|
+
return 'file';
|
|
181
|
+
|
|
182
|
+
default:
|
|
183
|
+
return 'text';
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
changeTextEvent(event) {
|
|
188
|
+
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
setDDLValueOnEditMode() {
|
|
193
|
+
if (this.PageGroupValues && this.PageGroupValues.RecId) {
|
|
194
|
+
this.fieldsList.map((x) => {
|
|
195
|
+
if (x.DataType == E_DataType.dropdown) {
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
let _field=x.Description+"_Desc"
|
|
199
|
+
if( _field in this.PageGroupValues) {
|
|
200
|
+
|
|
201
|
+
x.showSelectedValues = this.PageGroupValues[_field];
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
x.showSelectedValues = this.PageGroupValues[x.Description];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
});
|
|
210
|
+
alert("asa");
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
datatype: any;
|
|
219
|
+
changeFiledValue(event, item, SelectedObj?) {
|
|
220
|
+
// alert("change")
|
|
221
|
+
|
|
222
|
+
// let val = event.target.value;
|
|
223
|
+
// let id= event.target.id;
|
|
224
|
+
// let x =this.pageForm.form.get[id];
|
|
225
|
+
this.FieldChangeEvent.emit({ FieldData: item, RestData: SelectedObj });
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
SelectedFiles: any = null;
|
|
229
|
+
selectedFileItem: any = null;
|
|
230
|
+
|
|
231
|
+
changeFile(event: any, item) {
|
|
232
|
+
// alert("change");
|
|
233
|
+
|
|
234
|
+
this.selectedFileItem = item;
|
|
235
|
+
this.SelectedFiles = event.target.files;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
_deleteField(fieldIndex) {
|
|
239
|
+
this.deleteField.emit({
|
|
240
|
+
fieldIndex: fieldIndex,
|
|
241
|
+
groupIndex: this.groupIndex,
|
|
242
|
+
rowIndex: this.rowIndex,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
_downField(fieldIndex) {
|
|
246
|
+
this.downField.emit({
|
|
247
|
+
fieldIndex: fieldIndex,
|
|
248
|
+
groupIndex: this.groupIndex,
|
|
249
|
+
rowIndex: this.rowIndex,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
_upField(fieldIndex) {
|
|
253
|
+
this.upField.emit({
|
|
254
|
+
fieldIndex: fieldIndex,
|
|
255
|
+
groupIndex: this.groupIndex,
|
|
256
|
+
rowIndex: this.rowIndex,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
getFiledKey(keyValue, lookup) {
|
|
261
|
+
let key = keyValue;
|
|
262
|
+
let lookupValue: ILookUpJsonFieldData = JSON.parse(lookup);
|
|
263
|
+
if (lookupValue) key = lookupValue.IdDescription;
|
|
264
|
+
return key;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
tempFields: any;
|
|
268
|
+
|
|
269
|
+
loadDropdown(
|
|
270
|
+
field: EntityTypeFieldVM,
|
|
271
|
+
searchCriteria?: any,
|
|
272
|
+
RequestorField?:any,
|
|
273
|
+
SearchText?:any
|
|
274
|
+
) {
|
|
275
|
+
|
|
276
|
+
this.tempFields = field;
|
|
277
|
+
|
|
278
|
+
if (field.DataType == E_DataType.dropdown) {
|
|
279
|
+
// if(field.LookupData) {
|
|
280
|
+
// let _lookdata = JSON.parse(field.LookupData);
|
|
281
|
+
// let columns =_lookdata.IdField.split(",");
|
|
282
|
+
// this.dropDownColumn$[field.Description] = columns;
|
|
283
|
+
// }
|
|
284
|
+
|
|
285
|
+
// dropDownColumn
|
|
286
|
+
|
|
287
|
+
this.dropDown$[field.Description] = new Observable((obx) => {
|
|
288
|
+
if (field.FieldData) {
|
|
289
|
+
var jsonItem = JSON.parse(field.FieldData);
|
|
290
|
+
if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
|
|
291
|
+
let isDepandancyvalue = true;
|
|
292
|
+
let _formvalue = this.pageForm.form.value;
|
|
293
|
+
|
|
294
|
+
let restData: IRestConfig = jsonItem.rest;
|
|
295
|
+
|
|
296
|
+
/* #region Column def */
|
|
297
|
+
let columns: any[] = [];
|
|
298
|
+
columns.push(restData.valueField);
|
|
299
|
+
// columns.push(restData.textField)
|
|
300
|
+
|
|
301
|
+
let _col = restData.textField.split(',');
|
|
302
|
+
columns.push(..._col);
|
|
303
|
+
this.dropDownColumn$[field.Description] = columns;
|
|
304
|
+
/* #endregion */
|
|
305
|
+
|
|
306
|
+
restData.QueryStrings.forEach((query) => {
|
|
307
|
+
if (query.Type == 'FieldValue') {
|
|
308
|
+
|
|
309
|
+
if (!_formvalue[query.Value] && query.IsNullable != true) {
|
|
310
|
+
// Swal.fire('please fill ' + query.Value, 'warning');
|
|
311
|
+
Swal.fire({
|
|
312
|
+
title: this.translatePipe.transform('please fill ' + query.Value),
|
|
313
|
+
});
|
|
314
|
+
isDepandancyvalue = false;
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
else{
|
|
319
|
+
let _handleData:any={};
|
|
320
|
+
if (this.ParameterData){
|
|
321
|
+
_handleData.params = this.ParameterData;
|
|
322
|
+
}
|
|
323
|
+
query.Value = this.hanbleBarData(query.Value,_handleData);
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
if (!isDepandancyvalue) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue, searchCriteria,SearchText,restData.Havecriteria)
|
|
332
|
+
.subscribe((ress: any) => {
|
|
333
|
+
|
|
334
|
+
let res = ress;
|
|
335
|
+
if(restData.ResponseView) {
|
|
336
|
+
let _rview = restData.ResponseView.split(".");
|
|
337
|
+
_rview.forEach(x => {
|
|
338
|
+
if (ress) {
|
|
339
|
+
ress = ress[x];
|
|
340
|
+
res = ress;
|
|
341
|
+
}
|
|
342
|
+
else
|
|
343
|
+
res = "";
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
if (ress.Data) {
|
|
348
|
+
res = ress.Data;
|
|
349
|
+
if (res.Data)
|
|
350
|
+
res = res.Data
|
|
351
|
+
}
|
|
352
|
+
if (ress.content) res = ress.content;
|
|
353
|
+
|
|
354
|
+
if (ress.entities) res = ress.entities;
|
|
355
|
+
if (ress.templates) res = ress.templates;
|
|
356
|
+
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (RequestorField) {
|
|
360
|
+
let _Sitem = res.filter((x) => x[restData.valueField] == this.RequestorFieldValue);
|
|
361
|
+
this.fieldsList.map((x) => {
|
|
362
|
+
if (x.Description == field.Description)
|
|
363
|
+
x.showTable = false;
|
|
364
|
+
});
|
|
365
|
+
if (_Sitem && _Sitem.length > 0) {
|
|
366
|
+
this.selectDropDownRow(_Sitem[0], field);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
if (res && Array.isArray(res) && res.length > 0) {
|
|
371
|
+
obx.next(res);
|
|
372
|
+
} else if (
|
|
373
|
+
Object.keys(res).length > 0 &&
|
|
374
|
+
Object.keys(res).includes('List')
|
|
375
|
+
) {
|
|
376
|
+
obx.next(res['List']);
|
|
377
|
+
} else obx.next([]);
|
|
378
|
+
});
|
|
379
|
+
} else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
|
|
380
|
+
const url = jsonItem.api.url;
|
|
381
|
+
this.entityTypeSetup.getDyamicUrl(url).subscribe((ress: any) => {
|
|
382
|
+
|
|
383
|
+
let res = ress;
|
|
384
|
+
if(jsonItem.api && jsonItem.api.ResponseView) {
|
|
385
|
+
let _rview = jsonItem.api.ResponseView.split(".");
|
|
386
|
+
_rview.forEach(x => {
|
|
387
|
+
if (ress) {
|
|
388
|
+
ress = ress[x];
|
|
389
|
+
res = ress;
|
|
390
|
+
}
|
|
391
|
+
else
|
|
392
|
+
res = "";
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
if (ress.Data) {
|
|
397
|
+
res = ress.Data;
|
|
398
|
+
if (res.Data)
|
|
399
|
+
res = res.Data
|
|
400
|
+
}
|
|
401
|
+
if (ress.content) res = ress.content;
|
|
402
|
+
|
|
403
|
+
if (ress.entities) res = ress.entities;
|
|
404
|
+
if (ress.templates) res = ress.templates;
|
|
405
|
+
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if (res && Array.isArray(res) && res.length > 0) {
|
|
409
|
+
obx.next(
|
|
410
|
+
res.map((x) =>
|
|
411
|
+
Object.assign({
|
|
412
|
+
Id: x[jsonItem.api.valueField],
|
|
413
|
+
Description: x[jsonItem.api.textField],
|
|
414
|
+
})
|
|
415
|
+
)
|
|
416
|
+
);
|
|
417
|
+
} else if (
|
|
418
|
+
Object.keys(res).length > 0 &&
|
|
419
|
+
Object.keys(res).includes('List')
|
|
420
|
+
) {
|
|
421
|
+
obx.next(
|
|
422
|
+
res['List'].map((x) =>
|
|
423
|
+
Object.assign({
|
|
424
|
+
Id: x[jsonItem.api.valueField],
|
|
425
|
+
Description: x[jsonItem.api.textField],
|
|
426
|
+
})
|
|
427
|
+
)
|
|
428
|
+
);
|
|
429
|
+
} else obx.next([]);
|
|
430
|
+
});
|
|
431
|
+
} else {
|
|
432
|
+
if (
|
|
433
|
+
jsonItem.options &&
|
|
434
|
+
Array.isArray(jsonItem.options) &&
|
|
435
|
+
jsonItem.options.length > 0
|
|
436
|
+
) {
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
/* #region Column def for json manual Item */
|
|
440
|
+
let columns: any[] = ['value', 'text'];
|
|
441
|
+
this.dropDownColumn$[field.Description] = columns;
|
|
442
|
+
/* #endregion */
|
|
443
|
+
|
|
444
|
+
if (RequestorField) {
|
|
445
|
+
let _Sitem = jsonItem.options.filter(
|
|
446
|
+
(x) => x.text == this.RequestorField
|
|
447
|
+
);
|
|
448
|
+
if (_Sitem && _Sitem.length > 0) {
|
|
449
|
+
this.selectDropDownRow(_Sitem[0], field);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
obx.next(jsonItem.options);
|
|
454
|
+
} else obx.next([]);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
closeSearchBox: boolean = false;
|
|
462
|
+
closesearch() {
|
|
463
|
+
this.closeSearchBox = false;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
showDetailsFormField(field: EntityTypeFieldVM) {
|
|
468
|
+
|
|
469
|
+
let _ret: boolean = true;
|
|
470
|
+
|
|
471
|
+
if (field.LookupData) {
|
|
472
|
+
let _LookupData = JSON.parse(field.LookupData);
|
|
473
|
+
// LookupData.LookupTable
|
|
474
|
+
if (_LookupData && _LookupData.DetailsShowData && _LookupData.DetailsShowData.length > 0) {
|
|
475
|
+
_LookupData.DetailsShowData.forEach(element => {
|
|
476
|
+
|
|
477
|
+
if (element.Type == "All" ||
|
|
478
|
+
(element.Type == "OnlyArabic" && this.globalService.CurrentLanguage == "Ar") ||
|
|
479
|
+
(element.Type == "OnlyEnglish" && this.globalService.CurrentLanguage != "Ar"))
|
|
480
|
+
_ret = true;
|
|
481
|
+
else
|
|
482
|
+
_ret = false;
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
return _ret
|
|
490
|
+
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
// -----------these no need once client side pagination done.
|
|
495
|
+
pageStartFrom: number = 1;
|
|
496
|
+
defineItemsPerPage: number = 10;
|
|
497
|
+
//total: number = this.dropDownColumn$.length;
|
|
498
|
+
// -----------these no need once client side pagination done.
|
|
499
|
+
defineRecordCount(event) {
|
|
500
|
+
|
|
501
|
+
this.defineItemsPerPage = event.target.value;
|
|
502
|
+
this.pageStartFrom = 1;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
autoSearchDropdown(event: any,field: EntityTypeFieldVM,searchValue?,RequestorField?) {
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
this.tempFields = field;
|
|
510
|
+
|
|
511
|
+
if (field.DataType == E_DataType.dropdown) {
|
|
512
|
+
if (field.FieldData) {
|
|
513
|
+
var jsonItem = JSON.parse(field.FieldData);
|
|
514
|
+
if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
|
|
515
|
+
let restData: IRestConfig = jsonItem.rest;
|
|
516
|
+
let _Searchcriteria: ISearchCriteria = {
|
|
517
|
+
Pagging: {
|
|
518
|
+
PageNo: 1,
|
|
519
|
+
PageSize: 100,
|
|
520
|
+
},
|
|
521
|
+
Where: [],
|
|
522
|
+
SortOrder: 1,
|
|
523
|
+
};
|
|
524
|
+
if (!searchValue) searchValue = event.target.value;
|
|
525
|
+
let filterobj = {
|
|
526
|
+
Field: restData.valueField,
|
|
527
|
+
Operator: 'Contains',
|
|
528
|
+
TableAlias: '',
|
|
529
|
+
Value: searchValue,
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
jsonItem.rest.QueryStrings.filter(x => x.Type == "SearchValue").map((y) => {
|
|
533
|
+
let temp = ":" + y.Name;
|
|
534
|
+
filterobj.Field += temp;
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
if (filterobj.Field)
|
|
538
|
+
_Searchcriteria.Where.push(filterobj);
|
|
539
|
+
this.loadDropdown(field, _Searchcriteria, RequestorField,searchValue);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
loadDropdownColumn(field: EntityTypeFieldVM) {
|
|
546
|
+
|
|
547
|
+
let columns: string[] = ['value', 'text'];
|
|
548
|
+
this.dropDownColumn$[field.Description] = columns;
|
|
549
|
+
let jsonItem = JSON.parse(field.FieldData);
|
|
550
|
+
if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
|
|
551
|
+
let restData: IRestConfig = jsonItem.rest;
|
|
552
|
+
columns = [];
|
|
553
|
+
columns.push(restData.valueField);
|
|
554
|
+
let _col = restData.textField.split(',');
|
|
555
|
+
columns.push(..._col);
|
|
556
|
+
this.dropDownColumn$[field.Description] = columns;
|
|
557
|
+
|
|
558
|
+
if (jsonItem.rest.Havecriteria) {
|
|
559
|
+
this.fieldsList.map((x) => {
|
|
560
|
+
if (x.Description == field.Description) {
|
|
561
|
+
x.showSearchBox = true;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
} else {
|
|
565
|
+
|
|
566
|
+
let showSearchBox: boolean = false;
|
|
567
|
+
let SearchValue = jsonItem.rest.QueryStrings.filter((x) => x.Type == "SearchValue");
|
|
568
|
+
if (SearchValue.length > 0) {
|
|
569
|
+
showSearchBox = true;
|
|
570
|
+
}
|
|
571
|
+
if(showSearchBox) {
|
|
572
|
+
this.fieldsList.map((x) => {
|
|
573
|
+
if (x.Description == field.Description) {
|
|
574
|
+
x.showSearchBox = true;
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
this.loadDropdown(field);
|
|
580
|
+
} else {
|
|
581
|
+
this.loadDropdown(field);
|
|
582
|
+
}
|
|
583
|
+
this.closesearch();
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
selectDropDownRow(row, field: EntityTypeFieldVM) {
|
|
587
|
+
|
|
588
|
+
var jsonItem = JSON.parse(field.FieldData);
|
|
589
|
+
let _fieldVal = null;
|
|
590
|
+
if (jsonItem.isDynamic) _fieldVal = row[jsonItem.rest.valueField];
|
|
591
|
+
else _fieldVal = row['value'];
|
|
592
|
+
|
|
593
|
+
this.pageForm.form.get(field.Description).setValue(_fieldVal);
|
|
594
|
+
|
|
595
|
+
let showValue = '';
|
|
596
|
+
// this.dropDownColumn$[field.Description].forEach((col) => {
|
|
597
|
+
// showValue = showValue + row[col] + ' | ';
|
|
598
|
+
// });
|
|
599
|
+
if (jsonItem && jsonItem.rest) {
|
|
600
|
+
let _filedDropdown: IRestConfig = jsonItem.rest
|
|
601
|
+
if (_filedDropdown.TextboxShowData && _filedDropdown.TextboxShowData.length > 0) {
|
|
602
|
+
|
|
603
|
+
showValue = ''
|
|
604
|
+
_filedDropdown.TextboxShowData.forEach(element => {
|
|
605
|
+
|
|
606
|
+
if (element.Type == "All" ||
|
|
607
|
+
(element.Type =="OnlyArabic" && this.globalService.CurrentLanguage=="Ar") ||
|
|
608
|
+
(element.Type =="OnlyEnglish" && this.globalService.CurrentLanguage!="Ar"))
|
|
609
|
+
showValue = showValue + row[element.Column] + "-";
|
|
610
|
+
// else if(element.Type =="OnlyArabic" && this.globalService.CurrentLanguage=="Ar") {
|
|
611
|
+
// showValue = showValue + row[element.Column] + " - ";
|
|
612
|
+
// }
|
|
613
|
+
// else if(element.Type =="OnlyEnglish" && this.globalService.CurrentLanguage!="Ar") {
|
|
614
|
+
// showValue = showValue + row[element.Column] + " - ";
|
|
615
|
+
// }
|
|
616
|
+
|
|
617
|
+
});
|
|
618
|
+
if(showValue){
|
|
619
|
+
let value = showValue.charAt(showValue.length-1)
|
|
620
|
+
if(value == "-"){
|
|
621
|
+
showValue = showValue.substring(0, showValue.length - 1)
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
else
|
|
627
|
+
showValue = row[this.dropDownColumn$[field.Description][1]]
|
|
628
|
+
}
|
|
629
|
+
else
|
|
630
|
+
showValue = row[this.dropDownColumn$[field.Description][1]]
|
|
631
|
+
|
|
632
|
+
this.fieldsList.map((x) => {
|
|
633
|
+
if (x.Description == field.Description) x.showSelectedValues = showValue;
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
this.closesearch();
|
|
637
|
+
this.changeFiledValue('', field, row);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
showTable(item) {
|
|
641
|
+
this.pageStartFrom = 1;
|
|
642
|
+
this.defineItemsPerPage = 10;
|
|
643
|
+
this.fieldsList.map((x) => {
|
|
644
|
+
if (x.Description != item.Description) x.showTable = false;
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
item.showTable = !item.showTable;
|
|
648
|
+
this.loadDropdownColumn(item);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
activeInputId: any;
|
|
652
|
+
|
|
653
|
+
clks(item,Type) {
|
|
654
|
+
|
|
655
|
+
if (this.activeInputId){
|
|
656
|
+
if(Type !="Event"){
|
|
657
|
+
this.typeInTextarea($('#' + this.activeInputId), '@@' + item);
|
|
658
|
+
}
|
|
659
|
+
else{
|
|
660
|
+
this.typeInTextarea($('#' + this.activeInputId), item);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
//'@@' +
|
|
665
|
+
return false;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
typeInTextarea(el, newText) {
|
|
669
|
+
var start = el.prop('selectionStart');
|
|
670
|
+
var end = el.prop('selectionEnd');
|
|
671
|
+
var text = el.val();
|
|
672
|
+
var before = text.substring(0, start);
|
|
673
|
+
var after = text.substring(end, text.length);
|
|
674
|
+
el.val(before + newText + after);
|
|
675
|
+
el[0].selectionStart = el[0].selectionEnd = start + newText.length;
|
|
676
|
+
el.focus();
|
|
677
|
+
|
|
678
|
+
this.pageForm.form.get(this.activeInputId).setValue(el.val());
|
|
679
|
+
|
|
680
|
+
let item = this.fieldsList.filter(
|
|
681
|
+
(x) => x.Description == this.activeInputId
|
|
682
|
+
)[0];
|
|
683
|
+
this.changeFiledValue('', item);
|
|
684
|
+
|
|
685
|
+
return false;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
searchValue: any;
|
|
689
|
+
|
|
690
|
+
customSearchFn(term: string, item: any) {
|
|
691
|
+
// alert('a');
|
|
692
|
+
|
|
693
|
+
// this.searchValue = term
|
|
694
|
+
this.loadDropdown(this.tempFields, term);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
OnSearch(field) {
|
|
698
|
+
this.searchValue;
|
|
699
|
+
// alert('b');
|
|
700
|
+
|
|
701
|
+
// term = term.toLocaleLowerCase();
|
|
702
|
+
// return item.code.toLocaleLowerCase().indexOf(term) > -1 ||
|
|
703
|
+
// item.countryName.toLocaleLowerCase().indexOf(term) > -1;
|
|
704
|
+
|
|
705
|
+
if (field.DataType == E_DataType.dropdown) {
|
|
706
|
+
this.dropDown$[field.Description] = new Observable((obx) => {
|
|
707
|
+
if (field.FieldData) {
|
|
708
|
+
var jsonItem = JSON.parse(field.FieldData);
|
|
709
|
+
if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
|
|
710
|
+
let isDepandancyvalue = true;
|
|
711
|
+
let _formvalue = this.pageForm.form.value;
|
|
712
|
+
|
|
713
|
+
let restData: IRestConfig = jsonItem.rest;
|
|
714
|
+
|
|
715
|
+
restData.QueryStrings.forEach((query) => {
|
|
716
|
+
if (query.Type == 'FieldValue') {
|
|
717
|
+
|
|
718
|
+
if (!_formvalue[query.Value]) {
|
|
719
|
+
// Swal.fire('please fill ' + query.Value, 'warning');
|
|
720
|
+
Swal.fire({
|
|
721
|
+
title: this.translatePipe.transform('please fill ' + query.Value),
|
|
722
|
+
});
|
|
723
|
+
isDepandancyvalue = false;
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
if (!isDepandancyvalue) {
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue)
|
|
734
|
+
.subscribe((ress: any) => {
|
|
735
|
+
|
|
736
|
+
let res = ress;
|
|
737
|
+
if(restData.ResponseView) {
|
|
738
|
+
let _rview = restData.ResponseView.split(".");
|
|
739
|
+
_rview.forEach(x => {
|
|
740
|
+
if (ress) {
|
|
741
|
+
ress = ress[x];
|
|
742
|
+
res = ress;
|
|
743
|
+
}
|
|
744
|
+
else
|
|
745
|
+
res = "";
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
749
|
+
if (ress.Data) {
|
|
750
|
+
res = ress.Data;
|
|
751
|
+
if (res.Data)
|
|
752
|
+
res = res.Data
|
|
753
|
+
}
|
|
754
|
+
if (ress.content) res = ress.content;
|
|
755
|
+
|
|
756
|
+
if (ress.entities) res = ress.entities;
|
|
757
|
+
if (ress.templates) res = ress.templates;
|
|
758
|
+
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
if (res && Array.isArray(res) && res.length > 0) {
|
|
762
|
+
obx.next(
|
|
763
|
+
res.map((x) =>
|
|
764
|
+
Object.assign({
|
|
765
|
+
Id: x[jsonItem.rest.valueField],
|
|
766
|
+
Description: x[jsonItem.rest.textField],
|
|
767
|
+
})
|
|
768
|
+
)
|
|
769
|
+
);
|
|
770
|
+
} else if (
|
|
771
|
+
Object.keys(res).length > 0 &&
|
|
772
|
+
Object.keys(res).includes('List')
|
|
773
|
+
) {
|
|
774
|
+
obx.next(
|
|
775
|
+
res['List'].map((x) =>
|
|
776
|
+
Object.assign({
|
|
777
|
+
Id: x[jsonItem.rest.valueField],
|
|
778
|
+
Description: x[jsonItem.rest.textField],
|
|
779
|
+
})
|
|
780
|
+
)
|
|
781
|
+
);
|
|
782
|
+
} else obx.next([]);
|
|
783
|
+
});
|
|
784
|
+
} else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
|
|
785
|
+
const url = jsonItem.api.url;
|
|
786
|
+
this.entityTypeSetup.getDyamicUrl(url).subscribe((ress: any) => {
|
|
787
|
+
|
|
788
|
+
let res = ress;
|
|
789
|
+
if (jsonItem.api && jsonItem.api.ResponseView) {
|
|
790
|
+
let _rview = jsonItem.api.ResponseView.split(".");
|
|
791
|
+
_rview.forEach(x => {
|
|
792
|
+
if (ress) {
|
|
793
|
+
ress = ress[x];
|
|
794
|
+
res = ress;
|
|
795
|
+
}
|
|
796
|
+
else
|
|
797
|
+
res = "";
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
if (ress.Data) {
|
|
802
|
+
res = ress.Data;
|
|
803
|
+
if (res.Data)
|
|
804
|
+
res = res.Data
|
|
805
|
+
}
|
|
806
|
+
if (ress.content) res = ress.content;
|
|
807
|
+
|
|
808
|
+
if (ress.entities) res = ress.entities;
|
|
809
|
+
if (ress.templates) res = ress.templates;
|
|
810
|
+
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
if (res && Array.isArray(res) && res.length > 0) {
|
|
814
|
+
obx.next(
|
|
815
|
+
res.map((x) =>
|
|
816
|
+
Object.assign({
|
|
817
|
+
Id: x[jsonItem.api.valueField],
|
|
818
|
+
Description: x[jsonItem.api.textField],
|
|
819
|
+
})
|
|
820
|
+
)
|
|
821
|
+
);
|
|
822
|
+
} else if (
|
|
823
|
+
Object.keys(res).length > 0 &&
|
|
824
|
+
Object.keys(res).includes('List')
|
|
825
|
+
) {
|
|
826
|
+
obx.next(
|
|
827
|
+
res['List'].map((x) =>
|
|
828
|
+
Object.assign({
|
|
829
|
+
Id: x[jsonItem.api.valueField],
|
|
830
|
+
Description: x[jsonItem.api.textField],
|
|
831
|
+
})
|
|
832
|
+
)
|
|
833
|
+
);
|
|
834
|
+
} else obx.next([]);
|
|
835
|
+
});
|
|
836
|
+
} else {
|
|
837
|
+
if (
|
|
838
|
+
jsonItem.options &&
|
|
839
|
+
Array.isArray(jsonItem.options) &&
|
|
840
|
+
jsonItem.options.length > 0
|
|
841
|
+
) {
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
obx.next(
|
|
845
|
+
jsonItem.options.map((x) =>
|
|
846
|
+
Object.assign({
|
|
847
|
+
Id: x.value,
|
|
848
|
+
Description: x.text,
|
|
849
|
+
})
|
|
850
|
+
)
|
|
851
|
+
);
|
|
852
|
+
} else obx.next([]);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
OnSelectRequestorValue(Type?) {
|
|
860
|
+
|
|
861
|
+
if (!this.RequestorField || !this.RequestorFieldValue) return;
|
|
862
|
+
|
|
863
|
+
let _RequestorField = this.fieldsList.filter(
|
|
864
|
+
(x) => x.Description == this.RequestorField
|
|
865
|
+
);
|
|
866
|
+
if (_RequestorField && _RequestorField.length > 0) {
|
|
867
|
+
let _field = _RequestorField[0];
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
this.fieldsList = this.fieldsList.map((x) => {
|
|
871
|
+
if (x.Description == _field.Description) {
|
|
872
|
+
x.showTable = true;
|
|
873
|
+
x.IsReadonly = true;
|
|
874
|
+
x.IsInactive = true;
|
|
875
|
+
}
|
|
876
|
+
return x
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
if (!Type) {
|
|
880
|
+
if (this.pageForm.form && this.pageForm.form.get(this.RequestorField))
|
|
881
|
+
this.pageForm.form.get(this.RequestorField).setValue(this.RequestorFieldValue, { onlySelf: true });
|
|
882
|
+
if (_field.DataType == E_DataType.dropdown) {
|
|
883
|
+
this.autoSearchDropdown(null,_field,this.RequestorFieldValue,this.RequestorField);
|
|
884
|
+
} else {
|
|
885
|
+
setTimeout(() => this.changeFiledValue('', _field), 1000);
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
showshortcode:boolean = false;
|
|
894
|
+
shortcode: any[]=[];
|
|
895
|
+
shortcutkey: any = [];
|
|
896
|
+
getShortCodeCannedResponse(event?) {
|
|
897
|
+
|
|
898
|
+
// columns.push(...short);
|
|
899
|
+
event = '';
|
|
900
|
+
if (this.showshortcode && (!this.shortcode || this.shortcode.length < 1 )) {
|
|
901
|
+
|
|
902
|
+
this.entityTypeSetup.getShortKeyCannedResponse(event).subscribe((res:any) => {
|
|
903
|
+
|
|
904
|
+
this.shortcode = res;
|
|
905
|
+
this.shortcutkey = res;
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
closeShortCanned: boolean = false;
|
|
911
|
+
closeShortKey() {
|
|
912
|
+
this.closeShortCanned = false;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
shortkey: any;
|
|
916
|
+
selectShortKey(item) {
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
if (this.activeInputId)
|
|
920
|
+
this.typeInTextarea($('#' + this.activeInputId), item.Message);
|
|
921
|
+
return false;
|
|
922
|
+
|
|
923
|
+
this.closeShortKey();
|
|
924
|
+
// this.changeFiledValue('', field, row);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
showShortKey(item) {
|
|
928
|
+
this.shortkey.map((x) => {
|
|
929
|
+
if (x.Message != item.Message) x.showshort = false;
|
|
930
|
+
});
|
|
931
|
+
|
|
932
|
+
item.showshort = !item.showshort;
|
|
933
|
+
this.getShortCodeCannedResponse(item);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
FiedlListData$ = Object.assign({});
|
|
937
|
+
getListFieldData() {
|
|
938
|
+
for (const field of this.fieldsList) {
|
|
939
|
+
if (field.DataType == E_DataType.List) {
|
|
940
|
+
|
|
941
|
+
this.FiedlListData$[field.Description] = [];
|
|
942
|
+
let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
|
|
943
|
+
if (fieldVal) {
|
|
944
|
+
for (let key in fieldVal) {
|
|
945
|
+
let temp = { key: key, value: fieldVal[key] };
|
|
946
|
+
this.FiedlListData$[field.Description].push(temp);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
addnewList(field: EntityTypeFieldVM) {
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
if (!(this.FiedlListData$[field.Description] && this.FiedlListData$[field.Description].length > 0)) {
|
|
958
|
+
this.FiedlListData$[field.Description] = [];
|
|
959
|
+
let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
|
|
960
|
+
if (fieldVal) {
|
|
961
|
+
for (let key in fieldVal) {
|
|
962
|
+
let temp = { key: key, value: fieldVal[key] };
|
|
963
|
+
this.FiedlListData$[field.Description].push(temp);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
this.FiedlListData$[field.Description].push({ key: null, value: null })
|
|
968
|
+
|
|
969
|
+
let _fieldVal = {}
|
|
970
|
+
this.FiedlListData$[field.Description].forEach(x => _fieldVal[x.key] = x.value)
|
|
971
|
+
this.pageForm.form.get(field.Description).setValue(_fieldVal);
|
|
972
|
+
this.changeFiledValue('', field);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
removeList(field: EntityTypeFieldVM, index) {
|
|
977
|
+
|
|
978
|
+
// this.FiedlListData$[field.Description] = [];
|
|
979
|
+
// let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
|
|
980
|
+
// if (fieldVal) {
|
|
981
|
+
// for (let key in fieldVal) {
|
|
982
|
+
// let temp = { key: key, value: fieldVal[key] };
|
|
983
|
+
// this.FiedlListData$[field.Description].push(temp);
|
|
984
|
+
// }
|
|
985
|
+
// }
|
|
986
|
+
this.FiedlListData$[field.Description].splice(index, 1)
|
|
987
|
+
|
|
988
|
+
let _fieldVal = {}
|
|
989
|
+
this.FiedlListData$[field.Description].forEach(x => _fieldVal[x.key] = x.value);
|
|
990
|
+
this.pageForm.form.get(field.Description).setValue(_fieldVal);
|
|
991
|
+
this.changeFiledValue('', field);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
changeFiledList(field: EntityTypeFieldVM,item,index) {
|
|
995
|
+
|
|
996
|
+
// this.FiedlListData$[field.Description] = [];
|
|
997
|
+
// let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
|
|
998
|
+
// if (fieldVal) {
|
|
999
|
+
// for (let key in fieldVal) {
|
|
1000
|
+
// let temp = { key: key, value: fieldVal[key] };
|
|
1001
|
+
// this.FiedlListData$[field.Description].push(temp);
|
|
1002
|
+
// }
|
|
1003
|
+
// }
|
|
1004
|
+
|
|
1005
|
+
// this.FiedlListData$[field.Description][index]=item;
|
|
1006
|
+
|
|
1007
|
+
let _fieldVal = {}
|
|
1008
|
+
this.FiedlListData$[field.Description].forEach(x => _fieldVal[x.key] = x.value);
|
|
1009
|
+
this.pageForm.form.get(field.Description).setValue(_fieldVal);
|
|
1010
|
+
this.changeFiledValue('', field);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
translatePipe = new TranslatePipe(this.globalService);
|
|
1021
|
+
FilterPipe = new FilterPipe();
|
|
1022
|
+
UniqueFilterPipe = new UniqueFilterPipe();
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
hanbleBarData(_code, data?) {
|
|
1026
|
+
if (!data || (typeof data != 'object'))
|
|
1027
|
+
data = {};
|
|
1028
|
+
data.CurrentData = this;
|
|
1029
|
+
data.Local = localStorage;
|
|
1030
|
+
data.Cookies = this.Cookies;
|
|
1031
|
+
if (_code && data) {
|
|
1032
|
+
let template = Handlebars.compile(_code);
|
|
1033
|
+
let result = template(data);
|
|
1034
|
+
return result
|
|
1035
|
+
}
|
|
1036
|
+
else {
|
|
1037
|
+
return _code
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
get Cookies() {
|
|
1042
|
+
let cookies = document.cookie.split(';');
|
|
1043
|
+
let cookie = {};
|
|
1044
|
+
for (let i = 0; i < cookies.length; i++) {
|
|
1045
|
+
let hash = (cookies[i].split('='));
|
|
1046
|
+
let _key = hash[0].toString().replace(" ", "");
|
|
1047
|
+
cookie[_key] = hash[1];
|
|
1048
|
+
}
|
|
1049
|
+
return cookie;
|
|
1050
|
+
}
|
|
1051
|
+
}
|