b2adminui 1.0.5 → 1.0.7

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 (782) hide show
  1. package/package.json +5 -2
  2. package/Dockerfile +0 -45
  3. package/app-config-prod.json +0 -6
  4. package/app-config.json +0 -10
  5. package/b2@1.0.0 +0 -0
  6. package/bs-config.json +0 -8
  7. package/config/helpers.js +0 -10
  8. package/config/karma-test-shim.js +0 -21
  9. package/config/karma.conf.js +0 -37
  10. package/config/webpack.common.js +0 -96
  11. package/config/webpack.dev.js +0 -24
  12. package/config/webpack.eks.js +0 -72
  13. package/config/webpack.prod.js +0 -72
  14. package/config/webpack.test.js +0 -53
  15. package/default.nginx.config +0 -60
  16. package/docker-entrypoint.sh +0 -6
  17. package/e2e-spec.ts +0 -21
  18. package/favicon.ico +0 -0
  19. package/karma.webpack.conf.js +0 -1
  20. package/npm +0 -0
  21. package/rimraf +0 -0
  22. package/src/app/app-config.ts +0 -21
  23. package/src/app/app-routing.module.ts +0 -165
  24. package/src/app/app.component.ts +0 -30
  25. package/src/app/app.module.ts +0 -72
  26. package/src/app/auth/auth.guard.ts +0 -192
  27. package/src/app/customer-management/customer-management.module.ts +0 -52
  28. package/src/app/customer-management/customer-personal-details/components/customer-personal-details.component.ts +0 -766
  29. package/src/app/customer-management/customer-personal-details/customer-personal-details.component.css +0 -4
  30. package/src/app/customer-management/customer-personal-details/customer-personal-details.component.html +0 -812
  31. package/src/app/customer-management/customer-personal-details/models/companyrisksetting.model.ts +0 -65
  32. package/src/app/customer-management/customer-profile-history-list/components/customer-profile-history-list.component.ts +0 -149
  33. package/src/app/customer-management/customer-profile-history-list/customer-profile-history-list.component.html +0 -104
  34. package/src/app/customer-management/customer-profile-history-list/models/customer-profile-history-list.model.ts +0 -33
  35. package/src/app/customer-management/customer-profile-history-list/models/index.ts +0 -1
  36. package/src/app/customer-management/customer-registration/components/customer-registration.component.ts +0 -1595
  37. package/src/app/customer-management/customer-registration/customer-registration.component.css +0 -6
  38. package/src/app/customer-management/customer-registration/customer-registration.component.html +0 -1169
  39. package/src/app/customer-management/customer-registration/models/approve-customer.model.ts +0 -5
  40. package/src/app/customer-management/customer-registration/models/index.ts +0 -1
  41. package/src/app/customer-management/customer-registration/models/wallet-registration.model.ts +0 -198
  42. package/src/app/customer-management/customer-registration-list/components/customer-registration-list.component.ts +0 -444
  43. package/src/app/customer-management/customer-registration-list/customer-registration-list.component.html +0 -354
  44. package/src/app/customer-management/customer-registration-list/models/index.ts +0 -2
  45. package/src/app/customer-management/customer-registration-list/models/wallet-list.model.ts +0 -44
  46. package/src/app/customer-management/customer-registration-list/models/wallet.model.ts +0 -13
  47. package/src/app/customer-management/manual-topup/components/manual-topup.component.ts +0 -299
  48. package/src/app/customer-management/manual-topup/manual-topup.component.html +0 -173
  49. package/src/app/customer-management/manual-topup/models/index.ts +0 -1
  50. package/src/app/customer-management/manual-topup/models/manual-topup.model.ts +0 -17
  51. package/src/app/customer-management/wallet-balance-history/components/wallet-balance-history.component.ts +0 -243
  52. package/src/app/customer-management/wallet-balance-history/models/balance-history-list.model.ts +0 -25
  53. package/src/app/customer-management/wallet-balance-history/models/balance-history.model.ts +0 -13
  54. package/src/app/customer-management/wallet-balance-history/models/index.ts +0 -3
  55. package/src/app/customer-management/wallet-balance-history/models/wallet.model.ts +0 -13
  56. package/src/app/customer-management/wallet-balance-history/wallet-balance-history.component.html +0 -182
  57. package/src/app/customer-management/wallet-history/components/wallet-history.component.ts +0 -239
  58. package/src/app/customer-management/wallet-history/models/index.ts +0 -2
  59. package/src/app/customer-management/wallet-history/models/wallet-history-list.model.ts +0 -11
  60. package/src/app/customer-management/wallet-history/models/wallet-history.model.ts +0 -10
  61. package/src/app/customer-management/wallet-history/wallet-history.component.html +0 -85
  62. package/src/app/external-change-password/components/external-change-password.component.ts +0 -71
  63. package/src/app/external-change-password/external-change-password.component.html +0 -57
  64. package/src/app/external-change-password/models/external-change-password.model.ts +0 -6
  65. package/src/app/fee-management/company/company.component.html +0 -491
  66. package/src/app/fee-management/company/components/company.component.ts +0 -472
  67. package/src/app/fee-management/company/models/company.model.ts +0 -55
  68. package/src/app/fee-management/company/models/index.ts +0 -1
  69. package/src/app/fee-management/company-wallet-profile/company-wallet-profile.component.html +0 -161
  70. package/src/app/fee-management/company-wallet-profile/components/company-wallet-profile.component.ts +0 -194
  71. package/src/app/fee-management/fee-management.module.ts +0 -51
  72. package/src/app/fee-management/menu-setup/models/menu-setup.model.ts +0 -75
  73. package/src/app/fee-management/wallet-fee-setting/components/wallet-fee-setting.component.ts +0 -337
  74. package/src/app/fee-management/wallet-fee-setting/models/index.ts +0 -7
  75. package/src/app/fee-management/wallet-fee-setting/models/transfer-fee.model.ts +0 -32
  76. package/src/app/fee-management/wallet-fee-setting/models/verify-risk-level.model.ts +0 -7
  77. package/src/app/fee-management/wallet-fee-setting/models/wallet-fee-setting.model.ts +0 -32
  78. package/src/app/fee-management/wallet-fee-setting/models/wallet-setting.model.ts +0 -17
  79. package/src/app/fee-management/wallet-fee-setting/models/wallet.model.ts +0 -28
  80. package/src/app/fee-management/wallet-fee-setting/wallet-fee-setting.component.html +0 -1226
  81. package/src/app/fee-management/wallet-profile-limit-setting/components/wallet-profile-limit-setting.component.ts +0 -284
  82. package/src/app/fee-management/wallet-profile-limit-setting/models/index.ts +0 -1
  83. package/src/app/fee-management/wallet-profile-limit-setting/models/wallet-profile-limit-setting.model.ts +0 -79
  84. package/src/app/fee-management/wallet-profile-limit-setting/wallet-profile-limit-setting.component.html +0 -1285
  85. package/src/app/fee-management/wallet-profile-setting-list/components/wallet-profile-setting-list.component.ts +0 -350
  86. package/src/app/fee-management/wallet-profile-setting-list/models/index.ts +0 -2
  87. package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting-list.model.ts +0 -36
  88. package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting.model.ts +0 -12
  89. package/src/app/fee-management/wallet-profile-setting-list/wallet-profile-setting-list.component.html +0 -220
  90. package/src/app/fee-management/wallet-topup/components/wallet-topup.component.ts +0 -209
  91. package/src/app/fee-management/wallet-topup/models/index.ts +0 -3
  92. package/src/app/fee-management/wallet-topup/models/wallet-topup.model.ts +0 -11
  93. package/src/app/fee-management/wallet-topup/wallet-topup.component.html +0 -97
  94. package/src/app/forgot-password/components/forgot-password.component.ts +0 -87
  95. package/src/app/forgot-password/forgot-password.component.html +0 -40
  96. package/src/app/forgot-password/models/forgot-password.model.ts +0 -5
  97. package/src/app/forgot-password/models/index.ts +0 -2
  98. package/src/app/login/components/login.component.ts +0 -199
  99. package/src/app/login/login.component.html +0 -49
  100. package/src/app/login/models/common.model.ts +0 -21
  101. package/src/app/login/models/login.model.ts +0 -5
  102. package/src/app/models/audit-log-insert.model.ts +0 -11
  103. package/src/app/models/common.model.ts +0 -56
  104. package/src/app/models/index.ts +0 -4
  105. package/src/app/models/navigation-data.model.ts +0 -24
  106. package/src/app/models/page-info-model.ts +0 -4
  107. package/src/app/models/response-model.ts +0 -5
  108. package/src/app/models/search-model.ts +0 -21
  109. package/src/app/navbar/components/navbar.component.ts +0 -288
  110. package/src/app/navbar/navbar.component.html +0 -200
  111. package/src/app/profile-setting/change-password/change-password.component.html +0 -85
  112. package/src/app/profile-setting/change-password/components/change-password.component.ts +0 -76
  113. package/src/app/profile-setting/change-password/models/change-password.model.ts +0 -5
  114. package/src/app/profile-setting/change-password/models/index.ts +0 -1
  115. package/src/app/profile-setting/profile-setting/components/profile-setting.component.ts +0 -234
  116. package/src/app/profile-setting/profile-setting/models/profile-setting.model.ts +0 -21
  117. package/src/app/profile-setting/profile-setting/profile-setting.component.html +0 -228
  118. package/src/app/profile-setting/profile-setting.module.ts +0 -22
  119. package/src/app/shared/alerts/alertOptions.ts +0 -14
  120. package/src/app/shared/alerts/alerts.ts +0 -57
  121. package/src/app/shared/common/common.ts +0 -1353
  122. package/src/app/shared/constants/constants.ts +0 -550
  123. package/src/app/shared/interceptor/https-interceptor.ts +0 -69
  124. package/src/app/shared/service/shared.service.ts +0 -287
  125. package/src/app/shared/source-of-fund/source-of-fund.ts +0 -4
  126. package/src/app/shared/transaction/transaction-type-status.ts +0 -32
  127. package/src/app/transaction-history/transaction-history.module.ts +0 -83
  128. package/src/app/transaction-history/wallet-transaction-list/components/wallet-transaction-list.component.ts +0 -500
  129. package/src/app/transaction-history/wallet-transaction-list/models/wallet-transaction-list.model.ts +0 -75
  130. package/src/app/transaction-history/wallet-transaction-list/wallet-transaction-list.component.html +0 -530
  131. package/src/app/transaction-history/wallet-transaction-list-details/components/wallet-transaction-list-details.component.ts +0 -154
  132. package/src/app/transaction-history/wallet-transaction-list-details/models/index.ts +0 -3
  133. package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-list-details.model.ts +0 -39
  134. package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-refund.model.ts +0 -5
  135. package/src/app/transaction-history/wallet-transaction-list-details/wallet-transaction-list-details.component.html +0 -452
  136. package/src/app/user-management/audit-log-list/audit-log-list.component.html +0 -198
  137. package/src/app/user-management/audit-log-list/components/audit-log-list.component.ts +0 -415
  138. package/src/app/user-management/audit-log-list/models/audit-log-list.model.ts +0 -38
  139. package/src/app/user-management/audit-log-list/models/audit-log.model.ts +0 -11
  140. package/src/app/user-management/audit-log-list/models/index.ts +0 -2
  141. package/src/app/user-management/system-user/components/system-user.component.ts +0 -466
  142. package/src/app/user-management/system-user/models/system-user.model.ts +0 -23
  143. package/src/app/user-management/system-user/system-user.component.html +0 -349
  144. package/src/app/user-management/system-user-list/components/system-user-list.component.ts +0 -399
  145. package/src/app/user-management/system-user-list/models/index.ts +0 -2
  146. package/src/app/user-management/system-user-list/models/system-user-list.model.ts +0 -40
  147. package/src/app/user-management/system-user-list/models/system-user.model.ts +0 -11
  148. package/src/app/user-management/system-user-list/system-user-list.component.html +0 -266
  149. package/src/app/user-management/user-group-permission/components/user-group-permission.component.ts +0 -1819
  150. package/src/app/user-management/user-group-permission/models/user-group-permission.model.ts +0 -288
  151. package/src/app/user-management/user-group-permission/user-group-permission.component.html +0 -100
  152. package/src/app/user-management/user-group-permission-list/components/user-group-permission-list.component.ts +0 -379
  153. package/src/app/user-management/user-group-permission-list/models/index.ts +0 -2
  154. package/src/app/user-management/user-group-permission-list/models/user-group-permission-list.model.ts +0 -28
  155. package/src/app/user-management/user-group-permission-list/models/user-group-permission.model.ts +0 -8
  156. package/src/app/user-management/user-group-permission-list/user-group-permission-list.component.html +0 -184
  157. package/src/app/user-management/user-management.module.ts +0 -38
  158. package/src/app/validate-change-password/components/validate-change-password.component.ts +0 -66
  159. package/src/app/validate-change-password/validate-change-password.component.html +0 -8
  160. package/src/assets/css/animate.css +0 -2848
  161. package/src/assets/css/bootstrap.css +0 -6760
  162. package/src/assets/css/bootstrap.css.map +0 -1
  163. package/src/assets/css/bootstrap.min.css +0 -6
  164. package/src/assets/css/bootstrap.min.css.map +0 -1
  165. package/src/assets/css/font.css +0 -10
  166. package/src/assets/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css +0 -251
  167. package/src/assets/css/plugins/blueimp/css/blueimp-gallery-indicator.css +0 -71
  168. package/src/assets/css/plugins/blueimp/css/blueimp-gallery-video.css +0 -87
  169. package/src/assets/css/plugins/blueimp/css/blueimp-gallery.css +0 -226
  170. package/src/assets/css/plugins/blueimp/css/blueimp-gallery.min.css +0 -1
  171. package/src/assets/css/plugins/blueimp/css/demo.css +0 -51
  172. package/src/assets/css/plugins/blueimp/img/error.png +0 -0
  173. package/src/assets/css/plugins/blueimp/img/error.svg +0 -5
  174. package/src/assets/css/plugins/blueimp/img/loading.gif +0 -0
  175. package/src/assets/css/plugins/blueimp/img/play-pause.png +0 -0
  176. package/src/assets/css/plugins/blueimp/img/play-pause.svg +0 -6
  177. package/src/assets/css/plugins/blueimp/img/video-play.png +0 -0
  178. package/src/assets/css/plugins/blueimp/img/video-play.svg +0 -5
  179. package/src/assets/css/plugins/bootstrap-datepicker/bootstrap-datepicker3.min.css +0 -9
  180. package/src/assets/css/plugins/bootstrap-markdown/bootstrap-markdown.min.css +0 -1
  181. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css +0 -1468
  182. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css.map +0 -1
  183. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.min.css +0 -9
  184. package/src/assets/css/plugins/bootstrap-timepicker/bootstrap-timepicker.min.css +0 -10
  185. package/src/assets/css/plugins/bootstrapTour/bootstrap-tour.min.css +0 -22
  186. package/src/assets/css/plugins/c3/c3.min.css +0 -1
  187. package/src/assets/css/plugins/chartist/chartist.min.css +0 -773
  188. package/src/assets/css/plugins/chosen/chosen-sprite.png +0 -0
  189. package/src/assets/css/plugins/chosen/chosen-sprite@2x.png +0 -0
  190. package/src/assets/css/plugins/chosen/chosen.css +0 -429
  191. package/src/assets/css/plugins/clockpicker/clockpicker.css +0 -168
  192. package/src/assets/css/plugins/codemirror/ambiance.css +0 -77
  193. package/src/assets/css/plugins/codemirror/codemirror.css +0 -309
  194. package/src/assets/css/plugins/colorpicker/bootstrap-colorpicker.min.css +0 -9
  195. package/src/assets/css/plugins/cropper/cropper.min.css +0 -9
  196. package/src/assets/css/plugins/dataTables/datatables.min.css +0 -21
  197. package/src/assets/css/plugins/datapicker/datepicker3.css +0 -789
  198. package/src/assets/css/plugins/datatables.net/css/jquery.dataTables.css +0 -455
  199. package/src/assets/css/plugins/datatables.net/images/sort_asc.png +0 -0
  200. package/src/assets/css/plugins/datatables.net/images/sort_asc_disabled.png +0 -0
  201. package/src/assets/css/plugins/datatables.net/images/sort_both.png +0 -0
  202. package/src/assets/css/plugins/datatables.net/images/sort_desc.png +0 -0
  203. package/src/assets/css/plugins/datatables.net/images/sort_desc_disabled.png +0 -0
  204. package/src/assets/css/plugins/daterangepicker/daterangepicker-bs3.css +0 -335
  205. package/src/assets/css/plugins/dropzone/basic.css +0 -155
  206. package/src/assets/css/plugins/dropzone/dropzone.css +0 -410
  207. package/src/assets/css/plugins/footable/fonts/footable.eot +0 -0
  208. package/src/assets/css/plugins/footable/fonts/footable.svg +0 -78
  209. package/src/assets/css/plugins/footable/fonts/footable.ttf +0 -0
  210. package/src/assets/css/plugins/footable/fonts/footable.woff +0 -0
  211. package/src/assets/css/plugins/footable/footable.core.css +0 -178
  212. package/src/assets/css/plugins/fullcalendar/fullcalendar.css +0 -977
  213. package/src/assets/css/plugins/fullcalendar/fullcalendar.print.css +0 -202
  214. package/src/assets/css/plugins/iCheck/custom.css +0 -59
  215. package/src/assets/css/plugins/iCheck/green.png +0 -0
  216. package/src/assets/css/plugins/iCheck/green@2x.png +0 -0
  217. package/src/assets/css/plugins/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  218. package/src/assets/css/plugins/images/bootstrap-colorpicker/alpha.png +0 -0
  219. package/src/assets/css/plugins/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
  220. package/src/assets/css/plugins/images/bootstrap-colorpicker/hue.png +0 -0
  221. package/src/assets/css/plugins/images/bootstrap-colorpicker/saturation.png +0 -0
  222. package/src/assets/css/plugins/images/sort.png +0 -0
  223. package/src/assets/css/plugins/images/sort_asc.png +0 -0
  224. package/src/assets/css/plugins/images/sort_desc.png +0 -0
  225. package/src/assets/css/plugins/images/sprite-skin-flat.png +0 -0
  226. package/src/assets/css/plugins/images/sprite-skin-flat2.png +0 -0
  227. package/src/assets/css/plugins/images/sprite-skin-nice.png +0 -0
  228. package/src/assets/css/plugins/images/sprite-skin-simple.png +0 -0
  229. package/src/assets/css/plugins/images/spritemap.png +0 -0
  230. package/src/assets/css/plugins/images/spritemap@2x.png +0 -0
  231. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.css +0 -126
  232. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css +0 -89
  233. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinNice.css +0 -85
  234. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinSimple.css +0 -85
  235. package/src/assets/css/plugins/jQueryUI/images/animated-overlay.gif +0 -0
  236. package/src/assets/css/plugins/jQueryUI/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  237. package/src/assets/css/plugins/jQueryUI/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  238. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  239. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  240. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  241. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  242. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  243. package/src/assets/css/plugins/jQueryUI/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  244. package/src/assets/css/plugins/jQueryUI/images/ui-icons_222222_256x240.png +0 -0
  245. package/src/assets/css/plugins/jQueryUI/images/ui-icons_2e83ff_256x240.png +0 -0
  246. package/src/assets/css/plugins/jQueryUI/images/ui-icons_454545_256x240.png +0 -0
  247. package/src/assets/css/plugins/jQueryUI/images/ui-icons_888888_256x240.png +0 -0
  248. package/src/assets/css/plugins/jQueryUI/images/ui-icons_cd0a0a_256x240.png +0 -0
  249. package/src/assets/css/plugins/jQueryUI/jquery-ui-1.10.4.custom.min.css +0 -7
  250. package/src/assets/css/plugins/jQueryUI/jquery-ui.css +0 -1177
  251. package/src/assets/css/plugins/jasny/jasny-bootstrap.min.css +0 -7
  252. package/src/assets/css/plugins/jqGrid/ui.jqgrid.css +0 -171
  253. package/src/assets/css/plugins/jsTree/32px.png +0 -0
  254. package/src/assets/css/plugins/jsTree/39px.png +0 -0
  255. package/src/assets/css/plugins/jsTree/40px.png +0 -0
  256. package/src/assets/css/plugins/jsTree/style.css +0 -1050
  257. package/src/assets/css/plugins/jsTree/style.min.css +0 -1
  258. package/src/assets/css/plugins/jsTree/throbber.gif +0 -0
  259. package/src/assets/css/plugins/ladda/ladda-themeless.min.css +0 -7
  260. package/src/assets/css/plugins/ladda/ladda.min.css +0 -9
  261. package/src/assets/css/plugins/morris/morris-0.4.3.min.css +0 -2
  262. package/src/assets/css/plugins/nouslider/jquery.nouislider.css +0 -165
  263. package/src/assets/css/plugins/select2/select2.min.css +0 -1
  264. package/src/assets/css/plugins/slick/ajax-loader.gif +0 -0
  265. package/src/assets/css/plugins/slick/fonts/slick.eot +0 -0
  266. package/src/assets/css/plugins/slick/fonts/slick.svg +0 -14
  267. package/src/assets/css/plugins/slick/fonts/slick.ttf +0 -0
  268. package/src/assets/css/plugins/slick/fonts/slick.woff +0 -0
  269. package/src/assets/css/plugins/slick/slick-theme.css +0 -201
  270. package/src/assets/css/plugins/slick/slick.css +0 -119
  271. package/src/assets/css/plugins/social-buttons/social-buttons.css +0 -68
  272. package/src/assets/css/plugins/steps/jquery.steps.css +0 -380
  273. package/src/assets/css/plugins/summernote/summernote-bs3.css +0 -5970
  274. package/src/assets/css/plugins/summernote/summernote.css +0 -446
  275. package/src/assets/css/plugins/sweetalert/sweetalert.css +0 -715
  276. package/src/assets/css/plugins/switchery/switchery.css +0 -32
  277. package/src/assets/css/plugins/toastr/ng2-toastr.min.css +0 -1
  278. package/src/assets/css/plugins/toastr/toastr.min.css +0 -222
  279. package/src/assets/css/plugins/touchspin/jquery.bootstrap-touchspin.min.css +0 -10
  280. package/src/assets/css/style.css +0 -9725
  281. package/src/assets/css/style.scss +0 -1
  282. package/src/assets/font-awesome/css/font-awesome.css +0 -2337
  283. package/src/assets/font-awesome/css/font-awesome.min.css +0 -4
  284. package/src/assets/font-awesome/fonts/FontAwesome.otf +0 -0
  285. package/src/assets/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  286. package/src/assets/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
  287. package/src/assets/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  288. package/src/assets/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  289. package/src/assets/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
  290. package/src/assets/font-awesome/less/animated.less +0 -34
  291. package/src/assets/font-awesome/less/bordered-pulled.less +0 -25
  292. package/src/assets/font-awesome/less/core.less +0 -12
  293. package/src/assets/font-awesome/less/fixed-width.less +0 -6
  294. package/src/assets/font-awesome/less/font-awesome.less +0 -18
  295. package/src/assets/font-awesome/less/icons.less +0 -789
  296. package/src/assets/font-awesome/less/larger.less +0 -13
  297. package/src/assets/font-awesome/less/list.less +0 -19
  298. package/src/assets/font-awesome/less/mixins.less +0 -60
  299. package/src/assets/font-awesome/less/path.less +0 -15
  300. package/src/assets/font-awesome/less/rotated-flipped.less +0 -20
  301. package/src/assets/font-awesome/less/screen-reader.less +0 -5
  302. package/src/assets/font-awesome/less/stacked.less +0 -20
  303. package/src/assets/font-awesome/less/variables.less +0 -800
  304. package/src/assets/font-awesome/scss/_animated.scss +0 -34
  305. package/src/assets/font-awesome/scss/_bordered-pulled.scss +0 -25
  306. package/src/assets/font-awesome/scss/_core.scss +0 -12
  307. package/src/assets/font-awesome/scss/_fixed-width.scss +0 -6
  308. package/src/assets/font-awesome/scss/_icons.scss +0 -789
  309. package/src/assets/font-awesome/scss/_larger.scss +0 -13
  310. package/src/assets/font-awesome/scss/_list.scss +0 -19
  311. package/src/assets/font-awesome/scss/_mixins.scss +0 -60
  312. package/src/assets/font-awesome/scss/_path.scss +0 -15
  313. package/src/assets/font-awesome/scss/_rotated-flipped.scss +0 -20
  314. package/src/assets/font-awesome/scss/_screen-reader.scss +0 -5
  315. package/src/assets/font-awesome/scss/_stacked.scss +0 -20
  316. package/src/assets/font-awesome/scss/_variables.scss +0 -800
  317. package/src/assets/font-awesome/scss/font-awesome.scss +0 -18
  318. package/src/assets/fonts/DejaVuSans-Bold.ttf +0 -0
  319. package/src/assets/fonts/DejaVuSans-Oblique.ttf +0 -0
  320. package/src/assets/fonts/DejaVuSans.ttf +0 -0
  321. package/src/assets/fonts/Garuda.ttf +0 -0
  322. package/src/assets/fonts/NotoSansThaiUI-Regular.ttf +0 -0
  323. package/src/assets/fonts/TH-Charmonman-Regular.ttf +0 -0
  324. package/src/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  325. package/src/assets/fonts/glyphicons-halflings-regular.svg +0 -288
  326. package/src/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  327. package/src/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  328. package/src/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  329. package/src/assets/fonts/kanit-v3-latin_latin-ext_thai-regular.ttf +0 -0
  330. package/src/assets/img/2c2p_169x60.png +0 -0
  331. package/src/assets/img/2c2p_169x60_black_header.png +0 -0
  332. package/src/assets/img/calendar_gray.png +0 -0
  333. package/src/assets/img/success.png +0 -0
  334. package/src/assets/img/user.png +0 -0
  335. package/src/assets/img/warning.png +0 -0
  336. package/src/assets/js/bootstrap.js +0 -2363
  337. package/src/assets/js/bootstrap.min.js +0 -7
  338. package/src/assets/js/demo/chartjs-demo.js +0 -217
  339. package/src/assets/js/demo/dashboard-demo.js +0 -117
  340. package/src/assets/js/demo/flot-demo.js +0 -308
  341. package/src/assets/js/demo/flot-demo2.js +0 -377
  342. package/src/assets/js/demo/morris-demo.js +0 -89
  343. package/src/assets/js/demo/peity-demo.js +0 -33
  344. package/src/assets/js/demo/rickshaw-demo.js +0 -103
  345. package/src/assets/js/demo/sparkline-demo.js +0 -51
  346. package/src/assets/js/inspinia.js +0 -301
  347. package/src/assets/js/jquery-2.1.1.js +0 -4
  348. package/src/assets/js/jquery-3.3.1.min.js +0 -2
  349. package/src/assets/js/jquery-ui-1.10.4.min.js +0 -7
  350. package/src/assets/js/jquery-ui.custom.min.js +0 -16
  351. package/src/assets/js/plugins/blueimp/jquery.blueimp-gallery.min.js +0 -1
  352. package/src/assets/js/plugins/bootstrap-datepicker/bootstrap-datepicker.min.js +0 -9
  353. package/src/assets/js/plugins/bootstrap-markdown/bootstrap-markdown.js +0 -1386
  354. package/src/assets/js/plugins/bootstrap-markdown/markdown.js +0 -1616
  355. package/src/assets/js/plugins/bootstrap-timepicker/bootstrap-timepicker.min.js +0 -5
  356. package/src/assets/js/plugins/bootstrapTour/bootstrap-tour.min.js +0 -22
  357. package/src/assets/js/plugins/c3/c3.min.js +0 -5
  358. package/src/assets/js/plugins/chartJs/Chart.min.js +0 -14
  359. package/src/assets/js/plugins/chartist/chartist.min.js +0 -9
  360. package/src/assets/js/plugins/chartist/chartist.min.js.map +0 -1
  361. package/src/assets/js/plugins/chosen/chosen.jquery.js +0 -1211
  362. package/src/assets/js/plugins/clipboard/clipboard.min.js +0 -7
  363. package/src/assets/js/plugins/clockpicker/clockpicker.js +0 -729
  364. package/src/assets/js/plugins/codemirror/codemirror.js +0 -7830
  365. package/src/assets/js/plugins/codemirror/mode/apl/apl.js +0 -175
  366. package/src/assets/js/plugins/codemirror/mode/apl/index.html +0 -72
  367. package/src/assets/js/plugins/codemirror/mode/asterisk/asterisk.js +0 -198
  368. package/src/assets/js/plugins/codemirror/mode/asterisk/index.html +0 -154
  369. package/src/assets/js/plugins/codemirror/mode/clike/clike.js +0 -474
  370. package/src/assets/js/plugins/codemirror/mode/clike/index.html +0 -225
  371. package/src/assets/js/plugins/codemirror/mode/clike/scala.html +0 -767
  372. package/src/assets/js/plugins/codemirror/mode/clojure/clojure.js +0 -243
  373. package/src/assets/js/plugins/codemirror/mode/clojure/index.html +0 -88
  374. package/src/assets/js/plugins/codemirror/mode/cobol/cobol.js +0 -255
  375. package/src/assets/js/plugins/codemirror/mode/cobol/index.html +0 -210
  376. package/src/assets/js/plugins/codemirror/mode/coffeescript/coffeescript.js +0 -369
  377. package/src/assets/js/plugins/codemirror/mode/coffeescript/index.html +0 -740
  378. package/src/assets/js/plugins/codemirror/mode/commonlisp/commonlisp.js +0 -120
  379. package/src/assets/js/plugins/codemirror/mode/commonlisp/index.html +0 -177
  380. package/src/assets/js/plugins/codemirror/mode/css/css.js +0 -717
  381. package/src/assets/js/plugins/codemirror/mode/css/index.html +0 -70
  382. package/src/assets/js/plugins/codemirror/mode/css/less.html +0 -152
  383. package/src/assets/js/plugins/codemirror/mode/css/less_test.js +0 -51
  384. package/src/assets/js/plugins/codemirror/mode/css/scss.html +0 -157
  385. package/src/assets/js/plugins/codemirror/mode/css/scss_test.js +0 -110
  386. package/src/assets/js/plugins/codemirror/mode/css/test.js +0 -135
  387. package/src/assets/js/plugins/codemirror/mode/cypher/cypher.js +0 -146
  388. package/src/assets/js/plugins/codemirror/mode/cypher/index.html +0 -63
  389. package/src/assets/js/plugins/codemirror/mode/d/d.js +0 -218
  390. package/src/assets/js/plugins/codemirror/mode/d/index.html +0 -273
  391. package/src/assets/js/plugins/codemirror/mode/diff/diff.js +0 -47
  392. package/src/assets/js/plugins/codemirror/mode/diff/index.html +0 -117
  393. package/src/assets/js/plugins/codemirror/mode/django/django.js +0 -67
  394. package/src/assets/js/plugins/codemirror/mode/django/index.html +0 -63
  395. package/src/assets/js/plugins/codemirror/mode/dtd/dtd.js +0 -142
  396. package/src/assets/js/plugins/codemirror/mode/dtd/index.html +0 -89
  397. package/src/assets/js/plugins/codemirror/mode/dylan/dylan.js +0 -299
  398. package/src/assets/js/plugins/codemirror/mode/dylan/index.html +0 -407
  399. package/src/assets/js/plugins/codemirror/mode/ecl/ecl.js +0 -207
  400. package/src/assets/js/plugins/codemirror/mode/ecl/index.html +0 -52
  401. package/src/assets/js/plugins/codemirror/mode/eiffel/eiffel.js +0 -162
  402. package/src/assets/js/plugins/codemirror/mode/eiffel/index.html +0 -429
  403. package/src/assets/js/plugins/codemirror/mode/erlang/erlang.js +0 -622
  404. package/src/assets/js/plugins/codemirror/mode/erlang/index.html +0 -76
  405. package/src/assets/js/plugins/codemirror/mode/fortran/fortran.js +0 -188
  406. package/src/assets/js/plugins/codemirror/mode/fortran/index.html +0 -81
  407. package/src/assets/js/plugins/codemirror/mode/gas/gas.js +0 -345
  408. package/src/assets/js/plugins/codemirror/mode/gas/index.html +0 -68
  409. package/src/assets/js/plugins/codemirror/mode/gfm/gfm.js +0 -122
  410. package/src/assets/js/plugins/codemirror/mode/gfm/index.html +0 -82
  411. package/src/assets/js/plugins/codemirror/mode/gfm/test.js +0 -164
  412. package/src/assets/js/plugins/codemirror/mode/gherkin/gherkin.js +0 -178
  413. package/src/assets/js/plugins/codemirror/mode/gherkin/index.html +0 -48
  414. package/src/assets/js/plugins/codemirror/mode/go/go.js +0 -184
  415. package/src/assets/js/plugins/codemirror/mode/go/index.html +0 -85
  416. package/src/assets/js/plugins/codemirror/mode/groovy/groovy.js +0 -226
  417. package/src/assets/js/plugins/codemirror/mode/groovy/index.html +0 -84
  418. package/src/assets/js/plugins/codemirror/mode/haml/haml.js +0 -159
  419. package/src/assets/js/plugins/codemirror/mode/haml/index.html +0 -79
  420. package/src/assets/js/plugins/codemirror/mode/haml/test.js +0 -97
  421. package/src/assets/js/plugins/codemirror/mode/haskell/haskell.js +0 -267
  422. package/src/assets/js/plugins/codemirror/mode/haskell/index.html +0 -73
  423. package/src/assets/js/plugins/codemirror/mode/haxe/haxe.js +0 -518
  424. package/src/assets/js/plugins/codemirror/mode/haxe/index.html +0 -124
  425. package/src/assets/js/plugins/codemirror/mode/htmlembedded/htmlembedded.js +0 -86
  426. package/src/assets/js/plugins/codemirror/mode/htmlembedded/index.html +0 -58
  427. package/src/assets/js/plugins/codemirror/mode/htmlmixed/htmlmixed.js +0 -121
  428. package/src/assets/js/plugins/codemirror/mode/htmlmixed/index.html +0 -85
  429. package/src/assets/js/plugins/codemirror/mode/http/http.js +0 -113
  430. package/src/assets/js/plugins/codemirror/mode/http/index.html +0 -45
  431. package/src/assets/js/plugins/codemirror/mode/index.html +0 -125
  432. package/src/assets/js/plugins/codemirror/mode/jade/index.html +0 -70
  433. package/src/assets/js/plugins/codemirror/mode/jade/jade.js +0 -590
  434. package/src/assets/js/plugins/codemirror/mode/javascript/index.html +0 -114
  435. package/src/assets/js/plugins/codemirror/mode/javascript/javascript.js +0 -684
  436. package/src/assets/js/plugins/codemirror/mode/javascript/json-ld.html +0 -72
  437. package/src/assets/js/plugins/codemirror/mode/javascript/test.js +0 -194
  438. package/src/assets/js/plugins/codemirror/mode/javascript/typescript.html +0 -61
  439. package/src/assets/js/plugins/codemirror/mode/jinja2/index.html +0 -54
  440. package/src/assets/js/plugins/codemirror/mode/jinja2/jinja2.js +0 -142
  441. package/src/assets/js/plugins/codemirror/mode/julia/index.html +0 -195
  442. package/src/assets/js/plugins/codemirror/mode/julia/julia.js +0 -301
  443. package/src/assets/js/plugins/codemirror/mode/kotlin/index.html +0 -89
  444. package/src/assets/js/plugins/codemirror/mode/kotlin/kotlin.js +0 -280
  445. package/src/assets/js/plugins/codemirror/mode/livescript/index.html +0 -459
  446. package/src/assets/js/plugins/codemirror/mode/livescript/livescript.js +0 -280
  447. package/src/assets/js/plugins/codemirror/mode/lua/index.html +0 -85
  448. package/src/assets/js/plugins/codemirror/mode/lua/lua.js +0 -159
  449. package/src/assets/js/plugins/codemirror/mode/markdown/index.html +0 -359
  450. package/src/assets/js/plugins/codemirror/mode/markdown/markdown.js +0 -758
  451. package/src/assets/js/plugins/codemirror/mode/markdown/test.js +0 -754
  452. package/src/assets/js/plugins/codemirror/mode/meta.js +0 -144
  453. package/src/assets/js/plugins/codemirror/mode/mirc/index.html +0 -160
  454. package/src/assets/js/plugins/codemirror/mode/mirc/mirc.js +0 -193
  455. package/src/assets/js/plugins/codemirror/mode/mllike/index.html +0 -179
  456. package/src/assets/js/plugins/codemirror/mode/mllike/mllike.js +0 -205
  457. package/src/assets/js/plugins/codemirror/mode/modelica/index.html +0 -67
  458. package/src/assets/js/plugins/codemirror/mode/modelica/modelica.js +0 -245
  459. package/src/assets/js/plugins/codemirror/mode/nginx/index.html +0 -181
  460. package/src/assets/js/plugins/codemirror/mode/nginx/nginx.js +0 -178
  461. package/src/assets/js/plugins/codemirror/mode/ntriples/index.html +0 -45
  462. package/src/assets/js/plugins/codemirror/mode/ntriples/ntriples.js +0 -186
  463. package/src/assets/js/plugins/codemirror/mode/octave/index.html +0 -83
  464. package/src/assets/js/plugins/codemirror/mode/octave/octave.js +0 -135
  465. package/src/assets/js/plugins/codemirror/mode/pascal/index.html +0 -61
  466. package/src/assets/js/plugins/codemirror/mode/pascal/pascal.js +0 -109
  467. package/src/assets/js/plugins/codemirror/mode/pegjs/index.html +0 -66
  468. package/src/assets/js/plugins/codemirror/mode/pegjs/pegjs.js +0 -114
  469. package/src/assets/js/plugins/codemirror/mode/perl/index.html +0 -75
  470. package/src/assets/js/plugins/codemirror/mode/perl/perl.js +0 -832
  471. package/src/assets/js/plugins/codemirror/mode/php/index.html +0 -64
  472. package/src/assets/js/plugins/codemirror/mode/php/php.js +0 -226
  473. package/src/assets/js/plugins/codemirror/mode/php/test.js +0 -154
  474. package/src/assets/js/plugins/codemirror/mode/pig/index.html +0 -55
  475. package/src/assets/js/plugins/codemirror/mode/pig/pig.js +0 -188
  476. package/src/assets/js/plugins/codemirror/mode/properties/index.html +0 -53
  477. package/src/assets/js/plugins/codemirror/mode/properties/properties.js +0 -78
  478. package/src/assets/js/plugins/codemirror/mode/puppet/index.html +0 -121
  479. package/src/assets/js/plugins/codemirror/mode/puppet/puppet.js +0 -220
  480. package/src/assets/js/plugins/codemirror/mode/python/index.html +0 -198
  481. package/src/assets/js/plugins/codemirror/mode/python/python.js +0 -359
  482. package/src/assets/js/plugins/codemirror/mode/q/index.html +0 -144
  483. package/src/assets/js/plugins/codemirror/mode/q/q.js +0 -139
  484. package/src/assets/js/plugins/codemirror/mode/r/index.html +0 -85
  485. package/src/assets/js/plugins/codemirror/mode/r/r.js +0 -162
  486. package/src/assets/js/plugins/codemirror/mode/rpm/changes/index.html +0 -66
  487. package/src/assets/js/plugins/codemirror/mode/rpm/index.html +0 -149
  488. package/src/assets/js/plugins/codemirror/mode/rpm/rpm.js +0 -101
  489. package/src/assets/js/plugins/codemirror/mode/rst/index.html +0 -535
  490. package/src/assets/js/plugins/codemirror/mode/rst/rst.js +0 -557
  491. package/src/assets/js/plugins/codemirror/mode/ruby/index.html +0 -184
  492. package/src/assets/js/plugins/codemirror/mode/ruby/ruby.js +0 -285
  493. package/src/assets/js/plugins/codemirror/mode/ruby/test.js +0 -14
  494. package/src/assets/js/plugins/codemirror/mode/rust/index.html +0 -60
  495. package/src/assets/js/plugins/codemirror/mode/rust/rust.js +0 -451
  496. package/src/assets/js/plugins/codemirror/mode/sass/index.html +0 -66
  497. package/src/assets/js/plugins/codemirror/mode/sass/sass.js +0 -327
  498. package/src/assets/js/plugins/codemirror/mode/scheme/index.html +0 -77
  499. package/src/assets/js/plugins/codemirror/mode/scheme/scheme.js +0 -248
  500. package/src/assets/js/plugins/codemirror/mode/shell/index.html +0 -66
  501. package/src/assets/js/plugins/codemirror/mode/shell/shell.js +0 -138
  502. package/src/assets/js/plugins/codemirror/mode/shell/test.js +0 -58
  503. package/src/assets/js/plugins/codemirror/mode/sieve/index.html +0 -93
  504. package/src/assets/js/plugins/codemirror/mode/sieve/sieve.js +0 -193
  505. package/src/assets/js/plugins/codemirror/mode/slim/index.html +0 -96
  506. package/src/assets/js/plugins/codemirror/mode/slim/slim.js +0 -575
  507. package/src/assets/js/plugins/codemirror/mode/slim/test.js +0 -96
  508. package/src/assets/js/plugins/codemirror/mode/smalltalk/index.html +0 -68
  509. package/src/assets/js/plugins/codemirror/mode/smalltalk/smalltalk.js +0 -168
  510. package/src/assets/js/plugins/codemirror/mode/smarty/index.html +0 -136
  511. package/src/assets/js/plugins/codemirror/mode/smarty/smarty.js +0 -221
  512. package/src/assets/js/plugins/codemirror/mode/smartymixed/index.html +0 -114
  513. package/src/assets/js/plugins/codemirror/mode/smartymixed/smartymixed.js +0 -197
  514. package/src/assets/js/plugins/codemirror/mode/solr/index.html +0 -57
  515. package/src/assets/js/plugins/codemirror/mode/solr/solr.js +0 -104
  516. package/src/assets/js/plugins/codemirror/mode/sparql/index.html +0 -53
  517. package/src/assets/js/plugins/codemirror/mode/sparql/sparql.js +0 -160
  518. package/src/assets/js/plugins/codemirror/mode/sql/index.html +0 -84
  519. package/src/assets/js/plugins/codemirror/mode/sql/sql.js +0 -393
  520. package/src/assets/js/plugins/codemirror/mode/stex/index.html +0 -110
  521. package/src/assets/js/plugins/codemirror/mode/stex/stex.js +0 -262
  522. package/src/assets/js/plugins/codemirror/mode/stex/test.js +0 -123
  523. package/src/assets/js/plugins/codemirror/mode/tcl/index.html +0 -142
  524. package/src/assets/js/plugins/codemirror/mode/tcl/tcl.js +0 -147
  525. package/src/assets/js/plugins/codemirror/mode/textile/index.html +0 -191
  526. package/src/assets/js/plugins/codemirror/mode/textile/test.js +0 -406
  527. package/src/assets/js/plugins/codemirror/mode/textile/textile.js +0 -553
  528. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/index.html +0 -154
  529. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.css +0 -14
  530. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.js +0 -369
  531. package/src/assets/js/plugins/codemirror/mode/tiki/index.html +0 -95
  532. package/src/assets/js/plugins/codemirror/mode/tiki/tiki.css +0 -26
  533. package/src/assets/js/plugins/codemirror/mode/tiki/tiki.js +0 -323
  534. package/src/assets/js/plugins/codemirror/mode/toml/index.html +0 -73
  535. package/src/assets/js/plugins/codemirror/mode/toml/toml.js +0 -88
  536. package/src/assets/js/plugins/codemirror/mode/tornado/index.html +0 -63
  537. package/src/assets/js/plugins/codemirror/mode/tornado/tornado.js +0 -68
  538. package/src/assets/js/plugins/codemirror/mode/turtle/index.html +0 -50
  539. package/src/assets/js/plugins/codemirror/mode/turtle/turtle.js +0 -160
  540. package/src/assets/js/plugins/codemirror/mode/vb/index.html +0 -102
  541. package/src/assets/js/plugins/codemirror/mode/vb/vb.js +0 -274
  542. package/src/assets/js/plugins/codemirror/mode/vbscript/index.html +0 -55
  543. package/src/assets/js/plugins/codemirror/mode/vbscript/vbscript.js +0 -350
  544. package/src/assets/js/plugins/codemirror/mode/velocity/index.html +0 -118
  545. package/src/assets/js/plugins/codemirror/mode/velocity/velocity.js +0 -201
  546. package/src/assets/js/plugins/codemirror/mode/verilog/index.html +0 -120
  547. package/src/assets/js/plugins/codemirror/mode/verilog/test.js +0 -273
  548. package/src/assets/js/plugins/codemirror/mode/verilog/verilog.js +0 -364
  549. package/src/assets/js/plugins/codemirror/mode/xml/index.html +0 -57
  550. package/src/assets/js/plugins/codemirror/mode/xml/test.js +0 -51
  551. package/src/assets/js/plugins/codemirror/mode/xml/xml.js +0 -384
  552. package/src/assets/js/plugins/codemirror/mode/xquery/index.html +0 -210
  553. package/src/assets/js/plugins/codemirror/mode/xquery/test.js +0 -67
  554. package/src/assets/js/plugins/codemirror/mode/xquery/xquery.js +0 -447
  555. package/src/assets/js/plugins/codemirror/mode/yaml/index.html +0 -80
  556. package/src/assets/js/plugins/codemirror/mode/yaml/yaml.js +0 -112
  557. package/src/assets/js/plugins/codemirror/mode/z80/index.html +0 -52
  558. package/src/assets/js/plugins/codemirror/mode/z80/z80.js +0 -100
  559. package/src/assets/js/plugins/colorpicker/bootstrap-colorpicker.min.js +0 -1
  560. package/src/assets/js/plugins/cropper/cropper.min.js +0 -9
  561. package/src/assets/js/plugins/d3/d3.min.js +0 -5
  562. package/src/assets/js/plugins/dataTables/datatables.min.js +0 -336
  563. package/src/assets/js/plugins/datapicker/bootstrap-datepicker.js +0 -1671
  564. package/src/assets/js/plugins/datatables.net/jquery.dataTables.js +0 -15344
  565. package/src/assets/js/plugins/daterangepicker/daterangepicker.js +0 -1304
  566. package/src/assets/js/plugins/diff_match_patch/COPYING +0 -177
  567. package/src/assets/js/plugins/diff_match_patch/README.txt +0 -43
  568. package/src/assets/js/plugins/diff_match_patch/javascript/diff_match_patch.js +0 -49
  569. package/src/assets/js/plugins/dotdotdot/jquery.dotdotdot.min.js +0 -13
  570. package/src/assets/js/plugins/dropzone/dropzone.js +0 -1841
  571. package/src/assets/js/plugins/easypiechart/easypiechart.js +0 -350
  572. package/src/assets/js/plugins/easypiechart/jquery.easypiechart.js +0 -359
  573. package/src/assets/js/plugins/flot/curvedLines.js +0 -315
  574. package/src/assets/js/plugins/flot/excanvas.min.js +0 -1
  575. package/src/assets/js/plugins/flot/jquery.flot.js +0 -3168
  576. package/src/assets/js/plugins/flot/jquery.flot.pie.js +0 -820
  577. package/src/assets/js/plugins/flot/jquery.flot.resize.js +0 -59
  578. package/src/assets/js/plugins/flot/jquery.flot.spline.js +0 -212
  579. package/src/assets/js/plugins/flot/jquery.flot.symbol.js +0 -71
  580. package/src/assets/js/plugins/flot/jquery.flot.time.js +0 -432
  581. package/src/assets/js/plugins/flot/jquery.flot.tooltip.min.js +0 -12
  582. package/src/assets/js/plugins/footable/footable.all.min.js +0 -14
  583. package/src/assets/js/plugins/fullcalendar/fullcalendar.min.js +0 -8
  584. package/src/assets/js/plugins/fullcalendar/moment.min.js +0 -7
  585. package/src/assets/js/plugins/gritter/images/gritter-light.png +0 -0
  586. package/src/assets/js/plugins/gritter/images/gritter-long.png +0 -0
  587. package/src/assets/js/plugins/gritter/images/gritter.png +0 -0
  588. package/src/assets/js/plugins/gritter/images/ie-spacer.gif +0 -0
  589. package/src/assets/js/plugins/gritter/jquery.gritter.css +0 -137
  590. package/src/assets/js/plugins/gritter/jquery.gritter.min.js +0 -1
  591. package/src/assets/js/plugins/i18next/i18next.min.js +0 -7
  592. package/src/assets/js/plugins/iCheck/icheck.min.js +0 -11
  593. package/src/assets/js/plugins/idle-timer/idle-timer.min.js +0 -2
  594. package/src/assets/js/plugins/ionRangeSlider/ion.rangeSlider.min.js +0 -26
  595. package/src/assets/js/plugins/jasny/jasny-bootstrap.min.js +0 -6
  596. package/src/assets/js/plugins/jeditable/jquery.jeditable.js +0 -543
  597. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ar.js +0 -128
  598. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg.js +0 -134
  599. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg1251.js +0 -132
  600. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cat.js +0 -130
  601. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cn.js +0 -169
  602. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cs.js +0 -130
  603. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-da.js +0 -130
  604. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-de.js +0 -173
  605. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-dk.js +0 -129
  606. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-el.js +0 -128
  607. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-en.js +0 -170
  608. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-es.js +0 -130
  609. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fa.js +0 -147
  610. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fi.js +0 -131
  611. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fr.js +0 -128
  612. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-gl.js +0 -128
  613. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-he.js +0 -129
  614. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr.js +0 -164
  615. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr1250.js +0 -164
  616. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hu.js +0 -131
  617. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-id.js +0 -170
  618. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-is.js +0 -128
  619. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-it.js +0 -1
  620. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ja.js +0 -158
  621. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-kr.js +0 -130
  622. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-lt.js +0 -130
  623. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-mne.js +0 -130
  624. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-nl.js +0 -150
  625. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-no.js +0 -1
  626. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pl.js +0 -134
  627. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt-br.js +0 -137
  628. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt.js +0 -127
  629. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ro.js +0 -141
  630. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ru.js +0 -129
  631. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sk.js +0 -129
  632. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr-latin.js +0 -130
  633. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr.js +0 -130
  634. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sv.js +0 -129
  635. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-th.js +0 -130
  636. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tr.js +0 -128
  637. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tw.js +0 -131
  638. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ua.js +0 -129
  639. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-vi.js +0 -170
  640. package/src/assets/js/plugins/jqGrid/jquery.jqGrid.min.js +0 -545
  641. package/src/assets/js/plugins/jquery-ui/i18n/jquery-ui-i18n.min.js +0 -6
  642. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-af.min.js +0 -4
  643. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.min.js +0 -4
  644. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar.min.js +0 -4
  645. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-az.min.js +0 -4
  646. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-be.min.js +0 -4
  647. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bg.min.js +0 -4
  648. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bs.min.js +0 -4
  649. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ca.min.js +0 -4
  650. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cs.min.js +0 -4
  651. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cy-GB.min.js +0 -4
  652. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-da.min.js +0 -4
  653. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-de.min.js +0 -4
  654. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-el.min.js +0 -4
  655. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-AU.min.js +0 -4
  656. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-GB.min.js +0 -4
  657. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-NZ.min.js +0 -4
  658. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eo.min.js +0 -4
  659. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-es.min.js +0 -4
  660. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-et.min.js +0 -4
  661. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eu.min.js +0 -4
  662. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fa.min.js +0 -4
  663. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fi.min.js +0 -4
  664. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fo.min.js +0 -4
  665. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CA.min.js +0 -4
  666. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CH.min.js +0 -4
  667. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr.min.js +0 -4
  668. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-gl.min.js +0 -4
  669. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-he.min.js +0 -4
  670. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hi.min.js +0 -4
  671. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hr.min.js +0 -4
  672. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js +0 -4
  673. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hy.min.js +0 -4
  674. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-id.min.js +0 -4
  675. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-is.min.js +0 -4
  676. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-it.min.js +0 -4
  677. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ja.min.js +0 -4
  678. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ka.min.js +0 -4
  679. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-kk.min.js +0 -4
  680. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-km.min.js +0 -4
  681. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ko.min.js +0 -4
  682. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ky.min.js +0 -4
  683. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lb.min.js +0 -4
  684. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lt.min.js +0 -4
  685. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lv.min.js +0 -4
  686. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-mk.min.js +0 -4
  687. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ml.min.js +0 -4
  688. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ms.min.js +0 -4
  689. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nb.min.js +0 -4
  690. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl-BE.min.js +0 -4
  691. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl.min.js +0 -4
  692. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nn.min.js +0 -4
  693. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-no.min.js +0 -4
  694. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pl.min.js +0 -4
  695. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt-BR.min.js +0 -4
  696. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt.min.js +0 -4
  697. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-rm.min.js +0 -4
  698. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ro.min.js +0 -4
  699. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ru.min.js +0 -4
  700. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sk.min.js +0 -4
  701. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sl.min.js +0 -4
  702. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sq.min.js +0 -4
  703. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr-SR.min.js +0 -4
  704. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr.min.js +0 -4
  705. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sv.min.js +0 -4
  706. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ta.min.js +0 -4
  707. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-th.min.js +0 -4
  708. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tj.min.js +0 -4
  709. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tr.min.js +0 -4
  710. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-uk.min.js +0 -4
  711. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-vi.min.js +0 -4
  712. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-CN.min.js +0 -4
  713. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-HK.min.js +0 -4
  714. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-TW.min.js +0 -4
  715. package/src/assets/js/plugins/jquery-ui/images/animated-overlay.gif +0 -0
  716. package/src/assets/js/plugins/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  717. package/src/assets/js/plugins/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  718. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  719. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  720. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  721. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  722. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  723. package/src/assets/js/plugins/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  724. package/src/assets/js/plugins/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
  725. package/src/assets/js/plugins/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
  726. package/src/assets/js/plugins/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
  727. package/src/assets/js/plugins/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
  728. package/src/assets/js/plugins/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
  729. package/src/assets/js/plugins/jquery-ui/jquery-ui.css +0 -1189
  730. package/src/assets/js/plugins/jquery-ui/jquery-ui.js +0 -15040
  731. package/src/assets/js/plugins/jquery-ui/jquery-ui.min.css +0 -4
  732. package/src/assets/js/plugins/jquery-ui/jquery-ui.min.js +0 -12
  733. package/src/assets/js/plugins/jsKnob/jquery.knob.js +0 -791
  734. package/src/assets/js/plugins/jsTree/jstree.min.js +0 -5
  735. package/src/assets/js/plugins/justified-gallery/README.md +0 -14
  736. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.css +0 -73
  737. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.js +0 -258
  738. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.css +0 -17
  739. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.js +0 -24
  740. package/src/assets/js/plugins/justified-gallery/loading.gif +0 -0
  741. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-2.0.2.css +0 -130
  742. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js +0 -3328
  743. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +0 -1
  744. package/src/assets/js/plugins/ladda/ladda.jquery.min.js +0 -8
  745. package/src/assets/js/plugins/ladda/ladda.min.js +0 -8
  746. package/src/assets/js/plugins/ladda/spin.min.js +0 -1
  747. package/src/assets/js/plugins/masonary/masonry.pkgd.min.js +0 -9
  748. package/src/assets/js/plugins/metisMenu/jquery.metisMenu.js +0 -10
  749. package/src/assets/js/plugins/morris/morris.js +0 -1892
  750. package/src/assets/js/plugins/morris/raphael-2.1.0.min.js +0 -10
  751. package/src/assets/js/plugins/nestable/jquery.nestable.js +0 -484
  752. package/src/assets/js/plugins/nouslider/jquery.nouislider.min.js +0 -34
  753. package/src/assets/js/plugins/pace/pace.min.js +0 -2
  754. package/src/assets/js/plugins/peity/jquery.peity.min.js +0 -13
  755. package/src/assets/js/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js +0 -76
  756. package/src/assets/js/plugins/rickshaw/rickshaw.min.js +0 -3
  757. package/src/assets/js/plugins/rickshaw/vendor/d3.v3.js +0 -5
  758. package/src/assets/js/plugins/select2/select2.full.min.js +0 -3
  759. package/src/assets/js/plugins/slick/slick.min.js +0 -18
  760. package/src/assets/js/plugins/slimscroll/jquery.slimscroll.js +0 -474
  761. package/src/assets/js/plugins/slimscroll/jquery.slimscroll.min.js +0 -16
  762. package/src/assets/js/plugins/sparkline/jquery.sparkline.min.js +0 -5
  763. package/src/assets/js/plugins/staps/jquery.steps.min.js +0 -6
  764. package/src/assets/js/plugins/summernote/summernote.min.js +0 -2
  765. package/src/assets/js/plugins/sweetalert/sweetalert.min.js +0 -1
  766. package/src/assets/js/plugins/switchery/switchery.js +0 -1
  767. package/src/assets/js/plugins/tinycon/tinycon.min.js +0 -8
  768. package/src/assets/js/plugins/toastr/toastr.min.js +0 -2
  769. package/src/assets/js/plugins/touchspin/jquery.bootstrap-touchspin.min.js +0 -9
  770. package/src/assets/js/plugins/validate/jquery.validate.min.js +0 -4
  771. package/src/assets/js/plugins/video/responsible-video.js +0 -21
  772. package/src/assets/js/plugins/wow/wow.min.js +0 -2
  773. package/src/environment.ts +0 -24
  774. package/src/index.html +0 -23
  775. package/src/main.ts +0 -10
  776. package/src/polyfills.ts +0 -3
  777. package/src/tsconfig.json +0 -21
  778. package/src/vendor.ts +0 -32
  779. package/tslint.json +0 -93
  780. package/types.d.ts +0 -0
  781. package/web.config +0 -34
  782. package/webpack.config.js +0 -1
