arco-support-request 0.0.65 → 0.0.66

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