b2adminui 1.0.0

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/Dockerfile +45 -0
  2. package/app-config-prod.json +6 -0
  3. package/app-config.json +10 -0
  4. package/b2@1.0.0 +0 -0
  5. package/bs-config.json +8 -0
  6. package/config/helpers.js +10 -0
  7. package/config/karma-test-shim.js +21 -0
  8. package/config/karma.conf.js +37 -0
  9. package/config/webpack.common.js +96 -0
  10. package/config/webpack.dev.js +24 -0
  11. package/config/webpack.eks.js +72 -0
  12. package/config/webpack.prod.js +72 -0
  13. package/config/webpack.test.js +53 -0
  14. package/default.nginx.config +60 -0
  15. package/docker-entrypoint.sh +6 -0
  16. package/e2e-spec.ts +21 -0
  17. package/favicon.ico +0 -0
  18. package/karma.webpack.conf.js +1 -0
  19. package/npm +0 -0
  20. package/package.json +144 -0
  21. package/rimraf +0 -0
  22. package/src/app/app-config.ts +21 -0
  23. package/src/app/app-routing.module.ts +165 -0
  24. package/src/app/app.component.ts +30 -0
  25. package/src/app/app.module.ts +72 -0
  26. package/src/app/auth/auth.guard.ts +192 -0
  27. package/src/app/customer-management/customer-management.module.ts +52 -0
  28. package/src/app/customer-management/customer-personal-details/components/customer-personal-details.component.ts +766 -0
  29. package/src/app/customer-management/customer-personal-details/customer-personal-details.component.css +4 -0
  30. package/src/app/customer-management/customer-personal-details/customer-personal-details.component.html +812 -0
  31. package/src/app/customer-management/customer-personal-details/models/companyrisksetting.model.ts +65 -0
  32. package/src/app/customer-management/customer-profile-history-list/components/customer-profile-history-list.component.ts +149 -0
  33. package/src/app/customer-management/customer-profile-history-list/customer-profile-history-list.component.html +104 -0
  34. package/src/app/customer-management/customer-profile-history-list/models/customer-profile-history-list.model.ts +33 -0
  35. package/src/app/customer-management/customer-profile-history-list/models/index.ts +1 -0
  36. package/src/app/customer-management/customer-registration/components/customer-registration.component.ts +1567 -0
  37. package/src/app/customer-management/customer-registration/customer-registration.component.css +6 -0
  38. package/src/app/customer-management/customer-registration/customer-registration.component.html +1140 -0
  39. package/src/app/customer-management/customer-registration/models/approve-customer.model.ts +5 -0
  40. package/src/app/customer-management/customer-registration/models/index.ts +1 -0
  41. package/src/app/customer-management/customer-registration/models/wallet-registration.model.ts +191 -0
  42. package/src/app/customer-management/customer-registration-list/components/customer-registration-list.component.ts +444 -0
  43. package/src/app/customer-management/customer-registration-list/customer-registration-list.component.html +350 -0
  44. package/src/app/customer-management/customer-registration-list/models/index.ts +2 -0
  45. package/src/app/customer-management/customer-registration-list/models/wallet-list.model.ts +41 -0
  46. package/src/app/customer-management/customer-registration-list/models/wallet.model.ts +13 -0
  47. package/src/app/customer-management/manual-topup/components/manual-topup.component.ts +299 -0
  48. package/src/app/customer-management/manual-topup/manual-topup.component.html +173 -0
  49. package/src/app/customer-management/manual-topup/models/index.ts +1 -0
  50. package/src/app/customer-management/manual-topup/models/manual-topup.model.ts +17 -0
  51. package/src/app/customer-management/wallet-balance-history/components/wallet-balance-history.component.ts +243 -0
  52. package/src/app/customer-management/wallet-balance-history/models/balance-history-list.model.ts +25 -0
  53. package/src/app/customer-management/wallet-balance-history/models/balance-history.model.ts +13 -0
  54. package/src/app/customer-management/wallet-balance-history/models/index.ts +3 -0
  55. package/src/app/customer-management/wallet-balance-history/models/wallet.model.ts +13 -0
  56. package/src/app/customer-management/wallet-balance-history/wallet-balance-history.component.html +182 -0
  57. package/src/app/customer-management/wallet-history/components/wallet-history.component.ts +239 -0
  58. package/src/app/customer-management/wallet-history/models/index.ts +2 -0
  59. package/src/app/customer-management/wallet-history/models/wallet-history-list.model.ts +11 -0
  60. package/src/app/customer-management/wallet-history/models/wallet-history.model.ts +10 -0
  61. package/src/app/customer-management/wallet-history/wallet-history.component.html +85 -0
  62. package/src/app/external-change-password/components/external-change-password.component.ts +71 -0
  63. package/src/app/external-change-password/external-change-password.component.html +57 -0
  64. package/src/app/external-change-password/models/external-change-password.model.ts +6 -0
  65. package/src/app/fee-management/company/company.component.html +491 -0
  66. package/src/app/fee-management/company/components/company.component.ts +472 -0
  67. package/src/app/fee-management/company/models/company.model.ts +55 -0
  68. package/src/app/fee-management/company/models/index.ts +1 -0
  69. package/src/app/fee-management/company-wallet-profile/company-wallet-profile.component.html +161 -0
  70. package/src/app/fee-management/company-wallet-profile/components/company-wallet-profile.component.ts +194 -0
  71. package/src/app/fee-management/fee-management.module.ts +51 -0
  72. package/src/app/fee-management/menu-setup/models/menu-setup.model.ts +75 -0
  73. package/src/app/fee-management/wallet-fee-setting/components/wallet-fee-setting.component.ts +337 -0
  74. package/src/app/fee-management/wallet-fee-setting/models/index.ts +7 -0
  75. package/src/app/fee-management/wallet-fee-setting/models/transfer-fee.model.ts +32 -0
  76. package/src/app/fee-management/wallet-fee-setting/models/verify-risk-level.model.ts +7 -0
  77. package/src/app/fee-management/wallet-fee-setting/models/wallet-fee-setting.model.ts +32 -0
  78. package/src/app/fee-management/wallet-fee-setting/models/wallet-setting.model.ts +17 -0
  79. package/src/app/fee-management/wallet-fee-setting/models/wallet.model.ts +28 -0
  80. package/src/app/fee-management/wallet-fee-setting/wallet-fee-setting.component.html +1226 -0
  81. package/src/app/fee-management/wallet-profile-limit-setting/components/wallet-profile-limit-setting.component.ts +284 -0
  82. package/src/app/fee-management/wallet-profile-limit-setting/models/index.ts +1 -0
  83. package/src/app/fee-management/wallet-profile-limit-setting/models/wallet-profile-limit-setting.model.ts +79 -0
  84. package/src/app/fee-management/wallet-profile-limit-setting/wallet-profile-limit-setting.component.html +1285 -0
  85. package/src/app/fee-management/wallet-profile-setting-list/components/wallet-profile-setting-list.component.ts +350 -0
  86. package/src/app/fee-management/wallet-profile-setting-list/models/index.ts +2 -0
  87. package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting-list.model.ts +36 -0
  88. package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting.model.ts +12 -0
  89. package/src/app/fee-management/wallet-profile-setting-list/wallet-profile-setting-list.component.html +220 -0
  90. package/src/app/fee-management/wallet-topup/components/wallet-topup.component.ts +209 -0
  91. package/src/app/fee-management/wallet-topup/models/index.ts +3 -0
  92. package/src/app/fee-management/wallet-topup/models/wallet-topup.model.ts +11 -0
  93. package/src/app/fee-management/wallet-topup/wallet-topup.component.html +97 -0
  94. package/src/app/forgot-password/components/forgot-password.component.ts +87 -0
  95. package/src/app/forgot-password/forgot-password.component.html +40 -0
  96. package/src/app/forgot-password/models/forgot-password.model.ts +5 -0
  97. package/src/app/forgot-password/models/index.ts +2 -0
  98. package/src/app/login/components/login.component.ts +199 -0
  99. package/src/app/login/login.component.html +49 -0
  100. package/src/app/login/models/common.model.ts +21 -0
  101. package/src/app/login/models/login.model.ts +5 -0
  102. package/src/app/models/audit-log-insert.model.ts +11 -0
  103. package/src/app/models/common.model.ts +56 -0
  104. package/src/app/models/index.ts +4 -0
  105. package/src/app/models/navigation-data.model.ts +24 -0
  106. package/src/app/models/page-info-model.ts +4 -0
  107. package/src/app/models/response-model.ts +5 -0
  108. package/src/app/models/search-model.ts +21 -0
  109. package/src/app/navbar/components/navbar.component.ts +288 -0
  110. package/src/app/navbar/navbar.component.html +200 -0
  111. package/src/app/profile-setting/change-password/change-password.component.html +85 -0
  112. package/src/app/profile-setting/change-password/components/change-password.component.ts +76 -0
  113. package/src/app/profile-setting/change-password/models/change-password.model.ts +5 -0
  114. package/src/app/profile-setting/change-password/models/index.ts +1 -0
  115. package/src/app/profile-setting/profile-setting/components/profile-setting.component.ts +234 -0
  116. package/src/app/profile-setting/profile-setting/models/profile-setting.model.ts +21 -0
  117. package/src/app/profile-setting/profile-setting/profile-setting.component.html +228 -0
  118. package/src/app/profile-setting/profile-setting.module.ts +22 -0
  119. package/src/app/shared/alerts/alertOptions.ts +14 -0
  120. package/src/app/shared/alerts/alerts.ts +57 -0
  121. package/src/app/shared/common/common.ts +1342 -0
  122. package/src/app/shared/constants/constants.ts +550 -0
  123. package/src/app/shared/interceptor/https-interceptor.ts +69 -0
  124. package/src/app/shared/service/shared.service.ts +287 -0
  125. package/src/app/shared/source-of-fund/source-of-fund.ts +4 -0
  126. package/src/app/shared/transaction/transaction-type-status.ts +32 -0
  127. package/src/app/transaction-history/transaction-history.module.ts +83 -0
  128. package/src/app/transaction-history/wallet-transaction-list/components/wallet-transaction-list.component.ts +500 -0
  129. package/src/app/transaction-history/wallet-transaction-list/models/wallet-transaction-list.model.ts +75 -0
  130. package/src/app/transaction-history/wallet-transaction-list/wallet-transaction-list.component.html +530 -0
  131. package/src/app/transaction-history/wallet-transaction-list-details/components/wallet-transaction-list-details.component.ts +154 -0
  132. package/src/app/transaction-history/wallet-transaction-list-details/models/index.ts +3 -0
  133. package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-list-details.model.ts +39 -0
  134. package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-refund.model.ts +5 -0
  135. package/src/app/transaction-history/wallet-transaction-list-details/wallet-transaction-list-details.component.html +452 -0
  136. package/src/app/user-management/audit-log-list/audit-log-list.component.html +198 -0
  137. package/src/app/user-management/audit-log-list/components/audit-log-list.component.ts +415 -0
  138. package/src/app/user-management/audit-log-list/models/audit-log-list.model.ts +38 -0
  139. package/src/app/user-management/audit-log-list/models/audit-log.model.ts +11 -0
  140. package/src/app/user-management/audit-log-list/models/index.ts +2 -0
  141. package/src/app/user-management/system-user/components/system-user.component.ts +466 -0
  142. package/src/app/user-management/system-user/models/system-user.model.ts +23 -0
  143. package/src/app/user-management/system-user/system-user.component.html +349 -0
  144. package/src/app/user-management/system-user-list/components/system-user-list.component.ts +399 -0
  145. package/src/app/user-management/system-user-list/models/index.ts +2 -0
  146. package/src/app/user-management/system-user-list/models/system-user-list.model.ts +40 -0
  147. package/src/app/user-management/system-user-list/models/system-user.model.ts +11 -0
  148. package/src/app/user-management/system-user-list/system-user-list.component.html +266 -0
  149. package/src/app/user-management/user-group-permission/components/user-group-permission.component.ts +1819 -0
  150. package/src/app/user-management/user-group-permission/models/user-group-permission.model.ts +288 -0
  151. package/src/app/user-management/user-group-permission/user-group-permission.component.html +100 -0
  152. package/src/app/user-management/user-group-permission-list/components/user-group-permission-list.component.ts +379 -0
  153. package/src/app/user-management/user-group-permission-list/models/index.ts +2 -0
  154. package/src/app/user-management/user-group-permission-list/models/user-group-permission-list.model.ts +28 -0
  155. package/src/app/user-management/user-group-permission-list/models/user-group-permission.model.ts +8 -0
  156. package/src/app/user-management/user-group-permission-list/user-group-permission-list.component.html +184 -0
  157. package/src/app/user-management/user-management.module.ts +38 -0
  158. package/src/app/validate-change-password/components/validate-change-password.component.ts +66 -0
  159. package/src/app/validate-change-password/validate-change-password.component.html +8 -0
  160. package/src/assets/css/animate.css +2848 -0
  161. package/src/assets/css/bootstrap.css +6760 -0
  162. package/src/assets/css/bootstrap.css.map +1 -0
  163. package/src/assets/css/bootstrap.min.css +6 -0
  164. package/src/assets/css/bootstrap.min.css.map +1 -0
  165. package/src/assets/css/font.css +10 -0
  166. package/src/assets/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css +251 -0
  167. package/src/assets/css/plugins/blueimp/css/blueimp-gallery-indicator.css +71 -0
  168. package/src/assets/css/plugins/blueimp/css/blueimp-gallery-video.css +87 -0
  169. package/src/assets/css/plugins/blueimp/css/blueimp-gallery.css +226 -0
  170. package/src/assets/css/plugins/blueimp/css/blueimp-gallery.min.css +1 -0
  171. package/src/assets/css/plugins/blueimp/css/demo.css +51 -0
  172. package/src/assets/css/plugins/blueimp/img/error.png +0 -0
  173. package/src/assets/css/plugins/blueimp/img/error.svg +5 -0
  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 +6 -0
  177. package/src/assets/css/plugins/blueimp/img/video-play.png +0 -0
  178. package/src/assets/css/plugins/blueimp/img/video-play.svg +5 -0
  179. package/src/assets/css/plugins/bootstrap-datepicker/bootstrap-datepicker3.min.css +9 -0
  180. package/src/assets/css/plugins/bootstrap-markdown/bootstrap-markdown.min.css +1 -0
  181. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css +1468 -0
  182. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css.map +1 -0
  183. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.min.css +9 -0
  184. package/src/assets/css/plugins/bootstrap-timepicker/bootstrap-timepicker.min.css +10 -0
  185. package/src/assets/css/plugins/bootstrapTour/bootstrap-tour.min.css +22 -0
  186. package/src/assets/css/plugins/c3/c3.min.css +1 -0
  187. package/src/assets/css/plugins/chartist/chartist.min.css +773 -0
  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 +429 -0
  191. package/src/assets/css/plugins/clockpicker/clockpicker.css +168 -0
  192. package/src/assets/css/plugins/codemirror/ambiance.css +77 -0
  193. package/src/assets/css/plugins/codemirror/codemirror.css +309 -0
  194. package/src/assets/css/plugins/colorpicker/bootstrap-colorpicker.min.css +9 -0
  195. package/src/assets/css/plugins/cropper/cropper.min.css +9 -0
  196. package/src/assets/css/plugins/dataTables/datatables.min.css +21 -0
  197. package/src/assets/css/plugins/datapicker/datepicker3.css +789 -0
  198. package/src/assets/css/plugins/datatables.net/css/jquery.dataTables.css +455 -0
  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 +335 -0
  205. package/src/assets/css/plugins/dropzone/basic.css +155 -0
  206. package/src/assets/css/plugins/dropzone/dropzone.css +410 -0
  207. package/src/assets/css/plugins/footable/fonts/footable.eot +0 -0
  208. package/src/assets/css/plugins/footable/fonts/footable.svg +78 -0
  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 +178 -0
  212. package/src/assets/css/plugins/fullcalendar/fullcalendar.css +977 -0
  213. package/src/assets/css/plugins/fullcalendar/fullcalendar.print.css +202 -0
  214. package/src/assets/css/plugins/iCheck/custom.css +59 -0
  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 +126 -0
  232. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css +89 -0
  233. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinNice.css +85 -0
  234. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinSimple.css +85 -0
  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 +7 -0
  250. package/src/assets/css/plugins/jQueryUI/jquery-ui.css +1177 -0
  251. package/src/assets/css/plugins/jasny/jasny-bootstrap.min.css +7 -0
  252. package/src/assets/css/plugins/jqGrid/ui.jqgrid.css +171 -0
  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 +1050 -0
  257. package/src/assets/css/plugins/jsTree/style.min.css +1 -0
  258. package/src/assets/css/plugins/jsTree/throbber.gif +0 -0
  259. package/src/assets/css/plugins/ladda/ladda-themeless.min.css +7 -0
  260. package/src/assets/css/plugins/ladda/ladda.min.css +9 -0
  261. package/src/assets/css/plugins/morris/morris-0.4.3.min.css +2 -0
  262. package/src/assets/css/plugins/nouslider/jquery.nouislider.css +165 -0
  263. package/src/assets/css/plugins/select2/select2.min.css +1 -0
  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 +14 -0
  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 +201 -0
  270. package/src/assets/css/plugins/slick/slick.css +119 -0
  271. package/src/assets/css/plugins/social-buttons/social-buttons.css +68 -0
  272. package/src/assets/css/plugins/steps/jquery.steps.css +380 -0
  273. package/src/assets/css/plugins/summernote/summernote-bs3.css +5970 -0
  274. package/src/assets/css/plugins/summernote/summernote.css +446 -0
  275. package/src/assets/css/plugins/sweetalert/sweetalert.css +715 -0
  276. package/src/assets/css/plugins/switchery/switchery.css +32 -0
  277. package/src/assets/css/plugins/toastr/ng2-toastr.min.css +1 -0
  278. package/src/assets/css/plugins/toastr/toastr.min.css +222 -0
  279. package/src/assets/css/plugins/touchspin/jquery.bootstrap-touchspin.min.css +10 -0
  280. package/src/assets/css/style.css +9725 -0
  281. package/src/assets/css/style.scss +1 -0
  282. package/src/assets/font-awesome/css/font-awesome.css +2337 -0
  283. package/src/assets/font-awesome/css/font-awesome.min.css +4 -0
  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 +2671 -0
  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 +34 -0
  291. package/src/assets/font-awesome/less/bordered-pulled.less +25 -0
  292. package/src/assets/font-awesome/less/core.less +12 -0
  293. package/src/assets/font-awesome/less/fixed-width.less +6 -0
  294. package/src/assets/font-awesome/less/font-awesome.less +18 -0
  295. package/src/assets/font-awesome/less/icons.less +789 -0
  296. package/src/assets/font-awesome/less/larger.less +13 -0
  297. package/src/assets/font-awesome/less/list.less +19 -0
  298. package/src/assets/font-awesome/less/mixins.less +60 -0
  299. package/src/assets/font-awesome/less/path.less +15 -0
  300. package/src/assets/font-awesome/less/rotated-flipped.less +20 -0
  301. package/src/assets/font-awesome/less/screen-reader.less +5 -0
  302. package/src/assets/font-awesome/less/stacked.less +20 -0
  303. package/src/assets/font-awesome/less/variables.less +800 -0
  304. package/src/assets/font-awesome/scss/_animated.scss +34 -0
  305. package/src/assets/font-awesome/scss/_bordered-pulled.scss +25 -0
  306. package/src/assets/font-awesome/scss/_core.scss +12 -0
  307. package/src/assets/font-awesome/scss/_fixed-width.scss +6 -0
  308. package/src/assets/font-awesome/scss/_icons.scss +789 -0
  309. package/src/assets/font-awesome/scss/_larger.scss +13 -0
  310. package/src/assets/font-awesome/scss/_list.scss +19 -0
  311. package/src/assets/font-awesome/scss/_mixins.scss +60 -0
  312. package/src/assets/font-awesome/scss/_path.scss +15 -0
  313. package/src/assets/font-awesome/scss/_rotated-flipped.scss +20 -0
  314. package/src/assets/font-awesome/scss/_screen-reader.scss +5 -0
  315. package/src/assets/font-awesome/scss/_stacked.scss +20 -0
  316. package/src/assets/font-awesome/scss/_variables.scss +800 -0
  317. package/src/assets/font-awesome/scss/font-awesome.scss +18 -0
  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 +288 -0
  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 +2363 -0
  337. package/src/assets/js/bootstrap.min.js +7 -0
  338. package/src/assets/js/demo/chartjs-demo.js +217 -0
  339. package/src/assets/js/demo/dashboard-demo.js +117 -0
  340. package/src/assets/js/demo/flot-demo.js +308 -0
  341. package/src/assets/js/demo/flot-demo2.js +377 -0
  342. package/src/assets/js/demo/morris-demo.js +89 -0
  343. package/src/assets/js/demo/peity-demo.js +33 -0
  344. package/src/assets/js/demo/rickshaw-demo.js +103 -0
  345. package/src/assets/js/demo/sparkline-demo.js +51 -0
  346. package/src/assets/js/inspinia.js +301 -0
  347. package/src/assets/js/jquery-2.1.1.js +4 -0
  348. package/src/assets/js/jquery-3.3.1.min.js +2 -0
  349. package/src/assets/js/jquery-ui-1.10.4.min.js +7 -0
  350. package/src/assets/js/jquery-ui.custom.min.js +16 -0
  351. package/src/assets/js/plugins/blueimp/jquery.blueimp-gallery.min.js +1 -0
  352. package/src/assets/js/plugins/bootstrap-datepicker/bootstrap-datepicker.min.js +9 -0
  353. package/src/assets/js/plugins/bootstrap-markdown/bootstrap-markdown.js +1386 -0
  354. package/src/assets/js/plugins/bootstrap-markdown/markdown.js +1616 -0
  355. package/src/assets/js/plugins/bootstrap-timepicker/bootstrap-timepicker.min.js +5 -0
  356. package/src/assets/js/plugins/bootstrapTour/bootstrap-tour.min.js +22 -0
  357. package/src/assets/js/plugins/c3/c3.min.js +5 -0
  358. package/src/assets/js/plugins/chartJs/Chart.min.js +14 -0
  359. package/src/assets/js/plugins/chartist/chartist.min.js +9 -0
  360. package/src/assets/js/plugins/chartist/chartist.min.js.map +1 -0
  361. package/src/assets/js/plugins/chosen/chosen.jquery.js +1211 -0
  362. package/src/assets/js/plugins/clipboard/clipboard.min.js +7 -0
  363. package/src/assets/js/plugins/clockpicker/clockpicker.js +729 -0
  364. package/src/assets/js/plugins/codemirror/codemirror.js +7830 -0
  365. package/src/assets/js/plugins/codemirror/mode/apl/apl.js +175 -0
  366. package/src/assets/js/plugins/codemirror/mode/apl/index.html +72 -0
  367. package/src/assets/js/plugins/codemirror/mode/asterisk/asterisk.js +198 -0
  368. package/src/assets/js/plugins/codemirror/mode/asterisk/index.html +154 -0
  369. package/src/assets/js/plugins/codemirror/mode/clike/clike.js +474 -0
  370. package/src/assets/js/plugins/codemirror/mode/clike/index.html +225 -0
  371. package/src/assets/js/plugins/codemirror/mode/clike/scala.html +767 -0
  372. package/src/assets/js/plugins/codemirror/mode/clojure/clojure.js +243 -0
  373. package/src/assets/js/plugins/codemirror/mode/clojure/index.html +88 -0
  374. package/src/assets/js/plugins/codemirror/mode/cobol/cobol.js +255 -0
  375. package/src/assets/js/plugins/codemirror/mode/cobol/index.html +210 -0
  376. package/src/assets/js/plugins/codemirror/mode/coffeescript/coffeescript.js +369 -0
  377. package/src/assets/js/plugins/codemirror/mode/coffeescript/index.html +740 -0
  378. package/src/assets/js/plugins/codemirror/mode/commonlisp/commonlisp.js +120 -0
  379. package/src/assets/js/plugins/codemirror/mode/commonlisp/index.html +177 -0
  380. package/src/assets/js/plugins/codemirror/mode/css/css.js +717 -0
  381. package/src/assets/js/plugins/codemirror/mode/css/index.html +70 -0
  382. package/src/assets/js/plugins/codemirror/mode/css/less.html +152 -0
  383. package/src/assets/js/plugins/codemirror/mode/css/less_test.js +51 -0
  384. package/src/assets/js/plugins/codemirror/mode/css/scss.html +157 -0
  385. package/src/assets/js/plugins/codemirror/mode/css/scss_test.js +110 -0
  386. package/src/assets/js/plugins/codemirror/mode/css/test.js +135 -0
  387. package/src/assets/js/plugins/codemirror/mode/cypher/cypher.js +146 -0
  388. package/src/assets/js/plugins/codemirror/mode/cypher/index.html +63 -0
  389. package/src/assets/js/plugins/codemirror/mode/d/d.js +218 -0
  390. package/src/assets/js/plugins/codemirror/mode/d/index.html +273 -0
  391. package/src/assets/js/plugins/codemirror/mode/diff/diff.js +47 -0
  392. package/src/assets/js/plugins/codemirror/mode/diff/index.html +117 -0
  393. package/src/assets/js/plugins/codemirror/mode/django/django.js +67 -0
  394. package/src/assets/js/plugins/codemirror/mode/django/index.html +63 -0
  395. package/src/assets/js/plugins/codemirror/mode/dtd/dtd.js +142 -0
  396. package/src/assets/js/plugins/codemirror/mode/dtd/index.html +89 -0
  397. package/src/assets/js/plugins/codemirror/mode/dylan/dylan.js +299 -0
  398. package/src/assets/js/plugins/codemirror/mode/dylan/index.html +407 -0
  399. package/src/assets/js/plugins/codemirror/mode/ecl/ecl.js +207 -0
  400. package/src/assets/js/plugins/codemirror/mode/ecl/index.html +52 -0
  401. package/src/assets/js/plugins/codemirror/mode/eiffel/eiffel.js +162 -0
  402. package/src/assets/js/plugins/codemirror/mode/eiffel/index.html +429 -0
  403. package/src/assets/js/plugins/codemirror/mode/erlang/erlang.js +622 -0
  404. package/src/assets/js/plugins/codemirror/mode/erlang/index.html +76 -0
  405. package/src/assets/js/plugins/codemirror/mode/fortran/fortran.js +188 -0
  406. package/src/assets/js/plugins/codemirror/mode/fortran/index.html +81 -0
  407. package/src/assets/js/plugins/codemirror/mode/gas/gas.js +345 -0
  408. package/src/assets/js/plugins/codemirror/mode/gas/index.html +68 -0
  409. package/src/assets/js/plugins/codemirror/mode/gfm/gfm.js +122 -0
  410. package/src/assets/js/plugins/codemirror/mode/gfm/index.html +82 -0
  411. package/src/assets/js/plugins/codemirror/mode/gfm/test.js +164 -0
  412. package/src/assets/js/plugins/codemirror/mode/gherkin/gherkin.js +178 -0
  413. package/src/assets/js/plugins/codemirror/mode/gherkin/index.html +48 -0
  414. package/src/assets/js/plugins/codemirror/mode/go/go.js +184 -0
  415. package/src/assets/js/plugins/codemirror/mode/go/index.html +85 -0
  416. package/src/assets/js/plugins/codemirror/mode/groovy/groovy.js +226 -0
  417. package/src/assets/js/plugins/codemirror/mode/groovy/index.html +84 -0
  418. package/src/assets/js/plugins/codemirror/mode/haml/haml.js +159 -0
  419. package/src/assets/js/plugins/codemirror/mode/haml/index.html +79 -0
  420. package/src/assets/js/plugins/codemirror/mode/haml/test.js +97 -0
  421. package/src/assets/js/plugins/codemirror/mode/haskell/haskell.js +267 -0
  422. package/src/assets/js/plugins/codemirror/mode/haskell/index.html +73 -0
  423. package/src/assets/js/plugins/codemirror/mode/haxe/haxe.js +518 -0
  424. package/src/assets/js/plugins/codemirror/mode/haxe/index.html +124 -0
  425. package/src/assets/js/plugins/codemirror/mode/htmlembedded/htmlembedded.js +86 -0
  426. package/src/assets/js/plugins/codemirror/mode/htmlembedded/index.html +58 -0
  427. package/src/assets/js/plugins/codemirror/mode/htmlmixed/htmlmixed.js +121 -0
  428. package/src/assets/js/plugins/codemirror/mode/htmlmixed/index.html +85 -0
  429. package/src/assets/js/plugins/codemirror/mode/http/http.js +113 -0
  430. package/src/assets/js/plugins/codemirror/mode/http/index.html +45 -0
  431. package/src/assets/js/plugins/codemirror/mode/index.html +125 -0
  432. package/src/assets/js/plugins/codemirror/mode/jade/index.html +70 -0
  433. package/src/assets/js/plugins/codemirror/mode/jade/jade.js +590 -0
  434. package/src/assets/js/plugins/codemirror/mode/javascript/index.html +114 -0
  435. package/src/assets/js/plugins/codemirror/mode/javascript/javascript.js +684 -0
  436. package/src/assets/js/plugins/codemirror/mode/javascript/json-ld.html +72 -0
  437. package/src/assets/js/plugins/codemirror/mode/javascript/test.js +194 -0
  438. package/src/assets/js/plugins/codemirror/mode/javascript/typescript.html +61 -0
  439. package/src/assets/js/plugins/codemirror/mode/jinja2/index.html +54 -0
  440. package/src/assets/js/plugins/codemirror/mode/jinja2/jinja2.js +142 -0
  441. package/src/assets/js/plugins/codemirror/mode/julia/index.html +195 -0
  442. package/src/assets/js/plugins/codemirror/mode/julia/julia.js +301 -0
  443. package/src/assets/js/plugins/codemirror/mode/kotlin/index.html +89 -0
  444. package/src/assets/js/plugins/codemirror/mode/kotlin/kotlin.js +280 -0
  445. package/src/assets/js/plugins/codemirror/mode/livescript/index.html +459 -0
  446. package/src/assets/js/plugins/codemirror/mode/livescript/livescript.js +280 -0
  447. package/src/assets/js/plugins/codemirror/mode/lua/index.html +85 -0
  448. package/src/assets/js/plugins/codemirror/mode/lua/lua.js +159 -0
  449. package/src/assets/js/plugins/codemirror/mode/markdown/index.html +359 -0
  450. package/src/assets/js/plugins/codemirror/mode/markdown/markdown.js +758 -0
  451. package/src/assets/js/plugins/codemirror/mode/markdown/test.js +754 -0
  452. package/src/assets/js/plugins/codemirror/mode/meta.js +144 -0
  453. package/src/assets/js/plugins/codemirror/mode/mirc/index.html +160 -0
  454. package/src/assets/js/plugins/codemirror/mode/mirc/mirc.js +193 -0
  455. package/src/assets/js/plugins/codemirror/mode/mllike/index.html +179 -0
  456. package/src/assets/js/plugins/codemirror/mode/mllike/mllike.js +205 -0
  457. package/src/assets/js/plugins/codemirror/mode/modelica/index.html +67 -0
  458. package/src/assets/js/plugins/codemirror/mode/modelica/modelica.js +245 -0
  459. package/src/assets/js/plugins/codemirror/mode/nginx/index.html +181 -0
  460. package/src/assets/js/plugins/codemirror/mode/nginx/nginx.js +178 -0
  461. package/src/assets/js/plugins/codemirror/mode/ntriples/index.html +45 -0
  462. package/src/assets/js/plugins/codemirror/mode/ntriples/ntriples.js +186 -0
  463. package/src/assets/js/plugins/codemirror/mode/octave/index.html +83 -0
  464. package/src/assets/js/plugins/codemirror/mode/octave/octave.js +135 -0
  465. package/src/assets/js/plugins/codemirror/mode/pascal/index.html +61 -0
  466. package/src/assets/js/plugins/codemirror/mode/pascal/pascal.js +109 -0
  467. package/src/assets/js/plugins/codemirror/mode/pegjs/index.html +66 -0
  468. package/src/assets/js/plugins/codemirror/mode/pegjs/pegjs.js +114 -0
  469. package/src/assets/js/plugins/codemirror/mode/perl/index.html +75 -0
  470. package/src/assets/js/plugins/codemirror/mode/perl/perl.js +832 -0
  471. package/src/assets/js/plugins/codemirror/mode/php/index.html +64 -0
  472. package/src/assets/js/plugins/codemirror/mode/php/php.js +226 -0
  473. package/src/assets/js/plugins/codemirror/mode/php/test.js +154 -0
  474. package/src/assets/js/plugins/codemirror/mode/pig/index.html +55 -0
  475. package/src/assets/js/plugins/codemirror/mode/pig/pig.js +188 -0
  476. package/src/assets/js/plugins/codemirror/mode/properties/index.html +53 -0
  477. package/src/assets/js/plugins/codemirror/mode/properties/properties.js +78 -0
  478. package/src/assets/js/plugins/codemirror/mode/puppet/index.html +121 -0
  479. package/src/assets/js/plugins/codemirror/mode/puppet/puppet.js +220 -0
  480. package/src/assets/js/plugins/codemirror/mode/python/index.html +198 -0
  481. package/src/assets/js/plugins/codemirror/mode/python/python.js +359 -0
  482. package/src/assets/js/plugins/codemirror/mode/q/index.html +144 -0
  483. package/src/assets/js/plugins/codemirror/mode/q/q.js +139 -0
  484. package/src/assets/js/plugins/codemirror/mode/r/index.html +85 -0
  485. package/src/assets/js/plugins/codemirror/mode/r/r.js +162 -0
  486. package/src/assets/js/plugins/codemirror/mode/rpm/changes/index.html +66 -0
  487. package/src/assets/js/plugins/codemirror/mode/rpm/index.html +149 -0
  488. package/src/assets/js/plugins/codemirror/mode/rpm/rpm.js +101 -0
  489. package/src/assets/js/plugins/codemirror/mode/rst/index.html +535 -0
  490. package/src/assets/js/plugins/codemirror/mode/rst/rst.js +557 -0
  491. package/src/assets/js/plugins/codemirror/mode/ruby/index.html +184 -0
  492. package/src/assets/js/plugins/codemirror/mode/ruby/ruby.js +285 -0
  493. package/src/assets/js/plugins/codemirror/mode/ruby/test.js +14 -0
  494. package/src/assets/js/plugins/codemirror/mode/rust/index.html +60 -0
  495. package/src/assets/js/plugins/codemirror/mode/rust/rust.js +451 -0
  496. package/src/assets/js/plugins/codemirror/mode/sass/index.html +66 -0
  497. package/src/assets/js/plugins/codemirror/mode/sass/sass.js +327 -0
  498. package/src/assets/js/plugins/codemirror/mode/scheme/index.html +77 -0
  499. package/src/assets/js/plugins/codemirror/mode/scheme/scheme.js +248 -0
  500. package/src/assets/js/plugins/codemirror/mode/shell/index.html +66 -0
  501. package/src/assets/js/plugins/codemirror/mode/shell/shell.js +138 -0
  502. package/src/assets/js/plugins/codemirror/mode/shell/test.js +58 -0
  503. package/src/assets/js/plugins/codemirror/mode/sieve/index.html +93 -0
  504. package/src/assets/js/plugins/codemirror/mode/sieve/sieve.js +193 -0
  505. package/src/assets/js/plugins/codemirror/mode/slim/index.html +96 -0
  506. package/src/assets/js/plugins/codemirror/mode/slim/slim.js +575 -0
  507. package/src/assets/js/plugins/codemirror/mode/slim/test.js +96 -0
  508. package/src/assets/js/plugins/codemirror/mode/smalltalk/index.html +68 -0
  509. package/src/assets/js/plugins/codemirror/mode/smalltalk/smalltalk.js +168 -0
  510. package/src/assets/js/plugins/codemirror/mode/smarty/index.html +136 -0
  511. package/src/assets/js/plugins/codemirror/mode/smarty/smarty.js +221 -0
  512. package/src/assets/js/plugins/codemirror/mode/smartymixed/index.html +114 -0
  513. package/src/assets/js/plugins/codemirror/mode/smartymixed/smartymixed.js +197 -0
  514. package/src/assets/js/plugins/codemirror/mode/solr/index.html +57 -0
  515. package/src/assets/js/plugins/codemirror/mode/solr/solr.js +104 -0
  516. package/src/assets/js/plugins/codemirror/mode/sparql/index.html +53 -0
  517. package/src/assets/js/plugins/codemirror/mode/sparql/sparql.js +160 -0
  518. package/src/assets/js/plugins/codemirror/mode/sql/index.html +84 -0
  519. package/src/assets/js/plugins/codemirror/mode/sql/sql.js +393 -0
  520. package/src/assets/js/plugins/codemirror/mode/stex/index.html +110 -0
  521. package/src/assets/js/plugins/codemirror/mode/stex/stex.js +262 -0
  522. package/src/assets/js/plugins/codemirror/mode/stex/test.js +123 -0
  523. package/src/assets/js/plugins/codemirror/mode/tcl/index.html +142 -0
  524. package/src/assets/js/plugins/codemirror/mode/tcl/tcl.js +147 -0
  525. package/src/assets/js/plugins/codemirror/mode/textile/index.html +191 -0
  526. package/src/assets/js/plugins/codemirror/mode/textile/test.js +406 -0
  527. package/src/assets/js/plugins/codemirror/mode/textile/textile.js +553 -0
  528. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/index.html +154 -0
  529. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  530. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.js +369 -0
  531. package/src/assets/js/plugins/codemirror/mode/tiki/index.html +95 -0
  532. package/src/assets/js/plugins/codemirror/mode/tiki/tiki.css +26 -0
  533. package/src/assets/js/plugins/codemirror/mode/tiki/tiki.js +323 -0
  534. package/src/assets/js/plugins/codemirror/mode/toml/index.html +73 -0
  535. package/src/assets/js/plugins/codemirror/mode/toml/toml.js +88 -0
  536. package/src/assets/js/plugins/codemirror/mode/tornado/index.html +63 -0
  537. package/src/assets/js/plugins/codemirror/mode/tornado/tornado.js +68 -0
  538. package/src/assets/js/plugins/codemirror/mode/turtle/index.html +50 -0
  539. package/src/assets/js/plugins/codemirror/mode/turtle/turtle.js +160 -0
  540. package/src/assets/js/plugins/codemirror/mode/vb/index.html +102 -0
  541. package/src/assets/js/plugins/codemirror/mode/vb/vb.js +274 -0
  542. package/src/assets/js/plugins/codemirror/mode/vbscript/index.html +55 -0
  543. package/src/assets/js/plugins/codemirror/mode/vbscript/vbscript.js +350 -0
  544. package/src/assets/js/plugins/codemirror/mode/velocity/index.html +118 -0
  545. package/src/assets/js/plugins/codemirror/mode/velocity/velocity.js +201 -0
  546. package/src/assets/js/plugins/codemirror/mode/verilog/index.html +120 -0
  547. package/src/assets/js/plugins/codemirror/mode/verilog/test.js +273 -0
  548. package/src/assets/js/plugins/codemirror/mode/verilog/verilog.js +364 -0
  549. package/src/assets/js/plugins/codemirror/mode/xml/index.html +57 -0
  550. package/src/assets/js/plugins/codemirror/mode/xml/test.js +51 -0
  551. package/src/assets/js/plugins/codemirror/mode/xml/xml.js +384 -0
  552. package/src/assets/js/plugins/codemirror/mode/xquery/index.html +210 -0
  553. package/src/assets/js/plugins/codemirror/mode/xquery/test.js +67 -0
  554. package/src/assets/js/plugins/codemirror/mode/xquery/xquery.js +447 -0
  555. package/src/assets/js/plugins/codemirror/mode/yaml/index.html +80 -0
  556. package/src/assets/js/plugins/codemirror/mode/yaml/yaml.js +112 -0
  557. package/src/assets/js/plugins/codemirror/mode/z80/index.html +52 -0
  558. package/src/assets/js/plugins/codemirror/mode/z80/z80.js +100 -0
  559. package/src/assets/js/plugins/colorpicker/bootstrap-colorpicker.min.js +1 -0
  560. package/src/assets/js/plugins/cropper/cropper.min.js +9 -0
  561. package/src/assets/js/plugins/d3/d3.min.js +5 -0
  562. package/src/assets/js/plugins/dataTables/datatables.min.js +336 -0
  563. package/src/assets/js/plugins/datapicker/bootstrap-datepicker.js +1671 -0
  564. package/src/assets/js/plugins/datatables.net/jquery.dataTables.js +15344 -0
  565. package/src/assets/js/plugins/daterangepicker/daterangepicker.js +1304 -0
  566. package/src/assets/js/plugins/diff_match_patch/COPYING +177 -0
  567. package/src/assets/js/plugins/diff_match_patch/README.txt +43 -0
  568. package/src/assets/js/plugins/diff_match_patch/javascript/diff_match_patch.js +49 -0
  569. package/src/assets/js/plugins/dotdotdot/jquery.dotdotdot.min.js +13 -0
  570. package/src/assets/js/plugins/dropzone/dropzone.js +1841 -0
  571. package/src/assets/js/plugins/easypiechart/easypiechart.js +350 -0
  572. package/src/assets/js/plugins/easypiechart/jquery.easypiechart.js +359 -0
  573. package/src/assets/js/plugins/flot/curvedLines.js +315 -0
  574. package/src/assets/js/plugins/flot/excanvas.min.js +1 -0
  575. package/src/assets/js/plugins/flot/jquery.flot.js +3168 -0
  576. package/src/assets/js/plugins/flot/jquery.flot.pie.js +820 -0
  577. package/src/assets/js/plugins/flot/jquery.flot.resize.js +59 -0
  578. package/src/assets/js/plugins/flot/jquery.flot.spline.js +212 -0
  579. package/src/assets/js/plugins/flot/jquery.flot.symbol.js +71 -0
  580. package/src/assets/js/plugins/flot/jquery.flot.time.js +432 -0
  581. package/src/assets/js/plugins/flot/jquery.flot.tooltip.min.js +12 -0
  582. package/src/assets/js/plugins/footable/footable.all.min.js +14 -0
  583. package/src/assets/js/plugins/fullcalendar/fullcalendar.min.js +8 -0
  584. package/src/assets/js/plugins/fullcalendar/moment.min.js +7 -0
  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 +137 -0
  590. package/src/assets/js/plugins/gritter/jquery.gritter.min.js +1 -0
  591. package/src/assets/js/plugins/i18next/i18next.min.js +7 -0
  592. package/src/assets/js/plugins/iCheck/icheck.min.js +11 -0
  593. package/src/assets/js/plugins/idle-timer/idle-timer.min.js +2 -0
  594. package/src/assets/js/plugins/ionRangeSlider/ion.rangeSlider.min.js +26 -0
  595. package/src/assets/js/plugins/jasny/jasny-bootstrap.min.js +6 -0
  596. package/src/assets/js/plugins/jeditable/jquery.jeditable.js +543 -0
  597. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ar.js +128 -0
  598. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg.js +134 -0
  599. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg1251.js +132 -0
  600. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cat.js +130 -0
  601. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cn.js +169 -0
  602. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cs.js +130 -0
  603. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-da.js +130 -0
  604. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-de.js +173 -0
  605. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-dk.js +129 -0
  606. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-el.js +128 -0
  607. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-en.js +170 -0
  608. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-es.js +130 -0
  609. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fa.js +147 -0
  610. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fi.js +131 -0
  611. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fr.js +128 -0
  612. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-gl.js +128 -0
  613. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-he.js +129 -0
  614. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr.js +164 -0
  615. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr1250.js +164 -0
  616. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hu.js +131 -0
  617. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-id.js +170 -0
  618. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-is.js +128 -0
  619. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-it.js +1 -0
  620. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ja.js +158 -0
  621. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-kr.js +130 -0
  622. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-lt.js +130 -0
  623. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-mne.js +130 -0
  624. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-nl.js +150 -0
  625. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-no.js +1 -0
  626. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pl.js +134 -0
  627. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt-br.js +137 -0
  628. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt.js +127 -0
  629. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ro.js +141 -0
  630. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ru.js +129 -0
  631. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sk.js +129 -0
  632. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr-latin.js +130 -0
  633. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr.js +130 -0
  634. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sv.js +129 -0
  635. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-th.js +130 -0
  636. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tr.js +128 -0
  637. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tw.js +131 -0
  638. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ua.js +129 -0
  639. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-vi.js +170 -0
  640. package/src/assets/js/plugins/jqGrid/jquery.jqGrid.min.js +545 -0
  641. package/src/assets/js/plugins/jquery-ui/i18n/jquery-ui-i18n.min.js +6 -0
  642. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-af.min.js +4 -0
  643. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.min.js +4 -0
  644. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar.min.js +4 -0
  645. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-az.min.js +4 -0
  646. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-be.min.js +4 -0
  647. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bg.min.js +4 -0
  648. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bs.min.js +4 -0
  649. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ca.min.js +4 -0
  650. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cs.min.js +4 -0
  651. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cy-GB.min.js +4 -0
  652. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-da.min.js +4 -0
  653. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-de.min.js +4 -0
  654. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-el.min.js +4 -0
  655. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-AU.min.js +4 -0
  656. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-GB.min.js +4 -0
  657. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-NZ.min.js +4 -0
  658. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eo.min.js +4 -0
  659. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-es.min.js +4 -0
  660. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-et.min.js +4 -0
  661. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eu.min.js +4 -0
  662. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fa.min.js +4 -0
  663. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fi.min.js +4 -0
  664. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fo.min.js +4 -0
  665. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CA.min.js +4 -0
  666. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CH.min.js +4 -0
  667. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr.min.js +4 -0
  668. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-gl.min.js +4 -0
  669. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-he.min.js +4 -0
  670. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hi.min.js +4 -0
  671. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hr.min.js +4 -0
  672. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js +4 -0
  673. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hy.min.js +4 -0
  674. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-id.min.js +4 -0
  675. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-is.min.js +4 -0
  676. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-it.min.js +4 -0
  677. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ja.min.js +4 -0
  678. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ka.min.js +4 -0
  679. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-kk.min.js +4 -0
  680. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-km.min.js +4 -0
  681. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ko.min.js +4 -0
  682. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ky.min.js +4 -0
  683. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lb.min.js +4 -0
  684. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lt.min.js +4 -0
  685. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lv.min.js +4 -0
  686. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-mk.min.js +4 -0
  687. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ml.min.js +4 -0
  688. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ms.min.js +4 -0
  689. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nb.min.js +4 -0
  690. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl-BE.min.js +4 -0
  691. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl.min.js +4 -0
  692. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nn.min.js +4 -0
  693. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-no.min.js +4 -0
  694. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pl.min.js +4 -0
  695. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt-BR.min.js +4 -0
  696. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt.min.js +4 -0
  697. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-rm.min.js +4 -0
  698. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ro.min.js +4 -0
  699. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ru.min.js +4 -0
  700. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sk.min.js +4 -0
  701. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sl.min.js +4 -0
  702. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sq.min.js +4 -0
  703. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr-SR.min.js +4 -0
  704. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr.min.js +4 -0
  705. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sv.min.js +4 -0
  706. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ta.min.js +4 -0
  707. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-th.min.js +4 -0
  708. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tj.min.js +4 -0
  709. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tr.min.js +4 -0
  710. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-uk.min.js +4 -0
  711. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-vi.min.js +4 -0
  712. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-CN.min.js +4 -0
  713. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-HK.min.js +4 -0
  714. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-TW.min.js +4 -0
  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 +1189 -0
  730. package/src/assets/js/plugins/jquery-ui/jquery-ui.js +15040 -0
  731. package/src/assets/js/plugins/jquery-ui/jquery-ui.min.css +4 -0
  732. package/src/assets/js/plugins/jquery-ui/jquery-ui.min.js +12 -0
  733. package/src/assets/js/plugins/jsKnob/jquery.knob.js +791 -0
  734. package/src/assets/js/plugins/jsTree/jstree.min.js +5 -0
  735. package/src/assets/js/plugins/justified-gallery/README.md +14 -0
  736. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.css +73 -0
  737. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.js +258 -0
  738. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.css +17 -0
  739. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.js +24 -0
  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 +130 -0
  742. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js +3328 -0
  743. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +1 -0
  744. package/src/assets/js/plugins/ladda/ladda.jquery.min.js +8 -0
  745. package/src/assets/js/plugins/ladda/ladda.min.js +8 -0
  746. package/src/assets/js/plugins/ladda/spin.min.js +1 -0
  747. package/src/assets/js/plugins/masonary/masonry.pkgd.min.js +9 -0
  748. package/src/assets/js/plugins/metisMenu/jquery.metisMenu.js +10 -0
  749. package/src/assets/js/plugins/morris/morris.js +1892 -0
  750. package/src/assets/js/plugins/morris/raphael-2.1.0.min.js +10 -0
  751. package/src/assets/js/plugins/nestable/jquery.nestable.js +484 -0
  752. package/src/assets/js/plugins/nouslider/jquery.nouislider.min.js +34 -0
  753. package/src/assets/js/plugins/pace/pace.min.js +2 -0
  754. package/src/assets/js/plugins/peity/jquery.peity.min.js +13 -0
  755. package/src/assets/js/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js +76 -0
  756. package/src/assets/js/plugins/rickshaw/rickshaw.min.js +3 -0
  757. package/src/assets/js/plugins/rickshaw/vendor/d3.v3.js +5 -0
  758. package/src/assets/js/plugins/select2/select2.full.min.js +3 -0
  759. package/src/assets/js/plugins/slick/slick.min.js +18 -0
  760. package/src/assets/js/plugins/slimscroll/jquery.slimscroll.js +474 -0
  761. package/src/assets/js/plugins/slimscroll/jquery.slimscroll.min.js +16 -0
  762. package/src/assets/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
  763. package/src/assets/js/plugins/staps/jquery.steps.min.js +6 -0
  764. package/src/assets/js/plugins/summernote/summernote.min.js +2 -0
  765. package/src/assets/js/plugins/sweetalert/sweetalert.min.js +1 -0
  766. package/src/assets/js/plugins/switchery/switchery.js +1 -0
  767. package/src/assets/js/plugins/tinycon/tinycon.min.js +8 -0
  768. package/src/assets/js/plugins/toastr/toastr.min.js +2 -0
  769. package/src/assets/js/plugins/touchspin/jquery.bootstrap-touchspin.min.js +9 -0
  770. package/src/assets/js/plugins/validate/jquery.validate.min.js +4 -0
  771. package/src/assets/js/plugins/video/responsible-video.js +21 -0
  772. package/src/assets/js/plugins/wow/wow.min.js +2 -0
  773. package/src/environment.ts +24 -0
  774. package/src/index.html +23 -0
  775. package/src/main.ts +10 -0
  776. package/src/polyfills.ts +3 -0
  777. package/src/tsconfig.json +21 -0
  778. package/src/vendor.ts +32 -0
  779. package/tslint.json +93 -0
  780. package/types.d.ts +0 -0
  781. package/web.config +34 -0
  782. package/webpack.config.js +1 -0
@@ -0,0 +1,1819 @@
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
+ }