arco-support-request 0.0.88 → 0.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/karma.conf.js +44 -0
  2. package/ng-package.json +18 -0
  3. package/package.json +11 -22
  4. package/src/lib/Pipe/allpipe.pipe.ts +127 -0
  5. package/src/lib/Pipe/handlebar-helper-register.ts +249 -0
  6. package/src/lib/Pipe/translate.pipe.ts +32 -0
  7. package/src/lib/all-routing.ts +61 -0
  8. package/src/lib/arco-support-request.component.spec.ts +25 -0
  9. package/src/lib/arco-support-request.component.ts +20 -0
  10. package/src/lib/arco-support-request.module.ts +19 -0
  11. package/src/lib/arco-support-request.service.spec.ts +16 -0
  12. package/src/lib/arco-support-request.service.ts +16 -0
  13. package/src/lib/commonstyles/new-style-rtl.css +380 -0
  14. package/src/lib/commonstyles/styles.scss +4334 -0
  15. package/src/lib/core/encodeurl.service.ts +23 -0
  16. package/src/lib/core/global.service.ts +1859 -0
  17. package/src/lib/core/handlebar-helper-register.ts +247 -0
  18. package/src/lib/core/httpcancel.service.ts +21 -0
  19. package/src/lib/core/loader.service.ts +19 -0
  20. package/src/lib/core/loading-provider.service.ts +64 -0
  21. package/src/lib/core/managehttp.interceptor.ts +49 -0
  22. package/src/lib/core/static/jwt.ts +7 -0
  23. package/src/lib/core/token.service.ts +37 -0
  24. package/src/lib/entity-type-setup/activities-create/activities-create.component.html +69 -0
  25. package/src/lib/entity-type-setup/activities-create/activities-create.component.scss +13 -0
  26. package/src/lib/entity-type-setup/activities-create/activities-create.component.spec.ts +25 -0
  27. package/src/lib/entity-type-setup/activities-create/activities-create.component.ts +143 -0
  28. package/src/lib/entity-type-setup/activities-view/activities-view.component.html +19 -0
  29. package/src/lib/entity-type-setup/activities-view/activities-view.component.scss +3 -0
  30. package/src/lib/entity-type-setup/activities-view/activities-view.component.spec.ts +25 -0
  31. package/src/lib/entity-type-setup/activities-view/activities-view.component.ts +53 -0
  32. package/src/lib/entity-type-setup/activity-template/activity-template.component.html +73 -0
  33. package/src/lib/entity-type-setup/activity-template/activity-template.component.scss +0 -0
  34. package/src/lib/entity-type-setup/activity-template/activity-template.component.spec.ts +25 -0
  35. package/src/lib/entity-type-setup/activity-template/activity-template.component.ts +208 -0
  36. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.html +356 -0
  37. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.scss +50 -0
  38. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.spec.ts +25 -0
  39. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.ts +346 -0
  40. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.html +92 -0
  41. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.scss +90 -0
  42. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.spec.ts +25 -0
  43. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.ts +74 -0
  44. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.html +57 -0
  45. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.scss +16 -0
  46. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.spec.ts +25 -0
  47. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.ts +59 -0
  48. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.html +102 -0
  49. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.scss +3 -0
  50. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.spec.ts +25 -0
  51. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.ts +498 -0
  52. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.html +408 -0
  53. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.scss +123 -0
  54. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.spec.ts +25 -0
  55. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.ts +1073 -0
  56. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.ts +84 -0
  57. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.html +194 -0
  58. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.scss +81 -0
  59. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.spec.ts +25 -0
  60. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.ts +1526 -0
  61. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.html +137 -0
  62. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.scss +0 -0
  63. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.spec.ts +25 -0
  64. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.ts +1353 -0
  65. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.html +329 -0
  66. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.scss +0 -0
  67. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.spec.ts +25 -0
  68. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.ts +520 -0
  69. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.html +609 -0
  70. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.scss +99 -0
  71. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.spec.ts +25 -0
  72. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.ts +784 -0
  73. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.html +632 -0
  74. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.scss +261 -0
  75. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.spec.ts +25 -0
  76. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.ts +765 -0
  77. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.html +368 -0
  78. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.scss +0 -0
  79. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.spec.ts +25 -0
  80. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.ts +334 -0
  81. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.html +500 -0
  82. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.scss +0 -0
  83. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.spec.ts +25 -0
  84. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.ts +862 -0
  85. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.html +139 -0
  86. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.scss +14 -0
  87. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.spec.ts +25 -0
  88. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.ts +347 -0
  89. package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.html +150 -0
  90. package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.scss +27 -0
  91. package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.ts +384 -0
  92. package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.html +305 -0
  93. package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.scss +31 -0
  94. package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.ts +572 -0
  95. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.html +610 -0
  96. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.scss +50 -0
  97. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.spec.ts +25 -0
  98. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.ts +633 -0
  99. package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.html +609 -0
  100. package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.scss +4 -0
  101. package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.ts +702 -0
  102. package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.html +530 -0
  103. package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.scss +12 -0
  104. package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.ts +767 -0
  105. package/src/lib/entity-type-setup/entity-type-setup-routing.module.ts +92 -0
  106. package/src/lib/entity-type-setup/entity-type-setup.module.ts +114 -0
  107. package/src/lib/entity-type-setup/events/events.component.html +211 -0
  108. package/src/lib/entity-type-setup/events/events.component.scss +61 -0
  109. package/src/lib/entity-type-setup/events/events.component.spec.ts +25 -0
  110. package/src/lib/entity-type-setup/events/events.component.ts +517 -0
  111. package/src/lib/entity-type-setup/field-type/field-type.component.html +447 -0
  112. package/src/lib/entity-type-setup/field-type/field-type.component.scss +0 -0
  113. package/src/lib/entity-type-setup/field-type/field-type.component.spec.ts +25 -0
  114. package/src/lib/entity-type-setup/field-type/field-type.component.ts +531 -0
  115. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.html +152 -0
  116. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.scss +24 -0
  117. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.spec.ts +25 -0
  118. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.ts +35 -0
  119. package/src/lib/entity-type-setup/instruction/instruction.component.html +239 -0
  120. package/src/lib/entity-type-setup/instruction/instruction.component.scss +18 -0
  121. package/src/lib/entity-type-setup/instruction/instruction.component.ts +450 -0
  122. package/src/lib/entity-type-setup/interface/entityTypeInterface.ts +1046 -0
  123. package/src/lib/entity-type-setup/interface/eventEnum.ts +191 -0
  124. package/src/lib/entity-type-setup/issue-group/issue-group.component.html +77 -0
  125. package/src/lib/entity-type-setup/issue-group/issue-group.component.scss +0 -0
  126. package/src/lib/entity-type-setup/issue-group/issue-group.component.ts +221 -0
  127. package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.html +192 -0
  128. package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.scss +10 -0
  129. package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.ts +418 -0
  130. package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.html +42 -0
  131. package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.scss +8 -0
  132. package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.ts +52 -0
  133. package/src/lib/entity-type-setup/my-task/my-task.component.html +599 -0
  134. package/src/lib/entity-type-setup/my-task/my-task.component.scss +0 -0
  135. package/src/lib/entity-type-setup/my-task/my-task.component.spec.ts +25 -0
  136. package/src/lib/entity-type-setup/my-task/my-task.component.ts +770 -0
  137. package/src/lib/entity-type-setup/page-form-instance.ts +73 -0
  138. package/src/lib/entity-type-setup/page.interface.classes.ts +43 -0
  139. package/src/lib/entity-type-setup/service/dropdown.directive.ts +12 -0
  140. package/src/lib/entity-type-setup/service/entity-type-setup.service.ts +2901 -0
  141. package/src/lib/entity-type-setup/task-crete/task-crete.component.html +61 -0
  142. package/src/lib/entity-type-setup/task-crete/task-crete.component.scss +0 -0
  143. package/src/lib/entity-type-setup/task-crete/task-crete.component.ts +117 -0
  144. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.html +95 -0
  145. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.scss +23 -0
  146. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.spec.ts +25 -0
  147. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.ts +213 -0
  148. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.html +240 -0
  149. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.scss +14 -0
  150. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.spec.ts +25 -0
  151. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.ts +404 -0
  152. package/src/lib/search.pipe.spec.ts +8 -0
  153. package/src/lib/search.pipe.ts +21 -0
  154. package/src/lib/support-request/action/action.component.html +122 -0
  155. package/src/lib/support-request/action/action.component.scss +6 -0
  156. package/src/lib/support-request/action/action.component.ts +179 -0
  157. package/src/lib/support-request/case-list/case-list.component.html +280 -0
  158. package/src/lib/support-request/case-list/case-list.component.scss +187 -0
  159. package/src/lib/support-request/case-list/case-list.component.ts +519 -0
  160. package/src/lib/support-request/home/home.component.html +16 -0
  161. package/src/lib/support-request/home/home.component.scss +4 -0
  162. package/src/lib/support-request/home/home.component.ts +23 -0
  163. package/src/lib/support-request/pagination/pagination.component.html +71 -0
  164. package/src/lib/support-request/pagination/pagination.component.scss +77 -0
  165. package/src/lib/support-request/pagination/pagination.component.ts +29 -0
  166. package/src/lib/support-request/request-flow/request-flow.component.html +536 -0
  167. package/src/lib/support-request/request-flow/request-flow.component.scss +2 -0
  168. package/src/lib/support-request/request-flow/request-flow.component.ts +914 -0
  169. package/src/lib/support-request/self-service-flow/self-service-flow.component.html +64 -0
  170. package/src/lib/support-request/self-service-flow/self-service-flow.component.scss +2 -0
  171. package/src/lib/support-request/self-service-flow/self-service-flow.component.ts +105 -0
  172. package/src/lib/support-request/support-request-create/support-request-create.component.html +105 -0
  173. package/src/lib/support-request/support-request-create/support-request-create.component.scss +54 -0
  174. package/src/lib/support-request/support-request-create/support-request-create.component.ts +319 -0
  175. package/src/lib/support-request/support-request-details/support-request-details.component.html +553 -0
  176. package/src/lib/support-request/support-request-details/support-request-details.component.scss +338 -0
  177. package/src/lib/support-request/support-request-details/support-request-details.component.ts +849 -0
  178. package/src/lib/support-request/support-request-index/support-request-index.component.html +4 -0
  179. package/src/lib/support-request/support-request-index/support-request-index.component.scss +0 -0
  180. package/src/lib/support-request/support-request-index/support-request-index.component.ts +16 -0
  181. package/src/lib/support-request/support-request-list/support-request-list.component.html +455 -0
  182. package/src/lib/support-request/support-request-list/support-request-list.component.scss +0 -0
  183. package/src/lib/support-request/support-request-list/support-request-list.component.ts +869 -0
  184. package/src/lib/support-request/support-request-routing.module.ts +21 -0
  185. package/src/lib/support-request/support-request.module.ts +103 -0
  186. package/src/lib/support-request/support-request.service.ts +148 -0
  187. package/src/lib/support-request/supportRequestInterface.ts +6 -0
  188. package/src/lib/task/Interfaces/TaskInterface.ts +164 -0
  189. package/src/lib/task/Services/task.service.spec.ts +16 -0
  190. package/src/lib/task/Services/task.service.ts +354 -0
  191. package/src/lib/task/task-routing.module.ts +12 -0
  192. package/src/lib/task/task.module.ts +23 -0
  193. package/src/lib/template/template.component.html +22 -0
  194. package/src/lib/template/template.component.scss +0 -0
  195. package/src/lib/template/template.component.spec.ts +25 -0
  196. package/src/lib/template/template.component.ts +24 -0
  197. package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.html +83 -0
  198. package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.scss +0 -0
  199. package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.ts +120 -0
  200. package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.html +134 -0
  201. package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.scss +0 -0
  202. package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.ts +185 -0
  203. package/src/lib/templates/attachmentsetup/attachment-api.ts +55 -0
  204. package/src/lib/templates/attachmentsetup/attachment-interface.ts +100 -0
  205. package/src/lib/templates/attachmentsetup/attachment.service.ts +233 -0
  206. package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.html +97 -0
  207. package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.scss +10 -0
  208. package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.ts +367 -0
  209. package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.html +49 -0
  210. package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.scss +0 -0
  211. package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.ts +226 -0
  212. package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.html +140 -0
  213. package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.scss +8 -0
  214. package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.ts +176 -0
  215. package/src/lib/templates/card/card.component.html +56 -0
  216. package/src/lib/templates/card/card.component.scss +0 -0
  217. package/src/lib/templates/card/card.component.spec.ts +25 -0
  218. package/src/lib/templates/card/card.component.ts +306 -0
  219. package/src/lib/templates/dashboard/dashboard.component.html +333 -0
  220. package/src/lib/templates/dashboard/dashboard.component.scss +16 -0
  221. package/src/lib/templates/dashboard/dashboard.component.ts +2290 -0
  222. package/src/lib/templates/details/details.component.html +233 -0
  223. package/src/lib/templates/details/details.component.scss +0 -0
  224. package/src/lib/templates/details/details.component.spec.ts +25 -0
  225. package/src/lib/templates/details/details.component.ts +15 -0
  226. package/src/lib/templates/detailstwo/detailstwo.component.html +694 -0
  227. package/src/lib/templates/detailstwo/detailstwo.component.scss +0 -0
  228. package/src/lib/templates/detailstwo/detailstwo.component.spec.ts +25 -0
  229. package/src/lib/templates/detailstwo/detailstwo.component.ts +15 -0
  230. package/src/lib/templates/dyanamic-page/dyanamic-page.component.html +1 -0
  231. package/src/lib/templates/dyanamic-page/dyanamic-page.component.scss +0 -0
  232. package/src/lib/templates/dyanamic-page/dyanamic-page.component.spec.ts +25 -0
  233. package/src/lib/templates/dyanamic-page/dyanamic-page.component.ts +15 -0
  234. package/src/lib/templates/grid/grid-datatype/grid-datatype.component.ts +39 -0
  235. package/src/lib/templates/grid/grid-service.service.ts +236 -0
  236. package/src/lib/templates/grid/grid.component.html +358 -0
  237. package/src/lib/templates/grid/grid.component.scss +118 -0
  238. package/src/lib/templates/grid/grid.component.spec.ts +25 -0
  239. package/src/lib/templates/grid/grid.component.ts +638 -0
  240. package/src/lib/templates/grid/inner-grid/inner-grid.component.html +1 -0
  241. package/src/lib/templates/grid/inner-grid/inner-grid.component.scss +0 -0
  242. package/src/lib/templates/grid/inner-grid/inner-grid.component.spec.ts +25 -0
  243. package/src/lib/templates/grid/inner-grid/inner-grid.component.ts +15 -0
  244. package/src/lib/templates/home/home.component.html +251 -0
  245. package/src/lib/templates/home/home.component.scss +20 -0
  246. package/src/lib/templates/home/home.component.spec.ts +25 -0
  247. package/src/lib/templates/home/home.component.ts +15 -0
  248. package/src/lib/templates/interface_enum/common-Interface.ts +114 -0
  249. package/src/lib/templates/interface_enum/common-enum.ts +159 -0
  250. package/src/lib/templates/interface_enum/icon-class.ts +1149 -0
  251. package/src/lib/templates/leftside/leftside.component.html +77 -0
  252. package/src/lib/templates/leftside/leftside.component.scss +0 -0
  253. package/src/lib/templates/leftside/leftside.component.spec.ts +25 -0
  254. package/src/lib/templates/leftside/leftside.component.ts +238 -0
  255. package/src/lib/templates/login/login.component.html +93 -0
  256. package/src/lib/templates/login/login.component.scss +110 -0
  257. package/src/lib/templates/login/login.component.spec.ts +25 -0
  258. package/src/lib/templates/login/login.component.ts +142 -0
  259. package/src/lib/templates/main-content/main-content.component.html +31 -0
  260. package/src/lib/templates/main-content/main-content.component.scss +6 -0
  261. package/src/lib/templates/main-content/main-content.component.spec.ts +25 -0
  262. package/src/lib/templates/main-content/main-content.component.ts +24 -0
  263. package/src/lib/templates/menu-item/child-menu/child-menu.component.html +5 -0
  264. package/src/lib/templates/menu-item/child-menu/child-menu.component.scss +3 -0
  265. package/src/lib/templates/menu-item/child-menu/child-menu.component.ts +22 -0
  266. package/src/lib/templates/menu-item/menu-item.component.html +25 -0
  267. package/src/lib/templates/menu-item/menu-item.component.scss +11 -0
  268. package/src/lib/templates/menu-item/menu-item.component.ts +29 -0
  269. package/src/lib/templates/pagination/pagination.component.html +71 -0
  270. package/src/lib/templates/pagination/pagination.component.scss +73 -0
  271. package/src/lib/templates/pagination/pagination.component.ts +29 -0
  272. package/src/lib/templates/pie-chart/pie-chart.component.html +0 -0
  273. package/src/lib/templates/pie-chart/pie-chart.component.scss +0 -0
  274. package/src/lib/templates/pie-chart/pie-chart.component.ts +14 -0
  275. package/src/lib/templates/pipe/multiple-search.pipe.ts +28 -0
  276. package/src/lib/templates/pipe/simple-search.pipe.ts +18 -0
  277. package/src/lib/templates/pipe/translate.pipe.ts +31 -0
  278. package/src/lib/templates/request-flow-dash/request-flow-dash.component.html +16 -0
  279. package/src/lib/templates/request-flow-dash/request-flow-dash.component.scss +0 -0
  280. package/src/lib/templates/request-flow-dash/request-flow-dash.component.spec.ts +25 -0
  281. package/src/lib/templates/request-flow-dash/request-flow-dash.component.ts +59 -0
  282. package/src/lib/templates/table/table.component.html +310 -0
  283. package/src/lib/templates/table/table.component.scss +0 -0
  284. package/src/lib/templates/table/table.component.spec.ts +25 -0
  285. package/src/lib/templates/table/table.component.ts +52 -0
  286. package/src/lib/templates/template.service.ts +43 -0
  287. package/src/lib/templates/templates-routing.module.ts +21 -0
  288. package/src/lib/templates/templates.module.ts +80 -0
  289. package/src/lib/templates/topnav/topnav.component.html +172 -0
  290. package/src/lib/templates/topnav/topnav.component.scss +10 -0
  291. package/src/lib/templates/topnav/topnav.component.spec.ts +25 -0
  292. package/src/lib/templates/topnav/topnav.component.ts +59 -0
  293. package/src/lib/ticket/_interfaces/master-models.ts +66 -0
  294. package/src/lib/ticket/_interfaces/model.ts +252 -0
  295. package/src/lib/ticket/_ticket-services/ticket-api.service.ts +319 -0
  296. package/src/lib/ticket/_ticket-services/ticket-master-api.service.ts +169 -0
  297. package/src/lib/ticket/_ticket-services/ticket-priority.service.ts +86 -0
  298. package/src/lib/ticket/_ticket-services/ticketchannel.service.ts +107 -0
  299. package/src/lib/ticket/ticket-routing.module.ts +12 -0
  300. package/src/lib/ticket/ticket.module.ts +29 -0
  301. package/{public-api.d.ts → src/public-api.ts} +6 -1
  302. package/src/test.ts +26 -0
  303. package/tsconfig.lib.json +25 -0
  304. package/tsconfig.lib.prod.json +10 -0
  305. package/tsconfig.spec.json +17 -0
  306. package/tslint.json +17 -0
  307. package/arco-support-request.d.ts +0 -32
  308. package/arco-support-request.metadata.json +0 -1
  309. package/bundles/arco-support-request.umd.js +0 -11689
  310. package/bundles/arco-support-request.umd.js.map +0 -1
  311. package/bundles/arco-support-request.umd.min.js +0 -2
  312. package/bundles/arco-support-request.umd.min.js.map +0 -1
  313. package/esm2015/arco-support-request.js +0 -33
  314. package/esm2015/lib/Pipe/allpipe.pipe.js +0 -110
  315. package/esm2015/lib/Pipe/translate.pipe.js +0 -31
  316. package/esm2015/lib/arco-support-request.component.js +0 -18
  317. package/esm2015/lib/arco-support-request.module.js +0 -20
  318. package/esm2015/lib/arco-support-request.service.js +0 -19
  319. package/esm2015/lib/core/global.service.js +0 -1783
  320. package/esm2015/lib/core/handlebar-helper-register.js +0 -188
  321. package/esm2015/lib/core/static/jwt.js +0 -8
  322. package/esm2015/lib/entity-type-setup/activities-create/activities-create.component.js +0 -126
  323. package/esm2015/lib/entity-type-setup/activities-view/activities-view.component.js +0 -46
  324. package/esm2015/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.js +0 -367
  325. package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.js +0 -867
  326. package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.js +0 -85
  327. package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.js +0 -1056
  328. package/esm2015/lib/entity-type-setup/interface/entityTypeInterface.js +0 -51
  329. package/esm2015/lib/entity-type-setup/interface/eventEnum.js +0 -84
  330. package/esm2015/lib/entity-type-setup/page-form-instance.js +0 -65
  331. package/esm2015/lib/entity-type-setup/page.interface.classes.js +0 -40
  332. package/esm2015/lib/entity-type-setup/service/entity-type-setup.service.js +0 -1871
  333. package/esm2015/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.js +0 -320
  334. package/esm2015/lib/search.pipe.js +0 -19
  335. package/esm2015/lib/support-request/action/action.component.js +0 -104
  336. package/esm2015/lib/support-request/case-list/case-list.component.js +0 -449
  337. package/esm2015/lib/support-request/home/home.component.js +0 -23
  338. package/esm2015/lib/support-request/pagination/pagination.component.js +0 -34
  339. package/esm2015/lib/support-request/request-flow/request-flow.component.js +0 -739
  340. package/esm2015/lib/support-request/self-service-flow/self-service-flow.component.js +0 -88
  341. package/esm2015/lib/support-request/support-request-create/support-request-create.component.js +0 -270
  342. package/esm2015/lib/support-request/support-request-details/support-request-details.component.js +0 -659
  343. package/esm2015/lib/support-request/support-request-index/support-request-index.component.js +0 -16
  344. package/esm2015/lib/support-request/support-request-routing.module.js +0 -22
  345. package/esm2015/lib/support-request/support-request.module.js +0 -98
  346. package/esm2015/lib/support-request/support-request.service.js +0 -107
  347. package/esm2015/lib/support-request/supportRequestInterface.js +0 -2
  348. package/esm2015/lib/task/Interfaces/TaskInterface.js +0 -7
  349. package/esm2015/lib/task/Services/task.service.js +0 -251
  350. package/esm2015/lib/templates/attachmentsetup/attachment-interface.js +0 -2
  351. package/esm2015/lib/templates/attachmentsetup/attachment.service.js +0 -196
  352. package/esm2015/lib/templates/grid/grid-datatype/grid-datatype.component.js +0 -37
  353. package/esm2015/lib/templates/grid/grid-service.service.js +0 -151
  354. package/esm2015/lib/templates/grid/grid.component.js +0 -604
  355. package/esm2015/lib/templates/grid/inner-grid/inner-grid.component.js +0 -15
  356. package/esm2015/lib/templates/interface_enum/common-Interface.js +0 -2
  357. package/esm2015/lib/templates/interface_enum/common-enum.js +0 -164
  358. package/esm2015/lib/ticket/_interfaces/model.js +0 -2
  359. package/esm2015/lib/ticket/_ticket-services/ticket-api.service.js +0 -232
  360. package/esm2015/public-api.js +0 -9
  361. package/fesm2015/arco-support-request.js +0 -11082
  362. package/fesm2015/arco-support-request.js.map +0 -1
  363. package/lib/Pipe/allpipe.pipe.d.ts +0 -19
  364. package/lib/Pipe/translate.pipe.d.ts +0 -7
  365. package/lib/arco-support-request.component.d.ts +0 -5
  366. package/lib/arco-support-request.module.d.ts +0 -2
  367. package/lib/arco-support-request.service.d.ts +0 -9
  368. package/lib/core/global.service.d.ts +0 -99
  369. package/lib/core/handlebar-helper-register.d.ts +0 -1
  370. package/lib/core/static/jwt.d.ts +0 -7
  371. package/lib/entity-type-setup/activities-create/activities-create.component.d.ts +0 -30
  372. package/lib/entity-type-setup/activities-view/activities-view.component.d.ts +0 -16
  373. package/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.d.ts +0 -67
  374. package/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.d.ts +0 -88
  375. package/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.d.ts +0 -11
  376. package/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.d.ts +0 -70
  377. package/lib/entity-type-setup/interface/entityTypeInterface.d.ts +0 -917
  378. package/lib/entity-type-setup/interface/eventEnum.d.ts +0 -161
  379. package/lib/entity-type-setup/page-form-instance.d.ts +0 -13
  380. package/lib/entity-type-setup/page.interface.classes.d.ts +0 -33
  381. package/lib/entity-type-setup/service/entity-type-setup.service.d.ts +0 -615
  382. package/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.d.ts +0 -86
  383. package/lib/search.pipe.d.ts +0 -4
  384. package/lib/support-request/action/action.component.d.ts +0 -31
  385. package/lib/support-request/case-list/case-list.component.d.ts +0 -100
  386. package/lib/support-request/home/home.component.d.ts +0 -6
  387. package/lib/support-request/pagination/pagination.component.d.ts +0 -18
  388. package/lib/support-request/request-flow/request-flow.component.d.ts +0 -152
  389. package/lib/support-request/self-service-flow/self-service-flow.component.d.ts +0 -32
  390. package/lib/support-request/support-request-create/support-request-create.component.d.ts +0 -55
  391. package/lib/support-request/support-request-details/support-request-details.component.d.ts +0 -138
  392. package/lib/support-request/support-request-index/support-request-index.component.d.ts +0 -5
  393. package/lib/support-request/support-request-routing.module.d.ts +0 -2
  394. package/lib/support-request/support-request.module.d.ts +0 -2
  395. package/lib/support-request/support-request.service.d.ts +0 -35
  396. package/lib/support-request/supportRequestInterface.d.ts +0 -6
  397. package/lib/task/Interfaces/TaskInterface.d.ts +0 -132
  398. package/lib/task/Services/task.service.d.ts +0 -75
  399. package/lib/templates/attachmentsetup/attachment-interface.d.ts +0 -90
  400. package/lib/templates/attachmentsetup/attachment.service.d.ts +0 -61
  401. package/lib/templates/grid/grid-datatype/grid-datatype.component.d.ts +0 -11
  402. package/lib/templates/grid/grid-service.service.d.ts +0 -45
  403. package/lib/templates/grid/grid.component.d.ts +0 -218
  404. package/lib/templates/grid/inner-grid/inner-grid.component.d.ts +0 -5
  405. package/lib/templates/interface_enum/common-Interface.d.ts +0 -96
  406. package/lib/templates/interface_enum/common-enum.d.ts +0 -134
  407. package/lib/ticket/_interfaces/model.d.ts +0 -192
  408. package/lib/ticket/_ticket-services/ticket-api.service.d.ts +0 -81