@@ -1,1819 +0,0 @@
1
- import { Component, OnInit, ViewContainerRef, ViewChild, ElementRef } from '@angular/core';
2
- import { Common } from '../../../shared/common/common';
3
- import { SharedService } from '../../../shared/service/shared.service';
4
- import { Constants } from '../../../shared/constants/constants';
5
- import { Router, ActivatedRoute } from '@angular/router';
6
- import { UserGroupPermissionModel, Company, SystemManagement, HeadPermissions } from '../models/user-group-permission.model';
7
- import { Alerts } from '../../../shared/alerts/alerts';
8
- import { AuditLogInsertModel } from '../../../models/audit-log-insert.model';
9
- import { MenuSetupModel } from "../../../fee-management/menu-setup/models/menu-setup.model";
10
- import { NgForm } from '@angular/forms';
11
- import { of } from 'rxjs/observable/of';
12
- import { NumericTextBoxCustomMessagesComponent } from '@progress/kendo-angular-inputs';
13
-
14
- @Component({
15
- selector: 'user-group-permission',
16
- templateUrl: '../user-group-permission.component.html'
17
- })
18
-
19
- export class UserGroupPermissionComponent implements OnInit {
20
- @ViewChild('f') public permissionForm: NgForm;
21
- private groupPermission: UserGroupPermissionModel;
22
- private pageName: string;
23
- private userGroupId: number;
24
- private companyList: any[];
25
- private companyListData: any[];
26
- private auditLogInsertModel: AuditLogInsertModel;
27
- private actualObject: UserGroupPermissionModel;
28
- private readonly ddlCompanyDisable: boolean = true;
29
- private companyMenuSetup: MenuSetupModel;
30
- private ddlSelectedMenuSetup: MenuSetupModel;
31
- private ddlSelected2c2pCompany: boolean = false;
32
- private isCurrentUserGroup: boolean = false;
33
- elementRef: ElementRef;
34
- private isReadonly: boolean = false;
35
- private walletTopupWithdrawChecked: boolean = false;
36
- private cardTopupWithdrawChecked: boolean = false;
37
- private walletDebitCreditChecked: boolean = false;
38
- private cardDebitCreditChecked: boolean = false;
39
- private manualPostWalletTopupWithdrawChecked: boolean = false;
40
- private manualPostWalletDebitCreditChecked: boolean = false;
41
- private topupWithdraw: string = "Top-up/Withdraw";
42
-
43
- private firstTreeDataSet: any[];
44
- private secondTreeDataSet: any[];
45
- public checkedKeys: any[] = [];
46
- public children: any = (dataItem: any) => of(dataItem.items);
47
- public hasChildren = (dataItem: any): boolean => !!dataItem.items;
48
- private currentUserGroupPermissions: UserGroupPermissionModel;
49
- public disabledKeys: any[] = [];
50
- public apiPermissionModel: UserGroupPermissionModel;
51
- private isSelectAll: boolean = false;
52
- private defaultActionItem: any;
53
- private defaultCompanyItem: any;
54
-
55
- constructor(public sharedService: SharedService, public router: Router,
56
- public activatedRoute: ActivatedRoute, public common: Common, private alert: Alerts,
57
- private vcr: ViewContainerRef, elRef: ElementRef) {
58
- this.elementRef = elRef;
59
- this.alert.setRootViewContainerRef(vcr);
60
- this.groupPermission = new UserGroupPermissionModel();
61
- this.companyList = [];
62
- this.auditLogInsertModel = new AuditLogInsertModel();
63
- this.actualObject = new UserGroupPermissionModel();
64
- this.companyMenuSetup = this.common.getMenuSetup();
65
- this.ddlSelectedMenuSetup = new MenuSetupModel();
66
- this.ddlCompanyDisable = this.common.getCompanyId() != Constants.COMPANY_ID_2C2P;
67
- this.sharedService.disableButton = false;
68
- this.currentUserGroupPermissions = new UserGroupPermissionModel();
69
- this.apiPermissionModel = new UserGroupPermissionModel();
70
- this.defaultCompanyItem = { companyName: Constants.SELECT_COMPANY, companyUniqueId: null };
71
- this.defaultActionItem = { actionName: "Select Action", actionValue: null };
72
- }
73
-
74
- ngOnInit() {
75
- this.currentUserGroupPermissions = this.common.getCurrentUserGroup();
76
- switch (this.activatedRoute.snapshot.url[0].path) {
77
- case 'user-group-permission-view':
78
- this.pageName = Constants.VIEW;
79
- this.userGroupId = this.common.ConvertToNumber(this.activatedRoute.snapshot.params[Constants.ID]);
80
- break;
81
- case 'user-group-permission-edit':
82
- this.pageName = Constants.EDIT;
83
- this.userGroupId = this.common.ConvertToNumber(this.activatedRoute.snapshot.params[Constants.ID]);
84
- break;
85
- case 'user-group-permission-new':
86
- this.pageName = Constants.NEW;
87
- if (this.common.getCompanyId() == Constants.COMPANY_ID_2C2P) {
88
- }
89
- break;
90
- }
91
-
92
- this.initializeData();
93
- }
94
-
95
- private initializeData() {
96
- switch (this.pageName) {
97
- case Constants.VIEW:
98
- this.common.setPageTitle(Constants.USER_MANAGEMENT, Constants.USER_GROUP_PERMISSION_URL,
99
- Constants.USER_GROUP_PERMISSION, Constants.USER_GROUP_PERMISSION_URL, Constants.VIEW_TITLE, Constants.VIEW
100
- , Constants.USER_GROUP_PERMISSION_URL);
101
-
102
- this.bindUserGroupPermissionData();
103
- this.getCompanyMenuList();
104
- break;
105
-
106
- case Constants.EDIT:
107
- this.common.setPageTitle(Constants.USER_MANAGEMENT, Constants.USER_GROUP_PERMISSION_URL,
108
- Constants.USER_GROUP_PERMISSION, Constants.USER_GROUP_PERMISSION_URL, Constants.EDIT_TITLE, Constants.EDIT,
109
- Constants.USER_GROUP_PERMISSION_URL);
110
-
111
- this.bindUserGroupPermissionData();
112
- this.getCompanyMenuList();
113
- break;
114
-
115
- case Constants.NEW:
116
- this.common.setPageTitle(Constants.USER_MANAGEMENT, Constants.USER_GROUP_PERMISSION_URL,
117
- Constants.USER_GROUP_PERMISSION, Constants.USER_GROUP_PERMISSION_URL, Constants.NEW_TITLE, Constants.NEW
118
- , Constants.USER_GROUP_PERMISSION_URL);
119
-
120
- this.bindCompanyList();
121
- this.groupPermission.UserUniqueId = this.common.getCurrentUserUniqueID();
122
-
123
- this.initializeTreeView();
124
- this.createTreeData(this.firstTreeDataSet);
125
- this.createTreeData(this.secondTreeDataSet);
126
- break;
127
- }
128
- }
129
-
130
- private initializeTreeView() {
131
- this.firstTreeDataSet = [
132
- {
133
- text: 'Company Setting',
134
- permissionText: 'CompanySetting',
135
- hide: this.ddlSelectedMenuSetup.CompanySetting != Constants.YES,
136
- isEnabled: (this.currentUserGroupPermissions.Company.Setting == Constants.YES || this.currentUserGroupPermissions.Company.SettingEdit == Constants.YES) && this.pageName != Constants.VIEW,
137
- isChecked: this.groupPermission.Company.Setting == Constants.YES && this.groupPermission.Company.SettingEdit == Constants.YES,
138
- type: Constants.PARENT,
139
- items: [
140
- {
141
- text: 'View',
142
- isEnabled: this.currentUserGroupPermissions.Company.Setting == Constants.YES,
143
- isChecked: this.groupPermission.Company.Setting == Constants.YES,
144
- permissionText: "Company_Setting",
145
- type: Constants.CHILD
146
- },
147
- {
148
- text: 'Edit',
149
- isEnabled: this.currentUserGroupPermissions.Company.SettingEdit == Constants.YES,
150
- isChecked: this.groupPermission.Company.SettingEdit == Constants.YES,
151
- hide: this.isReadonly,
152
- permissionText: "Company_SettingEdit",
153
- type: Constants.CHILD
154
- }
155
- ]
156
- },
157
- {
158
- text: 'Customer Management',
159
- permissionText: 'CustomerManagement',
160
- hide: this.ddlSelectedMenuSetup.CustomerManagement.Registration != Constants.YES,
161
- isEnabled: this.pageName != Constants.VIEW && this.toggleHeadNodeEnabled('CustomerManagement'),
162
- isChecked: this.groupPermission.CompanyUniqueId != undefined && this.toggleHeadNodeCheck('CustomerManagement'),
163
- type: Constants.HEAD,
164
- items: [
165
- {
166
- text: 'Customer Registration',
167
- permissionText: 'CustomerRegistration',
168
- hide: this.ddlSelectedMenuSetup.CustomerManagement.Registration != Constants.YES,
169
- isEnabled: this.currentUserGroupPermissions.CustomerManagement.ViewCustomer == Constants.YES
170
- || this.currentUserGroupPermissions.CustomerManagement.EditCustomer == Constants.YES
171
- || this.currentUserGroupPermissions.CustomerManagement.ViewHistory == Constants.YES
172
- || this.currentUserGroupPermissions.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES
173
- || this.currentUserGroupPermissions.CustomerManagement.AddWallet == Constants.YES,
174
-
175
- isChecked: this.currentUserGroupPermissions.CustomerManagement.ViewCustomer == Constants.YES &&
176
- this.groupPermission.CustomerManagement.EditCustomer == Constants.YES &&
177
- this.groupPermission.CustomerManagement.ViewHistory == Constants.YES &&
178
- this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES &&
179
- this.groupPermission.CustomerManagement.AddWallet == Constants.YES,
180
- type: Constants.PARENT,
181
- items: [
182
- {
183
- text: 'View',
184
- isEnabled: this.currentUserGroupPermissions.CustomerManagement.ViewCustomer == Constants.YES,
185
- isChecked: this.groupPermission.CustomerManagement.ViewCustomer == Constants.YES,
186
- permissionText: 'CustomerManagement_ViewCustomer',
187
- type: Constants.CHILD
188
- },
189
- {
190
- text: 'Edit',
191
- isEnabled: this.currentUserGroupPermissions.CustomerManagement.EditCustomer == Constants.YES,
192
- isChecked: this.groupPermission.CustomerManagement.EditCustomer == Constants.YES,
193
- hide: this.isReadonly,
194
- type: Constants.CHILD,
195
- permissionText: 'CustomerManagement_EditCustomer'
196
- },
197
- {
198
- text: 'View Wallet Balance History',
199
- isEnabled: this.currentUserGroupPermissions.CustomerManagement.ViewHistory == Constants.YES,
200
- isChecked: this.groupPermission.CustomerManagement.ViewHistory == Constants.YES,
201
- type: Constants.CHILD,
202
- permissionText: 'CustomerManagement_ViewHistory'
203
- },
204
- {
205
- text: 'Manual Post Wallet',
206
- permissionText: 'CustomerManagementWalletTopUp',
207
- isEnabled: this.currentUserGroupPermissions.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES,
208
- isChecked: this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES,
209
- type: Constants.PARENT,
210
- hide: this.isReadonly,
211
- items: [
212
- {
213
- text: this.topupWithdraw,
214
- isEnabled: this.currentUserGroupPermissions.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES,
215
- isChecked: this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES,
216
- type: Constants.CHILD,
217
- permissionText: 'CustomerManagement_TopupWithdraw'
218
- }
219
- ]
220
- },
221
- {
222
- text: 'Add Wallet',
223
- isEnabled: this.currentUserGroupPermissions.CustomerManagement.AddWallet == Constants.YES,
224
- isChecked: this.groupPermission.CustomerManagement.AddWallet == Constants.YES,
225
- type: Constants.CHILD,
226
- hide: this.isReadonly,
227
- permissionText: 'CustomerManagement_AddWallet'
228
- }
229
- ]
230
- }
231
- ]
232
- },
233
- {
234
- text: 'Others',
235
- permissionText: 'Others',
236
- hide: false,
237
- isEnabled: (this.currentUserGroupPermissions.Others.FullPAN == Constants.YES || this.currentUserGroupPermissions.Others.IDNumber == Constants.YES) && this.pageName != Constants.VIEW,
238
- isChecked: this.groupPermission.Others.FullPAN == Constants.YES && this.groupPermission.Others.IDNumber == Constants.YES,
239
- type: Constants.PARENT,
240
- items: [
241
- {
242
- text: 'View ID Number',
243
- isEnabled: this.currentUserGroupPermissions.Others.IDNumber == Constants.YES,
244
- isChecked: this.groupPermission.Others.IDNumber == Constants.YES,
245
- type: Constants.CHILD,
246
- permissionText: "Others_IDNumber",
247
- },
248
- {
249
- text: 'View Full PAN / Wallet Id',
250
- isEnabled: this.currentUserGroupPermissions.Others.FullPAN == Constants.YES,
251
- isChecked: this.groupPermission.Others.FullPAN == Constants.YES,
252
- type: Constants.CHILD,
253
- permissionText: "Others_FullPAN",
254
- }
255
- ]
256
- }
257
- ];
258
-
259
- this.secondTreeDataSet = [
260
- {
261
- text: 'Transaction History',
262
- permissionText: 'TransactionHistory',
263
- hide: this.ddlSelectedMenuSetup.TransactionHistory.WalletTransaction != Constants.YES,
264
- isEnabled: this.pageName != Constants.VIEW && this.toggleHeadNodeEnabled('TransactionHistory'),
265
- isChecked: this.groupPermission.CompanyUniqueId != undefined && this.toggleHeadNodeCheck('TransactionHistory'),
266
- type: Constants.HEAD,
267
- items: [
268
- {
269
- text: 'Wallet Transaction',
270
- permissionText: 'NewWalletTransaction',
271
- hide: this.ddlSelectedMenuSetup.TransactionHistory.WalletTransaction != Constants.YES,
272
- isEnabled: this.currentUserGroupPermissions.NewWalletTransaction.View == Constants.YES,
273
- isChecked: this.groupPermission.NewWalletTransaction.View == Constants.YES,
274
- type: Constants.PARENT,
275
- items: [{
276
- text: 'View',
277
- isEnabled: this.currentUserGroupPermissions.NewWalletTransaction.View == Constants.YES,
278
- isChecked: this.groupPermission.NewWalletTransaction.View == Constants.YES,
279
- type: Constants.CHILD,
280
- permissionText: 'NewWalletTransaction_View'
281
- }]
282
- },
283
- ]
284
- },
285
- {
286
- text: 'User Management',
287
- permissionText: 'UserManagement',
288
- hide: this.ddlSelectedMenuSetup.UserManagement.SystemUser != Constants.YES && this.ddlSelectedMenuSetup.UserManagement.UserGroup != Constants.YES
289
- && this.ddlSelectedMenuSetup.UserManagement.AuditLog != Constants.YES,
290
- isEnabled: this.pageName != Constants.VIEW && this.toggleHeadNodeEnabled('UserManagement'),
291
- isChecked: this.groupPermission.CompanyUniqueId != undefined && this.toggleHeadNodeCheck('UserManagement'),
292
- type: Constants.HEAD,
293
- items: [
294
- {
295
- text: 'User Group Permission',
296
- permissionText: 'UserGroupPermission',
297
- hide: this.ddlSelectedMenuSetup.UserManagement.UserGroup != Constants.YES,
298
- isEnabled: this.currentUserGroupPermissions.UserGroup.View == Constants.YES || this.currentUserGroupPermissions.UserGroup.Add == Constants.YES
299
- || this.currentUserGroupPermissions.UserGroup.Edit == Constants.YES || this.currentUserGroupPermissions.UserGroup.Delete == Constants.YES,
300
-
301
- isChecked: this.groupPermission.UserGroup.View == Constants.YES && this.groupPermission.UserGroup.Add == Constants.YES
302
- && this.groupPermission.UserGroup.Edit == Constants.YES && this.groupPermission.UserGroup.Delete == Constants.YES,
303
- type: Constants.PARENT,
304
- items: [
305
- {
306
- text: 'View',
307
- isEnabled: this.currentUserGroupPermissions.UserGroup.View == Constants.YES,
308
- isChecked: this.groupPermission.UserGroup.View == Constants.YES,
309
- type: Constants.CHILD,
310
- permissionText: 'UserGroup_View'
311
- },
312
- {
313
- text: 'Edit',
314
- isEnabled: this.currentUserGroupPermissions.UserGroup.Edit == Constants.YES,
315
- isChecked: this.groupPermission.UserGroup.Edit == Constants.YES,
316
- type: Constants.CHILD,
317
- hide: this.isReadonly,
318
- permissionText: 'UserGroup_Edit'
319
- },
320
- {
321
- text: 'Add',
322
- isEnabled: this.currentUserGroupPermissions.UserGroup.Add == Constants.YES,
323
- isChecked: this.groupPermission.UserGroup.Add == Constants.YES,
324
- type: Constants.CHILD,
325
- hide: this.isReadonly,
326
- permissionText: 'UserGroup_Add'
327
- },
328
- {
329
- text: 'Delete',
330
- isEnabled: this.currentUserGroupPermissions.UserGroup.Delete == Constants.YES,
331
- isChecked: this.groupPermission.UserGroup.Delete == Constants.YES,
332
- type: Constants.CHILD,
333
- hide: this.isReadonly,
334
- permissionText: 'UserGroup_Delete'
335
- }
336
- ]
337
- },
338
- {
339
- text: 'System User',
340
- permissionText: 'SystemUser',
341
- hide: this.ddlSelectedMenuSetup.UserManagement.SystemUser != Constants.YES,
342
- isEnabled: this.currentUserGroupPermissions.SystemUser.View == Constants.YES || this.currentUserGroupPermissions.SystemUser.Add == Constants.YES
343
- || this.currentUserGroupPermissions.SystemUser.Edit == Constants.YES || this.currentUserGroupPermissions.SystemUser.Delete == Constants.YES
344
- || this.currentUserGroupPermissions.SystemUser.ResetPassword == Constants.YES,
345
-
346
- isChecked: this.groupPermission.SystemUser.View == Constants.YES && this.groupPermission.SystemUser.Add == Constants.YES
347
- && this.groupPermission.SystemUser.Edit == Constants.YES && this.groupPermission.SystemUser.Delete == Constants.YES
348
- && this.groupPermission.SystemUser.ResetPassword == Constants.YES,
349
- type: Constants.PARENT,
350
- items: [
351
- {
352
- text: 'View',
353
- isEnabled: this.currentUserGroupPermissions.SystemUser.View == Constants.YES,
354
- isChecked: this.groupPermission.SystemUser.View == Constants.YES,
355
- type: Constants.CHILD,
356
- permissionText: 'SystemUser_View'
357
- },
358
- {
359
- text: 'Edit',
360
- isEnabled: this.currentUserGroupPermissions.SystemUser.Edit == Constants.YES,
361
- isChecked: this.groupPermission.SystemUser.Edit == Constants.YES,
362
- type: Constants.CHILD,
363
- hide: this.isReadonly,
364
- permissionText: 'SystemUser_Edit'
365
- },
366
- {
367
- text: 'Add',
368
- isEnabled: this.currentUserGroupPermissions.SystemUser.Add == Constants.YES,
369
- isChecked: this.groupPermission.SystemUser.Add == Constants.YES,
370
- type: Constants.CHILD,
371
- hide: this.isReadonly,
372
- permissionText: 'SystemUser_Add'
373
- },
374
- {
375
- text: 'Delete',
376
- isEnabled: this.currentUserGroupPermissions.SystemUser.Delete == Constants.YES,
377
- isChecked: this.groupPermission.SystemUser.Delete == Constants.YES,
378
- type: Constants.CHILD,
379
- hide: this.isReadonly,
380
- permissionText: 'SystemUser_Delete'
381
- },
382
- {
383
- text: 'Reset Password',
384
- isEnabled: this.currentUserGroupPermissions.SystemUser.ResetPassword == Constants.YES,
385
- isChecked: this.groupPermission.SystemUser.ResetPassword == Constants.YES,
386
- type: Constants.CHILD,
387
-
388
- hide: this.isReadonly,
389
- permissionText: 'SystemUser_ResetPassword'
390
- }
391
- ]
392
- },
393
- {
394
- text: 'Audit Log',
395
- permissionText: 'AuditLog',
396
- hide: this.ddlSelectedMenuSetup.UserManagement.AuditLog != Constants.YES,
397
- isEnabled: this.currentUserGroupPermissions.AuditLog.View == Constants.YES,
398
-
399
- isChecked: this.groupPermission.AuditLog.View == Constants.YES,
400
- type: Constants.PARENT,
401
- items: [
402
- {
403
- text: 'View',
404
- isEnabled: this.currentUserGroupPermissions.AuditLog.View == Constants.YES,
405
- isChecked: this.groupPermission.AuditLog.View == Constants.YES,
406
- type: Constants.CHILD,
407
- permissionText: 'AuditLog_View'
408
- }
409
- ]
410
- }
411
- ]
412
- }
413
- ];
414
- }
415
-
416
- private toggleHeadNodeEnabled(headNodeName: string) {
417
- switch (headNodeName) {
418
- case Constants.CUSTOMER_MANAGEMENT_TEXT:
419
- return (this.currentUserGroupPermissions.CustomerManagement.ViewCustomer == Constants.YES ||
420
- this.currentUserGroupPermissions.CustomerManagement.EditCustomer == Constants.YES ||
421
- this.currentUserGroupPermissions.CustomerManagement.ViewHistory == Constants.YES ||
422
- this.currentUserGroupPermissions.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES ||
423
- this.currentUserGroupPermissions.CustomerManagement.AddWallet == Constants.YES)
424
-
425
- case Constants.TRANSACTION_HISTORY_TEXT:
426
- return this.currentUserGroupPermissions.WalletTransaction.View == Constants.YES ||
427
- this.currentUserGroupPermissions.NewWalletTransaction.View == Constants.YES;
428
-
429
- case Constants.USER_MANAGEMENT_TEXT:
430
- return (this.currentUserGroupPermissions.UserGroup.View == Constants.YES || this.currentUserGroupPermissions.UserGroup.Add == Constants.YES ||
431
- this.currentUserGroupPermissions.UserGroup.Edit == Constants.YES || this.currentUserGroupPermissions.UserGroup.Delete == Constants.YES) ||
432
- (this.currentUserGroupPermissions.SystemUser.View == Constants.YES || this.currentUserGroupPermissions.SystemUser.Add == Constants.YES ||
433
- this.currentUserGroupPermissions.SystemUser.Edit == Constants.YES || this.currentUserGroupPermissions.SystemUser.Delete == Constants.YES) ||
434
- this.currentUserGroupPermissions.AuditLog.View == Constants.YES;
435
- }
436
- }
437
-
438
- // Function to check/ uncheck head nodes based on it's all parents on initialization.
439
- private toggleHeadNodeCheck(rootName: string) {
440
- if (rootName) {
441
- switch (rootName) {
442
- case 'SystemManagement':
443
- if (this.ddlSelected2c2pCompany || this.groupPermission.CompanyUniqueId == undefined) {
444
- return (
445
- (this.ddlSelectedMenuSetup.SystemManagement.Company == Constants.NO || (this.groupPermission.Company.Add == Constants.YES &&
446
- this.groupPermission.Company.Edit == Constants.YES &&
447
- this.groupPermission.Company.View == Constants.YES)) &&
448
- (this.ddlSelectedMenuSetup.SystemManagement.MasterBin == Constants.NO || (this.groupPermission.MasterBin.Edit == Constants.YES &&
449
- this.groupPermission.MasterBin.Add == Constants.YES &&
450
- this.groupPermission.MasterBin.View == Constants.YES)) &&
451
- (this.ddlSelectedMenuSetup.SystemManagement.ProductSetting == Constants.NO || (this.groupPermission.ProductSetting.Add == Constants.YES &&
452
- this.groupPermission.ProductSetting.View == Constants.YES &&
453
- this.groupPermission.ProductSetting.Edit == Constants.YES)) &&
454
- (this.ddlSelectedMenuSetup.SystemManagement.CardOrdering == Constants.NO || (this.groupPermission.CardOrdering.Add == Constants.YES &&
455
- this.groupPermission.CardOrdering.View == Constants.YES &&
456
- this.groupPermission.CardOrdering.Edit == Constants.YES)) &&
457
- (this.ddlSelectedMenuSetup.SystemManagement.AuthorisationListing == Constants.NO || (this.groupPermission.AuthorisationListing.View == Constants.YES &&
458
- this.groupPermission.AuthorisationListing.ViewRawData == Constants.YES)) &&
459
- (this.ddlSelectedMenuSetup.SystemManagement.ClearingTransaction == Constants.NO ||
460
- (this.groupPermission.ClearingTransaction.View == Constants.YES &&
461
- this.groupPermission.ClearingTransaction.AddFraud == Constants.YES &&
462
- this.groupPermission.ClearingTransaction.Chargeback == Constants.YES))
463
- );
464
- }
465
- else {
466
- return (
467
- (this.ddlSelectedMenuSetup.SystemManagement.ProductSetting == Constants.NO || (this.groupPermission.ProductSetting.Add == Constants.YES &&
468
- this.groupPermission.ProductSetting.View == Constants.YES &&
469
- this.groupPermission.ProductSetting.Edit == Constants.YES)) &&
470
- (this.ddlSelectedMenuSetup.SystemManagement.CardOrdering == Constants.NO || (this.groupPermission.CardOrdering.Add == Constants.YES &&
471
- this.groupPermission.CardOrdering.View == Constants.YES &&
472
- this.groupPermission.CardOrdering.Edit == Constants.YES)) &&
473
- (this.ddlSelectedMenuSetup.SystemManagement.AuthorisationListing == Constants.NO || (this.groupPermission.AuthorisationListing.View == Constants.YES &&
474
- this.groupPermission.AuthorisationListing.ViewRawData == Constants.YES)));
475
- }
476
-
477
- case 'CustomerManagement':
478
- return (this.ddlSelectedMenuSetup.CustomerManagement.Registration == Constants.NO ||
479
- (this.groupPermission.CustomerManagement.ViewCustomer == Constants.YES &&
480
- this.groupPermission.CustomerManagement.EditCustomer == Constants.YES &&
481
- this.groupPermission.CustomerManagement.ViewHistory == Constants.YES &&
482
- this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw == Constants.YES &&
483
- this.groupPermission.CustomerManagement.AddWallet == Constants.YES));
484
-
485
- case 'MerchantManagement':
486
- return (this.ddlSelectedMenuSetup.MerchantManagement.Branch == Constants.NO || (this.groupPermission.Merchant.View == Constants.YES &&
487
- this.groupPermission.Merchant.Edit == Constants.YES && this.groupPermission.Merchant.Add == Constants.YES)) &&
488
- (this.ddlSelectedMenuSetup.MerchantManagement.StaffRegistration == Constants.NO || (this.groupPermission.Staff.View == Constants.YES && this.groupPermission.Staff.Edit == Constants.YES &&
489
- this.groupPermission.Staff.Add == Constants.YES && this.groupPermission.Staff.ResetPasscode == Constants.YES));
490
-
491
- case 'Notification':
492
- return (this.ddlSelectedMenuSetup.Notification.Message == Constants.NO || (this.groupPermission.Notification.View == Constants.YES && this.groupPermission.Notification.Add == Constants.YES
493
- && this.groupPermission.Notification.Edit == Constants.YES && this.groupPermission.Notification.Delete == Constants.YES))
494
-
495
- case 'TransactionHistory':
496
- return (this.ddlSelectedMenuSetup.TransactionHistory.WalletTransaction == Constants.NO ||
497
- (this.groupPermission.NewWalletTransaction.View == Constants.YES));
498
-
499
- case 'UserManagement':
500
- return (this.ddlSelectedMenuSetup.UserManagement.UserGroup == Constants.NO || (this.groupPermission.UserGroup.View == Constants.YES && this.groupPermission.UserGroup.Add == Constants.YES &&
501
- this.groupPermission.UserGroup.Edit == Constants.YES && this.groupPermission.UserGroup.Delete == Constants.YES)) &&
502
- (this.ddlSelectedMenuSetup.UserManagement.SystemUser == Constants.NO || (this.groupPermission.SystemUser.View == Constants.YES && this.groupPermission.SystemUser.Add == Constants.YES &&
503
- this.groupPermission.SystemUser.Edit == Constants.YES && this.groupPermission.SystemUser.Delete == Constants.YES)) &&
504
- (this.ddlSelectedMenuSetup.UserManagement.AuditLog == Constants.NO || (this.groupPermission.AuditLog.View == Constants.YES));
505
-
506
- case 'MISReport':
507
- if (this.ddlSelected2c2pCompany || this.groupPermission.CompanyUniqueId == undefined) {
508
- return (this.ddlSelectedMenuSetup.MisReport.FinancialReport == Constants.NO || (this.groupPermission.MisReport.View == Constants.YES)) &&
509
- (this.ddlSelectedMenuSetup.MisReport.MasterCardReport == Constants.NO || (this.groupPermission.MasterCardReport.View == Constants.YES)) &&
510
- (this.ddlSelectedMenuSetup.MisReport.BOTReport == Constants.NO || (this.groupPermission.BOTReport.View == Constants.YES)) &&
511
- (this.ddlSelectedMenuSetup.MisReport.Report2C2P == Constants.NO || (this.groupPermission.Report2C2P.View == Constants.YES));
512
- }
513
- else {
514
- return (this.ddlSelectedMenuSetup.MisReport.FinancialReport == Constants.NO || (this.groupPermission.MisReport.View == Constants.YES));
515
- }
516
- }
517
- }
518
- }
519
-
520
- //Function to render treeview based on data
521
- private createTreeData(model: any[]) {
522
- if (model) {
523
- for (let index = 0; index < model.length; index++) {
524
- if (!model[index].isEnabled) {
525
- if (this.disabledKeys.indexOf(model[index].permissionText) == -1) {
526
- this.disabledKeys.push(model[index].permissionText);
527
- }
528
- }
529
-
530
- if (this.pageName == Constants.NEW && this.groupPermission.CompanyUniqueId == undefined) {
531
- if (model[index].isChecked) {
532
- if (this.checkedKeys.indexOf(model[index].permissionText) == -1) {
533
- this.checkedKeys.push(model[index].permissionText);
534
- }
535
- }
536
- }
537
- else if (!model[index].hide) {
538
- if (model[index].isChecked) {
539
- if (this.checkedKeys.indexOf(model[index].permissionText) == -1) {
540
- this.checkedKeys.push(model[index].permissionText);
541
- }
542
- }
543
- }
544
- else {
545
- model.splice(index, 1);
546
- index--;
547
- }
548
-
549
- if (model && model[index] && model[index].items) {
550
- this.createTreeData(model[index].items);
551
- }
552
- }
553
- return model;
554
- }
555
- }
556
-
557
- private bindUserGroupPermissionData() {
558
- let url = `${Constants.GET_GROUP_API_URL}/${this.userGroupId}`;
559
- this.sharedService.get(url).subscribe((data: any) => {
560
- let response: any = data;
561
- this.handleResponse(response, Constants.GET_GROUP_API_URL);
562
- }, (error: any) => {
563
- this.alert.error(error);
564
- });
565
- }
566
-
567
- private bindCompanyList() {
568
- let url = Constants.GET_MASTER_COMPANY_LIST;
569
- this.sharedService.get(url).subscribe((data: any) => {
570
- let response: any = data;
571
- this.handleResponse(response, Constants.GET_MASTER_COMPANY_LIST);
572
- }, (error: any) => {
573
- this.alert.error(error);
574
- });
575
- }
576
-
577
- private onActionSeleted() {
578
- if (this.groupPermission.GroupTypeId === Constants.READONLY_ID) {
579
- this.isReadonly = true;
580
- this.initializeTreeView();
581
- this.setReadOnly(this.firstTreeDataSet);
582
- // Check the head nodes based on child for readonly
583
- this.setReadonlyHeads(this.firstTreeDataSet);
584
- this.setReadOnly(this.secondTreeDataSet);
585
- // Check the head nodes based on child for readonly
586
- this.setReadonlyHeads(this.secondTreeDataSet);
587
- }
588
- else {
589
- this.isReadonly = false;
590
- this.initializeTreeView();
591
- this.resetReadOnly(this.firstTreeDataSet);
592
- this.resetReadOnly(this.secondTreeDataSet);
593
- }
594
- this.setSelectAll();
595
- }
596
-
597
- setReadOnly(model: any[]) {
598
- if (model) {
599
- let parentCheckCount: number = 0;
600
-
601
- if (this.groupPermission.CompanyUniqueId == undefined) {
602
- for (let index = 0; index < model.length; index++) {
603
- if (model[index].hide && model[index].type == Constants.CHILD) {
604
- model[index].isChecked = false;
605
- model.splice(index, 1);
606
- index--;
607
- }
608
- else {
609
- let menuAndAction = model[index].permissionText.split('_', 2);
610
- switch (menuAndAction[0]) {
611
- case Constants.MESSAGE_MENU:
612
- menuAndAction[0] = Constants.NOTIFICATION_MENU;
613
- break;
614
- case Constants.CUSTOMER_REGISTRATION_TEXT:
615
- menuAndAction[0] = Constants.CUSTOMER_MANAGEMENT_TEXT;
616
- break;
617
- case Constants.STAFF_REGISTRATION_TEXT:
618
- menuAndAction[0] = 'Staff';
619
- break;
620
- }
621
-
622
- let isCheckedForReadOnly = model[index].type == Constants.PARENT && this.checkParentChecked(menuAndAction[0]);
623
-
624
- // If action type is readonly and parent's view permission is checked then check that parent.
625
- if (model[index].type == Constants.PARENT && isCheckedForReadOnly && this.checkedKeys.indexOf(model[index].permissionText) == -1)
626
- this.checkedKeys.push(model[index].permissionText);
627
-
628
- if (index >= 0 && model[index].items) {
629
- this.setReadOnly(model[index].items);
630
- }
631
- }
632
- }
633
- }
634
- else {
635
- for (let index = 0; index < model.length; index++) {
636
- if (model[index].hide) {
637
- model[index].isChecked = false;
638
- model.splice(index, 1);
639
- index--;
640
- }
641
- else {
642
- let menuAndAction = model[index].permissionText.split('_', 2);
643
- switch (menuAndAction[0]) {
644
- case Constants.MESSAGE_MENU:
645
- menuAndAction[0] = Constants.NOTIFICATION_MENU;
646
- break;
647
- case Constants.CUSTOMER_REGISTRATION_TEXT:
648
- menuAndAction[0] = Constants.CUSTOMER_MANAGEMENT_TEXT;
649
- break;
650
- case Constants.STAFF_REGISTRATION_TEXT:
651
- menuAndAction[0] = 'Staff';
652
- break;
653
- }
654
-
655
- let isCheckedForReadOnly = model[index].type == Constants.PARENT && this.checkParentChecked(menuAndAction[0]);
656
-
657
- // If action type is readonly and parent's view permission is checked then check that parent.
658
- if (model[index].type == Constants.PARENT && isCheckedForReadOnly && this.checkedKeys.indexOf(model[index].permissionText) == -1)
659
- this.checkedKeys.push(model[index].permissionText);
660
-
661
- if (index >= 0 && model[index].items) {
662
- this.setReadOnly(model[index].items);
663
- }
664
- }
665
- }
666
- }
667
- }
668
- }
669
-
670
- private setReadonlyHeads(model: any[]) {
671
- for (let index = 0; index < model.length; index++) {
672
- let menuAndAction = model[index].permissionText.split('_', 2);
673
- switch (menuAndAction[0]) {
674
- case Constants.MESSAGE_MENU:
675
- menuAndAction[0] = Constants.NOTIFICATION_MENU;
676
- break;
677
- }
678
- let allowedHeadData = this.getAllowedParentCount(model[index].items, model[index].permissionText);
679
- if (allowedHeadData && allowedHeadData.parentCount == allowedHeadData.parentCheckCount && !this.isChecked(model[index].permissionText)) {
680
- this.checkedKeys.push(model[index].permissionText);
681
- }
682
- }
683
- }
684
-
685
- /* Function to get count of visible parent permissions for company. Also the cheked parent count out of them,
686
- when action type is readonly*/
687
- private getAllowedParentCount(parentList: any[], headName: string): any {
688
- let allowedParentCount: number = 0;
689
- let allowedParentCheckCount: number = 0;
690
- parentList.forEach((element: any) => {
691
- if (element.hide && this.groupPermission.CompanyUniqueId == undefined)
692
- allowedParentCount++;
693
- else if (!element.hide)
694
- allowedParentCount++;
695
-
696
- let permissionText = element.permissionText;
697
- switch (permissionText) {
698
- case Constants.MESSAGE_MENU:
699
- permissionText = Constants.NOTIFICATION_MENU;
700
- break;
701
- case Constants.CUSTOMER_REGISTRATION_TEXT:
702
- permissionText = Constants.CUSTOMER_MANAGEMENT_TEXT;
703
- break;
704
- case Constants.STAFF_REGISTRATION_TEXT:
705
- permissionText = 'Staff';
706
- break;
707
- }
708
- if (this.checkParentChecked(permissionText))
709
- allowedParentCheckCount++;
710
- });
711
- return { 'parentCount': allowedParentCount, 'parentCheckCount': allowedParentCheckCount };
712
- }
713
-
714
- private resetReadOnly(model: any[]) {
715
- for (let index = 0; index < model.length; index++) {
716
- if (this.groupPermission.CompanyUniqueId == undefined) {
717
- if (model[index].type == Constants.CHILD) {
718
- model[index].isChecked = false;
719
- model.splice(index, 1);
720
- index--;
721
- }
722
- }
723
- else if (model[index].hide) {
724
- model[index].isChecked = false;
725
- model.splice(index, 1);
726
- index--;
727
- }
728
- else {
729
- if (index >= 0 && model[index].items) {
730
- this.resetReadOnly(model[index].items);
731
- }
732
- }
733
- }
734
-
735
- for (let index = 0; index < this.checkedKeys.length; index++) {
736
- let viewPermissionText: string = Constants.VIEW_ACTION;
737
- let menuAndAction = this.checkedKeys[index].split('_', 2);
738
- switch (menuAndAction[0]) {
739
- case Constants.MESSAGE_MENU:
740
- if (menuAndAction[1])
741
- menuAndAction[0] = Constants.NOTIFICATION_MENU;
742
- break;
743
- case Constants.CUSTOMER_REGISTRATION_TEXT:
744
- viewPermissionText = Constants.VIEW_CUSTOMER_ACTION;
745
-
746
- if (menuAndAction[1])
747
- menuAndAction[0] = Constants.CUSTOMER_MANAGEMENT_TEXT;
748
- break;
749
- case Constants.STAFF_REGISTRATION_TEXT:
750
- if (menuAndAction[1])
751
- menuAndAction[0] = Constants.STAFF_TEXT;
752
- break;
753
- case Constants.USER_GROUP_PERMISSION_TEXT:
754
- if (menuAndAction[1])
755
- menuAndAction[0] = Constants.USER_GROUP_TEXT;
756
- break;
757
- case Constants.FINANCIAL_REPORT_TEXT:
758
- menuAndAction[0] = Constants.MIS_REPORT_TEXT;
759
- break;
760
- case Constants.COMPANY_MENU:
761
- if (menuAndAction[1] == Constants.SETTING_ACTION)
762
- viewPermissionText = Constants.SETTING_ACTION;
763
-
764
- if (menuAndAction[1] == Constants.SETTING_EDIT_ACTION)
765
- viewPermissionText = Constants.SETTING_ACTION;
766
- break;
767
- case Constants.COMPANY_SETTING_TEXT:
768
- if (menuAndAction[1])
769
- menuAndAction[0] = Constants.COMPANY_TEXT;
770
- viewPermissionText = Constants.SETTING_ACTION;
771
- break;
772
- case Constants.CUSTOMER_MANAGEMENT_TEXT:
773
- viewPermissionText = Constants.VIEW_CUSTOMER_ACTION;
774
- break;
775
- }
776
-
777
- // If action type is not readonly and view is not selected for the parent, then uncheck it's all childs.
778
- if ((HeadPermissions[menuAndAction[0]] == null || menuAndAction[0] == Constants.NOTIFICATION_TEXT || menuAndAction[0] == Constants.CUSTOMER_MANAGEMENT_TEXT)
779
- && menuAndAction && menuAndAction.length > 0) {
780
-
781
- /* If it's heads permission text then check in checked keys
782
- If it's child permission text then check that childs view permission is checked or not.*/
783
- if (!HeadPermissions[menuAndAction[0]] == null || menuAndAction[1] ? !this.isChecked(`${menuAndAction[0]}_${viewPermissionText}`) : !this.isChecked(menuAndAction[0])) {
784
- this.checkedKeys.splice(index, 1);
785
- index--;
786
- }
787
- }
788
- }
789
- this.checkUncheckParent(model);
790
- }
791
-
792
- // Function to manage check/ uncheck of parent nodes when user select action type "Cheker/ Maker"
793
- private checkUncheckParent(model: any) {
794
- let childCheckCount: number = 0;
795
- for (let index = 0; index < model.length; index++) {
796
- if (model[index].type == Constants.PARENT) {
797
- childCheckCount = this.getParentChildCheckCount(model[index].items);
798
- }
799
-
800
- let removeIndex = this.checkedKeys.indexOf(model[index].permissionText)
801
-
802
- //If action type is not readonly and all child of parent are not checked then uncheck parent node.
803
- if (model[index].type == Constants.PARENT && removeIndex > -1 && childCheckCount != model[index].items.length) {
804
- this.checkedKeys.splice(removeIndex, 1);
805
- }
806
-
807
- if (model && model[index].items) {
808
- this.checkUncheckParent(model[index].items);
809
- }
810
- this.checkUncheckHeads(model);
811
- }
812
- }
813
-
814
- // Function to manage check/ uncheck of head nodes when user select action type "Cheker/ Maker"
815
- private checkUncheckHeads(model: any) {
816
- let parentCheckCount: number = 0;
817
- let allowedHeadCount: number = 0;
818
- for (let index = 0; index < model.length; index++) {
819
- if (model[index].type == Constants.HEAD) {
820
- parentCheckCount = this.getParentChildCheckCount(model[index].items);
821
- allowedHeadCount = this.getAllowedHeadCount(model, model[index].permissionText);
822
- }
823
-
824
- let removeIndex = this.checkedKeys.indexOf(model[index].permissionText)
825
-
826
- //If not readonly and all child not selected then uncheck head
827
- if (model[index].type == Constants.HEAD && removeIndex > -1 && parentCheckCount != allowedHeadCount)
828
- this.checkedKeys.splice(removeIndex, 1);
829
- }
830
- }
831
-
832
- // Function to get count of visible permissions for company.
833
- private getAllowedHeadCount(model: any, headNode: string): number {
834
- let allowedHeadCount: number = 0;
835
- model.forEach((element: any) => {
836
- if (element.permissionText == headNode) {
837
- element.items.forEach((element: any) => {
838
- if (element.hide && this.groupPermission.CompanyUniqueId == undefined)
839
- allowedHeadCount++;
840
- else if (!element.hide)
841
- allowedHeadCount++;
842
- });
843
- }
844
- });
845
- return allowedHeadCount;
846
- }
847
-
848
- // Function to get check count of chid permissions for respective node
849
- private getParentChildCheckCount(childList: any[]): number {
850
- let childCheckCount: number = 0;
851
- childList.forEach((element: any) => {
852
- if (this.checkedKeys.indexOf(element.permissionText) > -1)
853
- childCheckCount++;
854
- });
855
-
856
- return childCheckCount;
857
- }
858
-
859
- // This function returns true if action type is "Read Only" and view permission is checked for parent.
860
- private checkParentChecked(parentName: string) {
861
- if (parentName) {
862
- switch (parentName) {
863
- case Constants.MASTER_BIN_TEXT:
864
- case Constants.COMPANY_TEXT:
865
- case Constants.CARD_ORDERING_TEXT:
866
- case Constants.PRODUCT_SETTING_TEXT:
867
- case Constants.CARD_LISTING_TEXT:
868
- case Constants.MERCHANT_TEXT:
869
- case Constants.STAFF_TEXT:
870
- case Constants.PUSH_NOTIFICATION_TEXT:
871
- case Constants.NOTIFICATION_TEXT:
872
- case Constants.CARD_TRANSACTION_TEXT:
873
- case Constants.MERCHANT_TRANSACTION_TEXT:
874
- case Constants.CUSTOMER_TRANSACTION_TEXT:
875
- case Constants.WALLET_TRANSACTION_TEXT:
876
- case Constants.FRAUD_TRANSACTION_TEXT:
877
- case Constants.CHARGEBACK_TEXT:
878
- case Constants.SYSTEM_USER_TEXT:
879
- case Constants.AUDIT_LOG_TEXT:
880
- case Constants.FINANCIAL_REPORT_TEXT:
881
- case Constants.MASTER_CARD_REPORT_TEXT:
882
- case Constants.BOT_REPORT_TEXT:
883
- case Constants.REMITTANCE_REPORT_TEXT:
884
- case Constants.CLEARING_TRANSACTION_TEXT:
885
- case Constants.REPORT_2C2P:
886
- return this.isChecked(`${parentName}_${Constants.VIEW_ACTION}`) && this.isReadonly;
887
-
888
- case Constants.AUTHORISATION_LISTING_TEXT:
889
- return this.isChecked(`${parentName}_${Constants.VIEW_ACTION}`) &&
890
- this.isChecked(`${parentName}_${Constants.VIEW_RAW_DATA}`) &&
891
- this.isReadonly
892
-
893
- // Company Setting
894
- case Constants.COMPANY_SETTING_TEXT:
895
- return this.isChecked(`Company_${Constants.SETTING_ACTION}`) && this.isReadonly;
896
-
897
- case Constants.CUSTOMER_MANAGEMENT_TEXT:
898
- return this.isChecked(`${parentName}_${Constants.VIEW_CUSTOMER_ACTION}`) &&
899
- this.isChecked(`${parentName}_CardHistory`) &&
900
- this.isChecked(`${parentName}_ViewHistory`) &&
901
- this.isReadonly
902
-
903
- case Constants.OTHERS_TEXT:
904
- return this.isChecked(`${parentName}_${Constants.IDNUMBER_ACTION}`) &&
905
- this.isChecked(`${parentName}_${Constants.FULLPAN_ACTION}`) &&
906
- this.isReadonly;
907
-
908
- case Constants.USER_GROUP_PERMISSION_TEXT:
909
- return this.isChecked(`${Constants.USER_GROUP_TEXT}_${Constants.VIEW_ACTION}`) && this.isReadonly;
910
- }
911
- }
912
- }
913
-
914
- // This function returns true if action type is "Read Only" and all the parents of head node are checked.
915
- private checkHeadsChecked(parentName: string) {
916
- if (parentName) {
917
- switch (parentName) {
918
- case Constants.SYSTEM_MANAGEMENT_TEXT:
919
- if (this.ddlSelected2c2pCompany || this.groupPermission.CompanyUniqueId == undefined) {
920
- return (this.ddlSelectedMenuSetup.SystemManagement.MasterBin == Constants.NO || this.isChecked(Constants.MASTER_BIN_TEXT)) &&
921
- (this.ddlSelectedMenuSetup.SystemManagement.Company == Constants.NO || this.isChecked(Constants.COMPANY_TEXT)) &&
922
- (this.ddlSelectedMenuSetup.SystemManagement.ProductSetting == Constants.NO || this.isChecked(Constants.PRODUCT_SETTING_TEXT)) &&
923
- (this.ddlSelectedMenuSetup.SystemManagement.CardOrdering == Constants.NO || this.isChecked(Constants.CARD_ORDERING_TEXT)) &&
924
- (this.ddlSelectedMenuSetup.SystemManagement.AuthorisationListing == Constants.NO || this.isChecked(Constants.AUTHORISATION_LISTING_TEXT)) &&
925
- (this.ddlSelectedMenuSetup.SystemManagement.ClearingTransaction == Constants.NO || this.isChecked(Constants.CLEARING_TRANSACTION_TEXT)) &&
926
- this.isReadonly;
927
- }
928
- else {
929
- return (this.ddlSelectedMenuSetup.SystemManagement.ProductSetting == Constants.NO || this.isChecked(Constants.PRODUCT_SETTING_TEXT)) &&
930
- (this.ddlSelectedMenuSetup.SystemManagement.CardOrdering == Constants.NO || this.isChecked(Constants.CARD_ORDERING_TEXT)) &&
931
- (this.ddlSelectedMenuSetup.SystemManagement.AuthorisationListing == Constants.NO || this.isChecked(Constants.AUTHORISATION_LISTING_TEXT)) &&
932
- this.isReadonly;
933
- }
934
-
935
- case Constants.TRANSACTION_HISTORY_TEXT:
936
- return (this.ddlSelectedMenuSetup.TransactionHistory.WalletTransaction == Constants.NO || this.isChecked(Constants.WALLET_TRANSACTION_TEXT)) &&
937
- this.isReadonly;
938
-
939
- case Constants.CUSTOMER_MANAGEMENT_TEXT:
940
- return (this.ddlSelectedMenuSetup.CustomerManagement.Registration == Constants.NO ||
941
- this.isChecked(Constants.CUSTOMER_REGISTRATION_TEXT)) &&
942
- this.isReadonly;
943
-
944
- case Constants.MERCHANT_MANAGEMENT_TEXT:
945
- return (this.ddlSelectedMenuSetup.MerchantManagement.Branch == Constants.NO || this.isChecked(Constants.MERCHANT_TEXT)) &&
946
- (this.ddlSelectedMenuSetup.MerchantManagement.StaffRegistration == Constants.NO || this.isChecked(Constants.STAFF_REGISTRATION_TEXT)) &&
947
- this.isReadonly;
948
-
949
- case Constants.NOTIFICATION_TEXT:
950
- return (this.ddlSelectedMenuSetup.Notification.Message == Constants.NO || this.isChecked(Constants.MESSAGE_TEXT)) &&
951
- this.isReadonly;
952
-
953
- case Constants.USER_MANAGEMENT_TEXT:
954
- return (this.ddlSelectedMenuSetup.UserManagement.UserGroup == Constants.NO || this.isChecked(Constants.USER_GROUP_PERMISSION_TEXT)) &&
955
- (this.ddlSelectedMenuSetup.UserManagement.SystemUser == Constants.NO || this.isChecked(Constants.SYSTEM_USER_TEXT)) &&
956
- (this.ddlSelectedMenuSetup.UserManagement.AuditLog == Constants.NO || this.isChecked(Constants.AUDIT_LOG_TEXT)) &&
957
- this.isReadonly;
958
-
959
- case Constants.MIS_REPORT_TEXT:
960
- if (this.ddlSelected2c2pCompany || this.groupPermission.CompanyUniqueId == undefined) {
961
- return (this.ddlSelectedMenuSetup.MisReport.FinancialReport == Constants.NO || this.isChecked(Constants.FINANCIAL_REPORT_TEXT)) &&
962
- (this.ddlSelectedMenuSetup.MisReport.MasterCardReport == Constants.NO || this.isChecked(Constants.MASTER_CARD_REPORT_TEXT)) &&
963
- (this.ddlSelectedMenuSetup.MisReport.BOTReport == Constants.NO || this.isChecked(Constants.BOT_REPORT_TEXT)) &&
964
- (this.ddlSelectedMenuSetup.MisReport.Report2C2P == Constants.NO || this.isChecked(Constants.REPORT2C2P_TEXT)) &&
965
- this.isReadonly;
966
- }
967
- else {
968
- return (this.ddlSelectedMenuSetup.MisReport.FinancialReport == Constants.NO || this.isChecked(Constants.FINANCIAL_REPORT_TEXT)) &&
969
- this.isReadonly;
970
- }
971
- }
972
- }
973
- }
974
-
975
- private onFormSubmit() {
976
- this.sharedService.disableButton = true;
977
- this.setUserPermissions();
978
-
979
- if (this.pageName === Constants.EDIT) {
980
- this.onUpdate();
981
- }
982
- else {
983
- this.onSave();
984
- }
985
- }
986
-
987
- private onEdit() {
988
- if (this.groupPermission.UserGroupName == this.common.getCurrentUserGroup().UserGroupName) {
989
- this.alert.error(this.common.permissionMessage);
990
- return false;
991
- }
992
- else {
993
- this.router.navigate(['user-group-permission-edit', this.userGroupId]);
994
- }
995
- }
996
-
997
- // Method to remove permission when select Readonly action.
998
- private doManagePermissionForReadonly(permissionModel: UserGroupPermissionModel) {
999
- permissionModel.CustomerManagement.EditCustomer = Constants.NO;
1000
- permissionModel.CustomerManagement.WalletTopUp.TopupWithdraw = Constants.NO;
1001
- permissionModel.CustomerManagement.AddWallet = Constants.NO;
1002
-
1003
- permissionModel.Company.SettingEdit = Constants.NO;
1004
-
1005
- permissionModel.UserGroup.Edit = Constants.NO;
1006
- permissionModel.UserGroup.Add = Constants.NO;
1007
- permissionModel.UserGroup.Delete = Constants.NO;
1008
-
1009
- permissionModel.SystemUser.Edit = Constants.NO;
1010
- permissionModel.SystemUser.Add = Constants.NO;
1011
- permissionModel.SystemUser.Delete = Constants.NO;
1012
- permissionModel.SystemUser.ResetPassword = Constants.NO;
1013
- }
1014
-
1015
- private onUpdate() {
1016
- if (this.userGroupId == this.common.getCurrentUserGroupId()) {
1017
- this.alert.error(this.common.permissionMessage);
1018
- return false;
1019
- }
1020
- else {
1021
- if (this.walletTopupWithdrawChecked) {
1022
- this.apiPermissionModel.CustomerManagement.WalletTopUp.TopupWithdraw = Constants.YES;
1023
- }
1024
-
1025
- this.apiPermissionModel.Id = this.userGroupId;
1026
- let url = `${Constants.GET_GROUP_API_URL}/${this.apiPermissionModel.Id}`;
1027
- this.sharedService.put(url, this.apiPermissionModel).subscribe((data: any) => {
1028
- let response: any = data;
1029
- this.handleResponse(response, Constants.PUT_REQUEST);
1030
- }, (error: any) => {
1031
- this.alert.error(error);
1032
- });
1033
- }
1034
- }
1035
-
1036
- private onSave() {
1037
- if (this.walletTopupWithdrawChecked) {
1038
- this.apiPermissionModel.CustomerManagement.WalletTopUp.TopupWithdraw = Constants.YES;
1039
- }
1040
-
1041
- this.sharedService.post(Constants.GET_GROUP_API_URL, this.apiPermissionModel).subscribe((data: any) => {
1042
- let response: any = data;
1043
- this.handleResponse(response, Constants.POST_REQUEST);
1044
- }, (error: any) => {
1045
- this.alert.error(error);
1046
- });
1047
- }
1048
-
1049
- private redirectToView() {
1050
- setTimeout(() => {
1051
- this.router.navigate(['user-group-permission-view', this.userGroupId]);
1052
- }, Constants.TIMEOUT);
1053
- }
1054
-
1055
- // select or deselect Parent Node checkbox when child node is updated
1056
- private handleChildNodeToggle(propertyName: any) {
1057
- switch (propertyName) {
1058
- case 'system':
1059
- if (this.groupPermission.ProductSetting.View === Constants.YES &&
1060
- (this.groupPermission.ProductSetting.Edit === Constants.YES || this.isReadonly) &&
1061
- (this.groupPermission.ProductSetting.Add === Constants.YES || this.isReadonly) &&
1062
- this.groupPermission.CardOrdering.View === Constants.YES &&
1063
- (this.groupPermission.CardOrdering.Edit === Constants.YES || this.isReadonly) &&
1064
- (this.groupPermission.CardOrdering.Add === Constants.YES || this.isReadonly) &&
1065
- this.groupPermission.AuthorisationListing.View === Constants.YES &&
1066
- this.groupPermission.AuthorisationListing.ViewRawData === Constants.YES
1067
- ) {
1068
- if (this.ddlSelected2c2pCompany) {
1069
- if (this.groupPermission.Company.View === Constants.YES &&
1070
- (this.groupPermission.Company.Edit === Constants.YES || this.isReadonly) &&
1071
- (this.groupPermission.Company.Add === Constants.YES || this.isReadonly) &&
1072
- this.groupPermission.MasterBin.View === Constants.YES &&
1073
- (this.groupPermission.MasterBin.Edit === Constants.YES || this.isReadonly) &&
1074
- (this.groupPermission.MasterBin.Add === Constants.YES || this.isReadonly) &&
1075
- this.groupPermission.ClearingTransaction.View === Constants.YES &&
1076
- (this.groupPermission.ClearingTransaction.AddFraud === Constants.YES || this.isReadonly) &&
1077
- (this.groupPermission.ClearingTransaction.Chargeback === Constants.YES || this.isReadonly)
1078
- ) {
1079
- return true;
1080
- }
1081
- return false;
1082
- }
1083
- return true;
1084
- }
1085
- return false;
1086
-
1087
- case 'customerManagementRoot':
1088
- if (this.groupPermission.CustomerManagement.ViewCustomer === Constants.YES &&
1089
- (this.groupPermission.CustomerManagement.EditCustomer === Constants.YES || this.isReadonly) &&
1090
- this.groupPermission.CustomerManagement.ViewHistory === Constants.YES &&
1091
- (this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw === Constants.YES || this.isReadonly) &&
1092
- (this.groupPermission.CustomerManagement.AddWallet === Constants.YES || this.isReadonly)
1093
- ) {
1094
- return true;
1095
- }
1096
- return false;
1097
-
1098
- case 'customerManagement':
1099
- if (this.groupPermission.CustomerManagement.ViewCustomer === Constants.YES &&
1100
- (this.groupPermission.CustomerManagement.EditCustomer === Constants.YES || this.isReadonly) &&
1101
- this.groupPermission.CustomerManagement.ViewHistory === Constants.YES &&
1102
- (this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw === Constants.YES || this.isReadonly) &&
1103
- (this.groupPermission.CustomerManagement.AddWallet === Constants.YES || this.isReadonly)
1104
- ) {
1105
- return true;
1106
- }
1107
- return false;
1108
-
1109
- case 'merchantManagement':
1110
- if (this.groupPermission.Merchant.View === Constants.YES &&
1111
- (this.groupPermission.Merchant.Edit === Constants.YES || this.isReadonly) &&
1112
- (this.groupPermission.Merchant.Add === Constants.YES || this.isReadonly) &&
1113
- this.groupPermission.Staff.View === Constants.YES &&
1114
- (this.groupPermission.Staff.Edit === Constants.YES || this.isReadonly) &&
1115
- (this.groupPermission.Staff.Add === Constants.YES || this.isReadonly) &&
1116
- (this.groupPermission.Staff.ResetPasscode === Constants.YES || this.isReadonly)
1117
- ) {
1118
- return true;
1119
- }
1120
- return false;
1121
-
1122
- case 'company':
1123
- if (this.groupPermission.Company.View === Constants.YES &&
1124
- (this.groupPermission.Company.Edit === Constants.YES || this.isReadonly) &&
1125
- (this.groupPermission.Company.Add === Constants.YES || this.isReadonly)) {
1126
- return true;
1127
- }
1128
- return false;
1129
-
1130
- case 'authorisationListing':
1131
- if (this.groupPermission.AuthorisationListing.View === Constants.YES &&
1132
- this.groupPermission.AuthorisationListing.ViewRawData == Constants.YES) {
1133
- return true;
1134
- }
1135
- return false;
1136
-
1137
- case 'companySetting':
1138
- if (this.groupPermission.Company.Setting === Constants.YES &&
1139
- (this.groupPermission.Company.SettingEdit === Constants.YES || this.isReadonly)) {
1140
- return true;
1141
- }
1142
- return false;
1143
-
1144
- case 'transactionHistory':
1145
- if (this.groupPermission.WalletTransaction.View === Constants.YES &&
1146
- this.groupPermission.NewWalletTransaction.View === Constants.YES
1147
- ) {
1148
- return true;
1149
- }
1150
- return false;
1151
-
1152
- case 'walletTransaction':
1153
- if (this.groupPermission.WalletTransaction.View === Constants.YES &&
1154
- (this.groupPermission.WalletTransaction.Refund === Constants.YES || this.isReadonly) &&
1155
- (this.groupPermission.WalletTransaction.Void === Constants.YES || this.isReadonly)
1156
- ) {
1157
- return true;
1158
- }
1159
- return false;
1160
-
1161
- case 'newWalletTransaction':
1162
- if (this.groupPermission.NewWalletTransaction.View === Constants.YES) {
1163
- return true;
1164
- }
1165
- return false;
1166
-
1167
- case 'userManagement':
1168
- if (this.groupPermission.UserGroup.View === Constants.YES &&
1169
- (this.groupPermission.UserGroup.Edit === Constants.YES || this.isReadonly) &&
1170
- (this.groupPermission.UserGroup.Add === Constants.YES || this.isReadonly) &&
1171
- (this.groupPermission.UserGroup.Delete === Constants.YES || this.isReadonly) &&
1172
- this.groupPermission.SystemUser.View === Constants.YES &&
1173
- (this.groupPermission.SystemUser.Edit === Constants.YES || this.isReadonly) &&
1174
- (this.groupPermission.SystemUser.Add === Constants.YES || this.isReadonly) &&
1175
- (this.groupPermission.SystemUser.Delete === Constants.YES || this.isReadonly) &&
1176
- this.groupPermission.AuditLog.View === Constants.YES &&
1177
- (this.groupPermission.SystemUser.ResetPassword === Constants.YES || this.isReadonly)) {
1178
- return true;
1179
- }
1180
- return false;
1181
-
1182
- case 'userGroup':
1183
- if (this.groupPermission.UserGroup.View === Constants.YES &&
1184
- (this.groupPermission.UserGroup.Edit === Constants.YES || this.isReadonly) &&
1185
- (this.groupPermission.UserGroup.Add === Constants.YES || this.isReadonly) &&
1186
- (this.groupPermission.UserGroup.Delete === Constants.YES || this.isReadonly)) {
1187
- return true;
1188
- }
1189
- return false;
1190
-
1191
- case 'systemUser':
1192
- if (this.groupPermission.SystemUser.View === Constants.YES &&
1193
- (this.groupPermission.SystemUser.Edit === Constants.YES || this.isReadonly) &&
1194
- (this.groupPermission.SystemUser.Add === Constants.YES || this.isReadonly) &&
1195
- (this.groupPermission.SystemUser.Delete === Constants.YES || this.isReadonly) &&
1196
- (this.groupPermission.SystemUser.ResetPassword === Constants.YES || this.isReadonly)) {
1197
- return true;
1198
- }
1199
- return false;
1200
-
1201
- case 'auditLog':
1202
- if (this.groupPermission.AuditLog.View === Constants.YES) {
1203
- return true;
1204
- }
1205
- return false;
1206
-
1207
- case 'others':
1208
- if (this.groupPermission.Others.FullPAN === Constants.YES &&
1209
- this.groupPermission.Others.IDNumber === Constants.YES
1210
- ) {
1211
- return true;
1212
- }
1213
- return false;
1214
- }
1215
- }
1216
-
1217
- private handleSelectAllChildNodeToggle() {
1218
- if (this.handleChildNodeToggle('system')
1219
- && this.handleChildNodeToggle('customerManagementRoot')
1220
- && this.handleChildNodeToggle('companySetting')
1221
- && this.handleChildNodeToggle('merchantManagement')
1222
- && this.handleChildNodeToggle('transactionHistory')
1223
- && this.handleChildNodeToggle('notificationRoot')
1224
- && this.handleChildNodeToggle('userManagement')
1225
- && this.handleChildNodeToggle('misReportRoot')
1226
- && this.handleChildNodeToggle('others')
1227
- && this.handleChildNodeToggle('bulkAction')
1228
- ) {
1229
- return true;
1230
- }
1231
-
1232
- return false;
1233
- }
1234
-
1235
- // parent checkbox change event: this will select or deselect all child Node
1236
- private toggleParentNodeCheckbox(parentItem: any) {
1237
- let permission = parentItem.currentTarget.checked ? Constants.YES : Constants.NO;
1238
-
1239
- switch (parentItem.currentTarget.name) {
1240
- case 'customerManagement':
1241
- this.groupPermission.CustomerManagement.ViewCustomer = this.checkUserPermission('CustomerManagement', 'ViewCustomer') ? permission : this.groupPermission.CustomerManagement.ViewCustomer;
1242
- this.groupPermission.CustomerManagement.EditCustomer = this.checkUserPermission('CustomerManagement', 'EditCustomer') ? permission : this.groupPermission.CustomerManagement.EditCustomer;
1243
- this.groupPermission.CustomerManagement.ViewHistory = this.checkUserPermission('CustomerManagement', 'ViewHistory') ? permission : this.groupPermission.CustomerManagement.ViewHistory;
1244
- this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw = this.checkUserPermissionForManualPosting('CustomerManagement', Constants.WALLET_MANUAL_POST, Constants.TOPUP_WITHDRAW) ? permission :
1245
- this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw;
1246
- this.groupPermission.CustomerManagement.AddWallet = this.checkUserPermission('CustomerManagement', 'AddWallet') ? permission : this.groupPermission.CustomerManagement.AddWallet;
1247
- break;
1248
-
1249
- case 'customerManagementRoot':
1250
- this.groupPermission.CustomerManagement.ViewCustomer = this.checkUserPermission('CustomerManagement', 'ViewCustomer') ? permission : this.groupPermission.CustomerManagement.ViewCustomer;
1251
- this.groupPermission.CustomerManagement.EditCustomer = this.checkUserPermission('CustomerManagement', 'EditCustomer') ? permission : this.groupPermission.CustomerManagement.EditCustomer;
1252
- this.groupPermission.CustomerManagement.ViewHistory = this.checkUserPermission('CustomerManagement', 'ViewHistory') ? permission : this.groupPermission.CustomerManagement.ViewHistory;
1253
- this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw = this.checkUserPermissionForManualPosting('CustomerManagement', Constants.WALLET_MANUAL_POST, Constants.TOPUP_WITHDRAW) ? permission :
1254
- this.groupPermission.CustomerManagement.WalletTopUp.TopupWithdraw;
1255
- this.groupPermission.CustomerManagement.AddWallet = this.checkUserPermission('CustomerManagement', 'AddWallet') ? permission : this.groupPermission.CustomerManagement.AddWallet;
1256
-
1257
- break;
1258
-
1259
- case 'system':
1260
- this.groupPermission.Company.View = this.checkUserPermission('Company', 'View') ? permission : this.groupPermission.Company.View;
1261
- this.groupPermission.Company.Edit = this.checkUserPermission('Company', 'Edit') ? permission : this.groupPermission.Company.Edit;
1262
- this.groupPermission.Company.Add = this.checkUserPermission('Company', 'Add') ? permission : this.groupPermission.Company.Add;
1263
- this.groupPermission.MasterBin.View = this.checkUserPermission('MasterBin', 'View') ? permission : this.groupPermission.MasterBin.View;
1264
- this.groupPermission.MasterBin.Edit = this.checkUserPermission('MasterBin', 'Edit') ? permission : this.groupPermission.MasterBin.Edit;
1265
- this.groupPermission.MasterBin.Add = this.checkUserPermission('MasterBin', 'Add') ? permission : this.groupPermission.MasterBin.Add;
1266
- this.groupPermission.ProductSetting.View = this.checkUserPermission('ProductSetting', 'View') ? permission : this.groupPermission.ProductSetting.View;
1267
- this.groupPermission.ProductSetting.Edit = this.checkUserPermission('ProductSetting', 'Edit') ? permission : this.groupPermission.ProductSetting.Edit;
1268
- this.groupPermission.ProductSetting.Add = this.checkUserPermission('ProductSetting', 'Add') ? permission : this.groupPermission.ProductSetting.Add;
1269
- this.groupPermission.CardOrdering.View = this.checkUserPermission('CardOrdering', 'View') ? permission : this.groupPermission.CardOrdering.View;
1270
- this.groupPermission.CardOrdering.Edit = this.checkUserPermission('CardOrdering', 'Edit') ? permission : this.groupPermission.CardOrdering.Edit;
1271
- this.groupPermission.CardOrdering.Add = this.checkUserPermission('CardOrdering', 'Add') ? permission : this.groupPermission.CardOrdering.Add;
1272
- this.groupPermission.AuthorisationListing.View = this.checkUserPermission('AuthorisationListing', 'View') ? permission : this.groupPermission.AuthorisationListing.View;
1273
- this.groupPermission.AuthorisationListing.ViewRawData = this.checkUserPermission('AuthorisationListing', 'ViewRawData') ? permission : this.groupPermission.AuthorisationListing.ViewRawData;
1274
- this.groupPermission.ClearingTransaction.View = this.checkUserPermission('ClearingTransaction', 'View') ? permission : this.groupPermission.ClearingTransaction.View;
1275
- this.groupPermission.ClearingTransaction.AddFraud = this.checkUserPermission('ClearingTransaction', 'AddFraud') ? permission : this.groupPermission.ClearingTransaction.AddFraud;
1276
- this.groupPermission.ClearingTransaction.Chargeback = this.checkUserPermission('ClearingTransaction', 'Chargeback') ? permission : this.groupPermission.ClearingTransaction.Chargeback;
1277
- break;
1278
-
1279
- case 'companySetting':
1280
- this.groupPermission.Company.Setting = this.checkUserPermission('Company', 'Setting') ? permission : this.groupPermission.Company.Setting;
1281
- this.groupPermission.Company.SettingEdit = this.checkUserPermission('Company', 'SettingEdit') ? permission : this.groupPermission.Company.SettingEdit;
1282
- break;
1283
-
1284
- case 'authorisationListing':
1285
- this.groupPermission.AuthorisationListing.View = this.checkUserPermission('AuthorisationListing', 'View') ? permission : this.groupPermission.AuthorisationListing.View;
1286
- this.groupPermission.AuthorisationListing.ViewRawData = this.checkUserPermission('AuthorisationListing', 'ViewRawData') ? permission : this.groupPermission.AuthorisationListing.ViewRawData;
1287
- break;
1288
-
1289
- case 'transactionHistory':
1290
- this.groupPermission.WalletTransaction.View = this.checkUserPermission('WalletTransaction', 'View') ? permission : this.groupPermission.WalletTransaction.View;
1291
- this.groupPermission.NewWalletTransaction.View = this.checkUserPermission('NewWalletTransaction', 'View') ? permission : this.groupPermission.NewWalletTransaction.View;
1292
- break;
1293
-
1294
- case 'walletTransaction':
1295
- this.groupPermission.WalletTransaction.View = this.checkUserPermission('WalletTransaction', 'View') ? permission : this.groupPermission.WalletTransaction.View;
1296
- break;
1297
-
1298
- case 'newWalletTransaction':
1299
- this.groupPermission.NewWalletTransaction.View = this.checkUserPermission('NewWalletTransaction', 'View') ? permission : this.groupPermission.NewWalletTransaction.View;
1300
- break;
1301
-
1302
- case 'userManagement':
1303
- this.groupPermission.UserGroup.View = this.checkUserPermission('UserGroup', 'View') ? permission : this.groupPermission.UserGroup.View;
1304
- this.groupPermission.UserGroup.Edit = this.checkUserPermission('UserGroup', 'Edit') ? permission : this.groupPermission.UserGroup.Edit;
1305
- this.groupPermission.UserGroup.Add = this.checkUserPermission('UserGroup', 'Add') ? permission : this.groupPermission.UserGroup.Add;
1306
- this.groupPermission.UserGroup.Delete = this.checkUserPermission('UserGroup', 'Delete') ? permission : this.groupPermission.UserGroup.Delete;
1307
- this.groupPermission.SystemUser.View = this.checkUserPermission('SystemUser', 'View') ? permission : this.groupPermission.SystemUser.View;
1308
- this.groupPermission.SystemUser.Edit = this.checkUserPermission('SystemUser', 'Edit') ? permission : this.groupPermission.SystemUser.Edit;
1309
- this.groupPermission.SystemUser.Add = this.checkUserPermission('SystemUser', 'Add') ? permission : this.groupPermission.SystemUser.Add;
1310
- this.groupPermission.SystemUser.Delete = this.checkUserPermission('SystemUser', 'Delete') ? permission : this.groupPermission.SystemUser.Delete;
1311
- this.groupPermission.SystemUser.ResetPassword = this.checkUserPermission('SystemUser', 'ResetPassword') ? permission : this.groupPermission.SystemUser.ResetPassword;
1312
- this.groupPermission.AuditLog.View = this.checkUserPermission('AuditLog', 'View') ? permission : this.groupPermission.AuditLog.View;
1313
- break;
1314
-
1315
- case 'userGroup':
1316
- this.groupPermission.UserGroup.View = this.checkUserPermission('UserGroup', 'View') ? permission : this.groupPermission.UserGroup.View;
1317
- this.groupPermission.UserGroup.Edit = this.checkUserPermission('UserGroup', 'Edit') ? permission : this.groupPermission.UserGroup.Edit;
1318
- this.groupPermission.UserGroup.Add = this.checkUserPermission('UserGroup', 'Add') ? permission : this.groupPermission.UserGroup.Add;
1319
- this.groupPermission.UserGroup.Delete = this.checkUserPermission('UserGroup', 'Delete') ? permission : this.groupPermission.UserGroup.Delete;
1320
- break;
1321
-
1322
- case 'systemUser':
1323
- this.groupPermission.SystemUser.View = this.checkUserPermission('SystemUser', 'View') ? permission : this.groupPermission.SystemUser.View;
1324
- this.groupPermission.SystemUser.Edit = this.checkUserPermission('SystemUser', 'Edit') ? permission : this.groupPermission.SystemUser.Edit;
1325
- this.groupPermission.SystemUser.Add = this.checkUserPermission('SystemUser', 'Add') ? permission : this.groupPermission.SystemUser.Add;
1326
- this.groupPermission.SystemUser.Delete = this.checkUserPermission('SystemUser', 'Delete') ? permission : this.groupPermission.SystemUser.Delete;
1327
- this.groupPermission.SystemUser.ResetPassword = this.checkUserPermission('SystemUser', 'ResetPassword') ? permission : this.groupPermission.SystemUser.ResetPassword;
1328
- break;
1329
-
1330
- case 'auditLog':
1331
- this.groupPermission.AuditLog.View = this.checkUserPermission('AuditLog', 'View') ? permission : this.groupPermission.AuditLog.View;
1332
- break;
1333
-
1334
- case 'others':
1335
- this.groupPermission.Others.FullPAN = this.checkUserPermission('Others', 'FullPAN') ? permission : this.groupPermission.Others.FullPAN;
1336
- this.groupPermission.Others.IDNumber = this.checkUserPermission('Others', 'IDNumber') ? permission : this.groupPermission.Others.IDNumber;
1337
- break;
1338
- }
1339
- }
1340
-
1341
- // on select/deselect Select All checkbox
1342
- private toggleAllSelectNodeCheckbox(parentItem: any) {
1343
- let rootNode: any = $('li.root-menu>input').not('[disabled]');
1344
-
1345
- if (rootNode) {
1346
- for (let i = 0; i < rootNode.length; i++) {
1347
- parentItem.currentTarget.name = rootNode[i].name;
1348
- this.toggleParentNodeCheckbox(parentItem);
1349
- }
1350
- }
1351
- }
1352
-
1353
- private handleResponse(response: any, requestType: string) {
1354
- if (response) {
1355
- switch (response.responseCode) {
1356
- case Constants.SUCCESS_CODE:
1357
- this.handleSuccessResponse(response, requestType);
1358
- break;
1359
- default:
1360
- this.alert.error(response.resDescriptionEN);
1361
- break;
1362
- }
1363
- }
1364
- }
1365
-
1366
- private handleSuccessResponse(response: any, requestType: string) {
1367
- if (response && requestType) {
1368
- switch (requestType) {
1369
- // get list request
1370
- case Constants.GET_GROUP_API_URL:
1371
- this.groupPermission = this.common.removePropertyFromJSON(response);
1372
- this.isReadonly = this.groupPermission.GroupTypeId === Constants.READONLY_ID ? true : false;
1373
- this.ddlSelected2c2pCompany = this.groupPermission.CompanyId == Constants.COMPANY_ID_2C2P;
1374
- this.isCurrentUserGroup = this.groupPermission.CompanyUniqueId == this.common.getCompanyId();
1375
- this.groupPermission.UserUniqueId = this.common.getCurrentUserUniqueID();
1376
- this.groupPermission.CompanyUniqueId = this.groupPermission.CompanyUniqueId == 0 ? undefined : this.groupPermission.CompanyUniqueId;
1377
- this.isSelectAll = this.groupPermission.SelectAll == Constants.YES ? true : false;
1378
-
1379
- if (this.userGroupId == this.common.getCurrentUserGroupId()) {
1380
- this.common.saveUserGroup(this.groupPermission);
1381
- }
1382
-
1383
- // copy of object
1384
- this.actualObject = JSON.parse(JSON.stringify(this.groupPermission));
1385
- this.apiPermissionModel = JSON.parse(JSON.stringify(this.groupPermission));
1386
- this.getCompanyMenuList();
1387
-
1388
- this.insertAuditLog(Constants.VIEW_AUDIT_TYPE);
1389
- break;
1390
-
1391
- case Constants.PUT_REQUEST:
1392
- this.alert.success(Constants.UPDATE_SUCCESS_MESSAGE);
1393
- if (this.userGroupId == this.common.getCurrentUserGroupId()) {
1394
- this.common.saveUserGroup(this.apiPermissionModel);
1395
- }
1396
-
1397
- this.insertAuditLog(Constants.EDIT_AUDIT_TYPE);
1398
- this.redirectToView();
1399
- break;
1400
-
1401
- case Constants.POST_REQUEST:
1402
- this.alert.success(Constants.CREATE_SUCCESS_MESSAGE);
1403
- this.userGroupId = response.Id;
1404
-
1405
- this.insertAuditLog(Constants.ADD_AUDIT_TYPE);
1406
- this.common.goToPreviousPage(true);
1407
- break;
1408
-
1409
- case Constants.GET_MASTER_COMPANY_LIST:
1410
- this.companyList = response.companyList;
1411
- let currentCompanyUniqueId = this.common.getCompanyUniqueId();
1412
- let company = response.companyList.filter((comp: any) => {
1413
- return comp.companyUniqueId == currentCompanyUniqueId;
1414
- });
1415
-
1416
- if (company.length > 0) {
1417
- let companyId: string = company[0].companyId;
1418
- let companyUniqueId: number = company[0].companyUniqueId;
1419
- if (companyId === Constants.COMPANY_ID_2C2P) {
1420
- //this.companyDisable = false;
1421
- }
1422
- else {
1423
- this.groupPermission.CompanyUniqueId = companyUniqueId;
1424
- }
1425
- }
1426
-
1427
- this.companyListData = this.companyList;
1428
- this.getCompanyMenuList();
1429
- break;
1430
- }
1431
- }
1432
- }
1433
-
1434
- // insert Audit Log for view and add
1435
- private insertAuditLog(auditType: string) {
1436
- this.auditLogInsertModel = new AuditLogInsertModel();
1437
- this.auditLogInsertModel.Menu = this.common.getMenuId(Constants.USER_GROUP_PERMISSION_MENU);
1438
- this.auditLogInsertModel.Action = this.common.getAuditTypeId(auditType);
1439
- if (auditType == Constants.EDIT_AUDIT_TYPE) {
1440
- // description template: <Field Name 1> <before value> to <after value>
1441
- this.auditLogInsertModel.Description = `${this.groupPermission.UserGroupName}`;
1442
- this.auditLogInsertModel.Description += this.getEditAuditDescription(this.actualObject, this.groupPermission);
1443
- }
1444
- else {
1445
- // description template: <Group Name>
1446
- this.auditLogInsertModel.Description = this.groupPermission.UserGroupName;
1447
- }
1448
- this.common.insertAuditLog(this.auditLogInsertModel);
1449
- }
1450
-
1451
- // on Company change get companyID
1452
- private onCompanychange() {
1453
- let selectedCompanyID = this.groupPermission.CompanyUniqueId;
1454
- this.isCurrentUserGroup = this.groupPermission.CompanyUniqueId == this.common.getCompanyId();
1455
- let company = this.companyList.filter((comp: any) => {
1456
- return comp.companyUniqueId == selectedCompanyID;
1457
- });
1458
-
1459
- if (company.length > 0) {
1460
- let companyId: string = company[0].companyId;
1461
- this.groupPermission.CompanyId = companyId;
1462
- if (companyId === Constants.COMPANY_ID_2C2P) {
1463
- this.ddlSelected2c2pCompany = true;
1464
- }
1465
- else {
1466
- this.ddlSelected2c2pCompany = false;
1467
- this.groupPermission.Company = new Company();
1468
- this.groupPermission.SystemManagement = new SystemManagement();
1469
- }
1470
- }
1471
- this.groupPermission.resetPermissions();
1472
- this.getCompanyMenuList();
1473
- }
1474
-
1475
- private getCompanyMenuList() {
1476
- if (this.groupPermission.CompanyUniqueId > 0) {
1477
- if (this.common.getCompanyUniqueId() == this.groupPermission.CompanyUniqueId) {
1478
- this.ddlSelectedMenuSetup = this.common.getMenuSetup();
1479
-
1480
- this.initializeTreeView();
1481
- this.createTreeData(this.firstTreeDataSet);
1482
- this.createTreeData(this.secondTreeDataSet);
1483
- this.setInitialActionNodes();
1484
- }
1485
- else {
1486
- let url = Constants.COMPANY_SETTING_MENU_SETUP_API + "/" + this.groupPermission.CompanyUniqueId;
1487
- this.sharedService.get(url).subscribe((data: any) => {
1488
- let result = data ? data : null;
1489
- if (result && result.responseCode === Constants.SUCCESS_CODE) {
1490
-
1491
- this.ddlSelectedMenuSetup.CustomerManagement = result.CustomerManagement;
1492
- this.ddlSelectedMenuSetup.MerchantManagement = result.MerchantManagement;
1493
- this.ddlSelectedMenuSetup.Notification = result.Notification;
1494
- this.ddlSelectedMenuSetup.MisReport = result.MisReport;
1495
- this.ddlSelectedMenuSetup.SystemManagement = result.SystemManagement;
1496
- this.ddlSelectedMenuSetup.TransactionHistory = result.TransactionHistory;
1497
- this.ddlSelectedMenuSetup.UserManagement = result.UserManagement;
1498
- this.ddlSelectedMenuSetup.CompanySetting = result.CompanySetting;
1499
- this.ddlSelectedMenuSetup.BulkTransfer = result.BulkTransfer;
1500
-
1501
- this.initializeTreeView();
1502
- this.createTreeData(this.firstTreeDataSet);
1503
- this.createTreeData(this.secondTreeDataSet);
1504
-
1505
- this.setInitialActionNodes();
1506
- }
1507
- else {
1508
- this.alert.error(result.resDescriptionEN);
1509
- }
1510
- }, (error: any) => {
1511
- this.alert.error(error);
1512
- });
1513
- }
1514
- }
1515
- else {
1516
- this.initializeTreeView();
1517
- this.checkedKeys = [];
1518
- }
1519
- }
1520
-
1521
- private setInitialActionNodes() {
1522
- if (this.isReadonly) {
1523
- this.initializeTreeView();
1524
- this.setReadOnly(this.firstTreeDataSet);
1525
- this.setReadonlyHeads(this.firstTreeDataSet);
1526
- this.setReadOnly(this.secondTreeDataSet);
1527
- this.setReadonlyHeads(this.secondTreeDataSet);
1528
- }
1529
- else {
1530
- this.initializeTreeView();
1531
- this.resetReadOnly(this.firstTreeDataSet);
1532
- this.resetReadOnly(this.secondTreeDataSet);
1533
- }
1534
- this.setSelectAll();
1535
- }
1536
-
1537
- public getEditAuditDescription(acutalObject: any, updatedObject: any, objectName?: string): any {
1538
- let keys = acutalObject ? Object.keys(acutalObject) : null;
1539
- let description = Constants.STRING_EMPTY;
1540
- if (keys) {
1541
- for (let i = 0; i < keys.length; i++) {
1542
- let fieldName = keys[i];
1543
- let beforeValue = acutalObject[fieldName];
1544
- let afterValue = updatedObject[fieldName];
1545
- if (beforeValue && afterValue && typeof beforeValue == Constants.OBJECT && typeof beforeValue == Constants.OBJECT) {
1546
- description += this.getEditAuditDescription(beforeValue, afterValue, fieldName);
1547
- }
1548
- else {
1549
- if (beforeValue != afterValue && fieldName != Constants.FIELD_SELECT_ALL && fieldName != Constants.FIELD_MERCHANT_NAME && fieldName != Constants.FIELD_MERCHANT_UNIQUE_ID) {
1550
-
1551
- if (!(fieldName == 'UserGroupName' || fieldName == 'GroupTypeId')) {
1552
- beforeValue = (beforeValue == "Y") ? Constants.CHECKED_STATUS : Constants.UNCHECKED_STATUS;
1553
- afterValue = (afterValue == "Y") ? Constants.CHECKED_STATUS : Constants.UNCHECKED_STATUS;
1554
- }
1555
-
1556
- if (fieldName == 'GroupTypeId') {
1557
- beforeValue = this.common.getGroupTypeDescription(beforeValue);
1558
- afterValue = this.common.getGroupTypeDescription(afterValue);
1559
- }
1560
- if (objectName == Constants.COMPANY_FIELD)
1561
- objectName = Constants.COMPANY_AUDIT_LABEL;
1562
-
1563
- description += objectName ? `\n${objectName.replace('WalletTransaction', 'CustomerTransaction').replace(/([A-Z])/g, ' $1').trim()} ${fieldName.replace(/([A-Z])/g, ' $1').trim()}: ${beforeValue} to ${afterValue}` :
1564
- `\n${fieldName.replace(/([A-Z])/g, ' $1').trim()}: ${beforeValue} to ${afterValue}`;
1565
- }
1566
- }
1567
- }
1568
- }
1569
- return description;
1570
- }
1571
-
1572
- private checkUserPermission(userModule: string, subModule: string) {
1573
- if (this.ddlSelected2c2pCompany) {
1574
- return true;
1575
- }
1576
-
1577
- let userRights = this.common.getUserRights(userModule, subModule);
1578
- return userRights;
1579
- }
1580
-
1581
- private checkUserPermissionForManualPosting(userModule: string, subModule: string, action: string) {
1582
- if (this.ddlSelected2c2pCompany) {
1583
- return true;
1584
- }
1585
-
1586
- let userRights = this.common.getManualPostingUserRights(userModule, subModule, action);
1587
- return userRights;
1588
- }
1589
-
1590
- private checkUserPermissionforChild(userModule: string) {
1591
- if (this.ddlSelected2c2pCompany) {
1592
- return true;
1593
- }
1594
-
1595
- let currentUserGroup = this.common.getCurrentUserGroup();
1596
- if (currentUserGroup) {
1597
- let currentModule = currentUserGroup[userModule];
1598
- if (currentModule) {
1599
- let keys = Object.keys(currentModule);
1600
- for (let i = 0; i < keys.length; i++) {
1601
- let key = keys[i];
1602
- if (currentModule[key] === 'Y') {
1603
- return true;
1604
- }
1605
- }
1606
- }
1607
-
1608
- return false;
1609
- }
1610
- return false;
1611
- }
1612
-
1613
- private async handleCheckChange(checkEvent: any) {
1614
- await this.handleCheckUncheck(checkEvent);
1615
- this.setSelectAll();
1616
- }
1617
-
1618
- private handleCheckUncheck(checkEvent: any) {
1619
- // Get the childrens list with for checked checkbox.
1620
- let checkedChildren: any;
1621
-
1622
- if (checkEvent && checkEvent.parent && checkEvent.parent.children) {
1623
-
1624
- if (checkEvent.item.dataItem.text === this.topupWithdraw) {
1625
- checkedChildren = checkEvent.parent.parent.children;
1626
- }
1627
- else {
1628
- checkedChildren = checkEvent.parent.children;
1629
- }
1630
-
1631
- if (checkedChildren && checkedChildren.length > 0) {
1632
- // Get the data for View checkbox
1633
- let viewNode = checkedChildren.filter((element: any) => {
1634
- return element.dataItem.text == Constants.VIEW_ACTION;
1635
- });
1636
-
1637
- if (viewNode && viewNode.length > 0) {
1638
- // If selected node is "view" and
1639
- if (checkEvent.item.dataItem.text == Constants.VIEW_ACTION) {
1640
- // if it's already checked then uncheck other
1641
- if (this.checkedKeys.indexOf(viewNode[0].dataItem.permissionText) > -1) {
1642
- checkedChildren.forEach((element: any, index: number) => {
1643
- let indexOfElement = this.checkedKeys.indexOf(element.dataItem.permissionText);
1644
- if (indexOfElement > -1 && element.dataItem.isEnabled && element.dataItem.text != Constants.VIEW_ACTION) {
1645
- this.checkedKeys.splice(indexOfElement, 1);
1646
- this.isSelectAll = false;
1647
- }
1648
- });
1649
-
1650
- if (checkEvent.item.dataItem.permissionText === 'CustomerManagement_ViewCustomer') {
1651
- if (this.checkedKeys.indexOf('CustomerManagement_TopupWithdraw') > -1) {
1652
- this.checkedKeys.splice(this.checkedKeys.indexOf('CustomerManagement_TopupWithdraw'), 1);
1653
- }
1654
- }
1655
- }
1656
- }
1657
-
1658
- // When we click on permission checkbox other than view (checkEvent: other than view)
1659
- // If view is enabled & not checked & current checked element(other than view) is not checked then push view element
1660
- // ViewNode[0] : view node
1661
- else if (viewNode[0].dataItem.isEnabled && this.checkedKeys.indexOf(checkEvent.item.dataItem.permissionText) < 0) {
1662
- if (this.checkedKeys.indexOf(viewNode[0].dataItem.permissionText) == -1) {
1663
- this.checkedKeys.push(viewNode[0].dataItem.permissionText);
1664
- }
1665
- }
1666
- }
1667
- }
1668
-
1669
- let headNode = checkEvent.parent && checkEvent.parent.parent && checkEvent.parent.parent.item;
1670
- if (headNode && this.isChecked(headNode.dataItem.permissionText)) {
1671
- let index = this.checkedKeys.indexOf(headNode.dataItem.permissionText);
1672
- this.checkedKeys.splice(index, 1);
1673
- }
1674
- }
1675
-
1676
- if (this.checkedKeys.indexOf(checkEvent.item.dataItem.permissionText) > -1) {
1677
- this.isSelectAll = false;
1678
- }
1679
- }
1680
-
1681
- private toggleSelectAll(checkEvent: any) {
1682
- // Toggle for left tree view
1683
- this.checkUncheckAll(this.firstTreeDataSet, checkEvent.srcElement.checked);
1684
-
1685
- // Toggle for right tree view
1686
- this.checkUncheckAll(this.secondTreeDataSet, checkEvent.srcElement.checked);
1687
- }
1688
-
1689
- // Function to check/ uncheck all nodes
1690
- private checkUncheckAll(model: any[], isChecked: boolean) {
1691
- for (let index = 0; index < model.length; index++) {
1692
- if (this.groupPermission.CompanyUniqueId == undefined && model[index].isEnabled) {
1693
- if (isChecked) {
1694
- if (this.checkedKeys.indexOf(model[index].permissionText) == -1) {
1695
- this.checkedKeys.push(model[index].permissionText);
1696
- }
1697
- }
1698
- else {
1699
- let checkedIndex = this.checkedKeys.indexOf(model[index].permissionText);
1700
- if (checkedIndex > -1) {
1701
- this.checkedKeys.splice(checkedIndex, 1);
1702
- }
1703
- }
1704
- }
1705
- else if (!model[index].hide && model[index].isEnabled) {
1706
- if (isChecked) {
1707
- if (this.checkedKeys.indexOf(model[index].permissionText) == -1) {
1708
- this.checkedKeys.push(model[index].permissionText);
1709
- }
1710
- }
1711
- else {
1712
- let checkedIndex = this.checkedKeys.indexOf(model[index].permissionText);
1713
- if (checkedIndex > -1) {
1714
- this.checkedKeys.splice(checkedIndex, 1);
1715
- }
1716
- }
1717
- }
1718
- //If it's object then toggle for it's item
1719
- if (model && model[index].items) {
1720
- this.checkUncheckAll(model[index].items, isChecked);
1721
- }
1722
- }
1723
- }
1724
-
1725
- private setSelectAll() {
1726
- let headCount: number = 0;
1727
- let headCheckCount: number = 0;
1728
- this.firstTreeDataSet.forEach((element: any) => {
1729
- if ((element.type == Constants.HEAD || element.permissionText == Constants.COMPANY_SETTING_TEXT
1730
- || element.permissionText == Constants.OTHERS_TEXT || element.permissionText == Constants.BULKACTION_TEXT)
1731
- && (!element.hide || this.groupPermission.CompanyUniqueId == undefined))
1732
- headCount++;
1733
-
1734
- if ((element.type == Constants.HEAD || element.permissionText == Constants.COMPANY_SETTING_TEXT
1735
- || element.permissionText == Constants.OTHERS_TEXT || element.permissionText == Constants.BULKACTION_TEXT) &&
1736
- this.isChecked(element.permissionText))
1737
- headCheckCount++;
1738
- });
1739
-
1740
- this.secondTreeDataSet.forEach((element: any) => {
1741
- if (element.type == Constants.HEAD && (!element.hide || this.groupPermission.CompanyUniqueId == undefined))
1742
- headCount++;
1743
-
1744
- if (element.type == Constants.HEAD && this.isChecked(element.permissionText))
1745
- headCheckCount++;
1746
- })
1747
-
1748
- this.isSelectAll = headCount === headCheckCount;
1749
- }
1750
-
1751
- // Function to check a node is checked or not.
1752
- private isChecked(permissionText: string) {
1753
- return this.checkedKeys.indexOf(permissionText) > -1
1754
- }
1755
-
1756
- private setUserPermissions() {
1757
- this.apiPermissionModel = new UserGroupPermissionModel();
1758
- let keys = this.apiPermissionModel ? Object.keys(this.apiPermissionModel) : null;
1759
- this.apiPermissionModel.SelectAll = this.isSelectAll ? Constants.YES : Constants.NO;
1760
-
1761
- this.checkedKeys.forEach((element: any) => {
1762
- let menuAndSubmenu = element && element.split('_', 2);
1763
- if (menuAndSubmenu && menuAndSubmenu.length >= 2) {
1764
- if (this.checkedKeys.indexOf(`${menuAndSubmenu[0]}_${Constants.VIEW_ACTION}`) > -1 ||
1765
- this.checkedKeys.indexOf(`${menuAndSubmenu[0]}_${Constants.SETTING_ACTION}`) > -1 ||
1766
- this.checkedKeys.indexOf(`${menuAndSubmenu[0]}_${Constants.IDNUMBER_ACTION}`) > -1 ||
1767
- this.checkedKeys.indexOf(`${menuAndSubmenu[0]}_${Constants.FULLPAN_ACTION}`) > -1 ||
1768
- this.checkedKeys.indexOf(`${menuAndSubmenu[0]}_${Constants.VIEW_CUSTOMER_ACTION}`) > -1) {
1769
-
1770
- if ((menuAndSubmenu[0] === 'CustomerManagement') &&
1771
- (menuAndSubmenu[1] === Constants.TOPUP_WITHDRAW || menuAndSubmenu[1] === Constants.DEBIT_CREDIT_ADJUSTMENT)) {
1772
- if (menuAndSubmenu[0] === 'CustomerManagement' && menuAndSubmenu[1] === Constants.TOPUP_WITHDRAW) {
1773
- this.walletTopupWithdrawChecked = true;
1774
- }
1775
- else if (menuAndSubmenu[0] === 'CustomerManagement' && menuAndSubmenu[1] === Constants.DEBIT_CREDIT_ADJUSTMENT) {
1776
- this.walletDebitCreditChecked = true;
1777
- }
1778
- }
1779
- else {
1780
- this.apiPermissionModel[menuAndSubmenu[0]][menuAndSubmenu[1]] = Constants.YES;
1781
- }
1782
- }
1783
- else {
1784
- if ((menuAndSubmenu[0] === 'CustomerManagement') &&
1785
- (menuAndSubmenu[1] === Constants.TOPUP_WITHDRAW || menuAndSubmenu[1] === Constants.DEBIT_CREDIT_ADJUSTMENT)) {
1786
- if (menuAndSubmenu[0] === 'CustomerManagement' && menuAndSubmenu[1] === Constants.TOPUP_WITHDRAW) {
1787
- this.walletTopupWithdrawChecked = false;
1788
- }
1789
- else if (menuAndSubmenu[0] === 'CustomerManagement' && menuAndSubmenu[1] === Constants.DEBIT_CREDIT_ADJUSTMENT) {
1790
- this.walletDebitCreditChecked = false;
1791
- }
1792
- }
1793
- else {
1794
- this.apiPermissionModel[menuAndSubmenu[0]][menuAndSubmenu[1]] = Constants.NO;
1795
- }
1796
- }
1797
- }
1798
- });
1799
-
1800
- if (this.isReadonly) {
1801
- this.doManagePermissionForReadonly(this.apiPermissionModel);
1802
- }
1803
-
1804
- this.apiPermissionModel.groupId = this.groupPermission.groupId;
1805
- this.apiPermissionModel.GroupTypeId = this.groupPermission.GroupTypeId;
1806
- this.apiPermissionModel.UserGroupName = this.groupPermission.UserGroupName;
1807
- this.apiPermissionModel.CompanyName = this.groupPermission.CompanyName;
1808
- this.apiPermissionModel.CompanyId = this.groupPermission.CompanyId;
1809
- this.apiPermissionModel.CompanyUniqueId = this.groupPermission.CompanyUniqueId;
1810
- this.apiPermissionModel.UserUniqueId = this.groupPermission.UserUniqueId;
1811
- this.apiPermissionModel.Id = this.groupPermission.Id;
1812
-
1813
- this.groupPermission = JSON.parse(JSON.stringify(this.apiPermissionModel));
1814
- }
1815
-
1816
- private companySearchFilter(value: any) {
1817
- this.companyListData = this.companyList.filter((comp: any) => comp.companyName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
1818
- }
1819
- }