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.
- package/Dockerfile +45 -0
- package/app-config-prod.json +6 -0
- package/app-config.json +10 -0
- package/b2@1.0.0 +0 -0
- package/bs-config.json +8 -0
- package/config/helpers.js +10 -0
- package/config/karma-test-shim.js +21 -0
- package/config/karma.conf.js +37 -0
- package/config/webpack.common.js +96 -0
- package/config/webpack.dev.js +24 -0
- package/config/webpack.eks.js +72 -0
- package/config/webpack.prod.js +72 -0
- package/config/webpack.test.js +53 -0
- package/default.nginx.config +60 -0
- package/docker-entrypoint.sh +6 -0
- package/e2e-spec.ts +21 -0
- package/favicon.ico +0 -0
- package/karma.webpack.conf.js +1 -0
- package/npm +0 -0
- package/package.json +144 -0
- package/rimraf +0 -0
- package/src/app/app-config.ts +21 -0
- package/src/app/app-routing.module.ts +165 -0
- package/src/app/app.component.ts +30 -0
- package/src/app/app.module.ts +72 -0
- package/src/app/auth/auth.guard.ts +192 -0
- package/src/app/customer-management/customer-management.module.ts +52 -0
- package/src/app/customer-management/customer-personal-details/components/customer-personal-details.component.ts +766 -0
- package/src/app/customer-management/customer-personal-details/customer-personal-details.component.css +4 -0
- package/src/app/customer-management/customer-personal-details/customer-personal-details.component.html +812 -0
- package/src/app/customer-management/customer-personal-details/models/companyrisksetting.model.ts +65 -0
- package/src/app/customer-management/customer-profile-history-list/components/customer-profile-history-list.component.ts +149 -0
- package/src/app/customer-management/customer-profile-history-list/customer-profile-history-list.component.html +104 -0
- package/src/app/customer-management/customer-profile-history-list/models/customer-profile-history-list.model.ts +33 -0
- package/src/app/customer-management/customer-profile-history-list/models/index.ts +1 -0
- package/src/app/customer-management/customer-registration/components/customer-registration.component.ts +1567 -0
- package/src/app/customer-management/customer-registration/customer-registration.component.css +6 -0
- package/src/app/customer-management/customer-registration/customer-registration.component.html +1140 -0
- package/src/app/customer-management/customer-registration/models/approve-customer.model.ts +5 -0
- package/src/app/customer-management/customer-registration/models/index.ts +1 -0
- package/src/app/customer-management/customer-registration/models/wallet-registration.model.ts +191 -0
- package/src/app/customer-management/customer-registration-list/components/customer-registration-list.component.ts +444 -0
- package/src/app/customer-management/customer-registration-list/customer-registration-list.component.html +350 -0
- package/src/app/customer-management/customer-registration-list/models/index.ts +2 -0
- package/src/app/customer-management/customer-registration-list/models/wallet-list.model.ts +41 -0
- package/src/app/customer-management/customer-registration-list/models/wallet.model.ts +13 -0
- package/src/app/customer-management/manual-topup/components/manual-topup.component.ts +299 -0
- package/src/app/customer-management/manual-topup/manual-topup.component.html +173 -0
- package/src/app/customer-management/manual-topup/models/index.ts +1 -0
- package/src/app/customer-management/manual-topup/models/manual-topup.model.ts +17 -0
- package/src/app/customer-management/wallet-balance-history/components/wallet-balance-history.component.ts +243 -0
- package/src/app/customer-management/wallet-balance-history/models/balance-history-list.model.ts +25 -0
- package/src/app/customer-management/wallet-balance-history/models/balance-history.model.ts +13 -0
- package/src/app/customer-management/wallet-balance-history/models/index.ts +3 -0
- package/src/app/customer-management/wallet-balance-history/models/wallet.model.ts +13 -0
- package/src/app/customer-management/wallet-balance-history/wallet-balance-history.component.html +182 -0
- package/src/app/customer-management/wallet-history/components/wallet-history.component.ts +239 -0
- package/src/app/customer-management/wallet-history/models/index.ts +2 -0
- package/src/app/customer-management/wallet-history/models/wallet-history-list.model.ts +11 -0
- package/src/app/customer-management/wallet-history/models/wallet-history.model.ts +10 -0
- package/src/app/customer-management/wallet-history/wallet-history.component.html +85 -0
- package/src/app/external-change-password/components/external-change-password.component.ts +71 -0
- package/src/app/external-change-password/external-change-password.component.html +57 -0
- package/src/app/external-change-password/models/external-change-password.model.ts +6 -0
- package/src/app/fee-management/company/company.component.html +491 -0
- package/src/app/fee-management/company/components/company.component.ts +472 -0
- package/src/app/fee-management/company/models/company.model.ts +55 -0
- package/src/app/fee-management/company/models/index.ts +1 -0
- package/src/app/fee-management/company-wallet-profile/company-wallet-profile.component.html +161 -0
- package/src/app/fee-management/company-wallet-profile/components/company-wallet-profile.component.ts +194 -0
- package/src/app/fee-management/fee-management.module.ts +51 -0
- package/src/app/fee-management/menu-setup/models/menu-setup.model.ts +75 -0
- package/src/app/fee-management/wallet-fee-setting/components/wallet-fee-setting.component.ts +337 -0
- package/src/app/fee-management/wallet-fee-setting/models/index.ts +7 -0
- package/src/app/fee-management/wallet-fee-setting/models/transfer-fee.model.ts +32 -0
- package/src/app/fee-management/wallet-fee-setting/models/verify-risk-level.model.ts +7 -0
- package/src/app/fee-management/wallet-fee-setting/models/wallet-fee-setting.model.ts +32 -0
- package/src/app/fee-management/wallet-fee-setting/models/wallet-setting.model.ts +17 -0
- package/src/app/fee-management/wallet-fee-setting/models/wallet.model.ts +28 -0
- package/src/app/fee-management/wallet-fee-setting/wallet-fee-setting.component.html +1226 -0
- package/src/app/fee-management/wallet-profile-limit-setting/components/wallet-profile-limit-setting.component.ts +284 -0
- package/src/app/fee-management/wallet-profile-limit-setting/models/index.ts +1 -0
- package/src/app/fee-management/wallet-profile-limit-setting/models/wallet-profile-limit-setting.model.ts +79 -0
- package/src/app/fee-management/wallet-profile-limit-setting/wallet-profile-limit-setting.component.html +1285 -0
- package/src/app/fee-management/wallet-profile-setting-list/components/wallet-profile-setting-list.component.ts +350 -0
- package/src/app/fee-management/wallet-profile-setting-list/models/index.ts +2 -0
- package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting-list.model.ts +36 -0
- package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting.model.ts +12 -0
- package/src/app/fee-management/wallet-profile-setting-list/wallet-profile-setting-list.component.html +220 -0
- package/src/app/fee-management/wallet-topup/components/wallet-topup.component.ts +209 -0
- package/src/app/fee-management/wallet-topup/models/index.ts +3 -0
- package/src/app/fee-management/wallet-topup/models/wallet-topup.model.ts +11 -0
- package/src/app/fee-management/wallet-topup/wallet-topup.component.html +97 -0
- package/src/app/forgot-password/components/forgot-password.component.ts +87 -0
- package/src/app/forgot-password/forgot-password.component.html +40 -0
- package/src/app/forgot-password/models/forgot-password.model.ts +5 -0
- package/src/app/forgot-password/models/index.ts +2 -0
- package/src/app/login/components/login.component.ts +199 -0
- package/src/app/login/login.component.html +49 -0
- package/src/app/login/models/common.model.ts +21 -0
- package/src/app/login/models/login.model.ts +5 -0
- package/src/app/models/audit-log-insert.model.ts +11 -0
- package/src/app/models/common.model.ts +56 -0
- package/src/app/models/index.ts +4 -0
- package/src/app/models/navigation-data.model.ts +24 -0
- package/src/app/models/page-info-model.ts +4 -0
- package/src/app/models/response-model.ts +5 -0
- package/src/app/models/search-model.ts +21 -0
- package/src/app/navbar/components/navbar.component.ts +288 -0
- package/src/app/navbar/navbar.component.html +200 -0
- package/src/app/profile-setting/change-password/change-password.component.html +85 -0
- package/src/app/profile-setting/change-password/components/change-password.component.ts +76 -0
- package/src/app/profile-setting/change-password/models/change-password.model.ts +5 -0
- package/src/app/profile-setting/change-password/models/index.ts +1 -0
- package/src/app/profile-setting/profile-setting/components/profile-setting.component.ts +234 -0
- package/src/app/profile-setting/profile-setting/models/profile-setting.model.ts +21 -0
- package/src/app/profile-setting/profile-setting/profile-setting.component.html +228 -0
- package/src/app/profile-setting/profile-setting.module.ts +22 -0
- package/src/app/shared/alerts/alertOptions.ts +14 -0
- package/src/app/shared/alerts/alerts.ts +57 -0
- package/src/app/shared/common/common.ts +1342 -0
- package/src/app/shared/constants/constants.ts +550 -0
- package/src/app/shared/interceptor/https-interceptor.ts +69 -0
- package/src/app/shared/service/shared.service.ts +287 -0
- package/src/app/shared/source-of-fund/source-of-fund.ts +4 -0
- package/src/app/shared/transaction/transaction-type-status.ts +32 -0
- package/src/app/transaction-history/transaction-history.module.ts +83 -0
- package/src/app/transaction-history/wallet-transaction-list/components/wallet-transaction-list.component.ts +500 -0
- package/src/app/transaction-history/wallet-transaction-list/models/wallet-transaction-list.model.ts +75 -0
- package/src/app/transaction-history/wallet-transaction-list/wallet-transaction-list.component.html +530 -0
- package/src/app/transaction-history/wallet-transaction-list-details/components/wallet-transaction-list-details.component.ts +154 -0
- package/src/app/transaction-history/wallet-transaction-list-details/models/index.ts +3 -0
- package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-list-details.model.ts +39 -0
- package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-refund.model.ts +5 -0
- package/src/app/transaction-history/wallet-transaction-list-details/wallet-transaction-list-details.component.html +452 -0
- package/src/app/user-management/audit-log-list/audit-log-list.component.html +198 -0
- package/src/app/user-management/audit-log-list/components/audit-log-list.component.ts +415 -0
- package/src/app/user-management/audit-log-list/models/audit-log-list.model.ts +38 -0
- package/src/app/user-management/audit-log-list/models/audit-log.model.ts +11 -0
- package/src/app/user-management/audit-log-list/models/index.ts +2 -0
- package/src/app/user-management/system-user/components/system-user.component.ts +466 -0
- package/src/app/user-management/system-user/models/system-user.model.ts +23 -0
- package/src/app/user-management/system-user/system-user.component.html +349 -0
- package/src/app/user-management/system-user-list/components/system-user-list.component.ts +399 -0
- package/src/app/user-management/system-user-list/models/index.ts +2 -0
- package/src/app/user-management/system-user-list/models/system-user-list.model.ts +40 -0
- package/src/app/user-management/system-user-list/models/system-user.model.ts +11 -0
- package/src/app/user-management/system-user-list/system-user-list.component.html +266 -0
- package/src/app/user-management/user-group-permission/components/user-group-permission.component.ts +1819 -0
- package/src/app/user-management/user-group-permission/models/user-group-permission.model.ts +288 -0
- package/src/app/user-management/user-group-permission/user-group-permission.component.html +100 -0
- package/src/app/user-management/user-group-permission-list/components/user-group-permission-list.component.ts +379 -0
- package/src/app/user-management/user-group-permission-list/models/index.ts +2 -0
- package/src/app/user-management/user-group-permission-list/models/user-group-permission-list.model.ts +28 -0
- package/src/app/user-management/user-group-permission-list/models/user-group-permission.model.ts +8 -0
- package/src/app/user-management/user-group-permission-list/user-group-permission-list.component.html +184 -0
- package/src/app/user-management/user-management.module.ts +38 -0
- package/src/app/validate-change-password/components/validate-change-password.component.ts +66 -0
- package/src/app/validate-change-password/validate-change-password.component.html +8 -0
- package/src/assets/css/animate.css +2848 -0
- package/src/assets/css/bootstrap.css +6760 -0
- package/src/assets/css/bootstrap.css.map +1 -0
- package/src/assets/css/bootstrap.min.css +6 -0
- package/src/assets/css/bootstrap.min.css.map +1 -0
- package/src/assets/css/font.css +10 -0
- package/src/assets/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css +251 -0
- package/src/assets/css/plugins/blueimp/css/blueimp-gallery-indicator.css +71 -0
- package/src/assets/css/plugins/blueimp/css/blueimp-gallery-video.css +87 -0
- package/src/assets/css/plugins/blueimp/css/blueimp-gallery.css +226 -0
- package/src/assets/css/plugins/blueimp/css/blueimp-gallery.min.css +1 -0
- package/src/assets/css/plugins/blueimp/css/demo.css +51 -0
- package/src/assets/css/plugins/blueimp/img/error.png +0 -0
- package/src/assets/css/plugins/blueimp/img/error.svg +5 -0
- package/src/assets/css/plugins/blueimp/img/loading.gif +0 -0
- package/src/assets/css/plugins/blueimp/img/play-pause.png +0 -0
- package/src/assets/css/plugins/blueimp/img/play-pause.svg +6 -0
- package/src/assets/css/plugins/blueimp/img/video-play.png +0 -0
- package/src/assets/css/plugins/blueimp/img/video-play.svg +5 -0
- package/src/assets/css/plugins/bootstrap-datepicker/bootstrap-datepicker3.min.css +9 -0
- package/src/assets/css/plugins/bootstrap-markdown/bootstrap-markdown.min.css +1 -0
- package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css +1468 -0
- package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css.map +1 -0
- package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.min.css +9 -0
- package/src/assets/css/plugins/bootstrap-timepicker/bootstrap-timepicker.min.css +10 -0
- package/src/assets/css/plugins/bootstrapTour/bootstrap-tour.min.css +22 -0
- package/src/assets/css/plugins/c3/c3.min.css +1 -0
- package/src/assets/css/plugins/chartist/chartist.min.css +773 -0
- package/src/assets/css/plugins/chosen/chosen-sprite.png +0 -0
- package/src/assets/css/plugins/chosen/chosen-sprite@2x.png +0 -0
- package/src/assets/css/plugins/chosen/chosen.css +429 -0
- package/src/assets/css/plugins/clockpicker/clockpicker.css +168 -0
- package/src/assets/css/plugins/codemirror/ambiance.css +77 -0
- package/src/assets/css/plugins/codemirror/codemirror.css +309 -0
- package/src/assets/css/plugins/colorpicker/bootstrap-colorpicker.min.css +9 -0
- package/src/assets/css/plugins/cropper/cropper.min.css +9 -0
- package/src/assets/css/plugins/dataTables/datatables.min.css +21 -0
- package/src/assets/css/plugins/datapicker/datepicker3.css +789 -0
- package/src/assets/css/plugins/datatables.net/css/jquery.dataTables.css +455 -0
- package/src/assets/css/plugins/datatables.net/images/sort_asc.png +0 -0
- package/src/assets/css/plugins/datatables.net/images/sort_asc_disabled.png +0 -0
- package/src/assets/css/plugins/datatables.net/images/sort_both.png +0 -0
- package/src/assets/css/plugins/datatables.net/images/sort_desc.png +0 -0
- package/src/assets/css/plugins/datatables.net/images/sort_desc_disabled.png +0 -0
- package/src/assets/css/plugins/daterangepicker/daterangepicker-bs3.css +335 -0
- package/src/assets/css/plugins/dropzone/basic.css +155 -0
- package/src/assets/css/plugins/dropzone/dropzone.css +410 -0
- package/src/assets/css/plugins/footable/fonts/footable.eot +0 -0
- package/src/assets/css/plugins/footable/fonts/footable.svg +78 -0
- package/src/assets/css/plugins/footable/fonts/footable.ttf +0 -0
- package/src/assets/css/plugins/footable/fonts/footable.woff +0 -0
- package/src/assets/css/plugins/footable/footable.core.css +178 -0
- package/src/assets/css/plugins/fullcalendar/fullcalendar.css +977 -0
- package/src/assets/css/plugins/fullcalendar/fullcalendar.print.css +202 -0
- package/src/assets/css/plugins/iCheck/custom.css +59 -0
- package/src/assets/css/plugins/iCheck/green.png +0 -0
- package/src/assets/css/plugins/iCheck/green@2x.png +0 -0
- package/src/assets/css/plugins/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- package/src/assets/css/plugins/images/bootstrap-colorpicker/alpha.png +0 -0
- package/src/assets/css/plugins/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
- package/src/assets/css/plugins/images/bootstrap-colorpicker/hue.png +0 -0
- package/src/assets/css/plugins/images/bootstrap-colorpicker/saturation.png +0 -0
- package/src/assets/css/plugins/images/sort.png +0 -0
- package/src/assets/css/plugins/images/sort_asc.png +0 -0
- package/src/assets/css/plugins/images/sort_desc.png +0 -0
- package/src/assets/css/plugins/images/sprite-skin-flat.png +0 -0
- package/src/assets/css/plugins/images/sprite-skin-flat2.png +0 -0
- package/src/assets/css/plugins/images/sprite-skin-nice.png +0 -0
- package/src/assets/css/plugins/images/sprite-skin-simple.png +0 -0
- package/src/assets/css/plugins/images/spritemap.png +0 -0
- package/src/assets/css/plugins/images/spritemap@2x.png +0 -0
- package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.css +126 -0
- package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css +89 -0
- package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinNice.css +85 -0
- package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinSimple.css +85 -0
- package/src/assets/css/plugins/jQueryUI/images/animated-overlay.gif +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-icons_222222_256x240.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-icons_2e83ff_256x240.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-icons_454545_256x240.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-icons_888888_256x240.png +0 -0
- package/src/assets/css/plugins/jQueryUI/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/src/assets/css/plugins/jQueryUI/jquery-ui-1.10.4.custom.min.css +7 -0
- package/src/assets/css/plugins/jQueryUI/jquery-ui.css +1177 -0
- package/src/assets/css/plugins/jasny/jasny-bootstrap.min.css +7 -0
- package/src/assets/css/plugins/jqGrid/ui.jqgrid.css +171 -0
- package/src/assets/css/plugins/jsTree/32px.png +0 -0
- package/src/assets/css/plugins/jsTree/39px.png +0 -0
- package/src/assets/css/plugins/jsTree/40px.png +0 -0
- package/src/assets/css/plugins/jsTree/style.css +1050 -0
- package/src/assets/css/plugins/jsTree/style.min.css +1 -0
- package/src/assets/css/plugins/jsTree/throbber.gif +0 -0
- package/src/assets/css/plugins/ladda/ladda-themeless.min.css +7 -0
- package/src/assets/css/plugins/ladda/ladda.min.css +9 -0
- package/src/assets/css/plugins/morris/morris-0.4.3.min.css +2 -0
- package/src/assets/css/plugins/nouslider/jquery.nouislider.css +165 -0
- package/src/assets/css/plugins/select2/select2.min.css +1 -0
- package/src/assets/css/plugins/slick/ajax-loader.gif +0 -0
- package/src/assets/css/plugins/slick/fonts/slick.eot +0 -0
- package/src/assets/css/plugins/slick/fonts/slick.svg +14 -0
- package/src/assets/css/plugins/slick/fonts/slick.ttf +0 -0
- package/src/assets/css/plugins/slick/fonts/slick.woff +0 -0
- package/src/assets/css/plugins/slick/slick-theme.css +201 -0
- package/src/assets/css/plugins/slick/slick.css +119 -0
- package/src/assets/css/plugins/social-buttons/social-buttons.css +68 -0
- package/src/assets/css/plugins/steps/jquery.steps.css +380 -0
- package/src/assets/css/plugins/summernote/summernote-bs3.css +5970 -0
- package/src/assets/css/plugins/summernote/summernote.css +446 -0
- package/src/assets/css/plugins/sweetalert/sweetalert.css +715 -0
- package/src/assets/css/plugins/switchery/switchery.css +32 -0
- package/src/assets/css/plugins/toastr/ng2-toastr.min.css +1 -0
- package/src/assets/css/plugins/toastr/toastr.min.css +222 -0
- package/src/assets/css/plugins/touchspin/jquery.bootstrap-touchspin.min.css +10 -0
- package/src/assets/css/style.css +9725 -0
- package/src/assets/css/style.scss +1 -0
- package/src/assets/font-awesome/css/font-awesome.css +2337 -0
- package/src/assets/font-awesome/css/font-awesome.min.css +4 -0
- package/src/assets/font-awesome/fonts/FontAwesome.otf +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.svg +2671 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/src/assets/font-awesome/less/animated.less +34 -0
- package/src/assets/font-awesome/less/bordered-pulled.less +25 -0
- package/src/assets/font-awesome/less/core.less +12 -0
- package/src/assets/font-awesome/less/fixed-width.less +6 -0
- package/src/assets/font-awesome/less/font-awesome.less +18 -0
- package/src/assets/font-awesome/less/icons.less +789 -0
- package/src/assets/font-awesome/less/larger.less +13 -0
- package/src/assets/font-awesome/less/list.less +19 -0
- package/src/assets/font-awesome/less/mixins.less +60 -0
- package/src/assets/font-awesome/less/path.less +15 -0
- package/src/assets/font-awesome/less/rotated-flipped.less +20 -0
- package/src/assets/font-awesome/less/screen-reader.less +5 -0
- package/src/assets/font-awesome/less/stacked.less +20 -0
- package/src/assets/font-awesome/less/variables.less +800 -0
- package/src/assets/font-awesome/scss/_animated.scss +34 -0
- package/src/assets/font-awesome/scss/_bordered-pulled.scss +25 -0
- package/src/assets/font-awesome/scss/_core.scss +12 -0
- package/src/assets/font-awesome/scss/_fixed-width.scss +6 -0
- package/src/assets/font-awesome/scss/_icons.scss +789 -0
- package/src/assets/font-awesome/scss/_larger.scss +13 -0
- package/src/assets/font-awesome/scss/_list.scss +19 -0
- package/src/assets/font-awesome/scss/_mixins.scss +60 -0
- package/src/assets/font-awesome/scss/_path.scss +15 -0
- package/src/assets/font-awesome/scss/_rotated-flipped.scss +20 -0
- package/src/assets/font-awesome/scss/_screen-reader.scss +5 -0
- package/src/assets/font-awesome/scss/_stacked.scss +20 -0
- package/src/assets/font-awesome/scss/_variables.scss +800 -0
- package/src/assets/font-awesome/scss/font-awesome.scss +18 -0
- package/src/assets/fonts/DejaVuSans-Bold.ttf +0 -0
- package/src/assets/fonts/DejaVuSans-Oblique.ttf +0 -0
- package/src/assets/fonts/DejaVuSans.ttf +0 -0
- package/src/assets/fonts/Garuda.ttf +0 -0
- package/src/assets/fonts/NotoSansThaiUI-Regular.ttf +0 -0
- package/src/assets/fonts/TH-Charmonman-Regular.ttf +0 -0
- package/src/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/assets/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/assets/fonts/kanit-v3-latin_latin-ext_thai-regular.ttf +0 -0
- package/src/assets/img/2c2p_169x60.png +0 -0
- package/src/assets/img/2c2p_169x60_black_header.png +0 -0
- package/src/assets/img/calendar_gray.png +0 -0
- package/src/assets/img/success.png +0 -0
- package/src/assets/img/user.png +0 -0
- package/src/assets/img/warning.png +0 -0
- package/src/assets/js/bootstrap.js +2363 -0
- package/src/assets/js/bootstrap.min.js +7 -0
- package/src/assets/js/demo/chartjs-demo.js +217 -0
- package/src/assets/js/demo/dashboard-demo.js +117 -0
- package/src/assets/js/demo/flot-demo.js +308 -0
- package/src/assets/js/demo/flot-demo2.js +377 -0
- package/src/assets/js/demo/morris-demo.js +89 -0
- package/src/assets/js/demo/peity-demo.js +33 -0
- package/src/assets/js/demo/rickshaw-demo.js +103 -0
- package/src/assets/js/demo/sparkline-demo.js +51 -0
- package/src/assets/js/inspinia.js +301 -0
- package/src/assets/js/jquery-2.1.1.js +4 -0
- package/src/assets/js/jquery-3.3.1.min.js +2 -0
- package/src/assets/js/jquery-ui-1.10.4.min.js +7 -0
- package/src/assets/js/jquery-ui.custom.min.js +16 -0
- package/src/assets/js/plugins/blueimp/jquery.blueimp-gallery.min.js +1 -0
- package/src/assets/js/plugins/bootstrap-datepicker/bootstrap-datepicker.min.js +9 -0
- package/src/assets/js/plugins/bootstrap-markdown/bootstrap-markdown.js +1386 -0
- package/src/assets/js/plugins/bootstrap-markdown/markdown.js +1616 -0
- package/src/assets/js/plugins/bootstrap-timepicker/bootstrap-timepicker.min.js +5 -0
- package/src/assets/js/plugins/bootstrapTour/bootstrap-tour.min.js +22 -0
- package/src/assets/js/plugins/c3/c3.min.js +5 -0
- package/src/assets/js/plugins/chartJs/Chart.min.js +14 -0
- package/src/assets/js/plugins/chartist/chartist.min.js +9 -0
- package/src/assets/js/plugins/chartist/chartist.min.js.map +1 -0
- package/src/assets/js/plugins/chosen/chosen.jquery.js +1211 -0
- package/src/assets/js/plugins/clipboard/clipboard.min.js +7 -0
- package/src/assets/js/plugins/clockpicker/clockpicker.js +729 -0
- package/src/assets/js/plugins/codemirror/codemirror.js +7830 -0
- package/src/assets/js/plugins/codemirror/mode/apl/apl.js +175 -0
- package/src/assets/js/plugins/codemirror/mode/apl/index.html +72 -0
- package/src/assets/js/plugins/codemirror/mode/asterisk/asterisk.js +198 -0
- package/src/assets/js/plugins/codemirror/mode/asterisk/index.html +154 -0
- package/src/assets/js/plugins/codemirror/mode/clike/clike.js +474 -0
- package/src/assets/js/plugins/codemirror/mode/clike/index.html +225 -0
- package/src/assets/js/plugins/codemirror/mode/clike/scala.html +767 -0
- package/src/assets/js/plugins/codemirror/mode/clojure/clojure.js +243 -0
- package/src/assets/js/plugins/codemirror/mode/clojure/index.html +88 -0
- package/src/assets/js/plugins/codemirror/mode/cobol/cobol.js +255 -0
- package/src/assets/js/plugins/codemirror/mode/cobol/index.html +210 -0
- package/src/assets/js/plugins/codemirror/mode/coffeescript/coffeescript.js +369 -0
- package/src/assets/js/plugins/codemirror/mode/coffeescript/index.html +740 -0
- package/src/assets/js/plugins/codemirror/mode/commonlisp/commonlisp.js +120 -0
- package/src/assets/js/plugins/codemirror/mode/commonlisp/index.html +177 -0
- package/src/assets/js/plugins/codemirror/mode/css/css.js +717 -0
- package/src/assets/js/plugins/codemirror/mode/css/index.html +70 -0
- package/src/assets/js/plugins/codemirror/mode/css/less.html +152 -0
- package/src/assets/js/plugins/codemirror/mode/css/less_test.js +51 -0
- package/src/assets/js/plugins/codemirror/mode/css/scss.html +157 -0
- package/src/assets/js/plugins/codemirror/mode/css/scss_test.js +110 -0
- package/src/assets/js/plugins/codemirror/mode/css/test.js +135 -0
- package/src/assets/js/plugins/codemirror/mode/cypher/cypher.js +146 -0
- package/src/assets/js/plugins/codemirror/mode/cypher/index.html +63 -0
- package/src/assets/js/plugins/codemirror/mode/d/d.js +218 -0
- package/src/assets/js/plugins/codemirror/mode/d/index.html +273 -0
- package/src/assets/js/plugins/codemirror/mode/diff/diff.js +47 -0
- package/src/assets/js/plugins/codemirror/mode/diff/index.html +117 -0
- package/src/assets/js/plugins/codemirror/mode/django/django.js +67 -0
- package/src/assets/js/plugins/codemirror/mode/django/index.html +63 -0
- package/src/assets/js/plugins/codemirror/mode/dtd/dtd.js +142 -0
- package/src/assets/js/plugins/codemirror/mode/dtd/index.html +89 -0
- package/src/assets/js/plugins/codemirror/mode/dylan/dylan.js +299 -0
- package/src/assets/js/plugins/codemirror/mode/dylan/index.html +407 -0
- package/src/assets/js/plugins/codemirror/mode/ecl/ecl.js +207 -0
- package/src/assets/js/plugins/codemirror/mode/ecl/index.html +52 -0
- package/src/assets/js/plugins/codemirror/mode/eiffel/eiffel.js +162 -0
- package/src/assets/js/plugins/codemirror/mode/eiffel/index.html +429 -0
- package/src/assets/js/plugins/codemirror/mode/erlang/erlang.js +622 -0
- package/src/assets/js/plugins/codemirror/mode/erlang/index.html +76 -0
- package/src/assets/js/plugins/codemirror/mode/fortran/fortran.js +188 -0
- package/src/assets/js/plugins/codemirror/mode/fortran/index.html +81 -0
- package/src/assets/js/plugins/codemirror/mode/gas/gas.js +345 -0
- package/src/assets/js/plugins/codemirror/mode/gas/index.html +68 -0
- package/src/assets/js/plugins/codemirror/mode/gfm/gfm.js +122 -0
- package/src/assets/js/plugins/codemirror/mode/gfm/index.html +82 -0
- package/src/assets/js/plugins/codemirror/mode/gfm/test.js +164 -0
- package/src/assets/js/plugins/codemirror/mode/gherkin/gherkin.js +178 -0
- package/src/assets/js/plugins/codemirror/mode/gherkin/index.html +48 -0
- package/src/assets/js/plugins/codemirror/mode/go/go.js +184 -0
- package/src/assets/js/plugins/codemirror/mode/go/index.html +85 -0
- package/src/assets/js/plugins/codemirror/mode/groovy/groovy.js +226 -0
- package/src/assets/js/plugins/codemirror/mode/groovy/index.html +84 -0
- package/src/assets/js/plugins/codemirror/mode/haml/haml.js +159 -0
- package/src/assets/js/plugins/codemirror/mode/haml/index.html +79 -0
- package/src/assets/js/plugins/codemirror/mode/haml/test.js +97 -0
- package/src/assets/js/plugins/codemirror/mode/haskell/haskell.js +267 -0
- package/src/assets/js/plugins/codemirror/mode/haskell/index.html +73 -0
- package/src/assets/js/plugins/codemirror/mode/haxe/haxe.js +518 -0
- package/src/assets/js/plugins/codemirror/mode/haxe/index.html +124 -0
- package/src/assets/js/plugins/codemirror/mode/htmlembedded/htmlembedded.js +86 -0
- package/src/assets/js/plugins/codemirror/mode/htmlembedded/index.html +58 -0
- package/src/assets/js/plugins/codemirror/mode/htmlmixed/htmlmixed.js +121 -0
- package/src/assets/js/plugins/codemirror/mode/htmlmixed/index.html +85 -0
- package/src/assets/js/plugins/codemirror/mode/http/http.js +113 -0
- package/src/assets/js/plugins/codemirror/mode/http/index.html +45 -0
- package/src/assets/js/plugins/codemirror/mode/index.html +125 -0
- package/src/assets/js/plugins/codemirror/mode/jade/index.html +70 -0
- package/src/assets/js/plugins/codemirror/mode/jade/jade.js +590 -0
- package/src/assets/js/plugins/codemirror/mode/javascript/index.html +114 -0
- package/src/assets/js/plugins/codemirror/mode/javascript/javascript.js +684 -0
- package/src/assets/js/plugins/codemirror/mode/javascript/json-ld.html +72 -0
- package/src/assets/js/plugins/codemirror/mode/javascript/test.js +194 -0
- package/src/assets/js/plugins/codemirror/mode/javascript/typescript.html +61 -0
- package/src/assets/js/plugins/codemirror/mode/jinja2/index.html +54 -0
- package/src/assets/js/plugins/codemirror/mode/jinja2/jinja2.js +142 -0
- package/src/assets/js/plugins/codemirror/mode/julia/index.html +195 -0
- package/src/assets/js/plugins/codemirror/mode/julia/julia.js +301 -0
- package/src/assets/js/plugins/codemirror/mode/kotlin/index.html +89 -0
- package/src/assets/js/plugins/codemirror/mode/kotlin/kotlin.js +280 -0
- package/src/assets/js/plugins/codemirror/mode/livescript/index.html +459 -0
- package/src/assets/js/plugins/codemirror/mode/livescript/livescript.js +280 -0
- package/src/assets/js/plugins/codemirror/mode/lua/index.html +85 -0
- package/src/assets/js/plugins/codemirror/mode/lua/lua.js +159 -0
- package/src/assets/js/plugins/codemirror/mode/markdown/index.html +359 -0
- package/src/assets/js/plugins/codemirror/mode/markdown/markdown.js +758 -0
- package/src/assets/js/plugins/codemirror/mode/markdown/test.js +754 -0
- package/src/assets/js/plugins/codemirror/mode/meta.js +144 -0
- package/src/assets/js/plugins/codemirror/mode/mirc/index.html +160 -0
- package/src/assets/js/plugins/codemirror/mode/mirc/mirc.js +193 -0
- package/src/assets/js/plugins/codemirror/mode/mllike/index.html +179 -0
- package/src/assets/js/plugins/codemirror/mode/mllike/mllike.js +205 -0
- package/src/assets/js/plugins/codemirror/mode/modelica/index.html +67 -0
- package/src/assets/js/plugins/codemirror/mode/modelica/modelica.js +245 -0
- package/src/assets/js/plugins/codemirror/mode/nginx/index.html +181 -0
- package/src/assets/js/plugins/codemirror/mode/nginx/nginx.js +178 -0
- package/src/assets/js/plugins/codemirror/mode/ntriples/index.html +45 -0
- package/src/assets/js/plugins/codemirror/mode/ntriples/ntriples.js +186 -0
- package/src/assets/js/plugins/codemirror/mode/octave/index.html +83 -0
- package/src/assets/js/plugins/codemirror/mode/octave/octave.js +135 -0
- package/src/assets/js/plugins/codemirror/mode/pascal/index.html +61 -0
- package/src/assets/js/plugins/codemirror/mode/pascal/pascal.js +109 -0
- package/src/assets/js/plugins/codemirror/mode/pegjs/index.html +66 -0
- package/src/assets/js/plugins/codemirror/mode/pegjs/pegjs.js +114 -0
- package/src/assets/js/plugins/codemirror/mode/perl/index.html +75 -0
- package/src/assets/js/plugins/codemirror/mode/perl/perl.js +832 -0
- package/src/assets/js/plugins/codemirror/mode/php/index.html +64 -0
- package/src/assets/js/plugins/codemirror/mode/php/php.js +226 -0
- package/src/assets/js/plugins/codemirror/mode/php/test.js +154 -0
- package/src/assets/js/plugins/codemirror/mode/pig/index.html +55 -0
- package/src/assets/js/plugins/codemirror/mode/pig/pig.js +188 -0
- package/src/assets/js/plugins/codemirror/mode/properties/index.html +53 -0
- package/src/assets/js/plugins/codemirror/mode/properties/properties.js +78 -0
- package/src/assets/js/plugins/codemirror/mode/puppet/index.html +121 -0
- package/src/assets/js/plugins/codemirror/mode/puppet/puppet.js +220 -0
- package/src/assets/js/plugins/codemirror/mode/python/index.html +198 -0
- package/src/assets/js/plugins/codemirror/mode/python/python.js +359 -0
- package/src/assets/js/plugins/codemirror/mode/q/index.html +144 -0
- package/src/assets/js/plugins/codemirror/mode/q/q.js +139 -0
- package/src/assets/js/plugins/codemirror/mode/r/index.html +85 -0
- package/src/assets/js/plugins/codemirror/mode/r/r.js +162 -0
- package/src/assets/js/plugins/codemirror/mode/rpm/changes/index.html +66 -0
- package/src/assets/js/plugins/codemirror/mode/rpm/index.html +149 -0
- package/src/assets/js/plugins/codemirror/mode/rpm/rpm.js +101 -0
- package/src/assets/js/plugins/codemirror/mode/rst/index.html +535 -0
- package/src/assets/js/plugins/codemirror/mode/rst/rst.js +557 -0
- package/src/assets/js/plugins/codemirror/mode/ruby/index.html +184 -0
- package/src/assets/js/plugins/codemirror/mode/ruby/ruby.js +285 -0
- package/src/assets/js/plugins/codemirror/mode/ruby/test.js +14 -0
- package/src/assets/js/plugins/codemirror/mode/rust/index.html +60 -0
- package/src/assets/js/plugins/codemirror/mode/rust/rust.js +451 -0
- package/src/assets/js/plugins/codemirror/mode/sass/index.html +66 -0
- package/src/assets/js/plugins/codemirror/mode/sass/sass.js +327 -0
- package/src/assets/js/plugins/codemirror/mode/scheme/index.html +77 -0
- package/src/assets/js/plugins/codemirror/mode/scheme/scheme.js +248 -0
- package/src/assets/js/plugins/codemirror/mode/shell/index.html +66 -0
- package/src/assets/js/plugins/codemirror/mode/shell/shell.js +138 -0
- package/src/assets/js/plugins/codemirror/mode/shell/test.js +58 -0
- package/src/assets/js/plugins/codemirror/mode/sieve/index.html +93 -0
- package/src/assets/js/plugins/codemirror/mode/sieve/sieve.js +193 -0
- package/src/assets/js/plugins/codemirror/mode/slim/index.html +96 -0
- package/src/assets/js/plugins/codemirror/mode/slim/slim.js +575 -0
- package/src/assets/js/plugins/codemirror/mode/slim/test.js +96 -0
- package/src/assets/js/plugins/codemirror/mode/smalltalk/index.html +68 -0
- package/src/assets/js/plugins/codemirror/mode/smalltalk/smalltalk.js +168 -0
- package/src/assets/js/plugins/codemirror/mode/smarty/index.html +136 -0
- package/src/assets/js/plugins/codemirror/mode/smarty/smarty.js +221 -0
- package/src/assets/js/plugins/codemirror/mode/smartymixed/index.html +114 -0
- package/src/assets/js/plugins/codemirror/mode/smartymixed/smartymixed.js +197 -0
- package/src/assets/js/plugins/codemirror/mode/solr/index.html +57 -0
- package/src/assets/js/plugins/codemirror/mode/solr/solr.js +104 -0
- package/src/assets/js/plugins/codemirror/mode/sparql/index.html +53 -0
- package/src/assets/js/plugins/codemirror/mode/sparql/sparql.js +160 -0
- package/src/assets/js/plugins/codemirror/mode/sql/index.html +84 -0
- package/src/assets/js/plugins/codemirror/mode/sql/sql.js +393 -0
- package/src/assets/js/plugins/codemirror/mode/stex/index.html +110 -0
- package/src/assets/js/plugins/codemirror/mode/stex/stex.js +262 -0
- package/src/assets/js/plugins/codemirror/mode/stex/test.js +123 -0
- package/src/assets/js/plugins/codemirror/mode/tcl/index.html +142 -0
- package/src/assets/js/plugins/codemirror/mode/tcl/tcl.js +147 -0
- package/src/assets/js/plugins/codemirror/mode/textile/index.html +191 -0
- package/src/assets/js/plugins/codemirror/mode/textile/test.js +406 -0
- package/src/assets/js/plugins/codemirror/mode/textile/textile.js +553 -0
- package/src/assets/js/plugins/codemirror/mode/tiddlywiki/index.html +154 -0
- package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.js +369 -0
- package/src/assets/js/plugins/codemirror/mode/tiki/index.html +95 -0
- package/src/assets/js/plugins/codemirror/mode/tiki/tiki.css +26 -0
- package/src/assets/js/plugins/codemirror/mode/tiki/tiki.js +323 -0
- package/src/assets/js/plugins/codemirror/mode/toml/index.html +73 -0
- package/src/assets/js/plugins/codemirror/mode/toml/toml.js +88 -0
- package/src/assets/js/plugins/codemirror/mode/tornado/index.html +63 -0
- package/src/assets/js/plugins/codemirror/mode/tornado/tornado.js +68 -0
- package/src/assets/js/plugins/codemirror/mode/turtle/index.html +50 -0
- package/src/assets/js/plugins/codemirror/mode/turtle/turtle.js +160 -0
- package/src/assets/js/plugins/codemirror/mode/vb/index.html +102 -0
- package/src/assets/js/plugins/codemirror/mode/vb/vb.js +274 -0
- package/src/assets/js/plugins/codemirror/mode/vbscript/index.html +55 -0
- package/src/assets/js/plugins/codemirror/mode/vbscript/vbscript.js +350 -0
- package/src/assets/js/plugins/codemirror/mode/velocity/index.html +118 -0
- package/src/assets/js/plugins/codemirror/mode/velocity/velocity.js +201 -0
- package/src/assets/js/plugins/codemirror/mode/verilog/index.html +120 -0
- package/src/assets/js/plugins/codemirror/mode/verilog/test.js +273 -0
- package/src/assets/js/plugins/codemirror/mode/verilog/verilog.js +364 -0
- package/src/assets/js/plugins/codemirror/mode/xml/index.html +57 -0
- package/src/assets/js/plugins/codemirror/mode/xml/test.js +51 -0
- package/src/assets/js/plugins/codemirror/mode/xml/xml.js +384 -0
- package/src/assets/js/plugins/codemirror/mode/xquery/index.html +210 -0
- package/src/assets/js/plugins/codemirror/mode/xquery/test.js +67 -0
- package/src/assets/js/plugins/codemirror/mode/xquery/xquery.js +447 -0
- package/src/assets/js/plugins/codemirror/mode/yaml/index.html +80 -0
- package/src/assets/js/plugins/codemirror/mode/yaml/yaml.js +112 -0
- package/src/assets/js/plugins/codemirror/mode/z80/index.html +52 -0
- package/src/assets/js/plugins/codemirror/mode/z80/z80.js +100 -0
- package/src/assets/js/plugins/colorpicker/bootstrap-colorpicker.min.js +1 -0
- package/src/assets/js/plugins/cropper/cropper.min.js +9 -0
- package/src/assets/js/plugins/d3/d3.min.js +5 -0
- package/src/assets/js/plugins/dataTables/datatables.min.js +336 -0
- package/src/assets/js/plugins/datapicker/bootstrap-datepicker.js +1671 -0
- package/src/assets/js/plugins/datatables.net/jquery.dataTables.js +15344 -0
- package/src/assets/js/plugins/daterangepicker/daterangepicker.js +1304 -0
- package/src/assets/js/plugins/diff_match_patch/COPYING +177 -0
- package/src/assets/js/plugins/diff_match_patch/README.txt +43 -0
- package/src/assets/js/plugins/diff_match_patch/javascript/diff_match_patch.js +49 -0
- package/src/assets/js/plugins/dotdotdot/jquery.dotdotdot.min.js +13 -0
- package/src/assets/js/plugins/dropzone/dropzone.js +1841 -0
- package/src/assets/js/plugins/easypiechart/easypiechart.js +350 -0
- package/src/assets/js/plugins/easypiechart/jquery.easypiechart.js +359 -0
- package/src/assets/js/plugins/flot/curvedLines.js +315 -0
- package/src/assets/js/plugins/flot/excanvas.min.js +1 -0
- package/src/assets/js/plugins/flot/jquery.flot.js +3168 -0
- package/src/assets/js/plugins/flot/jquery.flot.pie.js +820 -0
- package/src/assets/js/plugins/flot/jquery.flot.resize.js +59 -0
- package/src/assets/js/plugins/flot/jquery.flot.spline.js +212 -0
- package/src/assets/js/plugins/flot/jquery.flot.symbol.js +71 -0
- package/src/assets/js/plugins/flot/jquery.flot.time.js +432 -0
- package/src/assets/js/plugins/flot/jquery.flot.tooltip.min.js +12 -0
- package/src/assets/js/plugins/footable/footable.all.min.js +14 -0
- package/src/assets/js/plugins/fullcalendar/fullcalendar.min.js +8 -0
- package/src/assets/js/plugins/fullcalendar/moment.min.js +7 -0
- package/src/assets/js/plugins/gritter/images/gritter-light.png +0 -0
- package/src/assets/js/plugins/gritter/images/gritter-long.png +0 -0
- package/src/assets/js/plugins/gritter/images/gritter.png +0 -0
- package/src/assets/js/plugins/gritter/images/ie-spacer.gif +0 -0
- package/src/assets/js/plugins/gritter/jquery.gritter.css +137 -0
- package/src/assets/js/plugins/gritter/jquery.gritter.min.js +1 -0
- package/src/assets/js/plugins/i18next/i18next.min.js +7 -0
- package/src/assets/js/plugins/iCheck/icheck.min.js +11 -0
- package/src/assets/js/plugins/idle-timer/idle-timer.min.js +2 -0
- package/src/assets/js/plugins/ionRangeSlider/ion.rangeSlider.min.js +26 -0
- package/src/assets/js/plugins/jasny/jasny-bootstrap.min.js +6 -0
- package/src/assets/js/plugins/jeditable/jquery.jeditable.js +543 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ar.js +128 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg.js +134 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg1251.js +132 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cat.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cn.js +169 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cs.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-da.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-de.js +173 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-dk.js +129 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-el.js +128 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-en.js +170 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-es.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fa.js +147 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fi.js +131 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fr.js +128 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-gl.js +128 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-he.js +129 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr.js +164 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr1250.js +164 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hu.js +131 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-id.js +170 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-is.js +128 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-it.js +1 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ja.js +158 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-kr.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-lt.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-mne.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-nl.js +150 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-no.js +1 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pl.js +134 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt-br.js +137 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt.js +127 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ro.js +141 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ru.js +129 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sk.js +129 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr-latin.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sv.js +129 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-th.js +130 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tr.js +128 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tw.js +131 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ua.js +129 -0
- package/src/assets/js/plugins/jqGrid/i18n/grid.locale-vi.js +170 -0
- package/src/assets/js/plugins/jqGrid/jquery.jqGrid.min.js +545 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery-ui-i18n.min.js +6 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-af.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-az.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-be.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bg.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bs.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ca.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cs.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cy-GB.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-da.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-de.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-el.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-AU.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-GB.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-NZ.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eo.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-es.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-et.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eu.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fa.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fi.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fo.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CA.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CH.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-gl.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-he.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hi.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hr.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hy.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-id.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-is.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-it.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ja.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ka.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-kk.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-km.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ko.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ky.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lb.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lt.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lv.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-mk.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ml.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ms.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nb.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl-BE.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nn.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-no.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pl.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt-BR.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-rm.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ro.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ru.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sk.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sl.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sq.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr-SR.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sv.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ta.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-th.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tj.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tr.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-uk.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-vi.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-CN.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-HK.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-TW.min.js +4 -0
- package/src/assets/js/plugins/jquery-ui/images/animated-overlay.gif +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
- package/src/assets/js/plugins/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/src/assets/js/plugins/jquery-ui/jquery-ui.css +1189 -0
- package/src/assets/js/plugins/jquery-ui/jquery-ui.js +15040 -0
- package/src/assets/js/plugins/jquery-ui/jquery-ui.min.css +4 -0
- package/src/assets/js/plugins/jquery-ui/jquery-ui.min.js +12 -0
- package/src/assets/js/plugins/jsKnob/jquery.knob.js +791 -0
- package/src/assets/js/plugins/jsTree/jstree.min.js +5 -0
- package/src/assets/js/plugins/justified-gallery/README.md +14 -0
- package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.css +73 -0
- package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.js +258 -0
- package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.css +17 -0
- package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.js +24 -0
- package/src/assets/js/plugins/justified-gallery/loading.gif +0 -0
- package/src/assets/js/plugins/jvectormap/jquery-jvectormap-2.0.2.css +130 -0
- package/src/assets/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js +3328 -0
- package/src/assets/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +1 -0
- package/src/assets/js/plugins/ladda/ladda.jquery.min.js +8 -0
- package/src/assets/js/plugins/ladda/ladda.min.js +8 -0
- package/src/assets/js/plugins/ladda/spin.min.js +1 -0
- package/src/assets/js/plugins/masonary/masonry.pkgd.min.js +9 -0
- package/src/assets/js/plugins/metisMenu/jquery.metisMenu.js +10 -0
- package/src/assets/js/plugins/morris/morris.js +1892 -0
- package/src/assets/js/plugins/morris/raphael-2.1.0.min.js +10 -0
- package/src/assets/js/plugins/nestable/jquery.nestable.js +484 -0
- package/src/assets/js/plugins/nouslider/jquery.nouislider.min.js +34 -0
- package/src/assets/js/plugins/pace/pace.min.js +2 -0
- package/src/assets/js/plugins/peity/jquery.peity.min.js +13 -0
- package/src/assets/js/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js +76 -0
- package/src/assets/js/plugins/rickshaw/rickshaw.min.js +3 -0
- package/src/assets/js/plugins/rickshaw/vendor/d3.v3.js +5 -0
- package/src/assets/js/plugins/select2/select2.full.min.js +3 -0
- package/src/assets/js/plugins/slick/slick.min.js +18 -0
- package/src/assets/js/plugins/slimscroll/jquery.slimscroll.js +474 -0
- package/src/assets/js/plugins/slimscroll/jquery.slimscroll.min.js +16 -0
- package/src/assets/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
- package/src/assets/js/plugins/staps/jquery.steps.min.js +6 -0
- package/src/assets/js/plugins/summernote/summernote.min.js +2 -0
- package/src/assets/js/plugins/sweetalert/sweetalert.min.js +1 -0
- package/src/assets/js/plugins/switchery/switchery.js +1 -0
- package/src/assets/js/plugins/tinycon/tinycon.min.js +8 -0
- package/src/assets/js/plugins/toastr/toastr.min.js +2 -0
- package/src/assets/js/plugins/touchspin/jquery.bootstrap-touchspin.min.js +9 -0
- package/src/assets/js/plugins/validate/jquery.validate.min.js +4 -0
- package/src/assets/js/plugins/video/responsible-video.js +21 -0
- package/src/assets/js/plugins/wow/wow.min.js +2 -0
- package/src/environment.ts +24 -0
- package/src/index.html +23 -0
- package/src/main.ts +10 -0
- package/src/polyfills.ts +3 -0
- package/src/tsconfig.json +21 -0
- package/src/vendor.ts +32 -0
- package/tslint.json +93 -0
- package/types.d.ts +0 -0
- package/web.config +34 -0
- package/webpack.config.js +1 -0
|
@@ -0,0 +1,1567 @@
|
|
|
1
|
+
import { Component, OnInit, AfterViewInit, ViewContainerRef, ViewChild } from '@angular/core';
|
|
2
|
+
import { Common } from '../../../shared/common/common';
|
|
3
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
4
|
+
import { SharedService } from '../../../shared/service/shared.service';
|
|
5
|
+
import { Constants } from '../../../shared/constants/constants';
|
|
6
|
+
import { WalletRegistrationModel, ContactModel, CustomerModel, WalletModel, MailingAddressModel, CompanyAddressModel, CardModel, AttachFileModel, AttachFileListModel, DownloadFileModel, AddWalletAuditLogModel } from '../models/index';
|
|
7
|
+
import { Alerts } from '../../../shared/alerts/alerts';
|
|
8
|
+
import { AuditLogInsertModel } from '../../../models/audit-log-insert.model';
|
|
9
|
+
import { AddCardAuditLogMoel, AddWalletModel, CustomerDipChipModel, UpdateStatus } from "../models/wallet-registration.model";
|
|
10
|
+
import { CustomerPersonalDetailsComponent } from '../../customer-personal-details/components/customer-personal-details.component';
|
|
11
|
+
import { CompanyModel } from '../../../fee-management/company/models';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'customer-registration',
|
|
15
|
+
templateUrl: '../customer-registration.component.html',
|
|
16
|
+
styleUrls: ['../customer-registration.component.css']
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
20
|
+
@ViewChild('duplicateMobileModal') duplicateMobileModal: any;
|
|
21
|
+
@ViewChild('addWalletModal') addWalletModal: any;
|
|
22
|
+
@ViewChild('deleteConfirmationModal') deleteConfirmationModal: any;
|
|
23
|
+
@ViewChild('updateDataConfirmationModal') updateDataConfirmationModal: any;
|
|
24
|
+
@ViewChild(CustomerPersonalDetailsComponent) custPersonalDetailsComp: CustomerPersonalDetailsComponent;
|
|
25
|
+
@ViewChild('customPopupModal') customPopupModal: any;
|
|
26
|
+
private showCardModel: boolean;
|
|
27
|
+
private showWalletModal: boolean;
|
|
28
|
+
private dateFormat: string;
|
|
29
|
+
private walletRegistrationModel: WalletRegistrationModel;
|
|
30
|
+
private cardModel: CardModel;
|
|
31
|
+
private attachFileModel: AttachFileModel;
|
|
32
|
+
private stateList: any[];
|
|
33
|
+
private stateListData: any[];
|
|
34
|
+
private mailingStateListData: any[];
|
|
35
|
+
private companyStateListData: any[];
|
|
36
|
+
private districtList: any[];
|
|
37
|
+
private districtListData: any[];
|
|
38
|
+
private mailingDistrictList: any[];
|
|
39
|
+
private mailingDistrictListData: any[];
|
|
40
|
+
private companyDistrictList: any[];
|
|
41
|
+
private companyDistrictListData: any[];
|
|
42
|
+
private walletStatusList: any[];
|
|
43
|
+
public walletStatusListData: any[];
|
|
44
|
+
public walletTypeList: any[];
|
|
45
|
+
public walletTypeListData: any[];
|
|
46
|
+
public addWalletTypeListData: any[];
|
|
47
|
+
public pageName: string;
|
|
48
|
+
public customerId: any;
|
|
49
|
+
private todayDate: Date;
|
|
50
|
+
private auditLogInsertModel: AuditLogInsertModel;
|
|
51
|
+
private actualObject: WalletRegistrationModel;
|
|
52
|
+
public isUserTerminated: boolean = false;
|
|
53
|
+
public isWalletTerminated: boolean = false;
|
|
54
|
+
public homeAsMailingAddress: boolean = false;
|
|
55
|
+
public confirmMessage: string;
|
|
56
|
+
private fileName: any;
|
|
57
|
+
private url: string;
|
|
58
|
+
public imageURL: any;
|
|
59
|
+
public attachFileType = ['jpg', 'jpeg', 'pdf'];
|
|
60
|
+
public countryList: any[];
|
|
61
|
+
public countryListData: any[];
|
|
62
|
+
public mailingCountryListData: any[];
|
|
63
|
+
public downloadFileModel: DownloadFileModel;
|
|
64
|
+
public isWalletPresent: boolean = false;
|
|
65
|
+
public topupRights: boolean = false;
|
|
66
|
+
public resetPasscodeRights: boolean = false;
|
|
67
|
+
public addCardRights: boolean = false;
|
|
68
|
+
public addWalletRights: boolean = false;
|
|
69
|
+
public fullPanRights: boolean = false;
|
|
70
|
+
public addCardAuditLogMoel: AddCardAuditLogMoel;
|
|
71
|
+
public isFile1Deleted: boolean = false;
|
|
72
|
+
public isFile2Deleted: boolean = false;
|
|
73
|
+
public isFileUpdated1: boolean = false;
|
|
74
|
+
public isFileUpdated2: boolean = false;
|
|
75
|
+
public isStateListPopulated: boolean = false;
|
|
76
|
+
public selectedFile: string;
|
|
77
|
+
public addWalletModel: AddWalletModel;
|
|
78
|
+
public addWalletAuditLogModel: AddWalletAuditLogModel;
|
|
79
|
+
public disableEdit: boolean = false;
|
|
80
|
+
public disableCreate: boolean = false;
|
|
81
|
+
public walletProfileList: any[];
|
|
82
|
+
public walletProfileListData: any;
|
|
83
|
+
public addWalletProfileListData: any[];
|
|
84
|
+
public is2C2PAdmin: boolean = true;
|
|
85
|
+
public isAddWalletSubmit: boolean = false;
|
|
86
|
+
public walletTypeCustomer: number = Constants.WALLET_CUSTOMER;
|
|
87
|
+
public walletId: string;
|
|
88
|
+
public thaiCountryId: string = '764';
|
|
89
|
+
public defaultWalletTypeItem: any;
|
|
90
|
+
public defaultWalletProfileItem: any;
|
|
91
|
+
public defaultCountryItem: any;
|
|
92
|
+
public defaultStateItem: any;
|
|
93
|
+
public defaultDistrictItem: any;
|
|
94
|
+
public alertMessage: string;
|
|
95
|
+
public editAbnormalCase: Boolean = false;
|
|
96
|
+
public displayKycValidation: Boolean = false;
|
|
97
|
+
public walletStatusDisabled: boolean = false;
|
|
98
|
+
private disableWalletProfile: Boolean = false;
|
|
99
|
+
private showApprovalIcon: boolean = false;
|
|
100
|
+
private autoApprove: boolean = true;
|
|
101
|
+
private companyModel: CompanyModel;
|
|
102
|
+
|
|
103
|
+
constructor(public sharedService: SharedService, public common: Common,
|
|
104
|
+
private router: Router, private route: ActivatedRoute, private alert: Alerts,
|
|
105
|
+
private vcr: ViewContainerRef) {
|
|
106
|
+
this.alert.setRootViewContainerRef(vcr);
|
|
107
|
+
this.walletRegistrationModel = new WalletRegistrationModel();
|
|
108
|
+
this.walletRegistrationModel.Customer = new CustomerModel();
|
|
109
|
+
this.walletRegistrationModel.Contact = new ContactModel();
|
|
110
|
+
this.walletRegistrationModel.Wallet = new WalletModel();
|
|
111
|
+
this.walletRegistrationModel.MailingAddress = new MailingAddressModel();
|
|
112
|
+
this.walletRegistrationModel.CompanyAddress = new CompanyAddressModel();
|
|
113
|
+
this.walletRegistrationModel.AttachFileListModel = new AttachFileListModel();
|
|
114
|
+
this.walletRegistrationModel.CustomerDipChip = new CustomerDipChipModel();
|
|
115
|
+
this.cardModel = new CardModel();
|
|
116
|
+
this.attachFileModel = new AttachFileModel();
|
|
117
|
+
this.stateList = [];
|
|
118
|
+
this.stateListData = [];
|
|
119
|
+
this.mailingStateListData = [];
|
|
120
|
+
this.companyStateListData = [];
|
|
121
|
+
this.walletStatusList = [];
|
|
122
|
+
this.walletTypeList = [];
|
|
123
|
+
this.auditLogInsertModel = new AuditLogInsertModel();
|
|
124
|
+
this.actualObject = new WalletRegistrationModel();
|
|
125
|
+
this.imageURL = { src: null, fileName: null };
|
|
126
|
+
this.downloadFileModel = new DownloadFileModel();
|
|
127
|
+
this.actualObject.Customer = new CustomerModel();
|
|
128
|
+
this.actualObject.Contact = new ContactModel();
|
|
129
|
+
this.actualObject.Wallet = new WalletModel();
|
|
130
|
+
this.actualObject.MailingAddress = new MailingAddressModel();
|
|
131
|
+
this.actualObject.CompanyAddress = new CompanyAddressModel();
|
|
132
|
+
this.actualObject.AttachFileListModel = new AttachFileListModel();
|
|
133
|
+
this.sharedService.disableButton = false;
|
|
134
|
+
this.addWalletModel = new AddWalletModel();
|
|
135
|
+
this.addWalletAuditLogModel = new AddWalletAuditLogModel();
|
|
136
|
+
this.defaultWalletTypeItem = { walletType: Constants.SELECT_WALLET_TYPE, walletTypeId: null }
|
|
137
|
+
this.defaultWalletProfileItem = { profileName: Constants.SELECT_WALLET_PROFILE, walletProfileId: null }
|
|
138
|
+
this.defaultCountryItem = { countryName: Constants.SELECT_COUNTRY, countryCode: null }
|
|
139
|
+
this.defaultStateItem = { stateName: 'Select State / Province', stateId: null }
|
|
140
|
+
this.defaultDistrictItem = { districtName: 'Select District', districtId: null }
|
|
141
|
+
this.autoApprove = this.sharedService.autoApprove;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
ngOnInit() {
|
|
145
|
+
// set date format
|
|
146
|
+
this.dateFormat = Constants.DATE_FORMAT;
|
|
147
|
+
this.todayDate = new Date();
|
|
148
|
+
this.showApprovalIcon = this.sharedService.CanChecker();
|
|
149
|
+
|
|
150
|
+
// get page name and wallet Id from url
|
|
151
|
+
let urlSegment = this.route.snapshot.url[0];
|
|
152
|
+
if (urlSegment) {
|
|
153
|
+
switch (urlSegment.path) {
|
|
154
|
+
case 'customer-registration-view':
|
|
155
|
+
this.pageName = Constants.VIEW;
|
|
156
|
+
if (localStorage.getItem('displayKycFailure') === 'true') {
|
|
157
|
+
this.displayKycValidation = true;
|
|
158
|
+
}
|
|
159
|
+
localStorage.removeItem('displayKycFailure');
|
|
160
|
+
break;
|
|
161
|
+
|
|
162
|
+
case 'customer-registration-new':
|
|
163
|
+
this.pageName = Constants.NEW;
|
|
164
|
+
break;
|
|
165
|
+
|
|
166
|
+
case 'customer-registration-edit':
|
|
167
|
+
this.pageName = Constants.EDIT;
|
|
168
|
+
if (localStorage.getItem('editAbnormal') === 'true') {
|
|
169
|
+
this.editAbnormalCase = true;
|
|
170
|
+
}
|
|
171
|
+
localStorage.removeItem('editAbnormal');
|
|
172
|
+
|
|
173
|
+
if (localStorage.getItem('displayKycFailure') === 'true') {
|
|
174
|
+
this.displayKycValidation = true;
|
|
175
|
+
}
|
|
176
|
+
localStorage.removeItem('displayKycFailure');
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
this.customerId = this.route.snapshot.params[Constants.ID];
|
|
182
|
+
|
|
183
|
+
this.initializeWalletData();
|
|
184
|
+
|
|
185
|
+
if (this.common.getManualPostingUserRights('CustomerManagement', Constants.WALLET_MANUAL_POST, Constants.TOPUP_WITHDRAW) ||
|
|
186
|
+
this.common.getManualPostingUserRights('CustomerManagement', Constants.WALLET_MANUAL_POST, Constants.DEBIT_CREDIT_ADJUSTMENT)) {
|
|
187
|
+
this.topupRights = true;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
this.resetPasscodeRights = this.common.getUserRights('CustomerManagement', 'ResetPasscode');
|
|
191
|
+
this.addCardRights = this.common.getUserRights('CustomerManagement', 'AddCard');
|
|
192
|
+
this.fullPanRights = this.common.getUserRights('Others', 'FullPAN');
|
|
193
|
+
this.addWalletRights = this.common.getUserRights('CustomerManagement', 'AddWallet');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
ngAfterViewInit() {
|
|
197
|
+
this.bindEvents();
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
private bindEvents() {
|
|
201
|
+
let componentObject = this;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
private initializeWalletData() {
|
|
205
|
+
if (this.pageName) {
|
|
206
|
+
switch (this.pageName) {
|
|
207
|
+
case Constants.EDIT:
|
|
208
|
+
// set page title and url
|
|
209
|
+
this.common.setPageTitle(Constants.CUSTOMER_MANAGEMENT, Constants.CUSTOMER_REGISTRATION_URL,
|
|
210
|
+
Constants.CUSTOMER_REGISTRATION, Constants.CUSTOMER_REGISTRATION_URL, Constants.EDIT_TITLE,
|
|
211
|
+
Constants.CUSTOMER_REGISTRATION_EDIT_URL, Constants.CUSTOMER_REGISTRATION_URL);
|
|
212
|
+
// bind Events
|
|
213
|
+
this.bindEvents();
|
|
214
|
+
break;
|
|
215
|
+
case Constants.VIEW:
|
|
216
|
+
// set page title and url
|
|
217
|
+
this.common.setPageTitle(Constants.CUSTOMER_MANAGEMENT, Constants.CUSTOMER_REGISTRATION_URL,
|
|
218
|
+
Constants.CUSTOMER_REGISTRATION, Constants.CUSTOMER_REGISTRATION_URL, Constants.VIEW_TITLE,
|
|
219
|
+
Constants.CUSTOMER_REGISTRATION_VIEW_URL, Constants.CUSTOMER_REGISTRATION_URL);
|
|
220
|
+
break;
|
|
221
|
+
case Constants.NEW:
|
|
222
|
+
// Set page title and url
|
|
223
|
+
this.common.setPageTitle(Constants.CUSTOMER_MANAGEMENT, Constants.CUSTOMER_REGISTRATION_URL,
|
|
224
|
+
Constants.CUSTOMER_REGISTRATION, Constants.CUSTOMER_REGISTRATION_URL, Constants.NEW_TITLE,
|
|
225
|
+
Constants.CUSTOMER_REGISTRATION_NEW_URL, Constants.CUSTOMER_REGISTRATION_URL);
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
this.getCountryList();
|
|
230
|
+
this.getWalletStatusList();
|
|
231
|
+
this.getWalletTypeList();
|
|
232
|
+
|
|
233
|
+
if (this.common.getCompanyId() != Constants.COMPANY_ID_2C2P) {
|
|
234
|
+
this.walletRegistrationModel.Customer.CompanyUniqueId = this.common.getCompanyUniqueId();
|
|
235
|
+
this.is2C2PAdmin = false;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (this.pageName != Constants.NEW) {
|
|
239
|
+
this.getWalletDetails();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
private getCountryList() {
|
|
245
|
+
this.sharedService.get(Constants.MASTER_COUNTRY_NAME_API).subscribe((data: any) => {
|
|
246
|
+
let response: any = data;
|
|
247
|
+
this.handleResponse(response, Constants.MASTER_COUNTRY_NAME_API);
|
|
248
|
+
}, (error: any) => {
|
|
249
|
+
this.alert.error(error);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
private getWalletStatusList() {
|
|
254
|
+
this.sharedService.get(Constants.MASTER_WALLET_STATUS_API).subscribe((data: any) => {
|
|
255
|
+
let response: any = data;
|
|
256
|
+
this.handleResponse(response, Constants.MASTER_WALLET_STATUS_API);
|
|
257
|
+
}, (error: any) => {
|
|
258
|
+
this.alert.error(error);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
public getStateList(isCountryChange?: boolean) {
|
|
263
|
+
if (isCountryChange) {
|
|
264
|
+
this.walletRegistrationModel.Contact.StateId = null;
|
|
265
|
+
this.walletRegistrationModel.Contact.DistrictId = null;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (this.walletRegistrationModel.Contact.CountryCode === this.thaiCountryId) {
|
|
269
|
+
let url = `${Constants.MASTER_STATE_API}?countryId=${this.walletRegistrationModel.Contact.CountryCode}`;
|
|
270
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
271
|
+
let response: any = data ? data : null;
|
|
272
|
+
switch (response.responseCode) {
|
|
273
|
+
case Constants.SUCCESS_CODE:
|
|
274
|
+
this.stateList = response.stateList;
|
|
275
|
+
|
|
276
|
+
this.BindStateName();
|
|
277
|
+
|
|
278
|
+
break;
|
|
279
|
+
case Constants.DATA_NOT_FOUND:
|
|
280
|
+
this.stateList = [];
|
|
281
|
+
this.walletRegistrationModel.Contact.StateId = null;
|
|
282
|
+
break;
|
|
283
|
+
default:
|
|
284
|
+
this.alert.error(response.resDescriptionEN);
|
|
285
|
+
this.stateList = [];
|
|
286
|
+
this.walletRegistrationModel.Contact.StateId = null;
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
this.stateListData = this.stateList;
|
|
290
|
+
}, (error: any) => {
|
|
291
|
+
this.alert.error(error);
|
|
292
|
+
this.stateList = [];
|
|
293
|
+
this.walletRegistrationModel.Contact.StateId = null;
|
|
294
|
+
this.stateListData = this.stateList;
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
this.stateList = [];
|
|
299
|
+
this.walletRegistrationModel.Contact.StateId = null;
|
|
300
|
+
this.stateListData = this.stateList;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
private getWalletTypeList() {
|
|
305
|
+
this.sharedService.get(Constants.MASTER_WALLET_TYPE_API).subscribe((data: any) => {
|
|
306
|
+
let response: any = data;
|
|
307
|
+
this.handleResponse(response, Constants.MASTER_WALLET_TYPE_API);
|
|
308
|
+
}, (error: any) => {
|
|
309
|
+
this.alert.error(error);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
private BindStateName() {
|
|
314
|
+
|
|
315
|
+
if (this.pageName === Constants.VIEW) {
|
|
316
|
+
if (this.walletRegistrationModel.Contact.StateId > 0 && !this.walletRegistrationModel.Contact.State) {
|
|
317
|
+
let data = this.stateList.filter((element: any) => {
|
|
318
|
+
if (element.stateId == this.walletRegistrationModel.Contact.StateId)
|
|
319
|
+
return element;
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
if (data && data.length > 0)
|
|
323
|
+
this.walletRegistrationModel.Contact.State = data[0].stateName;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (this.walletRegistrationModel.MailingAddress.StateId > 0 && !this.walletRegistrationModel.MailingAddress.State) {
|
|
327
|
+
let data = this.stateList.filter((element: any) => {
|
|
328
|
+
if (element.stateId == this.walletRegistrationModel.MailingAddress.StateId)
|
|
329
|
+
return element;
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
if (data && data.length > 0)
|
|
333
|
+
this.walletRegistrationModel.MailingAddress.State = data[0].stateName;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (this.walletRegistrationModel.CompanyAddress.StateId > 0 && !this.walletRegistrationModel.CompanyAddress.CompanyState) {
|
|
337
|
+
let data = this.stateList.filter((element: any) => {
|
|
338
|
+
if (element.stateId == this.walletRegistrationModel.CompanyAddress.StateId)
|
|
339
|
+
return element;
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
if (data && data.length > 0)
|
|
343
|
+
this.walletRegistrationModel.CompanyAddress.CompanyState = data[0].stateName;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
private getWalletDetails() {
|
|
349
|
+
let url = `${Constants.GET_WALLET_DETAILS}/${this.customerId}`;
|
|
350
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
351
|
+
let response: any = data;
|
|
352
|
+
this.handleResponse(response, Constants.GET_REQUEST);
|
|
353
|
+
}, (error: any) => {
|
|
354
|
+
this.alert.error(error);
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// on Edit Click redirect to edit page
|
|
359
|
+
public onEditClick() {
|
|
360
|
+
this.router.navigate(['/customer-registration-edit', this.customerId]);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
public saveData() {
|
|
364
|
+
if (this.walletRegistrationModel.Customer.CustomerCompany != undefined && this.walletRegistrationModel.Customer.CustomerCompany.length > 100) {
|
|
365
|
+
this.alert.error("Customer company can't be greater than 100 characters");
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
this.sharedService.disableButton = true;
|
|
370
|
+
|
|
371
|
+
if (this.walletRegistrationModel.Contact.CountryCode === this.thaiCountryId) {
|
|
372
|
+
this.walletRegistrationModel.Contact.State = null;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
this.walletRegistrationModel.Contact.StateId = null;
|
|
376
|
+
this.walletRegistrationModel.Contact.DistrictId = null;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (this.walletRegistrationModel.MailingAddress.CountryCode === this.thaiCountryId) {
|
|
380
|
+
this.walletRegistrationModel.MailingAddress.State = null;
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
this.walletRegistrationModel.MailingAddress.StateId = null;
|
|
384
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = null;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if (this.walletRegistrationModel.CompanyAddress.CompanyCountryCode === this.thaiCountryId) {
|
|
388
|
+
this.walletRegistrationModel.CompanyAddress.CompanyState = null;
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
this.walletRegistrationModel.CompanyAddress.StateId = null;
|
|
392
|
+
this.walletRegistrationModel.CompanyAddress.DistrictId = null;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (this.pageName == Constants.EDIT) {
|
|
396
|
+
this.updateCustomer();
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (this.disableCreate) {
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
this.disableCreate = true;
|
|
405
|
+
let url = `${Constants.CUSTOMER_API}`;
|
|
406
|
+
let requestJson = this.getRequestJson();
|
|
407
|
+
this.sharedService.post(url, requestJson).subscribe((data: any) => {
|
|
408
|
+
let response: any = data;
|
|
409
|
+
this.handleResponse(response, Constants.POST_REQUEST);
|
|
410
|
+
}, (error: any) => {
|
|
411
|
+
this.alert.error(error);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
public onAddWallet() {
|
|
416
|
+
if (!this.addWalletRights) {
|
|
417
|
+
this.alert.error(this.common.permissionMessage);
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if (this.addWalletModel.WalletTypeId == 0) {
|
|
422
|
+
return false;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
this.isAddWalletSubmit = true;
|
|
426
|
+
var walletTypeItem = this.walletTypeList.filter(item => item.walletTypeId == this.addWalletModel.WalletTypeId);
|
|
427
|
+
let customerWalletType = walletTypeItem[0].walletType;
|
|
428
|
+
if ((this.addWalletModel.WalletProfileId == null || this.addWalletModel.WalletProfileId == 0) &&
|
|
429
|
+
customerWalletType === Constants.WALLET_TYPE_CUSTOMER) {
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
let request = {
|
|
434
|
+
CustomerId: this.customerId,
|
|
435
|
+
WalletTypeId: this.addWalletModel.WalletTypeId,
|
|
436
|
+
CompanyId: this.common.getCompanyId(),
|
|
437
|
+
WalletProfileId: customerWalletType === Constants.WALLET_TYPE_CUSTOMER ? this.addWalletModel.WalletProfileId : null
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
this.addWalletModel.WalletType = walletTypeItem[0].walletType;
|
|
441
|
+
this.addWalletAuditLogModel.WalletType = this.addWalletModel.WalletType;
|
|
442
|
+
let url = `${Constants.CUSTOMER_ADD_WALLET}`;
|
|
443
|
+
this.sharedService.post(url, request).subscribe((data: any) => {
|
|
444
|
+
let response: any = data;
|
|
445
|
+
if (response && response.responseCode === Constants.SUCCESS_CODE) {
|
|
446
|
+
this.addWalletModal.close();
|
|
447
|
+
this.showWalletModal = false;
|
|
448
|
+
this.insertAddWalletLog(this.auditLogInsertModel);
|
|
449
|
+
this.getWalletDetails();
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
this.alert.error(response.resDescriptionEN);
|
|
453
|
+
}
|
|
454
|
+
}, (error: any) => {
|
|
455
|
+
this.alert.error(error);
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// update existing Customer mobile number = mobile number + companyID and terminate existing customer
|
|
460
|
+
public updateCustomer() {
|
|
461
|
+
this.duplicateMobileModal.close();
|
|
462
|
+
|
|
463
|
+
let url = `${Constants.GET_CUSTOMER_REGISTRATION_LIST}/${this.customerId}`;
|
|
464
|
+
let requestJson = this.getRequestJson();
|
|
465
|
+
this.sharedService.put(url, requestJson).subscribe((data: any) => {
|
|
466
|
+
let response: any = data;
|
|
467
|
+
if (response.responseCode == Constants.SUCCESS_CODE) {
|
|
468
|
+
|
|
469
|
+
// insert audit log
|
|
470
|
+
this.insertEditAuditLog(this.auditLogInsertModel);
|
|
471
|
+
|
|
472
|
+
if (this.custPersonalDetailsComp.kycVerificationRequired && this.walletRegistrationModel.Customer.CustomerTypeId === 1) {
|
|
473
|
+
this.updateDataConfirmationModal.open();
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
this.alert.success(Constants.UPDATE_SUCCESS_MESSAGE);
|
|
477
|
+
this.loadViewPage();
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
this.alert.error(response.resDescriptionEN);
|
|
482
|
+
}
|
|
483
|
+
}, (error: any) => {
|
|
484
|
+
this.alert.error(error);
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
private loadViewPage() {
|
|
489
|
+
setTimeout(() => {
|
|
490
|
+
this.router.navigate(['/customer-registration-list']);
|
|
491
|
+
}, Constants.TIMEOUT);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// validate Date
|
|
495
|
+
private setUpdatedDate(date: any) {
|
|
496
|
+
let strDate: string = date ? date.toString() : null;
|
|
497
|
+
let dob = this.common.parseStringDateToFormat(strDate, Constants.DEFAULT_DATE_CONVERT);
|
|
498
|
+
this.walletRegistrationModel.Customer.CustomerDateOfBirth = dob >= this.todayDate ? null : dob;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
private handleResponse(response: any, requestType: string) {
|
|
502
|
+
if (!response) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
this.disableCreate = false;
|
|
507
|
+
switch (response.responseCode) {
|
|
508
|
+
case Constants.SUCCESS_CODE:
|
|
509
|
+
this.handleSuccessResponse(response, requestType);
|
|
510
|
+
break;
|
|
511
|
+
case Constants.DUPLICATE_MOBILE_NUMBER:
|
|
512
|
+
if (requestType == Constants.PUT_REQUEST) {
|
|
513
|
+
this.duplicateMobileModal.open();
|
|
514
|
+
this.confirmMessage = response.responseDescription;
|
|
515
|
+
}
|
|
516
|
+
else if (requestType == Constants.POST_REQUEST) {
|
|
517
|
+
this.alert.error(response.responseDescription);
|
|
518
|
+
}
|
|
519
|
+
break;
|
|
520
|
+
default:
|
|
521
|
+
this.alert.error(response.responseDescription);
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
private handleSuccessResponse(response: any, requestType: string) {
|
|
527
|
+
if (response && requestType) {
|
|
528
|
+
switch (requestType) {
|
|
529
|
+
// get master wallet profile list
|
|
530
|
+
case Constants.GET_MASTER_WALLET_PROFILE_LIST:
|
|
531
|
+
this.walletProfileList = response.walletProfileList;
|
|
532
|
+
this.walletProfileListData = this.walletProfileList;
|
|
533
|
+
this.addWalletProfileListData = this.walletProfileList;
|
|
534
|
+
break;
|
|
535
|
+
// get master country list request
|
|
536
|
+
case Constants.MASTER_COUNTRY_NAME_API:
|
|
537
|
+
this.countryList = response.countryNameList;
|
|
538
|
+
this.countryListData = this.countryList;
|
|
539
|
+
this.mailingCountryListData = this.countryList;
|
|
540
|
+
break;
|
|
541
|
+
// get master state list request
|
|
542
|
+
case Constants.MASTER_STATE_API:
|
|
543
|
+
this.stateList = response.stateList;
|
|
544
|
+
this.stateListData = this.stateList;
|
|
545
|
+
break;
|
|
546
|
+
// get master wallet status list request
|
|
547
|
+
case Constants.MASTER_WALLET_STATUS_API:
|
|
548
|
+
this.walletStatusList = response.walletStatusList;
|
|
549
|
+
this.walletStatusListData = this.walletStatusList;
|
|
550
|
+
break;
|
|
551
|
+
|
|
552
|
+
case Constants.MASTER_WALLET_TYPE_API:
|
|
553
|
+
if (this.common.getCompanyId() != Constants.COMPANY_ID_2C2P) {
|
|
554
|
+
response.walletTypeList = response.walletTypeList.filter((wallet: any) => wallet.walletTypeId !== 2);
|
|
555
|
+
this.is2C2PAdmin = false;
|
|
556
|
+
}
|
|
557
|
+
this.walletTypeList = response.walletTypeList;
|
|
558
|
+
this.walletTypeListData = this.walletTypeList;
|
|
559
|
+
this.addWalletTypeListData = this.walletTypeList;
|
|
560
|
+
break;
|
|
561
|
+
|
|
562
|
+
// get details request
|
|
563
|
+
case Constants.GET_REQUEST:
|
|
564
|
+
if (response && response.Wallet) {
|
|
565
|
+
this.walletRegistrationModel.Wallet = response.Wallet;
|
|
566
|
+
this.isWalletPresent = true;
|
|
567
|
+
|
|
568
|
+
if (this.common.getCompanyId() != Constants.COMPANY_ID_2C2P && this.walletRegistrationModel.Wallet.WalletTypeId == 2) {
|
|
569
|
+
this.disableEdit = true;
|
|
570
|
+
}
|
|
571
|
+
else {
|
|
572
|
+
this.disableEdit = false;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
this.walletStatusDisabled = ((this.walletRegistrationModel.Wallet.WalletStatusId == Constants.WALLET_STATUS_SUSPENDED_KYC) ||
|
|
576
|
+
(this.walletRegistrationModel.Wallet.WalletStatusId == Constants.WALLET_STATUS_FRAUD));
|
|
577
|
+
|
|
578
|
+
if ((this.walletRegistrationModel.Wallet.WalletStatusId != Constants.WALLET_STATUS_SUSPENDED_KYC) &&
|
|
579
|
+
(this.walletRegistrationModel.Wallet.WalletStatusId != Constants.WALLET_STATUS_FRAUD)) {
|
|
580
|
+
this.walletStatusListData = this.walletStatusListData.filter(ws => ws.walletStatusId != Constants.WALLET_STATUS_SUSPENDED_KYC);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
this.isWalletPresent = false;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
this.walletRegistrationModel.Contact = response.Contact;
|
|
588
|
+
this.walletRegistrationModel.Customer = response.Customer;
|
|
589
|
+
this.walletRegistrationModel.MailingAddress = response.MailingAddress;
|
|
590
|
+
this.walletRegistrationModel.CompanyAddress = response.CompanyAddress;
|
|
591
|
+
this.walletRegistrationModel.AttachFile1 = response.AttachFile1;
|
|
592
|
+
this.walletRegistrationModel.AttachFile2 = response.AttachFile2;
|
|
593
|
+
this.walletRegistrationModel.FileName1 = response.AttachFileName1;
|
|
594
|
+
this.walletRegistrationModel.FileName2 = response.AttachFileName2;
|
|
595
|
+
|
|
596
|
+
this.custPersonalDetailsComp.getUserStatusList();
|
|
597
|
+
|
|
598
|
+
if (this.walletRegistrationModel.Contact.CountryCode === this.thaiCountryId ||
|
|
599
|
+
this.walletRegistrationModel.MailingAddress.CountryCode === this.thaiCountryId ||
|
|
600
|
+
this.walletRegistrationModel.CompanyAddress.CompanyCountryCode === this.thaiCountryId) {
|
|
601
|
+
this.getStateList();
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
if (response && response.Card) {
|
|
605
|
+
this.walletRegistrationModel.Card = response.Card;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
this.isWalletTerminated = this.walletRegistrationModel.Wallet.WalletStatusId == Constants.TERMINATED_STATUS ? true : false;
|
|
609
|
+
this.isUserTerminated = this.walletRegistrationModel.Customer.UserStatusId == Constants.TERMINATED_STATUS ? true : false;
|
|
610
|
+
|
|
611
|
+
// set undefined if null or blank
|
|
612
|
+
this.common.verifySearchObject(this.walletRegistrationModel.Wallet);
|
|
613
|
+
this.common.verifySearchObject(this.walletRegistrationModel.Contact);
|
|
614
|
+
this.common.verifySearchObject(this.walletRegistrationModel.Customer);
|
|
615
|
+
this.common.verifySearchObject(this.walletRegistrationModel.MailingAddress);
|
|
616
|
+
this.common.verifySearchObject(this.walletRegistrationModel.CompanyAddress);
|
|
617
|
+
this.common.verifySearchObject(this.walletRegistrationModel.Card);
|
|
618
|
+
|
|
619
|
+
if (this.walletRegistrationModel.Customer.DateOfBirth) {
|
|
620
|
+
var dateItemsComponent = this.walletRegistrationModel.Customer.DateOfBirth.split('-');
|
|
621
|
+
if (dateItemsComponent[2] == '00' && dateItemsComponent[1] == '00') {
|
|
622
|
+
this.walletRegistrationModel.Customer.DateOfBirthType = Constants.DATE_TYPE_YYYY
|
|
623
|
+
this.walletRegistrationModel.Customer.CustomerDateOfBirth = this.common.parseStringDateToFormat(this.walletRegistrationModel.Customer.DateOfBirth,
|
|
624
|
+
Constants.DATE_TO_STRING_FORMAT_YYYY);
|
|
625
|
+
this.custPersonalDetailsComp.dateOfBirthTypeChange(Constants.DATE_TYPE_YYYY);
|
|
626
|
+
}
|
|
627
|
+
else if (dateItemsComponent[2] == '00' && dateItemsComponent[1] != '00') {
|
|
628
|
+
this.walletRegistrationModel.Customer.DateOfBirthType = Constants.DATE_TYPE_MMYYYY
|
|
629
|
+
this.walletRegistrationModel.Customer.CustomerDateOfBirth = this.common.parseStringDateToFormat(this.walletRegistrationModel.Customer.DateOfBirth,
|
|
630
|
+
Constants.DATE_TO_STRING_FORMAT_YYYYMM);
|
|
631
|
+
this.custPersonalDetailsComp.dateOfBirthTypeChange(Constants.DATE_TYPE_MMYYYY);
|
|
632
|
+
|
|
633
|
+
}
|
|
634
|
+
else if (dateItemsComponent[2] != '00' && dateItemsComponent[1] != '00') {
|
|
635
|
+
this.walletRegistrationModel.Customer.DateOfBirthType = Constants.DATE_TYPE_DDMMYYYY;
|
|
636
|
+
this.walletRegistrationModel.Customer.CustomerDateOfBirth = this.common.parseStringDateToFormat(this.walletRegistrationModel.Customer.DateOfBirth,
|
|
637
|
+
Constants.DATE_TO_STRING_FORMAT_YYYY_MM_DD);
|
|
638
|
+
this.custPersonalDetailsComp.dateOfBirthTypeChange(Constants.DATE_TYPE_DDMMYYYY);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (this.walletRegistrationModel.Customer.IdIssueDate) {
|
|
643
|
+
this.walletRegistrationModel.Customer.IdIssuedDate = this.common.parseStringDateToFormat(this.walletRegistrationModel.Customer.IdIssueDate,
|
|
644
|
+
Constants.DEFAULT_DATE_CONVERT);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
if (this.walletRegistrationModel.Customer.IdExpiryDate) {
|
|
648
|
+
this.walletRegistrationModel.Customer.IdExpiredDate = this.common.parseStringDateToFormat(this.walletRegistrationModel.Customer.IdExpiryDate,
|
|
649
|
+
Constants.DEFAULT_DATE_CONVERT);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
this.custPersonalDetailsComp.getTypeOfIdList();
|
|
653
|
+
|
|
654
|
+
// Clone model data for audit log
|
|
655
|
+
this.setAuditLogModel();
|
|
656
|
+
|
|
657
|
+
this.insertViewAuditLog(this.auditLogInsertModel);
|
|
658
|
+
|
|
659
|
+
if (this.walletRegistrationModel.Customer.CompanyUniqueId) {
|
|
660
|
+
this.getWalletProfileList(this.walletRegistrationModel.Customer.CompanyUniqueId, false);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
if (this.walletRegistrationModel.Wallet.WalletId) {
|
|
664
|
+
this.walletId = ` ${this.common.maskString(6, 4, this.walletRegistrationModel.Wallet.WalletId.toString(), Constants.ASTERISK_SYMBOL)}`;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
this.custPersonalDetailsComp.afterDataLoad();
|
|
668
|
+
|
|
669
|
+
if (this.walletRegistrationModel.Contact.StateId > 0) {
|
|
670
|
+
this.getDistrictList();
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if (this.walletRegistrationModel.MailingAddress.StateId > 0) {
|
|
674
|
+
this.getMailingStateList();
|
|
675
|
+
this.getMailingDistrictList();
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
if (this.walletRegistrationModel.CompanyAddress.StateId > 0) {
|
|
679
|
+
this.getCompanyStateList();
|
|
680
|
+
this.getCompanyDistrictList();
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
if (this.displayKycValidation) {
|
|
684
|
+
this.alertMessage = this.pageName === Constants.VIEW ? Constants.CUSTOMER_KYC_ERROR : Constants.VERIFY_CUSTOMER_INFO_ERROR;
|
|
685
|
+
this.customPopupModal.open();
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
break;
|
|
689
|
+
|
|
690
|
+
// update request
|
|
691
|
+
case Constants.PUT_REQUEST:
|
|
692
|
+
this.alert.success(Constants.UPDATE_SUCCESS_MESSAGE);
|
|
693
|
+
this.loadViewPage();
|
|
694
|
+
|
|
695
|
+
this.insertEditAuditLog(this.auditLogInsertModel);
|
|
696
|
+
break;
|
|
697
|
+
case Constants.POST_REQUEST:
|
|
698
|
+
this.insertAddAuditLog(this.auditLogInsertModel);
|
|
699
|
+
|
|
700
|
+
if (this.autoApprove && this.custPersonalDetailsComp.kycVerificationRequired && this.walletRegistrationModel.Customer.CustomerTypeId === 1) {
|
|
701
|
+
this.customerId = response.customerId;
|
|
702
|
+
|
|
703
|
+
this.updateDataConfirmationModal.open();
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
this.alert.success(Constants.CREATE_SUCCESS_MESSAGE);
|
|
707
|
+
this.loadViewPage();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
private updateStatuses(type: number) {
|
|
714
|
+
let url = `${Constants.UPDATE_STATUS_API}`;
|
|
715
|
+
let updateRequestJson: UpdateStatus = {
|
|
716
|
+
CustomerId: this.customerId,
|
|
717
|
+
UpdateType: type
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
this.sharedService.put(url, updateRequestJson).subscribe((data: any) => {
|
|
721
|
+
let response: any = data;
|
|
722
|
+
if (response.responseCode != Constants.SUCCESS_CODE) {
|
|
723
|
+
}
|
|
724
|
+
}, (error: any) => {
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
private getRequestJson() {
|
|
729
|
+
if (this.walletRegistrationModel.Customer.CustomerTypeId == 1) {
|
|
730
|
+
this.walletRegistrationModel.Customer.FirstName = this.walletRegistrationModel.Customer && this.walletRegistrationModel.Customer.FirstName ?
|
|
731
|
+
this.walletRegistrationModel.Customer.FirstName.trim() : null;
|
|
732
|
+
|
|
733
|
+
this.walletRegistrationModel.Customer.LastName = this.walletRegistrationModel.Customer && this.walletRegistrationModel.Customer.LastName ?
|
|
734
|
+
this.walletRegistrationModel.Customer.LastName.trim() : null;
|
|
735
|
+
}
|
|
736
|
+
else {
|
|
737
|
+
this.walletRegistrationModel.Customer.FirstName = this.walletRegistrationModel.Customer && this.walletRegistrationModel.Customer.FirstName ?
|
|
738
|
+
this.walletRegistrationModel.Customer.FirstName.trim() : null;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
if (this.walletRegistrationModel.Customer.DateOfBirthType == Constants.DATE_TYPE_DDMMYYYY) {
|
|
742
|
+
this.walletRegistrationModel.Customer.DateOfBirth = this.common.convertDateStringFormat(this.walletRegistrationModel.Customer.CustomerDateOfBirth,
|
|
743
|
+
Constants.DATE_TO_STRING_FORMAT_YYYY_MM_DD);
|
|
744
|
+
}
|
|
745
|
+
else if (this.walletRegistrationModel.Customer.DateOfBirthType == Constants.DATE_TYPE_MMYYYY) {
|
|
746
|
+
this.walletRegistrationModel.Customer.DateOfBirth = this.common.convertDateStringFormat(this.walletRegistrationModel.Customer.CustomerDateOfBirth,
|
|
747
|
+
Constants.DATE_TO_STRING_FORMAT_YYYYMM);
|
|
748
|
+
}
|
|
749
|
+
else if (this.walletRegistrationModel.Customer.DateOfBirthType == Constants.DATE_TYPE_YYYY) {
|
|
750
|
+
this.walletRegistrationModel.Customer.DateOfBirth = this.common.convertDateStringFormat(this.walletRegistrationModel.Customer.CustomerDateOfBirth,
|
|
751
|
+
Constants.DATE_TO_STRING_FORMAT_YYYY);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
if (this.walletRegistrationModel.Customer.IdIssuedDate) {
|
|
755
|
+
this.walletRegistrationModel.Customer.IdIssueDate = this.common.convertDateStringFormat(this.walletRegistrationModel.Customer.IdIssuedDate,
|
|
756
|
+
Constants.DEFAULT_DATE_CONVERT);
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
this.walletRegistrationModel.Customer.IdIssueDate = null;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
if (this.walletRegistrationModel.Customer.IdExpiredDate) {
|
|
763
|
+
this.walletRegistrationModel.Customer.IdExpiryDate = this.common.convertDateStringFormat(this.walletRegistrationModel.Customer.IdExpiredDate,
|
|
764
|
+
Constants.DEFAULT_DATE_CONVERT);
|
|
765
|
+
}
|
|
766
|
+
else {
|
|
767
|
+
this.walletRegistrationModel.Customer.IdExpiryDate = null;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if (this.walletRegistrationModel.Contact.MobileCountryCode && (!this.walletRegistrationModel.Contact.MobileNo ||
|
|
771
|
+
(this.walletRegistrationModel.Contact.MobileNo && !this.walletRegistrationModel.Contact.MobileNo.trim()))
|
|
772
|
+
) {
|
|
773
|
+
this.walletRegistrationModel.Contact.MobileCountryCode = null;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
this.walletRegistrationModel.UserUniqueId = this.common.getCurrentUserUniqueID();
|
|
777
|
+
this.walletRegistrationModel.Contact.PostalCode = this.walletRegistrationModel.Contact.PostalCode ? this.walletRegistrationModel.Contact.PostalCode : null;
|
|
778
|
+
this.walletRegistrationModel.MailingAddress.PostalCode = this.walletRegistrationModel.MailingAddress.PostalCode ? this.walletRegistrationModel.MailingAddress.PostalCode : null;
|
|
779
|
+
this.walletRegistrationModel.CompanyAddress.CompanyPostalCode = this.walletRegistrationModel.CompanyAddress.CompanyPostalCode ? this.walletRegistrationModel.CompanyAddress.CompanyPostalCode : null;
|
|
780
|
+
var companyDetails = this.custPersonalDetailsComp.companyList.filter(x => x.companyUniqueId == this.walletRegistrationModel.Customer.CompanyUniqueId)[0];
|
|
781
|
+
|
|
782
|
+
if (companyDetails) {
|
|
783
|
+
this.walletRegistrationModel.Customer.CompanyName = companyDetails.companyName;
|
|
784
|
+
this.walletRegistrationModel.Customer.CompanyUniqueId = companyDetails.companyUniqueId;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
if (this.walletRegistrationModel.Customer.WalletPurposeId != 999) {
|
|
788
|
+
this.walletRegistrationModel.Customer.WalletPurposeDescription = null;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
return this.walletRegistrationModel;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
public resetPassCode() {
|
|
795
|
+
if (this.resetPasscodeRights) {
|
|
796
|
+
let url = `${Constants.WALLET_API}/${this.customerId}/${Constants.RESET_USER_PASSWORD_REQUEST}`;
|
|
797
|
+
this.sharedService.put(url, {}).subscribe((data: any) => {
|
|
798
|
+
let response: any = data ? data : null;
|
|
799
|
+
if (response && response.responseCode === Constants.SUCCESS_CODE) {
|
|
800
|
+
this.alert.success(Constants.UPDATE_SUCCESS_MESSAGE);
|
|
801
|
+
this.insertResetPasscodeLog(this.auditLogInsertModel);
|
|
802
|
+
}
|
|
803
|
+
else {
|
|
804
|
+
this.alert.error(response.resDescriptionEN);
|
|
805
|
+
}
|
|
806
|
+
}, (error: any) => {
|
|
807
|
+
this.alert.error(error);
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
else {
|
|
811
|
+
this.alert.error(this.common.permissionMessage);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
private insertViewAuditLog(auditLog: AuditLogInsertModel) {
|
|
816
|
+
this.auditLogInsertModel = new AuditLogInsertModel();
|
|
817
|
+
this.auditLogInsertModel.Menu = this.common.getMenuId(Constants.CUSTOMER_REGISTRATION_MENU);
|
|
818
|
+
this.auditLogInsertModel.Action = this.common.getAuditTypeId(Constants.VIEW_AUDIT_TYPE);
|
|
819
|
+
this.auditLogInsertModel.Description = this.getViewDescription();
|
|
820
|
+
this.auditLogInsertModel.CustomerUniqueId = this.customerId;
|
|
821
|
+
this.common.insertAuditLog(this.auditLogInsertModel);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
private insertAddAuditLog(auditLog: AuditLogInsertModel) {
|
|
825
|
+
this.auditLogInsertModel = new AuditLogInsertModel();
|
|
826
|
+
this.auditLogInsertModel.Menu = this.common.getMenuId(Constants.CUSTOMER_REGISTRATION_MENU);
|
|
827
|
+
this.auditLogInsertModel.Action = this.common.getAuditTypeId(Constants.ADD_AUDIT_TYPE);
|
|
828
|
+
let description = this.getViewDescription();
|
|
829
|
+
this.auditLogInsertModel.CustomerUniqueId = this.customerId;
|
|
830
|
+
this.auditLogInsertModel.Description = description;
|
|
831
|
+
this.common.insertAuditLog(this.auditLogInsertModel);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
private insertEditAuditLog(auditLog: AuditLogInsertModel) {
|
|
835
|
+
this.auditLogInsertModel = new AuditLogInsertModel();
|
|
836
|
+
this.auditLogInsertModel.Menu = this.common.getMenuId(Constants.CUSTOMER_REGISTRATION_MENU);
|
|
837
|
+
this.auditLogInsertModel.Action = this.common.getAuditTypeId(Constants.EDIT_AUDIT_TYPE);
|
|
838
|
+
this.auditLogInsertModel.CustomerUniqueId = this.customerId;
|
|
839
|
+
let description = Constants.STRING_EMPTY;
|
|
840
|
+
description = this.getDescriptionFirstLine();
|
|
841
|
+
//Country name for home address
|
|
842
|
+
this.actualObject.Contact.CountryName = this.getCountryName(this.actualObject.Contact.CountryCode);
|
|
843
|
+
this.walletRegistrationModel.Contact.CountryName = this.getCountryName(this.walletRegistrationModel.Contact.CountryCode);
|
|
844
|
+
//Country name for mailing address
|
|
845
|
+
this.actualObject.MailingAddress.CountryName = this.getCountryName(this.actualObject.MailingAddress.CountryCode);
|
|
846
|
+
this.walletRegistrationModel.MailingAddress.CountryName = this.getCountryName(this.walletRegistrationModel.MailingAddress.CountryCode);
|
|
847
|
+
this.actualObject.CompanyAddress.CompanyCountryName = this.getCountryName(this.actualObject.CompanyAddress.CompanyCountryCode);
|
|
848
|
+
this.walletRegistrationModel.CompanyAddress.CompanyCountryName = this.getCountryName(this.walletRegistrationModel.CompanyAddress.CompanyCountryCode);
|
|
849
|
+
//Nationality and occupation name
|
|
850
|
+
this.actualObject.Customer.Occupation = this.custPersonalDetailsComp.getOccupationName(this.actualObject.Customer.OccupationId);
|
|
851
|
+
this.actualObject.Customer.NationalityName = this.custPersonalDetailsComp.getNationality(this.actualObject.Customer.NationalityId);
|
|
852
|
+
this.walletRegistrationModel.Customer.Occupation = this.custPersonalDetailsComp.getOccupationName(this.walletRegistrationModel.Customer.OccupationId);
|
|
853
|
+
this.walletRegistrationModel.Customer.NationalityName = this.custPersonalDetailsComp.getNationality(this.walletRegistrationModel.Customer.NationalityId);
|
|
854
|
+
this.walletRegistrationModel.Wallet.WalletStatus = this.getWalletStatus(this.walletRegistrationModel.Wallet.WalletStatusId);
|
|
855
|
+
|
|
856
|
+
// Update user status according status id
|
|
857
|
+
let userrStatus = this.custPersonalDetailsComp.userStatusList.filter(status => status.userStatusId == this.walletRegistrationModel.Customer.UserStatusId);
|
|
858
|
+
if (userrStatus && userrStatus.length > 0) {
|
|
859
|
+
this.walletRegistrationModel.Customer.UserStatus = userrStatus[0].userStatus;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
this.actualObject.Contact.CountryCode = this.walletRegistrationModel.Contact.CountryCode;
|
|
863
|
+
this.actualObject.MailingAddress.CountryCode = this.walletRegistrationModel.MailingAddress.CountryCode;
|
|
864
|
+
this.actualObject.CompanyAddress.CompanyCountryCode = this.walletRegistrationModel.CompanyAddress.CompanyCountryCode;
|
|
865
|
+
this.actualObject.Customer.OccupationId = this.walletRegistrationModel.Customer.OccupationId;
|
|
866
|
+
this.actualObject.Customer.NationalityId = this.walletRegistrationModel.Customer.NationalityId;
|
|
867
|
+
this.actualObject.Customer.IdentityId = this.walletRegistrationModel.Customer.IdentityId;
|
|
868
|
+
this.actualObject.Customer.UserStatusId = this.walletRegistrationModel.Customer.UserStatusId;
|
|
869
|
+
this.actualObject.Wallet.WalletStatusId = this.walletRegistrationModel.Wallet.WalletStatusId;
|
|
870
|
+
|
|
871
|
+
if (this.walletRegistrationModel.Customer.IdentityId == Constants.THAI_IDENTITY_ID)
|
|
872
|
+
this.walletRegistrationModel.Customer.IdNumber = this.common.maskString(4, 3, this.walletRegistrationModel.Customer.IdNumber, Constants.ASTERISK_SYMBOL)
|
|
873
|
+
if (this.walletRegistrationModel.Customer.IdentityId == 2)
|
|
874
|
+
this.walletRegistrationModel.Customer.IdNumber = this.common.maskString(0, 4, this.walletRegistrationModel.Customer.IdNumber, Constants.ASTERISK_SYMBOL)
|
|
875
|
+
|
|
876
|
+
description += this.common.getEditAuditDescription(this.actualObject.Customer, this.walletRegistrationModel.Customer);
|
|
877
|
+
description += this.common.getEditAuditDescription(this.actualObject.Contact, this.walletRegistrationModel.Contact);
|
|
878
|
+
description += this.common.getEditAuditDescription(this.actualObject.CompanyAddress, this.walletRegistrationModel.CompanyAddress);
|
|
879
|
+
description += this.common.getEditAuditDescription(this.actualObject.CompanyAddress, this.walletRegistrationModel.CompanyAddress);
|
|
880
|
+
description += this.common.getEditAuditDescription(this.actualObject.Wallet, this.walletRegistrationModel.Wallet);
|
|
881
|
+
this.auditLogInsertModel.Description = description;
|
|
882
|
+
this.common.insertAuditLog(this.auditLogInsertModel);
|
|
883
|
+
|
|
884
|
+
if (this.isFileUpdated1 || this.isFileUpdated2)
|
|
885
|
+
this.insertAttachFileLog(false);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
private getDescriptionFirstLine() {
|
|
889
|
+
var Description: string = Constants.STRING_EMPTY;
|
|
890
|
+
if (this.actualObject.Customer.FirstName)
|
|
891
|
+
Description = `${this.actualObject.Customer.FirstName} `
|
|
892
|
+
if (this.actualObject.Customer.LastName)
|
|
893
|
+
Description += `${this.actualObject.Customer.LastName} `
|
|
894
|
+
if (this.actualObject.Customer.IdNumber) {
|
|
895
|
+
if (this.actualObject.Customer.IdentityId == 1 || this.actualObject.Customer.IdentityId == 2) {
|
|
896
|
+
Description += ` ${this.common.maskString(3, 4, this.actualObject.Customer.IdNumber, Constants.ASTERISK_SYMBOL)}`;
|
|
897
|
+
}
|
|
898
|
+
else {
|
|
899
|
+
Description += ` ${this.actualObject.Customer.IdNumber}`;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
if (this.actualObject.Wallet.WalletId)
|
|
904
|
+
Description += `${this.actualObject.Wallet.WalletId} `
|
|
905
|
+
|
|
906
|
+
return Description;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
// insert Reset Passcode Log
|
|
910
|
+
// Description template: <First Name> <Last Name> <ID Number> <Wallet ID>
|
|
911
|
+
// Reset Passcode
|
|
912
|
+
private insertResetPasscodeLog(auditLog: AuditLogInsertModel) {
|
|
913
|
+
this.auditLogInsertModel = new AuditLogInsertModel();
|
|
914
|
+
this.auditLogInsertModel.Menu = this.common.getMenuId(Constants.CUSTOMER_REGISTRATION_MENU);
|
|
915
|
+
this.auditLogInsertModel.Action = this.common.getAuditTypeId(Constants.RESET_PASSCODE_AUDIT_TYPE);
|
|
916
|
+
this.auditLogInsertModel.Description = this.getViewDescription();
|
|
917
|
+
this.auditLogInsertModel.Description += `\n${Constants.RESET_PASSCODE}`;
|
|
918
|
+
this.auditLogInsertModel.CustomerUniqueId = this.customerId;
|
|
919
|
+
this.common.insertAuditLog(this.auditLogInsertModel);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
private insertAddWalletLog(auditLog: AuditLogInsertModel) {
|
|
923
|
+
this.auditLogInsertModel = new AuditLogInsertModel();
|
|
924
|
+
this.auditLogInsertModel.Menu = this.common.getMenuId(Constants.CUSTOMER_REGISTRATION_MENU);
|
|
925
|
+
this.auditLogInsertModel.Action = this.common.getAuditTypeId(Constants.ADD_WALLET_AUDIT_TYPE);
|
|
926
|
+
this.auditLogInsertModel.Description = this.getViewDescription();
|
|
927
|
+
this.auditLogInsertModel.Description += ` ` + this.addWalletAuditLogModel.WalletType;
|
|
928
|
+
this.auditLogInsertModel.CustomerUniqueId = this.customerId;
|
|
929
|
+
this.common.insertAuditLog(this.auditLogInsertModel);
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
// get View Description for logs
|
|
933
|
+
// Description template: <First Name> <Last Name> <ID Number> <Wallet ID>
|
|
934
|
+
private getViewDescription() {
|
|
935
|
+
let description = Constants.STRING_EMPTY;
|
|
936
|
+
if (this.walletRegistrationModel.Customer.FirstName)
|
|
937
|
+
description += `${this.walletRegistrationModel.Customer.FirstName}`;
|
|
938
|
+
if (this.walletRegistrationModel.Customer.LastName)
|
|
939
|
+
description += ` ${this.walletRegistrationModel.Customer.LastName}`;
|
|
940
|
+
if (this.walletRegistrationModel.Customer.IdNumber)
|
|
941
|
+
if (this.walletRegistrationModel.Customer.IdentityId == 1 || this.walletRegistrationModel.Customer.IdentityId == 2) {
|
|
942
|
+
description += ` ${this.common.maskString(3, 4, this.walletRegistrationModel.Customer.IdNumber, Constants.ASTERISK_SYMBOL)}`;
|
|
943
|
+
}
|
|
944
|
+
else {
|
|
945
|
+
description += ` ${this.walletRegistrationModel.Customer.IdNumber}`;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
if (this.walletRegistrationModel.Wallet.WalletId) {
|
|
949
|
+
let walletId = this.walletRegistrationModel.Wallet.WalletId ? this.walletRegistrationModel.Wallet.WalletId.toString() : '';
|
|
950
|
+
|
|
951
|
+
description += ` ${this.common.maskString(6, 4, walletId, Constants.ASTERISK_SYMBOL)}`;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
return description;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
public redirectToManualTopup() {
|
|
958
|
+
if (this.topupRights) {
|
|
959
|
+
this.sharedService.navigationData['walletRegistrationModel'] = this.walletRegistrationModel;
|
|
960
|
+
this.router.navigate(['/manual-post-wallet', this.customerId]);
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
this.alert.error(this.common.permissionMessage);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
// Home Address as mailing
|
|
968
|
+
public onChangeAddressCheckbox() {
|
|
969
|
+
if (!this.homeAsMailingAddress) {
|
|
970
|
+
this.walletRegistrationModel.MailingAddress = new MailingAddressModel();
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
this.walletRegistrationModel.MailingAddress.MailAddress1 = this.walletRegistrationModel.Contact.HomeAddress1;
|
|
974
|
+
this.walletRegistrationModel.MailingAddress.MailAddress2 = this.walletRegistrationModel.Contact.HomeAddress2;
|
|
975
|
+
this.walletRegistrationModel.MailingAddress.CountryCode = this.walletRegistrationModel.Contact.CountryCode;
|
|
976
|
+
this.walletRegistrationModel.MailingAddress.CountryName = this.walletRegistrationModel.Contact.CountryName;
|
|
977
|
+
|
|
978
|
+
if (this.walletRegistrationModel.Contact.CountryCode == this.thaiCountryId) {
|
|
979
|
+
this.mailingStateListData = this.stateListData;
|
|
980
|
+
this.mailingDistrictListData = this.districtListData;
|
|
981
|
+
this.walletRegistrationModel.MailingAddress.StateId = this.walletRegistrationModel.Contact.StateId;
|
|
982
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = this.walletRegistrationModel.Contact.DistrictId;
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
this.walletRegistrationModel.MailingAddress.State = this.walletRegistrationModel.Contact.State;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
this.walletRegistrationModel.MailingAddress.PostalCode = this.walletRegistrationModel.Contact.PostalCode;
|
|
989
|
+
this.walletRegistrationModel.MailingAddress.AddressDefine1 = this.walletRegistrationModel.Contact.AddressDefine1;
|
|
990
|
+
this.walletRegistrationModel.MailingAddress.AddressDefine2 = this.walletRegistrationModel.Contact.AddressDefine2;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
// uploadFile: Get uploaded file.
|
|
994
|
+
public uploadFile(event: any) {
|
|
995
|
+
let thisComponent = this;
|
|
996
|
+
if (event.target.files && event.target.files[0]) {
|
|
997
|
+
let file = event.target.files[0];
|
|
998
|
+
let fileType = file.type.split('/')[1].toLowerCase();
|
|
999
|
+
if (this.attachFileType.indexOf(fileType) < 0) {
|
|
1000
|
+
this.alert.error(Constants.CUST_REG_ATTACH_ERROR_MSG);
|
|
1001
|
+
event.target.value = Constants.STRING_EMPTY;
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
if (file.size > Constants.MAX_IMAGE_SIZE_1MB) {
|
|
1005
|
+
this.alert.error(Constants.MAX_IMAGE_SIZE_ERROR_1MB);
|
|
1006
|
+
event.target.value = Constants.STRING_EMPTY;
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
let pattern: RegExp = /^[^\\\/\:\*\?\"\<\>\|]+$/;
|
|
1010
|
+
if (!pattern.test(file.name)) {
|
|
1011
|
+
this.alert.error(Constants.CUST_REG_ATTACH_PATTERN_MSG);
|
|
1012
|
+
event.target.value = Constants.STRING_EMPTY;
|
|
1013
|
+
return;
|
|
1014
|
+
}
|
|
1015
|
+
this.imageURL.fileName = file.name;
|
|
1016
|
+
let reader = new FileReader();
|
|
1017
|
+
var base64;
|
|
1018
|
+
|
|
1019
|
+
reader.onload = (e: any) => {
|
|
1020
|
+
base64 = e.target.result;
|
|
1021
|
+
if (event.target.id == "file1") {
|
|
1022
|
+
thisComponent.walletRegistrationModel.FileName1 = file.name;
|
|
1023
|
+
thisComponent.walletRegistrationModel.AttachFile1 = thisComponent.common.getImageString(base64);
|
|
1024
|
+
this.isFile1Deleted = false;
|
|
1025
|
+
this.isFileUpdated1 = true;
|
|
1026
|
+
}
|
|
1027
|
+
else if (event.target.id == "file2") {
|
|
1028
|
+
thisComponent.walletRegistrationModel.FileName2 = file.name;
|
|
1029
|
+
thisComponent.walletRegistrationModel.AttachFile2 = thisComponent.common.getImageString(base64);
|
|
1030
|
+
this.isFile2Deleted = false;
|
|
1031
|
+
this.isFileUpdated2 = true;
|
|
1032
|
+
|
|
1033
|
+
}
|
|
1034
|
+
};
|
|
1035
|
+
reader.readAsDataURL(event.target.files[0]);
|
|
1036
|
+
}
|
|
1037
|
+
event.currentTarget.value = Constants.STRING_EMPTY;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
//method to delete file
|
|
1041
|
+
public deleteFile(file: string) {
|
|
1042
|
+
if (file == "file1") {
|
|
1043
|
+
this.walletRegistrationModel.AttachFile1 = this.walletRegistrationModel.FileName1 = null;
|
|
1044
|
+
this.isFile1Deleted = true;
|
|
1045
|
+
if (this.actualObject.FileName1)
|
|
1046
|
+
this.isFileUpdated1 = true;
|
|
1047
|
+
else {
|
|
1048
|
+
this.isFileUpdated1 = false;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
this.walletRegistrationModel.AttachFile2 = this.walletRegistrationModel.FileName2 = null;
|
|
1053
|
+
this.isFile2Deleted = true;
|
|
1054
|
+
if (this.actualObject.FileName2)
|
|
1055
|
+
this.isFileUpdated2 = true;
|
|
1056
|
+
else {
|
|
1057
|
+
this.isFileUpdated2 = false;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
this.deleteConfirmationModal.close();
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
// Download attached file
|
|
1064
|
+
public downloadFile(fileId: any, isDownload: boolean) {
|
|
1065
|
+
this.url = Constants.DOWNLOAD_FILE_API;
|
|
1066
|
+
let requestJSON = {
|
|
1067
|
+
customerId: this.customerId,
|
|
1068
|
+
attachFileId: fileId,
|
|
1069
|
+
companyUniqueId: this.walletRegistrationModel.Customer.CompanyUniqueId
|
|
1070
|
+
};
|
|
1071
|
+
this.sharedService.post(this.url, requestJSON).subscribe((data: any) => {
|
|
1072
|
+
var response = data;
|
|
1073
|
+
if (response.responseCode == Constants.SUCCESS_CODE) {
|
|
1074
|
+
if (isDownload) {
|
|
1075
|
+
let data = `${Constants.PDF_JPEG_CONTENT_FORMAT}${response.AttachFile}`;
|
|
1076
|
+
this.common.saveAsFile(response.AttachFileName, data);
|
|
1077
|
+
// Insert download file audit log.
|
|
1078
|
+
this.insertAttachFileLog(true, fileId);
|
|
1079
|
+
}
|
|
1080
|
+
else {
|
|
1081
|
+
if (fileId == 1)
|
|
1082
|
+
this.walletRegistrationModel.AttachFile1 = response.AttachFile;
|
|
1083
|
+
else
|
|
1084
|
+
this.walletRegistrationModel.AttachFile2 = response.AttachFile;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
else {
|
|
1088
|
+
this.alert.error(response.resDescriptionEN);
|
|
1089
|
+
}
|
|
1090
|
+
}, (error: any) => {
|
|
1091
|
+
this.alert.error(error);
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
public actionPermissionDenied() {
|
|
1096
|
+
this.alert.error(this.common.permissionMessage);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
openWalletPopup() {
|
|
1100
|
+
this.showWalletModal = true;
|
|
1101
|
+
this.isAddWalletSubmit = false;
|
|
1102
|
+
this.addWalletAuditLogModel.FirstName = this.actualObject.Customer.FirstName;
|
|
1103
|
+
this.addWalletAuditLogModel.LastName = this.actualObject.Customer.LastName;
|
|
1104
|
+
this.addWalletAuditLogModel.IdNumber = this.actualObject.Customer.IdNumber;
|
|
1105
|
+
this.addWalletModel.WalletTypeId = 1;
|
|
1106
|
+
this.addWalletModel.WalletProfileId = null;
|
|
1107
|
+
this.addWalletModal.CompanyUniqueId = this.actualObject.Customer.CompanyUniqueId;
|
|
1108
|
+
this.getWalletProfileList(this.addWalletModal.CompanyUniqueId, true);
|
|
1109
|
+
this.addWalletModal.open();
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
openCardPopup() {
|
|
1113
|
+
this.showCardModel = true;
|
|
1114
|
+
//Create model for add card audit log.
|
|
1115
|
+
this.addCardAuditLogMoel = new AddCardAuditLogMoel();
|
|
1116
|
+
this.addCardAuditLogMoel.FirstName = this.actualObject.Customer.FirstName;
|
|
1117
|
+
this.addCardAuditLogMoel.LastName = this.actualObject.Customer.LastName;
|
|
1118
|
+
this.addCardAuditLogMoel.IdNumber = this.actualObject.Customer.IdNumber;
|
|
1119
|
+
// this.addCardModal.open();
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
refresh() {
|
|
1123
|
+
this.getWalletDetails();
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
private getCountryName(countryCode: any) {
|
|
1127
|
+
let countryName: string = Constants.STRING_EMPTY;
|
|
1128
|
+
if (countryCode) {
|
|
1129
|
+
let data = this.countryList.filter((element: any) => {
|
|
1130
|
+
if (element.countryCode == countryCode)
|
|
1131
|
+
return element;
|
|
1132
|
+
});
|
|
1133
|
+
|
|
1134
|
+
if (data && data.length > 0)
|
|
1135
|
+
countryName = data[0].countryName;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
return countryName;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
private insertAttachFileLog(isDownloadFile?: boolean, fileId?: number) {
|
|
1142
|
+
this.auditLogInsertModel = new AuditLogInsertModel();
|
|
1143
|
+
this.auditLogInsertModel.Menu = this.common.getMenuId(Constants.CUSTOMER_REGISTRATION_MENU);
|
|
1144
|
+
this.auditLogInsertModel.Action = this.common.getAuditTypeId(Constants.ATTACH_FILE_AUDIT_TYPE);
|
|
1145
|
+
this.auditLogInsertModel.Description = `${this.getDescriptionFirstLine()}\n`;
|
|
1146
|
+
this.auditLogInsertModel.CustomerUniqueId = this.customerId;
|
|
1147
|
+
//Delete File Log
|
|
1148
|
+
if ((this.walletRegistrationModel.AttachFile1 == null || this.walletRegistrationModel.AttachFile1 == Constants.STRING_EMPTY) && this.isFileUpdated1)
|
|
1149
|
+
this.auditLogInsertModel.Description += `File1 : ${Constants.FILE_DELETED_LABEL}\n`
|
|
1150
|
+
if ((this.walletRegistrationModel.AttachFile2 == null || this.walletRegistrationModel.AttachFile2 == Constants.STRING_EMPTY) && this.isFileUpdated2)
|
|
1151
|
+
this.auditLogInsertModel.Description += `File2 : ${Constants.FILE_DELETED_LABEL}\n`
|
|
1152
|
+
|
|
1153
|
+
//Attach File Log
|
|
1154
|
+
if (!this.isFile1Deleted)
|
|
1155
|
+
if (this.walletRegistrationModel.AttachFile1 != this.actualObject.AttachFile1)
|
|
1156
|
+
this.auditLogInsertModel.Description += `File1 : ${Constants.FILE_ATTACHED_LABEL}\n`
|
|
1157
|
+
|
|
1158
|
+
if (!this.isFile2Deleted)
|
|
1159
|
+
if (this.walletRegistrationModel.AttachFile2 != this.actualObject.AttachFile2)
|
|
1160
|
+
this.auditLogInsertModel.Description += `File2 : ${Constants.FILE_ATTACHED_LABEL}\n`
|
|
1161
|
+
|
|
1162
|
+
//Download File Log.
|
|
1163
|
+
if (isDownloadFile)
|
|
1164
|
+
this.auditLogInsertModel.Description += `\n ${(fileId == 1) ? 'File1' : 'File2'} : ${Constants.FILE_DOWNLOAD_LABEL}`;
|
|
1165
|
+
|
|
1166
|
+
this.common.insertAuditLog(this.auditLogInsertModel);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
private getWalletStatus(statusId: number) {
|
|
1170
|
+
let walletStatus: string;
|
|
1171
|
+
let walletData = this.walletStatusList.filter(x => x.walletStatusId == statusId);
|
|
1172
|
+
|
|
1173
|
+
if (walletData && walletData.length > 0) {
|
|
1174
|
+
walletStatus = walletData[0].walletStatus;
|
|
1175
|
+
}
|
|
1176
|
+
return walletStatus;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
private setAuditLogModel() {
|
|
1180
|
+
this.actualObject.Wallet = Object.assign({}, this.walletRegistrationModel.Wallet);
|
|
1181
|
+
this.actualObject.Contact = Object.assign({}, this.walletRegistrationModel.Contact);
|
|
1182
|
+
this.actualObject.Customer = Object.assign({}, this.walletRegistrationModel.Customer);
|
|
1183
|
+
this.actualObject.Card = Object.assign([], this.walletRegistrationModel.Card);
|
|
1184
|
+
this.actualObject.MailingAddress = Object.assign({}, this.walletRegistrationModel.MailingAddress);
|
|
1185
|
+
this.actualObject.CompanyAddress = Object.assign({}, this.walletRegistrationModel.CompanyAddress);
|
|
1186
|
+
this.actualObject.FileName1 = this.walletRegistrationModel.FileName1;
|
|
1187
|
+
this.actualObject.FileName2 = this.walletRegistrationModel.FileName2;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
public validateIdNumber(event: any) {
|
|
1191
|
+
let content: any = this.common.allowNumericOnly(event);
|
|
1192
|
+
if (content) {
|
|
1193
|
+
if (this.pageName == Constants.EDIT)
|
|
1194
|
+
this.walletRegistrationModel.Customer.IdNumber += content;
|
|
1195
|
+
else {
|
|
1196
|
+
this.walletRegistrationModel.Customer.IdNumber = this.walletRegistrationModel.Customer.IdNumber ? this.walletRegistrationModel.Customer.IdNumber : Constants.STRING_EMPTY
|
|
1197
|
+
this.walletRegistrationModel.Customer.IdNumber += `${this.walletRegistrationModel.Customer.IdNumber}${content}`;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
return false;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
public openConfirmationPopup(file: string) {
|
|
1204
|
+
this.selectedFile = file;
|
|
1205
|
+
this.deleteConfirmationModal.open()
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
// public navigateToCardList() {
|
|
1209
|
+
// if (this.customerId) {
|
|
1210
|
+
// this.router.navigate(['/customer-registration/all-card-list', this.customerId]);
|
|
1211
|
+
// }
|
|
1212
|
+
// }
|
|
1213
|
+
|
|
1214
|
+
public navigateToProfileHistory() {
|
|
1215
|
+
if (this.customerId) {
|
|
1216
|
+
this.router.navigate(['/customer-profile-history', this.customerId]);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
public navigateToWalletHistory() {
|
|
1221
|
+
if (this.customerId) {
|
|
1222
|
+
this.router.navigate(['/wallet-history', this.customerId]);
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
private getWalletProfileList(companyUniqueId: number, isAddWalletRequest: boolean) {
|
|
1227
|
+
|
|
1228
|
+
if (isAddWalletRequest && !this.addWalletRights) {
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
let url = `${Constants.GET_MASTER_WALLET_PROFILE_LIST}?companyUniqueId=${companyUniqueId}`;
|
|
1233
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
1234
|
+
let response: any = data;
|
|
1235
|
+
this.handleResponse(response, Constants.GET_MASTER_WALLET_PROFILE_LIST);
|
|
1236
|
+
},
|
|
1237
|
+
(error: any) => {
|
|
1238
|
+
this.alert.error(error);
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
public redirectToWalletProfileSetting() {
|
|
1243
|
+
if (this.walletRegistrationModel.Wallet.ProfileId > 0) {
|
|
1244
|
+
this.router.navigate(['/company-setting/wallet-profile-setting-view', this.walletRegistrationModel.Wallet.ProfileId]);
|
|
1245
|
+
}
|
|
1246
|
+
else {
|
|
1247
|
+
this.alert.error('No WalletProfile found.');
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
public getFullWalletId() {
|
|
1252
|
+
if (!this.walletRegistrationModel.Wallet.WalletId) {
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
if (this.fullPanRights) {
|
|
1257
|
+
this.walletId = this.walletRegistrationModel.Wallet.WalletId.toString();
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
this.alert.error(this.common.permissionMessage);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
public getDistrictList(stateChanged?: boolean) {
|
|
1265
|
+
if (stateChanged) {
|
|
1266
|
+
this.walletRegistrationModel.Contact.DistrictId = null;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
if (!this.walletRegistrationModel.Contact.StateId) {
|
|
1270
|
+
this.districtListData = this.districtListData = null;
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
let url = `${Constants.MASTER_DISTRICT_API}?stateId=${this.walletRegistrationModel.Contact.StateId}`;
|
|
1275
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
1276
|
+
let response: any = data ? data : null;
|
|
1277
|
+
switch (response.responseCode) {
|
|
1278
|
+
case Constants.SUCCESS_CODE:
|
|
1279
|
+
this.districtList = response.districtList;
|
|
1280
|
+
break;
|
|
1281
|
+
case Constants.DATA_NOT_FOUND:
|
|
1282
|
+
this.districtList = [];
|
|
1283
|
+
this.walletRegistrationModel.Contact.DistrictId = null;
|
|
1284
|
+
break;
|
|
1285
|
+
default:
|
|
1286
|
+
this.alert.error(response.resDescriptionEN);
|
|
1287
|
+
this.districtList = [];
|
|
1288
|
+
this.walletRegistrationModel.Contact.DistrictId = null;
|
|
1289
|
+
break;
|
|
1290
|
+
}
|
|
1291
|
+
this.districtListData = this.districtList;
|
|
1292
|
+
}, (error: any) => {
|
|
1293
|
+
this.alert.error(error);
|
|
1294
|
+
this.districtList = [];
|
|
1295
|
+
this.walletRegistrationModel.Contact.DistrictId = null;
|
|
1296
|
+
this.districtListData = this.districtList;
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
public getMailingStateList(countryChanged?: boolean) {
|
|
1301
|
+
if (countryChanged) {
|
|
1302
|
+
this.walletRegistrationModel.MailingAddress.StateId = null;
|
|
1303
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = null;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
if (this.walletRegistrationModel.MailingAddress.CountryCode !== this.thaiCountryId) {
|
|
1307
|
+
this.walletRegistrationModel.MailingAddress.StateId = null;
|
|
1308
|
+
this.mailingStateListData = [];
|
|
1309
|
+
return;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
if (this.stateList.length > 0) {
|
|
1313
|
+
this.mailingStateListData = this.stateList;
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
let url = `${Constants.MASTER_STATE_API}?countryId=${this.walletRegistrationModel.MailingAddress.CountryCode}`;
|
|
1318
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
1319
|
+
let response: any = data ? data : null;
|
|
1320
|
+
switch (response.responseCode) {
|
|
1321
|
+
case Constants.SUCCESS_CODE:
|
|
1322
|
+
this.stateList = response.stateList;
|
|
1323
|
+
break;
|
|
1324
|
+
case Constants.DATA_NOT_FOUND:
|
|
1325
|
+
this.stateList = [];
|
|
1326
|
+
this.walletRegistrationModel.MailingAddress.StateId = null;
|
|
1327
|
+
break;
|
|
1328
|
+
default:
|
|
1329
|
+
this.alert.error(response.resDescriptionEN);
|
|
1330
|
+
this.stateList = [];
|
|
1331
|
+
this.walletRegistrationModel.MailingAddress.StateId = null;
|
|
1332
|
+
break;
|
|
1333
|
+
}
|
|
1334
|
+
this.mailingStateListData = this.stateList;
|
|
1335
|
+
|
|
1336
|
+
}, (error: any) => {
|
|
1337
|
+
this.alert.error(error);
|
|
1338
|
+
this.stateList = [];
|
|
1339
|
+
this.walletRegistrationModel.MailingAddress.StateId = null;
|
|
1340
|
+
this.mailingStateListData = this.stateList;
|
|
1341
|
+
});
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
public getMailingDistrictList(stateChanged?: boolean) {
|
|
1345
|
+
if (stateChanged) {
|
|
1346
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = null;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
if (!this.walletRegistrationModel.MailingAddress.StateId) {
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
if (this.walletRegistrationModel.MailingAddress.StateId === this.walletRegistrationModel.Contact.StateId
|
|
1354
|
+
&& this.districtList && this.districtList.length > 0) {
|
|
1355
|
+
this.mailingDistrictListData = this.mailingDistrictList = this.districtList;
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
let url = `${Constants.MASTER_DISTRICT_API}?stateId=${this.walletRegistrationModel.MailingAddress.StateId}`;
|
|
1360
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
1361
|
+
let response: any = data ? data : null;
|
|
1362
|
+
switch (response.responseCode) {
|
|
1363
|
+
case Constants.SUCCESS_CODE:
|
|
1364
|
+
this.mailingDistrictList = response.districtList;
|
|
1365
|
+
break;
|
|
1366
|
+
case Constants.DATA_NOT_FOUND:
|
|
1367
|
+
this.mailingDistrictList = [];
|
|
1368
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = null;
|
|
1369
|
+
break;
|
|
1370
|
+
default:
|
|
1371
|
+
this.alert.error(response.resDescriptionEN);
|
|
1372
|
+
this.mailingDistrictList = [];
|
|
1373
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = null;
|
|
1374
|
+
break;
|
|
1375
|
+
}
|
|
1376
|
+
this.mailingDistrictListData = this.mailingDistrictList;
|
|
1377
|
+
|
|
1378
|
+
}, (error: any) => {
|
|
1379
|
+
this.alert.error(error);
|
|
1380
|
+
this.mailingDistrictList = [];
|
|
1381
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = null;
|
|
1382
|
+
this.mailingDistrictListData = this.mailingDistrictList;
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
public getCompanyStateList(countryChanged?: boolean) {
|
|
1387
|
+
if (countryChanged) {
|
|
1388
|
+
this.walletRegistrationModel.CompanyAddress.StateId = null;
|
|
1389
|
+
this.walletRegistrationModel.CompanyAddress.DistrictId = null;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
if (this.walletRegistrationModel.CompanyAddress.CompanyCountryCode !== this.thaiCountryId) {
|
|
1393
|
+
this.walletRegistrationModel.CompanyAddress.StateId = null;
|
|
1394
|
+
this.companyStateListData = [];
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
if (this.stateList.length > 0) {
|
|
1399
|
+
this.companyStateListData = this.stateList;
|
|
1400
|
+
return;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
let url = `${Constants.MASTER_STATE_API}?countryId=${this.walletRegistrationModel.CompanyAddress.CompanyCountryCode}`;
|
|
1404
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
1405
|
+
let response: any = data ? data : null;
|
|
1406
|
+
switch (response.responseCode) {
|
|
1407
|
+
case Constants.SUCCESS_CODE:
|
|
1408
|
+
this.stateList = response.stateList;
|
|
1409
|
+
break;
|
|
1410
|
+
case Constants.DATA_NOT_FOUND:
|
|
1411
|
+
this.stateList = [];
|
|
1412
|
+
this.walletRegistrationModel.CompanyAddress.StateId = null;
|
|
1413
|
+
break;
|
|
1414
|
+
default:
|
|
1415
|
+
this.alert.error(response.resDescriptionEN);
|
|
1416
|
+
this.stateList = [];
|
|
1417
|
+
this.walletRegistrationModel.CompanyAddress.StateId = null;
|
|
1418
|
+
break;
|
|
1419
|
+
}
|
|
1420
|
+
this.companyStateListData = this.stateList;
|
|
1421
|
+
|
|
1422
|
+
}, (error: any) => {
|
|
1423
|
+
this.alert.error(error);
|
|
1424
|
+
this.stateList = [];
|
|
1425
|
+
this.walletRegistrationModel.CompanyAddress.StateId = null;
|
|
1426
|
+
this.companyStateListData = this.stateList;
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
public getCompanyDistrictList(stateChanged?: boolean) {
|
|
1431
|
+
if (stateChanged) {
|
|
1432
|
+
this.walletRegistrationModel.CompanyAddress.DistrictId = null;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
if (!this.walletRegistrationModel.CompanyAddress.StateId) {
|
|
1436
|
+
this.companyStateListData = this.companyDistrictList = this.companyDistrictListData = null;
|
|
1437
|
+
return;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
if (this.walletRegistrationModel.Contact.StateId > 0 &&
|
|
1441
|
+
this.walletRegistrationModel.CompanyAddress.StateId == this.walletRegistrationModel.Contact.StateId &&
|
|
1442
|
+
this.districtListData && this.districtListData.length > 0) {
|
|
1443
|
+
this.companyDistrictListData = this.companyDistrictList = this.districtList;
|
|
1444
|
+
return;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
if (this.walletRegistrationModel.MailingAddress.StateId > 0 &&
|
|
1448
|
+
this.walletRegistrationModel.CompanyAddress.StateId == this.walletRegistrationModel.MailingAddress.StateId &&
|
|
1449
|
+
this.mailingDistrictList && this.mailingDistrictList.length > 0) {
|
|
1450
|
+
this.companyDistrictListData = this.companyDistrictList = this.mailingDistrictList;
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
let url = `${Constants.MASTER_DISTRICT_API}?stateId=${this.walletRegistrationModel.CompanyAddress.StateId}`;
|
|
1455
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
1456
|
+
let response: any = data ? data : null;
|
|
1457
|
+
switch (response.responseCode) {
|
|
1458
|
+
case Constants.SUCCESS_CODE:
|
|
1459
|
+
this.companyDistrictList = response.districtList;
|
|
1460
|
+
break;
|
|
1461
|
+
case Constants.DATA_NOT_FOUND:
|
|
1462
|
+
this.companyDistrictList = [];
|
|
1463
|
+
this.walletRegistrationModel.CompanyAddress.DistrictId = null;
|
|
1464
|
+
break;
|
|
1465
|
+
default:
|
|
1466
|
+
this.alert.error(response.resDescriptionEN);
|
|
1467
|
+
this.companyDistrictList = [];
|
|
1468
|
+
this.walletRegistrationModel.CompanyAddress.DistrictId = null;
|
|
1469
|
+
break;
|
|
1470
|
+
}
|
|
1471
|
+
this.companyDistrictListData = this.companyDistrictList;
|
|
1472
|
+
|
|
1473
|
+
}, (error: any) => {
|
|
1474
|
+
this.alert.error(error);
|
|
1475
|
+
this.mailingDistrictList = [];
|
|
1476
|
+
this.walletRegistrationModel.MailingAddress.DistrictId = null;
|
|
1477
|
+
this.mailingDistrictListData = this.mailingDistrictList;
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
public updateCustomerIndividualData(customerId: number) {
|
|
1482
|
+
this.updateDataConfirmationModal.close();
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
public CancelUserKycUpdate() {
|
|
1486
|
+
this.updateDataConfirmationModal.close();
|
|
1487
|
+
|
|
1488
|
+
if (this.pageName !== Constants.NEW) {
|
|
1489
|
+
this.sharedService.disableButton = false;
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
this.updateStatuses(Constants.SET_STATUS_PENDING);
|
|
1494
|
+
localStorage.setItem('editAbnormal', 'true');
|
|
1495
|
+
this.onEditClick();
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
public GetCompanyDetails(companyUniqueId: number) {
|
|
1499
|
+
let url = `${Constants.COMPANY_DEFAULT_ACTION_API}/${companyUniqueId}`;
|
|
1500
|
+
this.sharedService.get(url).subscribe((data: any) => {
|
|
1501
|
+
let response: any = data ? data : null;
|
|
1502
|
+
if (response && response.responseCode === Constants.SUCCESS_CODE) {
|
|
1503
|
+
this.companyModel = this.common.removePropertyFromJSON(response);
|
|
1504
|
+
this.companyModel.externalProfileSetting = this.companyModel.externalProfileSetting ? this.companyModel.externalProfileSetting : false;
|
|
1505
|
+
|
|
1506
|
+
this.disableWalletProfile = this.pageName == Constants.EDIT && this.companyModel.externalProfileSetting;
|
|
1507
|
+
}
|
|
1508
|
+
else {
|
|
1509
|
+
this.disableWalletProfile = false;
|
|
1510
|
+
}
|
|
1511
|
+
}, (error: any) => {
|
|
1512
|
+
this.disableWalletProfile = false;
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
public walletProfileSearchFilter(value: any) {
|
|
1517
|
+
this.walletProfileListData = this.walletProfileList.filter((wp: any) => wp.profileName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
public countrySearchFilter(value: any) {
|
|
1521
|
+
this.countryListData = this.countryList.filter((c: any) => c.countryName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
public mailingCountrySearchFilter(value: any) {
|
|
1525
|
+
this.mailingCountryListData = this.countryList.filter((c: any) => c.countryName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
public walletStatusSearchFilter(value: any) {
|
|
1529
|
+
this.walletStatusListData = this.walletStatusList.filter((ws: any) => ws.walletStatus.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
public walletTypesSearchFilter(value: any) {
|
|
1533
|
+
this.walletTypeListData = this.walletTypeList.filter((ws: any) => ws.walletStatus.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
public addWalletTypeSearchFilter(value: any) {
|
|
1537
|
+
this.addWalletTypeListData = this.walletTypeList.filter((wt: any) => wt.walletType.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
public addWalletProfileSearchFilter(value: any) {
|
|
1541
|
+
this.addWalletProfileListData = this.walletProfileList.filter((wp: any) => wp.profileName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
public stateSearchFilter(value: any) {
|
|
1545
|
+
this.stateListData = this.stateList.filter((st: any) => st.stateName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
public mailingStateSearchFilter(value: any) {
|
|
1549
|
+
this.mailingStateListData = this.stateList.filter((st: any) => st.stateName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
public companyStateSearchFilter(value: any) {
|
|
1553
|
+
this.companyStateListData = this.stateList.filter((st: any) => st.stateName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
public districtSearchFilter(value: any) {
|
|
1557
|
+
this.districtListData = this.districtList.filter((d: any) => d.districtName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
public mailingDistrictSearchFilter(value: any) {
|
|
1561
|
+
this.mailingDistrictListData = this.mailingDistrictList.filter((md: any) => md.districtName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
public companyDistrictSearchFilter(value: any) {
|
|
1565
|
+
this.companyDistrictListData = this.companyDistrictList.filter((cd: any) => cd.districtName.toLowerCase().indexOf(value.toLowerCase()) !== -1);
|
|
1566
|
+
}
|
|
1567
|
+
}
|