@@ -0,0 +1,25 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { EntityFieldRulesComponent } from './entity-field-rules.component';
4
+
5
+ describe('EntityFieldRulesComponent', () => {
6
+ let component: EntityFieldRulesComponent;
7
+ let fixture: ComponentFixture<EntityFieldRulesComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ EntityFieldRulesComponent ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(EntityFieldRulesComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,633 @@
1
+ import { Component, Input, OnInit } from '@angular/core';
2
+ import {
3
+ ISearchCriteria,
4
+ ISortingField,
5
+ } from '../../templates/interface_enum/common-Interface';
6
+ import Swal from 'sweetalert2';
7
+ import { EntityTypeSetupService } from '../service/entity-type-setup.service';
8
+ import {
9
+ EntityTypeFieldVM,
10
+ EntityTypeFormUVM,
11
+ EntityTypeFormVM,
12
+ } from '../interface/entityTypeInterface';
13
+ // import { EntityTypeSetupService } from './service/entity-type-setup.service';
14
+
15
+ @Component({
16
+ selector: 'app-entity-field-rules',
17
+ templateUrl: './entity-field-rules.component.html',
18
+ styleUrls: ['./entity-field-rules.component.scss'],
19
+ })
20
+ export class EntityFieldRulesComponent implements OnInit {
21
+ constructor(public entityTypeSetup: EntityTypeSetupService) {}
22
+
23
+ ngOnInit(): void {
24
+ this.getAllEntityTypeFieldS();
25
+ this.getSingleFormByRecId();
26
+ this.getSingleRules();
27
+ }
28
+
29
+ @Input() EntityTypeId;
30
+ @Input() FormStatus;
31
+
32
+ @Input() FormRecId;
33
+
34
+ EntityTypeFields: EntityTypeFieldVM[] = [];
35
+
36
+ SortingField: ISortingField = { field: null, direction: null } as any;
37
+ Searchcriteria: ISearchCriteria = {
38
+ Pagging: {
39
+ PageNo: 1,
40
+ PageSize: 100,
41
+ },
42
+ Where: [],
43
+ SortOrder: this.SortingField,
44
+ };
45
+
46
+ FieldRules: any[] = [];
47
+
48
+ getAllEntityTypeFieldS() {
49
+
50
+ this.entityTypeSetup
51
+ .getAllEntityTypeField(this.Searchcriteria, this.EntityTypeId)
52
+ .subscribe(
53
+ (res: any) => {
54
+
55
+ this.EntityTypeFields = res.Data;
56
+
57
+ for (let index = 0; index < this.EntityTypeFields.length; index++) {
58
+ let _field = this.EntityTypeFields[index];
59
+ let _fieldrules = [];
60
+ if (_field.RulesData) _fieldrules = JSON.parse(_field.RulesData);
61
+
62
+ let rule = {
63
+ Description: _field.Description,
64
+ rulesList: _fieldrules,
65
+ };
66
+ this.FieldRules.push(rule);
67
+ }
68
+ },
69
+ (error) => {
70
+
71
+ }
72
+ );
73
+ }
74
+
75
+ AllRules: any = null;
76
+
77
+ // getAllRules() {
78
+ //
79
+ // this.entityTypeSetup.getAllRules(this.EntityTypeId).subscribe(
80
+ // (res: any) => {
81
+ //
82
+ // this.AllRules = res;
83
+ // this.getFormRules();
84
+ // },
85
+ // (error) => {
86
+ //
87
+ // }
88
+ // );
89
+ // }
90
+
91
+ SingleRules: any = null;
92
+ getSingleRules() {
93
+
94
+
95
+ this.entityTypeSetup
96
+ .getSingleRules(this.EntityTypeId, this.FormRecId)
97
+ .subscribe(
98
+ (res: any) => {
99
+
100
+ this.SingleRules = res;
101
+ },
102
+ (error) => {
103
+
104
+ }
105
+ );
106
+ }
107
+
108
+ getSingleFormByRecId() {
109
+
110
+ this.formrules = [];
111
+
112
+ this.entityTypeSetup
113
+ .getSingleEntityTypeFormById(this.FormRecId)
114
+ .subscribe((res: any) => {
115
+
116
+
117
+ let FormRules = res.RulesData;
118
+ this.EntityFormData = res;
119
+
120
+ if (FormRules) {
121
+ let _formrules = JSON.parse(FormRules);
122
+ this.formrules = _formrules;
123
+ }
124
+ });
125
+ // this.getAllRules();
126
+ }
127
+
128
+ SelectedEntity: EntityTypeFieldVM = null;
129
+
130
+ changeEntityType(event) {
131
+
132
+ this.SelectedEntity = this.EntityTypeFields.filter(
133
+ (x) => x.Description == event.Description
134
+ )[0];
135
+ // this.refreshEntityRules()
136
+ }
137
+
138
+ refreshEntityRules(item) {
139
+
140
+ this.SelectedEntity = this.EntityTypeFields.filter(
141
+ (x) => x.Description == item.Description
142
+ )[0];
143
+ this.rulesList = [];
144
+ this.entityTypeSetup
145
+ .getSingleEntityTypeFieldById(this.SelectedEntity.RecId)
146
+ .subscribe(
147
+ (res: any) => {
148
+
149
+ if (res.RulesData) item.rulesList = JSON.parse(res.RulesData);
150
+ else item.rulesList = [];
151
+ },
152
+ (error) => {
153
+ console.log(error);
154
+ }
155
+ );
156
+ }
157
+
158
+ saveEntityFieldRules(item) {
159
+
160
+ this.SelectedEntity = this.EntityTypeFields.filter(
161
+ (x) => x.Description == item.Description
162
+ )[0];
163
+
164
+ let rulesData = JSON.stringify(item.rulesList);
165
+
166
+ const data: EntityTypeFieldVM = {
167
+ RecId: this.SelectedEntity.RecId,
168
+ EntityTypeId: this.SelectedEntity.EntityTypeRecId,
169
+ Label: this.SelectedEntity.Label,
170
+ LabelAr: this.SelectedEntity.LabelAr,
171
+ Description: this.SelectedEntity.Description,
172
+ DataType: this.SelectedEntity.DataType,
173
+ FieldData: this.SelectedEntity.FieldData,
174
+ RulesData: rulesData,
175
+ IsVisible: this.SelectedEntity.IsVisible,
176
+ IsReadonly: this.SelectedEntity.IsReadonly,
177
+ IsHide: this.SelectedEntity.IsHide,
178
+ IsMandatory: this.SelectedEntity.IsMandatory,
179
+ };
180
+ this.entityTypeSetup.putEntityTypeField(data).subscribe(
181
+ (res) => {
182
+ Swal.fire(
183
+ this.SelectedEntity.Description,
184
+ 'Rules Updated Successfully',
185
+ 'success'
186
+ );
187
+ },
188
+ (error) => {
189
+ console.log(error);
190
+ }
191
+ );
192
+ }
193
+
194
+ conditionType: any[] = [
195
+ { Id: 'If', Desc: 'If' },
196
+ { Id: 'IfElse', Desc: 'If Else' },
197
+ { Id: 'Action', Desc: 'Action' },
198
+ ];
199
+
200
+ conditionList: any[] = [
201
+ { Id: 'AddValidation', Desc: 'Add Validation' },
202
+ { Id: 'RemoveValidation', Desc: 'Remove Validation' },
203
+ { Id: 'SetFieldValue', Desc: 'Set Field Value' },
204
+ { Id: 'CopyFieldValue', Desc: 'Copy Field Value' },
205
+ { Id: 'ClearFieldValue', Desc: 'ClearFieldValue' },
206
+ { Id: 'IsVisible', Desc: 'IsVisible' },
207
+ { Id: 'IsEditable', Desc: 'IsEditable' },
208
+ ];
209
+
210
+ ValidationList = [
211
+ { Id: 'MinMax', Desc: 'MinMax' },
212
+ { Id: 'Required', Desc: 'Required' },
213
+ { Id: 'MaxLength', Desc: 'Max Length' },
214
+ { Id: 'MinLength', Desc: 'MinLength' },
215
+ { Id: 'Pattern', Desc: 'Pattern' },
216
+ ];
217
+
218
+ OperatorList = [
219
+ { Id: 'Equal', Desc: 'Equal' },
220
+ { Id: 'NotEqual', Desc: 'NotEqual' },
221
+ { Id: 'LessThen', Desc: 'LessT hen' },
222
+ { Id: 'LessThenEqual', Desc: 'Less Then Equal' },
223
+ { Id: 'GreaterThen', Desc: 'GreaterThen' },
224
+ { Id: 'GreaterThenEqual', Desc: 'Greater Then Equal' },
225
+ { Id: 'IsNull', Desc: 'Is Null' },
226
+ { Id: 'IsNotNull', Desc: 'Is Not Null' },
227
+ ];
228
+
229
+ ValueType = [
230
+ { Id: 'EntityField', Desc: 'Entity Field' },
231
+ { Id: 'Static', Desc: 'Static' },
232
+ ];
233
+
234
+ ddlCondition: string = null;
235
+
236
+ rulesList: any[] = [];
237
+
238
+ addnewrules(item) {
239
+ let rulesObj = {
240
+ Condition: '',
241
+ Field: '',
242
+ Type: '',
243
+ Value: '',
244
+ ValueTwo: '',
245
+ };
246
+ item.rulesList.push(rulesObj);
247
+ }
248
+
249
+ selectCondition(event) {
250
+
251
+ }
252
+ selectField(event) {
253
+
254
+ }
255
+
256
+ selectType(event) {
257
+
258
+ }
259
+ selectOperator(event) {
260
+
261
+ }
262
+
263
+ selectCopyFieldTo(event, rules, item) {
264
+
265
+
266
+ if (rules.field && rules.field == event.Description) {
267
+ item.Value = null;
268
+ Swal.fire(rules.field + ' cant copy to same field change event');
269
+ }
270
+ }
271
+
272
+ checkrulesEdited(rules) {
273
+ // let _rule = this.formrules.filter(x=>x)
274
+ return true;
275
+ }
276
+
277
+ deleterule(item, index) {
278
+
279
+ this.rulesList.splice(index, 1);
280
+ }
281
+
282
+ showFormRules: boolean = false;
283
+ showFieldRules: boolean = false;
284
+
285
+ PatternValues: any[] = [];
286
+ getPatternValueDDL() {
287
+ if (this.PatternValues.length < 1) {
288
+ let LookupTypeId = '1001';
289
+ this.entityTypeSetup.getLookupValuseByLookupId(LookupTypeId).subscribe(
290
+ (res: any[]) => {
291
+
292
+ this.PatternValues = res;
293
+ },
294
+ (error) => {
295
+ console.log(error);
296
+ }
297
+ );
298
+ }
299
+ }
300
+
301
+ ///////////////////////////////////////////////////////////////////////////////
302
+
303
+ formrules: any[] = [];
304
+
305
+ // getFormRules() {
306
+ //
307
+ // this.formrules = [];
308
+ // let FormRules = this.AllRules.FormRules;
309
+ // let FieldRules = this.AllRules.FieldRules;
310
+
311
+ // if (FormRules) {
312
+ // let _formrules = JSON.parse(FormRules);
313
+ // this.formrules = _formrules;
314
+ // }
315
+
316
+ // for (let index = 0; index < FieldRules.length; index++) {
317
+ // let _rules = FieldRules[index].Rules;
318
+ // if (_rules && _rules != '{ }') {
319
+ // let _fieldrules = JSON.parse(_rules);
320
+ // this.formrules.push(_fieldrules);
321
+ // }
322
+ // }
323
+ // }
324
+
325
+ fromOnInit() {
326
+
327
+
328
+ let _rules = {
329
+ Id: 1,
330
+ Type: 'OnInit',
331
+ Name: '',
332
+ Condtion: [],
333
+ action: [],
334
+ CondtionOperator: 1,
335
+ show: true,
336
+ };
337
+
338
+ this.formrules.push(_rules);
339
+ this.formRulesOrder();
340
+ this.collapeAllRules();
341
+
342
+ this.formrules = this.formrules.map((x) => {
343
+ if (x.Type == 'OnInit') x.show = true;
344
+ return x;
345
+ });
346
+ }
347
+
348
+ fromOnSubmit() {
349
+
350
+ let _rules = {
351
+ Id: 2,
352
+ Type: 'OnSubmit',
353
+ Name: '',
354
+ Condtion: [],
355
+ action: [],
356
+ CondtionOperator: 1,
357
+ show: true,
358
+ };
359
+ this.formrules.push(_rules);
360
+ this.formRulesOrder();
361
+ this.collapeAllRules();
362
+
363
+ this.formrules = this.formrules.map((x) => {
364
+ if (x.Type == 'OnSubmit') x.show = true;
365
+ return x;
366
+ });
367
+ }
368
+
369
+ fromOnSave() {
370
+ let _rules = {
371
+ Id: 3,
372
+ Type: 'OnSave',
373
+ Name: '',
374
+ Condtion: [],
375
+ action: [],
376
+ CondtionOperator: 1,
377
+ show: true,
378
+ };
379
+ this.formrules.push(_rules);
380
+ this.formRulesOrder();
381
+ this.collapeAllRules();
382
+
383
+ this.formrules = this.formrules.map((x) => {
384
+ if (x.Type == 'OnSave') x.show = true;
385
+ return x;
386
+ });
387
+ }
388
+
389
+ fromOnDelete() {
390
+ let _rules = {
391
+ Id: 4,
392
+ Type: 'OnDelete',
393
+ Name: '',
394
+ Condtion: [],
395
+ action: [],
396
+ CondtionOperator: 1,
397
+ show: true,
398
+ };
399
+ this.formrules.push(_rules);
400
+ this.formRulesOrder();
401
+ this.collapeAllRules();
402
+
403
+ this.formrules = this.formrules.map((x) => {
404
+ if (x.Type == 'OnDelete') x.show = true;
405
+ return x;
406
+ });
407
+ }
408
+
409
+ showFieldSelectPopup: boolean = false;
410
+ onFieldChange() {
411
+ this.showFieldSelectPopup = true;
412
+ }
413
+
414
+ closeFieldSelectPopup() {
415
+ this.showFieldSelectPopup = false;
416
+ }
417
+
418
+ selectFromFields(event) {
419
+ let field = this.EntityTypeFields.filter(
420
+ (x) => x.Description == event.Description
421
+ )[0];
422
+
423
+ let _rule = this.formrules.filter((x) => x.field == event.Description);
424
+ this.collapeAllRules();
425
+
426
+ if (_rule.length == 0) {
427
+ let _rules = {
428
+ Id: 5,
429
+ Type: 'OnFieldChange',
430
+ field: field.Description,
431
+ Name: field.Description + ' Change ',
432
+ Condtion: [],
433
+ action: [],
434
+ CondtionOperator: 1,
435
+ show: true,
436
+ };
437
+ this.formrules.push(_rules);
438
+ this.formRulesOrder();
439
+ } else {
440
+ this.formrules = this.formrules.map((x) => {
441
+ if (x.field == _rule[0].field) x.show = true;
442
+
443
+ return x;
444
+ });
445
+ }
446
+ this.closeFieldSelectPopup();
447
+ }
448
+
449
+ collapeAllRules() {
450
+
451
+ this.formrules = this.formrules.map((x) => {
452
+ x.show = false;
453
+ return x;
454
+ });
455
+ }
456
+
457
+ openAllRules() {
458
+ this.formrules = this.formrules.map((x) => {
459
+ x.show = true;
460
+ return x;
461
+ });
462
+ }
463
+
464
+ formRulesOrder() {
465
+
466
+ this.formrules = this.formrules.sort((a, b) => {
467
+ if (a.Id < b.Id) return -1;
468
+ else if (a.Id > b.Id) return 1;
469
+ else return 0;
470
+ });
471
+ }
472
+
473
+ addNewAction(item) {
474
+ let rulesObj = {
475
+ Condition: '',
476
+ Field: '',
477
+ Type: '',
478
+ Value: '',
479
+ ValueTwo: '',
480
+ ValidationMessage: '',
481
+ ValidationMessageAr: '',
482
+ };
483
+ item.action.push(rulesObj);
484
+ }
485
+
486
+ deleteAction(item, index) {
487
+
488
+ item.action.splice(index, 1);
489
+ }
490
+
491
+ deleterules(rules) {
492
+ Swal.fire({
493
+ title: 'Are you sure to delete?',
494
+ showCancelButton: true,
495
+ confirmButtonColor: '#3085d6',
496
+ cancelButtonColor: '#d33',
497
+ cancelButtonText: 'Cancel',
498
+ confirmButtonText: 'Yes, delete it!',
499
+ }).then((result) => {
500
+ if (result.value) {
501
+ if (rules.Type == 'OnFieldChange') {
502
+ this.saveFieldRules(rules, 'Delete');
503
+ this.formrules = this.formrules.filter((x) => x.field != rules.field);
504
+ } else {
505
+ let formrules = this.formrules.filter(
506
+ (x) => x.Type != 'OnFieldChange' && x.Id != rules.Id
507
+ );
508
+ this.saveFormRules(formrules);
509
+ this.formrules = this.formrules.filter((x) => x.Id != rules.Id);
510
+ }
511
+ }
512
+ });
513
+ }
514
+
515
+ saverules(rules) {
516
+
517
+
518
+ if (rules.Type == 'OnFieldChange' || rules.Type == 'OnFieldNameChange') {
519
+ rules.Id = 5;
520
+ this.saveFieldRules(rules);
521
+ } else {
522
+ let formrules = this.formrules.filter(
523
+ (x) => x.Type != 'OnFieldChange' && x.Type != 'OnFieldNameChange'
524
+ );
525
+ this.saveFormRules(formrules);
526
+ }
527
+ }
528
+
529
+ saveFieldRules(item, Type?) {
530
+
531
+ this.SelectedEntity = this.EntityTypeFields.filter(
532
+ (x) => x.Description == item.field
533
+ )[0];
534
+
535
+ if (!this.SelectedEntity || !this.SelectedEntity.RecId) {
536
+ Swal.fire('Fields error', 'Fields not found', 'error');
537
+ return;
538
+ }
539
+
540
+ let rulesData = JSON.stringify(item);
541
+
542
+ let data: EntityTypeFieldVM = {
543
+ RecId: this.SelectedEntity.RecId,
544
+ EntityTypeId: this.SelectedEntity.EntityTypeRecId,
545
+ Label: this.SelectedEntity.Label,
546
+ Description: this.SelectedEntity.Description,
547
+ DataType: this.SelectedEntity.DataType,
548
+ FieldData: this.SelectedEntity.FieldData,
549
+ RulesData: rulesData,
550
+ IsVisible: this.SelectedEntity.IsVisible,
551
+ IsReadonly: this.SelectedEntity.IsReadonly,
552
+ IsHide: this.SelectedEntity.IsHide,
553
+ IsMandatory: this.SelectedEntity.IsMandatory,
554
+ };
555
+
556
+ if (Type == 'Delete') {
557
+ data.RulesData = '{ }';
558
+ }
559
+
560
+ this.entityTypeSetup.putEntityTypeField(data).subscribe(
561
+ (res) => {
562
+ Swal.fire(
563
+ this.SelectedEntity.Description,
564
+ 'Rules Updated Successfully',
565
+ 'success'
566
+ );
567
+ // if (Type == "Delete") {
568
+ // this.getAllRules();
569
+ // }
570
+ },
571
+ (error) => {
572
+ console.log(error);
573
+ }
574
+ );
575
+ }
576
+
577
+ EntityFormData: EntityTypeFormVM = null;
578
+ @Input() EntityFormId: any;
579
+
580
+ // getActiveEntityForm() {
581
+ //
582
+ // this.entityTypeSetup.getActiveEntityForm(this.FormRecId).subscribe(
583
+ // (res: any) => {
584
+ //
585
+
586
+ // },
587
+ // (error) => {
588
+ //
589
+ // console.log(error);
590
+ // if (error.error == 'Form Data Not Found') {
591
+ // Swal.fire(
592
+ // 'Form',
593
+ // 'there is no form in this setup please continue the page form design',
594
+ // 'info'
595
+ // );
596
+ // }
597
+ // }
598
+ // );
599
+ // }
600
+
601
+ saveFormRules(item) {
602
+
603
+
604
+ if (!this.EntityFormData || !this.EntityFormData.RecId) {
605
+ Swal.fire('Form error', 'Form not found', 'error');
606
+ return;
607
+ }
608
+
609
+ let rulesData = JSON.stringify(item);
610
+
611
+ const data: EntityTypeFormUVM = {
612
+ RecId: this.EntityFormData.RecId,
613
+ EntityTypeId: this.EntityFormData.EntityTypeRecId,
614
+ CascadeFieldId: this.EntityFormData.CascadeFieldId,
615
+ DataSourceLink: this.EntityFormData.DataSourceLink,
616
+ FieldControlType: this.EntityFormData.FieldControlType,
617
+ FieldId: this.EntityFormData.FieldId,
618
+ IsVisible: this.EntityFormData.IsVisible,
619
+ OrderId: this.EntityFormData.OrderId,
620
+ EntityTypeRecId: this.EntityFormData.EntityTypeRecId,
621
+ RulesData: rulesData,
622
+ FormType: this.EntityFormData.FormType,
623
+ };
624
+ this.entityTypeSetup.putEntityTypeForm(data).subscribe(
625
+ (res) => {
626
+ Swal.fire('', 'Updated Successfully', 'success');
627
+ },
628
+ (error) => {
629
+ console.log(error);
630
+ }
631
+ );
632
+ }
633
+ }