arco-support-request 0.0.89 → 0.0.90

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