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,1342 @@
|
|
|
1
|
+
import { Constants } from '../constants/constants';
|
|
2
|
+
import { SharedService } from '../service/shared.service';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
import { Injectable } from '@angular/core';
|
|
5
|
+
import { Location } from '@angular/common';
|
|
6
|
+
import { NgZone, SecurityContext } from '@angular/core';
|
|
7
|
+
import { IntlService, NumberPipe } from '@progress/kendo-angular-intl';
|
|
8
|
+
import { GridComponent } from '@progress/kendo-angular-grid';
|
|
9
|
+
import { saveAs, encodeBase64 } from '@progress/kendo-file-saver';
|
|
10
|
+
import { Alerts } from '../alerts/alerts';
|
|
11
|
+
import { AuditLogInsertModel } from '../../models/audit-log-insert.model';
|
|
12
|
+
import { NavigationData } from '../../models/navigation-data.model';
|
|
13
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
14
|
+
import { Session } from 'selenium-webdriver';
|
|
15
|
+
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
|
|
16
|
+
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
17
|
+
import { modelGroupProvider } from '@angular/forms/src/directives/ng_model_group';
|
|
18
|
+
import { constants } from 'os';
|
|
19
|
+
import { filter } from 'rxjs/operator/filter';
|
|
20
|
+
|
|
21
|
+
declare const google: any;
|
|
22
|
+
declare const gapi: any;
|
|
23
|
+
|
|
24
|
+
// Common class
|
|
25
|
+
@Injectable()
|
|
26
|
+
export class Common {
|
|
27
|
+
public toggleCSVFile: boolean = false;
|
|
28
|
+
public togglePDFFile: boolean = false;
|
|
29
|
+
public toggleExcelFile: boolean = false;
|
|
30
|
+
public isExportFile: boolean = false;
|
|
31
|
+
|
|
32
|
+
public ALLOWED_IMAGE_EXTENSIONS: Array<string> = ['.jpg', '.gif', '.png'];
|
|
33
|
+
public numberFieldValidCodeList: string[] = ['Backspace', 'ArrowDown', 'ArrowUp', 'ArrowLeft',
|
|
34
|
+
'ArrowRight', 'Home', 'End', 'Delete'];
|
|
35
|
+
public datepickerFromOpts: any = {
|
|
36
|
+
autoclose: true, todayHighlight: true, format: Constants.DATE_FORMAT, startDate: new Date(Constants.DEFAULT_START_DATE),
|
|
37
|
+
placeholder: Constants.DATE_FORMAT, icon: 'fa fa-calendar fa-4'
|
|
38
|
+
};
|
|
39
|
+
public datepickerToOpts: any = {
|
|
40
|
+
autoclose: true, todayHighlight: true, format: Constants.DATE_FORMAT, startDate: new Date(Constants.DEFAULT_START_DATE),
|
|
41
|
+
placeholder: Constants.DATE_FORMAT, icon: 'fa fa-calendar fa-4'
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// 46-delete,13-enter, all arrow,home,end:37,39,38,40,36, backspace- 8
|
|
45
|
+
public numericKeyCodeList = [8, 57, 37, 39, 38, 40, 36, 35, 13, 46];
|
|
46
|
+
// default pageSize for grid
|
|
47
|
+
public pageSizes = [25, 50, 100];
|
|
48
|
+
public defaultPageSize = Constants.DEFAULT_PAGE_SIZE;
|
|
49
|
+
public dateFormat: string = Constants.DATE_FORMAT;
|
|
50
|
+
public titleList: any[] = [{ desc: 'Mr.', value: 'Mr.' },
|
|
51
|
+
{ desc: 'Mrs.', value: 'Mrs.' },
|
|
52
|
+
{ desc: 'Ms.', value: 'Ms.' }];
|
|
53
|
+
public proxyURL = `${this.sharedService.appConfig.api_base_url}${Constants.SAVE_FILE_API_URL}`;
|
|
54
|
+
public userGroupPermissionMessage: string = `You don't have permission to view this page.`;
|
|
55
|
+
public permissionMessage: string = `You don't have permission to perform this operation.`;
|
|
56
|
+
public imageFileType = ['jpg', 'jpeg', 'gif', 'png'];
|
|
57
|
+
public attachFileType = ['jpg', 'jpeg', 'gif', 'png', 'pdf'];
|
|
58
|
+
public maskFormat = Constants.MASK_FORMAT;
|
|
59
|
+
public walletMaskIndex = Constants.WALLET_MASK_INDEX;
|
|
60
|
+
public contorlKeyList = ['KeyV', 'KeyC', 'KeyX', 'KeyA'];
|
|
61
|
+
public navigationData: NavigationData = new NavigationData();
|
|
62
|
+
public domSanitizer: any;
|
|
63
|
+
public routeAfter: ActivatedRouteSnapshot;
|
|
64
|
+
public selectedRoot: string;
|
|
65
|
+
public dateOfBirthTypeList: any[] = [{ desc: 'Date/Month/Year', value: 0 },
|
|
66
|
+
{ desc: 'Month/Year', value: 1 },
|
|
67
|
+
{ desc: 'Year', value: 2 }];
|
|
68
|
+
|
|
69
|
+
constructor(public router: Router, public sharedService: SharedService, public location: Location,
|
|
70
|
+
private intlService: IntlService, private ngZone: NgZone, public alert: Alerts, sanitizer: DomSanitizer,
|
|
71
|
+
private numberPipe: NumberPipe
|
|
72
|
+
) {
|
|
73
|
+
this.domSanitizer = sanitizer;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public loading: boolean = false;
|
|
77
|
+
|
|
78
|
+
public centerPopup() {
|
|
79
|
+
if ($('.modal-dialog').length) {
|
|
80
|
+
if ($('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {
|
|
81
|
+
$('.modal-dialog').css('margin-left', 0);
|
|
82
|
+
} else {
|
|
83
|
+
let navbarWidth = $('.navbar-default').width();
|
|
84
|
+
$('.modal-dialog').css('margin-left', navbarWidth);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public setProfileImage(profileImage: any) {
|
|
90
|
+
if (profileImage) {
|
|
91
|
+
$('#profileImage').attr('src', profileImage);
|
|
92
|
+
$('#profileThumbnail').addClass('hide');
|
|
93
|
+
$('#profileImage').removeClass('hide');
|
|
94
|
+
} else {
|
|
95
|
+
$('#profileThumbnail').removeClass('hide');
|
|
96
|
+
$('#profileImage').addClass('hide');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public redirectToLogin(skipTimeout?: boolean) {
|
|
101
|
+
let timeout: number = Constants.TIMEOUT;
|
|
102
|
+
if (skipTimeout) {
|
|
103
|
+
timeout = 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// fixed for slide menu
|
|
107
|
+
if ($('body').hasClass('mini-navbar')) {
|
|
108
|
+
$('body').toggleClass('mini-navbar');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// navigate to login page
|
|
112
|
+
setTimeout(() => { this.router.navigate([Constants.LOGIN]); }, timeout);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public goToPreviousPage(isSetTimeOut?: boolean): any {
|
|
116
|
+
if (isSetTimeOut) {
|
|
117
|
+
return setTimeout(() => {
|
|
118
|
+
this.location.back();
|
|
119
|
+
}, Constants.TIMEOUT);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
this.location.back();
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public setPageTitle(rootPageTitle: string,
|
|
128
|
+
rootPageURL: string,
|
|
129
|
+
currentPageTitle: string,
|
|
130
|
+
currentPageURL: string,
|
|
131
|
+
childPageTitle?: string,
|
|
132
|
+
childPageURL?: string,
|
|
133
|
+
backPageURL?: string,
|
|
134
|
+
isPreviousPageURL?: boolean,
|
|
135
|
+
subChildPageTitle?: string,
|
|
136
|
+
subChildPageURL?: string) {
|
|
137
|
+
// set page title and url
|
|
138
|
+
this.sharedService.rootPageTitle = rootPageTitle;
|
|
139
|
+
this.sharedService.rootPageURL = rootPageURL;
|
|
140
|
+
this.sharedService.currentPageTitle = currentPageTitle;
|
|
141
|
+
this.sharedService.currentPageURL = currentPageURL;
|
|
142
|
+
this.sharedService.childPageTitle = childPageTitle ? childPageTitle : '';
|
|
143
|
+
this.sharedService.childPageURL = childPageURL ? childPageURL : '';
|
|
144
|
+
this.sharedService.backPageURL = backPageURL ? backPageURL : '';
|
|
145
|
+
this.sharedService.isPreviousPageURL = backPageURL ? isPreviousPageURL : true;
|
|
146
|
+
this.sharedService.subChildPageTitle = subChildPageTitle;
|
|
147
|
+
this.sharedService.subChildPageURL = subChildPageURL;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
public saveProfileImage(profileImage: any) {
|
|
151
|
+
this.sharedService.setProperty('profileImage', profileImage);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
public getImageString(imgStr: string) {
|
|
155
|
+
return imgStr ? imgStr.split('base64,')[1] : null;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public getCurrentUser(): any {
|
|
159
|
+
return this.sharedService.CurrentUser ? this.sharedService.CurrentUser : null;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
public setCurrentUser(currentUser: any): any {
|
|
163
|
+
if (currentUser) {
|
|
164
|
+
return this.sharedService.setProperty(Constants.CURRENT_USER_KEY, currentUser);
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
public getCurrentUserUniqueID(): any {
|
|
170
|
+
return this.sharedService.CurrentUser ? this.sharedService.CurrentUser.userUniqueId : null;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
public getCurrentUserGroupId(): any {
|
|
174
|
+
return this.sharedService.CurrentUser ? this.sharedService.CurrentUser.userGroupId : null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
public getCurrentUserGroup(): any {
|
|
178
|
+
let userGroup = this.sharedService.CurrentUserGroup;
|
|
179
|
+
if (userGroup) {
|
|
180
|
+
return JSON.parse(atob(userGroup));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
public isLoginWithInternalURL() {
|
|
185
|
+
return this.sharedService.CurrentUser ? this.sharedService.CurrentUser.loginWithInternalURL : null;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public getCurrentUsername(): any {
|
|
189
|
+
return this.sharedService.CurrentUser ? this.sharedService.CurrentUser.userId : null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
public getCompanyId() {
|
|
193
|
+
return this.sharedService.CurrentUser.companyId ? this.sharedService.CurrentUser.companyId : null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
public getCompanyUniqueId() {
|
|
197
|
+
return this.sharedService.CurrentUser.companyUniqueId ? this.sharedService.CurrentUser.companyUniqueId : null;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
public getMenuList() {
|
|
201
|
+
return this.sharedService.MenuList ? JSON.parse(this.sharedService.MenuList) : null;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
public getAuditTypeList() {
|
|
205
|
+
return this.sharedService.AuditLogTypeList ? JSON.parse(this.sharedService.AuditLogTypeList) : null;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
public convertDateStringFormat(dateTo: Date, dateFormat: string) {
|
|
209
|
+
if (dateTo) {
|
|
210
|
+
return this.intlService.formatDate(dateTo, dateFormat);
|
|
211
|
+
}
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
public parseStringDateToFormat(strDate: string, format: string) {
|
|
216
|
+
if (strDate) {
|
|
217
|
+
return this.intlService.parseDate(strDate, format);
|
|
218
|
+
}
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
public setDateTo(value: Date) {
|
|
223
|
+
this.datepickerToOpts = {
|
|
224
|
+
startDate: value,
|
|
225
|
+
autoclose: true,
|
|
226
|
+
todayHighlight: true,
|
|
227
|
+
format: Constants.DATE_FORMAT,
|
|
228
|
+
placeholder: Constants.DATE_FORMAT,
|
|
229
|
+
icon: 'fa fa-calendar fa-4'
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
public togglePopup(event: any) {
|
|
234
|
+
let popupElement = $(event.currentTarget).next('.toggle-popup').find('.popup');
|
|
235
|
+
let exportButton = $('.btn-export');
|
|
236
|
+
this.isExportFile = false;
|
|
237
|
+
if (exportButton.is(event.currentTarget)) {
|
|
238
|
+
$('#field-popup').removeClass('active');
|
|
239
|
+
if (popupElement.hasClass('active')) {
|
|
240
|
+
this.isExportFile = true;
|
|
241
|
+
} else {
|
|
242
|
+
this.toggleExcelFile = false;
|
|
243
|
+
this.togglePDFFile = false;
|
|
244
|
+
this.toggleCSVFile = false;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
$('#export-popup').removeClass('active');
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
let topMargin = $(event.currentTarget).position().top + $(event.currentTarget).outerHeight();
|
|
252
|
+
popupElement.css('top', topMargin);
|
|
253
|
+
popupElement.toggleClass('active');
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
public onlyNumberKey(event: any, isDecimal?: boolean) {
|
|
257
|
+
if (event) {
|
|
258
|
+
let pattern = isDecimal ? new RegExp(`^([0-9\.]*)*$`) : new RegExp('^([0-9]*)*$');
|
|
259
|
+
if ((event.key && event.key.length > 1)
|
|
260
|
+
|| ($.inArray(event.code, this.contorlKeyList) !== -1 && event.ctrlKey)) {
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
return pattern.test(event.key);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// accept only numbers
|
|
271
|
+
public validateDecimalLength(event: any, maxIntegerLength: number, maxFractionalLength: number) {
|
|
272
|
+
let value = event.currentTarget.value;
|
|
273
|
+
if (value) {
|
|
274
|
+
if (!this.onlyNumberKey(event, true)) {
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
let startPosition = event.currentTarget.selectionStart;
|
|
278
|
+
let endPosition = event.currentTarget.selectionEnd;
|
|
279
|
+
let output = startPosition == endPosition ? [value.slice(0, startPosition), event.key, value.slice(startPosition)].join('') : value;
|
|
280
|
+
let count = this.occurence(output, '.');
|
|
281
|
+
if (count > 1) {
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
let splitedData = output.split('.');
|
|
285
|
+
let integerPart = splitedData[0];
|
|
286
|
+
let fractionalPart = splitedData[1];
|
|
287
|
+
if (integerPart && integerPart.length > maxIntegerLength) {
|
|
288
|
+
return false;
|
|
289
|
+
} else if (fractionalPart && fractionalPart.length > maxFractionalLength) {
|
|
290
|
+
return false;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// accept only numbers
|
|
297
|
+
public validateIntegerLength(event: any, maxIntegerLength: number) {
|
|
298
|
+
let value = event.currentTarget.value;
|
|
299
|
+
if (value) {
|
|
300
|
+
if (!this.onlyNumberKey(event, false)) {
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
let startPosition = event.currentTarget.selectionStart;
|
|
304
|
+
let endPosition = event.currentTarget.selectionEnd;
|
|
305
|
+
let output = startPosition == endPosition ? [value.slice(0, startPosition), event.key, value.slice(startPosition)].join('') : value;
|
|
306
|
+
if (output.length > maxIntegerLength) {
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
public occurence(str: any, letter: any) {
|
|
314
|
+
let count: number;
|
|
315
|
+
for (var i = count = 0; i < str.length; count += +(letter === str[i++]));
|
|
316
|
+
return count;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// hide Field Popup on document click(column hide show popup)
|
|
320
|
+
public hideFieldPopup() {
|
|
321
|
+
$(document.body).mouseup(function (e) {
|
|
322
|
+
let popup = $('.custom-popup');
|
|
323
|
+
if (popup.length && !$('.btn-toggle .fa-list').is(e.target) && !$('.btn-toggle .k-i-file-excel').is(e.target)
|
|
324
|
+
&& !$('.btn-toggle').is(e.target) && !popup.is(e.target) && popup.has(e.target).length === 0) {
|
|
325
|
+
$('.popup').removeClass('active');
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// export To PDF
|
|
331
|
+
public exportToSelectedFiles(grid: GridComponent, url?: string, fileName?: string, model?: any, toggleColumnModel?: any,
|
|
332
|
+
isFromSearch?: boolean, requestType?: string, filterModel?: any, summaryModel?: any): void {
|
|
333
|
+
|
|
334
|
+
if (this.isExportFile && this.togglePDFFile && url && fileName) {
|
|
335
|
+
fileName = `${fileName}${Constants.PDF_FILE_EXTENSION}`;
|
|
336
|
+
const dataURI = Constants.Text_DATA_FORMAT + encodeBase64(Constants.STRING_EMPTY);
|
|
337
|
+
let proxyURL = `${this.sharedService.appConfig.api_base_url}${Constants.SAVE_PDF_FILE_API_URL}`;
|
|
338
|
+
let token = this.getToken() ? this.getToken().replace('bearer ', '') : null;
|
|
339
|
+
let searchModel = model ? JSON.stringify(model) : null;
|
|
340
|
+
let columnModel = toggleColumnModel ? JSON.stringify(toggleColumnModel) : null;
|
|
341
|
+
let isSearchURL = isFromSearch ? Constants.FROM_SEARCH : Constants.STRING_EMPTY;
|
|
342
|
+
saveAs(dataURI, fileName, {
|
|
343
|
+
proxyURL: proxyURL,
|
|
344
|
+
forceProxy: true,
|
|
345
|
+
proxyData: {
|
|
346
|
+
Token: token,
|
|
347
|
+
URL: url,
|
|
348
|
+
Model: searchModel,
|
|
349
|
+
ToggleColumnModel: columnModel,
|
|
350
|
+
IsFromSearch: isSearchURL,
|
|
351
|
+
RequestType: requestType,
|
|
352
|
+
FilterModel: filterModel ? JSON.stringify(filterModel) : null,
|
|
353
|
+
SummaryModel: summaryModel ? JSON.stringify(summaryModel) : null
|
|
354
|
+
},
|
|
355
|
+
proxyTarget: Constants.INLINE
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
public previousDaysToDate(value: Date, days: number) {
|
|
361
|
+
if (value) {
|
|
362
|
+
let newDate = new Date(value);
|
|
363
|
+
newDate.setDate(newDate.getDate() - days);
|
|
364
|
+
let endDate = (newDate.getMonth() + 1) + '/' + newDate.getDate() + '/' + newDate.getFullYear();
|
|
365
|
+
return new Date(endDate);
|
|
366
|
+
}
|
|
367
|
+
return null;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
public selectCheckbox() {
|
|
371
|
+
let classObj = this;
|
|
372
|
+
$('.toggle-popup:not(.field-popup) .k-item').click(function (event: any) {
|
|
373
|
+
event.stopPropagation();
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
$('.toggle-popup:not(.field-popup) input[type="checkbox"]').click(function (event: any) {
|
|
377
|
+
event.stopPropagation();
|
|
378
|
+
classObj.validateCheckboxSelect($(this), true);
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
$('.toggle-popup:not(.field-popup) .k-link').click(function (event: any) {
|
|
382
|
+
event.stopPropagation();
|
|
383
|
+
classObj.validateCheckboxSelect($(this), false);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
validateCheckboxSelect(thisElement: any, isCheckbox: boolean) {
|
|
388
|
+
let parentElement = thisElement.closest('#field-popup');
|
|
389
|
+
let isChecked = false;
|
|
390
|
+
if (parentElement && parentElement.length) {
|
|
391
|
+
let totalCheckCheckbox = parentElement.find('input[type="checkbox"]:checked').length;
|
|
392
|
+
if (isCheckbox) {
|
|
393
|
+
if (!totalCheckCheckbox) {
|
|
394
|
+
thisElement.prop('checked', true);
|
|
395
|
+
}
|
|
396
|
+
} else {
|
|
397
|
+
isChecked = thisElement.find('input[type="checkbox"]').prop('checked');
|
|
398
|
+
if (totalCheckCheckbox !== 1 || !isChecked) {
|
|
399
|
+
thisElement.find('input[type="checkbox"]').click();
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
} else if (!isCheckbox) {
|
|
403
|
+
isChecked = thisElement.find('input[type="checkbox"]').prop('checked');
|
|
404
|
+
thisElement.find('input[type="checkbox"]').click();
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
public validateNumberTextField(value: any, isDecimal: boolean) {
|
|
409
|
+
let number = value.target.value + value.key;
|
|
410
|
+
if (!isDecimal && (value.code === 'NumpadDecimal' || value.code === 'Period')) {
|
|
411
|
+
return false;
|
|
412
|
+
} else if ($.inArray(value.code, this.numberFieldValidCodeList) !== -1) {
|
|
413
|
+
return true;
|
|
414
|
+
} else if (isDecimal) {
|
|
415
|
+
if (number.indexOf('.') > 0) {
|
|
416
|
+
let splitNumber: any[] = number.split('.');
|
|
417
|
+
let amountDigit: any = splitNumber[0];
|
|
418
|
+
let decimalDigit: any = splitNumber[1];
|
|
419
|
+
if (amountDigit.length < 10 && decimalDigit.length < 3) {
|
|
420
|
+
return true;
|
|
421
|
+
}
|
|
422
|
+
} else if (number.indexOf('.') === -1 && number.length < 10) {
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
} else if (number.length < 10) {
|
|
426
|
+
return true;
|
|
427
|
+
}
|
|
428
|
+
return false;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
public getGroupTypeDescription(groupType: string) {
|
|
432
|
+
groupType = groupType ? groupType.toUpperCase() : null;
|
|
433
|
+
return (groupType === Constants.MAKER_ID) ? Constants.MAKER_DESCRIPTION :
|
|
434
|
+
(groupType === Constants.CHECKER_ID ? Constants.CHECKER_DESCRIPTION : Constants.READONLY_DESCRIPTION);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
public saveFile(fileName: string, data: any) {
|
|
438
|
+
const dataURI = 'data:text/plain;base64,' + encodeBase64(data);
|
|
439
|
+
let proxyURL = `${this.sharedService.appConfig.api_base_url}${Constants.SAVE_FILE_API_URL}`;
|
|
440
|
+
saveAs(dataURI, fileName, {
|
|
441
|
+
proxyURL: proxyURL,
|
|
442
|
+
forceProxy: true
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
public removePropertyFromJSON(response: any) {
|
|
447
|
+
try {
|
|
448
|
+
delete response['resDescriptionEN'];
|
|
449
|
+
delete response['resDescriptionTH'];
|
|
450
|
+
delete response['responseCode'];
|
|
451
|
+
return response;
|
|
452
|
+
}
|
|
453
|
+
catch (error) {
|
|
454
|
+
return response;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
public getURL(url: any, pageNo: number, pageSize: number, totalRecords: number) {
|
|
459
|
+
let updateUrl = '';
|
|
460
|
+
let pageNoParameter = 'pageNo=' + pageNo;
|
|
461
|
+
let pageSizeParameter = 'pageSize=' + pageSize;
|
|
462
|
+
updateUrl = url.replace(pageNoParameter, 'pageNo=1');
|
|
463
|
+
updateUrl = updateUrl.replace(pageSizeParameter, 'pageSize=' + totalRecords);
|
|
464
|
+
return updateUrl;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
public exportToCSVFile(url?: string,
|
|
468
|
+
fileName?: string,
|
|
469
|
+
model?: any,
|
|
470
|
+
toggleColumnModel?: any,
|
|
471
|
+
isFromSearch?: boolean,
|
|
472
|
+
requestType?: string,
|
|
473
|
+
baseUrl?: string,
|
|
474
|
+
filterModel?: any,
|
|
475
|
+
summaryModel?: any) {
|
|
476
|
+
let dataURI = Constants.CSV_DATA_URI_FORMAT + encodeBase64('');
|
|
477
|
+
let token = (this.getToken() && !baseUrl) ?
|
|
478
|
+
this.getToken().replace('bearer ', '') : Constants.STRING_EMPTY;
|
|
479
|
+
let searchModel = model ? JSON.stringify(model) : null;
|
|
480
|
+
let columnModel = toggleColumnModel ? JSON.stringify(toggleColumnModel) : null;
|
|
481
|
+
let isSearchURL = isFromSearch ? '1' : '';
|
|
482
|
+
fileName = baseUrl ? fileName : `${fileName}${Constants.CSV_FILE_EXTENSION}`;
|
|
483
|
+
let proxyData: any = {
|
|
484
|
+
Token: token,
|
|
485
|
+
URL: url,
|
|
486
|
+
Model: searchModel,
|
|
487
|
+
ToggleColumnModel: columnModel,
|
|
488
|
+
IsFromSearch: isSearchURL,
|
|
489
|
+
RequestType: requestType,
|
|
490
|
+
FileName: fileName,
|
|
491
|
+
FilterModel: filterModel ? JSON.stringify(filterModel) : null,
|
|
492
|
+
SummaryModel: summaryModel ? JSON.stringify(summaryModel) : null
|
|
493
|
+
};
|
|
494
|
+
if (baseUrl) {
|
|
495
|
+
proxyData[Constants.BaseURL] = baseUrl;
|
|
496
|
+
let proxyURL = `${this.sharedService.appConfig.api_base_url}${Constants.SAVE_CSV_FILE_API_URL}`;
|
|
497
|
+
saveAs(dataURI, fileName, {
|
|
498
|
+
proxyURL: proxyURL,
|
|
499
|
+
forceProxy: true,
|
|
500
|
+
proxyData: proxyData,
|
|
501
|
+
proxyTarget: Constants.INLINE
|
|
502
|
+
});
|
|
503
|
+
} else {
|
|
504
|
+
this.sharedService.getFileData(Constants.SAVE_CSV_FILE_API_URL, proxyData).subscribe((blob: any) => {
|
|
505
|
+
saveAs(blob, fileName, {
|
|
506
|
+
forceProxy: false,
|
|
507
|
+
proxyTarget: Constants.INLINE
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
public saveZipFile(model: any, fileName: any) {
|
|
514
|
+
let token = this.getToken().replace('bearer ', '');
|
|
515
|
+
let searchModel = model ? JSON.stringify(model) : null;
|
|
516
|
+
let proxyData: any = {
|
|
517
|
+
Token: token,
|
|
518
|
+
URL: '',
|
|
519
|
+
Model: searchModel,
|
|
520
|
+
ToggleColumnModel: '',
|
|
521
|
+
IsFromSearch: true,
|
|
522
|
+
RequestType: '',
|
|
523
|
+
FileName: fileName
|
|
524
|
+
};
|
|
525
|
+
return proxyData;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
public getFileNameWithDate(fileName: string) {
|
|
529
|
+
if (fileName) {
|
|
530
|
+
let date = this.convertDateStringFormat(new Date(), Constants.EXCEL_NAME_DATE_FORMAT);
|
|
531
|
+
return `${fileName}${date}`;
|
|
532
|
+
}
|
|
533
|
+
return null;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
public getZipFileNameWithDate(model: any, productTypeList: any, companyList: any) {
|
|
537
|
+
let Product =
|
|
538
|
+
productTypeList.filter((prod: any) => {
|
|
539
|
+
if (prod.id == model.ProductTypeId) {
|
|
540
|
+
return productTypeList;
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
let productName = Product ? Product[0].description : Constants.STRING_EMPTY;
|
|
545
|
+
productName = (productName == 'Master Card' || productName == 'Gift Card') ? productName.replace(" ", "") : productName;
|
|
546
|
+
|
|
547
|
+
let Company =
|
|
548
|
+
companyList.filter((c: any) => {
|
|
549
|
+
if (c.companyUniqueId == model.CompanyUniqueId) {
|
|
550
|
+
return companyList
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
let CompanyId = Company ? Company[0].companyId : Constants.STRING_EMPTY;
|
|
555
|
+
let date = this.convertDateStringFormat(model.Date, Constants.DEFAULT_DATE_CONVERT);
|
|
556
|
+
date = date.replace('/', '').replace('/', '');
|
|
557
|
+
|
|
558
|
+
return `AccountBalance_${CompanyId}_${productName}_${date}.zip`;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// get User Rights from localStorage
|
|
562
|
+
public getUserRights(userModule: string, subModule: string) {
|
|
563
|
+
let userRights;
|
|
564
|
+
let currentUserGroup = this.getCurrentUserGroup();
|
|
565
|
+
|
|
566
|
+
// get current user group rights
|
|
567
|
+
if (currentUserGroup) {
|
|
568
|
+
userRights = currentUserGroup[userModule][subModule] === Constants.NO ? false : true;
|
|
569
|
+
}
|
|
570
|
+
return userRights;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
public getManualPostingUserRights(userModule: string, subModule: string, action: string) {
|
|
574
|
+
let userRights;
|
|
575
|
+
let currentUserGroup = this.getCurrentUserGroup();
|
|
576
|
+
|
|
577
|
+
if (currentUserGroup) {
|
|
578
|
+
userRights = currentUserGroup[userModule][subModule][action] === Constants.NO ? false : true;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
return userRights;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
public maskData(index: any, format: any, value: any) {
|
|
585
|
+
if (value && format) {
|
|
586
|
+
return value.substring(0, index) + format + value.substr(index + format.length);
|
|
587
|
+
}
|
|
588
|
+
return value;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
// This method will add masking in given string with the mask symbol.
|
|
592
|
+
// fIndex: First end index of visible string.
|
|
593
|
+
// lIndex: Last index for end visible string.
|
|
594
|
+
// value: Value will be the string to masked.
|
|
595
|
+
// mask: This will be the symbol to use as a mask.
|
|
596
|
+
public maskString(fIndex: number, lIndex: number, value: string, mask: string) {
|
|
597
|
+
if (value) {
|
|
598
|
+
let format: string = Constants.STRING_EMPTY;
|
|
599
|
+
let maskLen = (value.length - lIndex) - fIndex;
|
|
600
|
+
for (let i = 0; i < maskLen; i++) {
|
|
601
|
+
format += mask;
|
|
602
|
+
}
|
|
603
|
+
return value.substring(0, fIndex) + format + value.substr(value.length - lIndex);
|
|
604
|
+
}
|
|
605
|
+
return value;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// This method will verify the model object. If any property has blank value then it will replace it with undefined.
|
|
609
|
+
// This method will be used to for search models.
|
|
610
|
+
public verifySearchObject(model: any, skipDefaultInteger?: boolean): any {
|
|
611
|
+
|
|
612
|
+
if (!model) {
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
let keys = Object.keys(model);
|
|
617
|
+
for (let i = 0; i < keys.length; i++) {
|
|
618
|
+
let key = keys[i];
|
|
619
|
+
if (skipDefaultInteger) {
|
|
620
|
+
model[key] = model[key] === 0 ? model[key] : (model[key] ? model[key] : undefined);
|
|
621
|
+
}
|
|
622
|
+
else if (model[key] === false)
|
|
623
|
+
{
|
|
624
|
+
model[key] = model[key];
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
model[key] = model[key] ? model[key] : undefined;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// This method will show/hide the column of the grid.
|
|
633
|
+
public hideColumn(column: any, element: any) {
|
|
634
|
+
column.hidden = !element.checked;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
public insertAuditLog(auditLogModel: AuditLogInsertModel) {
|
|
638
|
+
this.ngZone.runOutsideAngular(() => {
|
|
639
|
+
if (auditLogModel.Description) {
|
|
640
|
+
auditLogModel.CompanyId = this.getCompanyId();
|
|
641
|
+
auditLogModel.DateTime = this.convertDateStringFormat(new Date(), Constants.DATE_TIME_FORMAT);
|
|
642
|
+
auditLogModel.UserId = this.getCurrentUserUniqueID();
|
|
643
|
+
this.sharedService.put(Constants.DEFAULT_ACTION_AUDTI_LOG_API, auditLogModel).subscribe((data: any) => {
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
public getMenuId(menuName: string) {
|
|
650
|
+
let menuList = this.getMenuList();
|
|
651
|
+
let menuObject = menuList.filter((m: any) => m.menuName === menuName)[0];
|
|
652
|
+
return menuObject ? menuObject.menuId : 0;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
public getAuditTypeId(auditTypeName: string) {
|
|
656
|
+
let auditTypeList = this.getAuditTypeList();
|
|
657
|
+
let auditTypeObject = auditTypeList.filter((m: any) => m.auditTypeName === auditTypeName)[0];
|
|
658
|
+
return auditTypeObject.auditTypeId;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
// get Edit Audit Description
|
|
662
|
+
// Description template :<Field Name 1>: <before value> to <after value>
|
|
663
|
+
public getEditAuditDescription(acutalObject: any, updatedObject: any, objectName?: string): any {
|
|
664
|
+
let keys = acutalObject ? Object.keys(acutalObject) : null;
|
|
665
|
+
let description = Constants.STRING_EMPTY;
|
|
666
|
+
if (keys) {
|
|
667
|
+
for (let i = 0; i < keys.length; i++) {
|
|
668
|
+
let fieldName = keys[i];
|
|
669
|
+
let beforeValue = acutalObject[fieldName];
|
|
670
|
+
let afterValue = updatedObject[fieldName];
|
|
671
|
+
if (beforeValue && afterValue && typeof beforeValue == Constants.OBJECT && typeof beforeValue == Constants.OBJECT) {
|
|
672
|
+
description += this.getEditAuditDescription(beforeValue, afterValue, fieldName);
|
|
673
|
+
} else {
|
|
674
|
+
if (beforeValue != afterValue) {
|
|
675
|
+
// mask id number
|
|
676
|
+
if (fieldName && fieldName.toLowerCase() == Constants.ID_NUMBER) {
|
|
677
|
+
beforeValue = this.maskString(6, 4, beforeValue, '*');
|
|
678
|
+
afterValue = this.maskString(6, 4, afterValue, '*');
|
|
679
|
+
}
|
|
680
|
+
if (fieldName == Constants.MARKUP_RATE_FIELD)
|
|
681
|
+
fieldName = Constants.MARKUP_RATE_AUDIT_LABEL;
|
|
682
|
+
|
|
683
|
+
switch (fieldName) {
|
|
684
|
+
case Constants.MERCONTACTNO:
|
|
685
|
+
fieldName = Constants.BRANCH_MERCHANT_CONTACTNO_LABEL;
|
|
686
|
+
break
|
|
687
|
+
case Constants.MERCONTACTPERSON:
|
|
688
|
+
fieldName = Constants.BRANCH_MERCHANT_CONTACT_PERSON_LABLE;
|
|
689
|
+
break;
|
|
690
|
+
case Constants.STATENAME:
|
|
691
|
+
fieldName = Constants.BRANCH_STATE_NAME_LABLEStateName;
|
|
692
|
+
break;
|
|
693
|
+
case Constants.NATIONALITY_FIELD:
|
|
694
|
+
fieldName = Constants.NATIONALITY_LABEL;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
if (!afterValue) {
|
|
698
|
+
afterValue = "' '";
|
|
699
|
+
}
|
|
700
|
+
if (!beforeValue) {
|
|
701
|
+
beforeValue = "' '";
|
|
702
|
+
}
|
|
703
|
+
description += objectName ? `\n${objectName} ${fieldName.replace(/([A-Z])/g, ' $1').trim()}: ${beforeValue} to ${afterValue}` :
|
|
704
|
+
`\n${fieldName.replace(/([A-Z])/g, ' $1').trim()}: ${beforeValue} to ${afterValue}`;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return description;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
public onlyNumeric(event: any, isDecimal?: boolean) {
|
|
713
|
+
if (event) {
|
|
714
|
+
let pattern = isDecimal ? new RegExp(`^([0-9\.]*)*$`) : new RegExp('^([0-9]*)*$');
|
|
715
|
+
let content = event.clipboardData.getData('text/plain');
|
|
716
|
+
return pattern.test(content);
|
|
717
|
+
}
|
|
718
|
+
return false;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
public onlyAlphanumeric(event: any, isSpaceAllowed?: boolean) {
|
|
722
|
+
let pattern = isSpaceAllowed ? new RegExp('^([a-zA-Z0-9 ])*$') : new RegExp('^([a-zA-Z0-9])*$');
|
|
723
|
+
if (event) {
|
|
724
|
+
return pattern.test(event.key);
|
|
725
|
+
}
|
|
726
|
+
return false;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// validate Alphanumeric field on copy event
|
|
730
|
+
public validateAlphanumeric(event: any, isSpaceAllowed?: boolean) {
|
|
731
|
+
let content = event.clipboardData.getData('text/plain');
|
|
732
|
+
let pattern = isSpaceAllowed ? new RegExp('^([a-zA-Z0-9 ])*$') : new RegExp('^([a-zA-Z0-9])*$');
|
|
733
|
+
if (event) {
|
|
734
|
+
return pattern.test(content);
|
|
735
|
+
}
|
|
736
|
+
return false;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
// accept only Alpha character
|
|
740
|
+
public onlyAlphaCharacters(event: any, isSpaceAllowed?: boolean) {
|
|
741
|
+
let pattern = isSpaceAllowed ? new RegExp('^([a-zA-Z ])*$') : new RegExp('^([a-zA-Z])*$');
|
|
742
|
+
if (event) {
|
|
743
|
+
return pattern.test(event.key);
|
|
744
|
+
}
|
|
745
|
+
return false;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
public onlyAlphanumericAndThai(event: any, isSpaceAllowed?: boolean) {
|
|
749
|
+
let pattern = isSpaceAllowed ? new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9 ])*$') : new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9])*$');
|
|
750
|
+
if (event) {
|
|
751
|
+
return pattern.test(event.key);
|
|
752
|
+
}
|
|
753
|
+
return false;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
// validate Alphanumeric and Thai field on copy/paste event
|
|
757
|
+
public validateAlphanumericAndThai(event: any, isSpaceAllowed?: boolean) {
|
|
758
|
+
let content = event.clipboardData.getData('text/plain');
|
|
759
|
+
let pattern = isSpaceAllowed ? new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9 ])*$') : new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9])*$');
|
|
760
|
+
if (event) {
|
|
761
|
+
return pattern.test(content);
|
|
762
|
+
}
|
|
763
|
+
return false;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
public onlyAlphanumericAndThaiWithDot(event: any, isSpaceAllowed?: boolean) {
|
|
767
|
+
let pattern = isSpaceAllowed ? new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9. ])*$') : new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9.])*$');
|
|
768
|
+
if (event) {
|
|
769
|
+
return pattern.test(event.key);
|
|
770
|
+
}
|
|
771
|
+
return false;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// validate Alphanumeric and Thai field on copy/paste event
|
|
775
|
+
public validateAlphanumericAndThaiWithDot(event: any, isSpaceAllowed?: boolean) {
|
|
776
|
+
let content = event.clipboardData.getData('text/plain');
|
|
777
|
+
let pattern = isSpaceAllowed ? new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9. ])*$') : new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9.])*$');
|
|
778
|
+
if (event) {
|
|
779
|
+
return pattern.test(content);
|
|
780
|
+
}
|
|
781
|
+
return false;
|
|
782
|
+
}
|
|
783
|
+
// All the special characters allowed except for ? and =
|
|
784
|
+
public onlyAlphanumericAndThaiWithSpecialChars(event: any, isSpaceAllowed?: boolean) {
|
|
785
|
+
let pattern = isSpaceAllowed ? new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9!@#$&%^*()\\-`.+,/\"<>\'_:; ])*$') : new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9!@#$&%^*()\\-`.+,/\"<>\'_:;])*$');
|
|
786
|
+
if (event) {
|
|
787
|
+
return pattern.test(event.key);
|
|
788
|
+
}
|
|
789
|
+
return false;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
// validate Alphanumeric, and Thai field on copy/paste event
|
|
793
|
+
public validateAlphanumericAndThaiWithSpecialChars(event: any, isSpaceAllowed?: boolean) {
|
|
794
|
+
let content = event.clipboardData.getData('text/plain');
|
|
795
|
+
let pattern = isSpaceAllowed ? new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9!@#$&%^*()\\-`.+,/\"<>\'_:; ])*$') : new RegExp('^([\u0E00-\u0E7Fa-zA-Z0-9!@#$&%^*()\\-`.+,/\"<>\'_:;])*$');
|
|
796
|
+
if (event) {
|
|
797
|
+
return pattern.test(content);
|
|
798
|
+
}
|
|
799
|
+
return false;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// validate space on copy event
|
|
803
|
+
public validateSpaceBetweenWords(event: any) {
|
|
804
|
+
let content = event.clipboardData.getData('text/plain');
|
|
805
|
+
let pattern = new RegExp('^\\w+( \\w+)*$');
|
|
806
|
+
if (event) {
|
|
807
|
+
return pattern.test(content);
|
|
808
|
+
}
|
|
809
|
+
return false;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
// Convert to Float
|
|
813
|
+
public convertStringToFloat(value: string) {
|
|
814
|
+
if (value) {
|
|
815
|
+
return Number.parseFloat(value);
|
|
816
|
+
}
|
|
817
|
+
return 0;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
public ConvertToNumber(value: string) {
|
|
821
|
+
if (value) {
|
|
822
|
+
return Number.parseInt(value);
|
|
823
|
+
}
|
|
824
|
+
return 0;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
public getFieldNameList(grid: any, skipColumnArray?: any) {
|
|
828
|
+
let fieldNameModel: any[] = [];
|
|
829
|
+
let columns = grid.columnList.columns.toArray();
|
|
830
|
+
this.createFieldNameModel(columns, fieldNameModel, skipColumnArray);
|
|
831
|
+
return fieldNameModel;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
public createFieldNameModel(columns: any, fieldNameModel: any, skipColumnArray?: any) {
|
|
835
|
+
for (let i = 0; i < columns.length; i++) {
|
|
836
|
+
let toggleColumn: any = { fieldName: null, columnName: null };
|
|
837
|
+
let column = columns[i];
|
|
838
|
+
let isColumnAllowed = (skipColumnArray && skipColumnArray.length > 0) ? (skipColumnArray.indexOf(column.title) === -1) : true;
|
|
839
|
+
|
|
840
|
+
if (column.title && column.field && !column.hidden && isColumnAllowed) {
|
|
841
|
+
toggleColumn.fieldName = column.field;
|
|
842
|
+
toggleColumn.columnName = column.title;
|
|
843
|
+
fieldNameModel.push(toggleColumn);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
let childColumns: any = column.children ? column.children.toArray() : null;
|
|
847
|
+
|
|
848
|
+
if (childColumns) {
|
|
849
|
+
childColumns = childColumns.filter((c: any) => { return c.parent; });
|
|
850
|
+
this.createFieldNameModel(childColumns, fieldNameModel, skipColumnArray);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
// is field check disabled
|
|
856
|
+
public isDisabled(hidden: boolean, columns: any, isCompanyDisable: boolean) {
|
|
857
|
+
let hiddenColumns = columns.filter((c: any) => { return c.hidden; });
|
|
858
|
+
let hiddenColumnsLength = hiddenColumns ? hiddenColumns.length : 0;
|
|
859
|
+
hiddenColumnsLength = isCompanyDisable ? hiddenColumnsLength - 1 : hiddenColumnsLength;
|
|
860
|
+
let totalColumns = columns.filter((c: any) => { return c.field; });
|
|
861
|
+
let totalColumnsLength = totalColumns ? totalColumns.length : 0;
|
|
862
|
+
totalColumnsLength = isCompanyDisable ? totalColumnsLength - 1 : totalColumnsLength;
|
|
863
|
+
return (totalColumnsLength - hiddenColumnsLength) === 1 && !hidden;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
// save Menu Setup into local storage
|
|
867
|
+
public saveMenuSetup(menu: any) {
|
|
868
|
+
if (menu) {
|
|
869
|
+
let menuSetup = btoa(JSON.stringify(menu));
|
|
870
|
+
this.sharedService.setProperty(Constants.MENU_SETUP_KEY, menuSetup);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// get Menu Setup from local storage
|
|
875
|
+
public getMenuSetup() {
|
|
876
|
+
let menuSetup = this.sharedService.MenuSetup;
|
|
877
|
+
|
|
878
|
+
if (menuSetup) {
|
|
879
|
+
return JSON.parse(atob(menuSetup));
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
// get isMenuVisible true or false
|
|
884
|
+
public isMenuVisible(menu: string, subMenu: string) {
|
|
885
|
+
let menuSetup = this.getMenuSetup();
|
|
886
|
+
// menu is visible if value 'Y'
|
|
887
|
+
if (menuSetup) {
|
|
888
|
+
if (subMenu == null) return menuSetup[menu] === Constants.YES ? true : false;
|
|
889
|
+
return menuSetup[menu][subMenu] === Constants.YES ? true : false;
|
|
890
|
+
}
|
|
891
|
+
return false;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
public convertNumberToString(value: number) {
|
|
895
|
+
return value ? value.toString() : null;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
// save User Group into local storage
|
|
899
|
+
public saveUserGroup(userGroupObject: any) {
|
|
900
|
+
if (userGroupObject) {
|
|
901
|
+
let userGroup = btoa(JSON.stringify(userGroupObject));
|
|
902
|
+
this.sharedService.setProperty(Constants.CURRENT_USER_GROUP_KEY, userGroup);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
public FormatCardNumber(cardformat: any, cardno: any) {
|
|
907
|
+
if (typeof cardno != 'undefined' && cardno) {
|
|
908
|
+
cardno = cardno.replace(/\x/g, '').replace(/\_/g, '');
|
|
909
|
+
switch (cardformat) {
|
|
910
|
+
case "2":
|
|
911
|
+
cardno = `xxxxxxxxxxxx${cardno}`;
|
|
912
|
+
break;
|
|
913
|
+
case "3":
|
|
914
|
+
cardno = `${cardno.substring(0, cardno.length - 4)}xxxxxx${cardno.substring(6, cardno.length)}`; //"000000XXXXXX0000";
|
|
915
|
+
break;
|
|
916
|
+
default:
|
|
917
|
+
return cardno;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return cardno;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
public GetCardIdFromPan(cardNumber: string) {
|
|
924
|
+
let cardId: number = 0;
|
|
925
|
+
if (cardNumber) {
|
|
926
|
+
switch (cardNumber.charAt(0)) {
|
|
927
|
+
case '4':
|
|
928
|
+
cardId = 2;
|
|
929
|
+
break;
|
|
930
|
+
case '5':
|
|
931
|
+
cardId = 1;
|
|
932
|
+
break
|
|
933
|
+
}
|
|
934
|
+
return cardId;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
// save company and product name for edited product to into local storage
|
|
939
|
+
public saveSelectedProductDetails(companyName: string, productName: string) {
|
|
940
|
+
if (companyName && productName) {
|
|
941
|
+
var editedProductObject = {
|
|
942
|
+
CompanyName: companyName,
|
|
943
|
+
ProductName: productName
|
|
944
|
+
}
|
|
945
|
+
let editedProduct = btoa(JSON.stringify(editedProductObject));
|
|
946
|
+
this.sharedService.setProperty(Constants.EDITED_PRODUCT_KEY, editedProduct);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
public getSelectedCardDetails() {
|
|
951
|
+
return this.sharedService.EditedProduct ? JSON.parse(atob(this.sharedService.EditedProduct)) : null;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
// Get company name By company unique ID
|
|
955
|
+
public getCompanyNameFromId(companyList: any, selectedId: any) {
|
|
956
|
+
let companyName: string = Constants.STRING_EMPTY;
|
|
957
|
+
if (companyList) {
|
|
958
|
+
let data = companyList.filter((element: any) => {
|
|
959
|
+
if (element.companyUniqueId == selectedId)
|
|
960
|
+
return element;
|
|
961
|
+
});
|
|
962
|
+
if (data && data.length > 0)
|
|
963
|
+
companyName = data[0].companyName;
|
|
964
|
+
}
|
|
965
|
+
return companyName;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
//Return numeric value from string
|
|
969
|
+
public allowNumericOnly(event: any) {
|
|
970
|
+
let content = event.clipboardData.getData('text/plain');
|
|
971
|
+
let numericContent: any = Constants.STRING_EMPTY;
|
|
972
|
+
if (content)
|
|
973
|
+
numericContent = content.match(/\d/g);
|
|
974
|
+
|
|
975
|
+
return (numericContent) ? numericContent.join('') : Constants.STRING_EMPTY;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
public exportToExcelFile(url?: string, fileName?: string, model?: any, toggleColumnModel?: any,
|
|
979
|
+
isFromSearch?: boolean, requestType?: string): void {
|
|
980
|
+
if (this.isExportFile && this.toggleExcelFile && url && fileName) {
|
|
981
|
+
fileName = `${fileName}${Constants.EXCEL_FILE_EXTENSION}`;
|
|
982
|
+
const dataURI = Constants.Text_DATA_FORMAT + encodeBase64(Constants.STRING_EMPTY);
|
|
983
|
+
let proxyURL = `${this.sharedService.appConfig.api_base_url}${Constants.SAVE_EXCEL_FILE_API_URL}`;
|
|
984
|
+
let token = this.getToken() ? this.getToken().replace('bearer ', '') : null;
|
|
985
|
+
let searchModel = model ? JSON.stringify(model) : null;
|
|
986
|
+
let columnModel = toggleColumnModel ? JSON.stringify(toggleColumnModel) : null;
|
|
987
|
+
let isSearchURL = isFromSearch ? Constants.FROM_SEARCH : Constants.STRING_EMPTY;
|
|
988
|
+
let proxyData: any = {
|
|
989
|
+
Token: token,
|
|
990
|
+
URL: url,
|
|
991
|
+
Model: searchModel,
|
|
992
|
+
ToggleColumnModel: columnModel,
|
|
993
|
+
IsFromSearch: isSearchURL,
|
|
994
|
+
RequestType: requestType
|
|
995
|
+
}
|
|
996
|
+
this.sharedService.getFileData(Constants.SAVE_EXCEL_FILE_API_URL, proxyData).subscribe((blob: any) => {
|
|
997
|
+
saveAs(blob, fileName, {
|
|
998
|
+
forceProxy: false,
|
|
999
|
+
proxyTarget: Constants.INLINE
|
|
1000
|
+
});
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// get Menu Id from menu setup list
|
|
1006
|
+
public getMenuIdForAuditLog(menuName: string) {
|
|
1007
|
+
let menuSetupList = this.getMenuSetup();
|
|
1008
|
+
let menuObject = menuSetupList.MenuData.filter((m: any) => m.MenuName === menuName)[0];
|
|
1009
|
+
return menuObject ? menuObject.MenuId : 0;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
public convertToFloat(model: any): any {
|
|
1013
|
+
let keys = Object.keys(model);
|
|
1014
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1015
|
+
let key = keys[i];
|
|
1016
|
+
try {
|
|
1017
|
+
let data = model[key] ? parseFloat(model[key]) : model[key];
|
|
1018
|
+
model[key] = Number.isNaN(data) ? model[key] : data;
|
|
1019
|
+
} catch (ex) {
|
|
1020
|
+
model[key] = model[key];
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return model;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
// save any file
|
|
1027
|
+
// data: dataformat + encoded base64 string
|
|
1028
|
+
public saveAsFile(fileName: string, data: any) {
|
|
1029
|
+
saveAs(data, fileName, {
|
|
1030
|
+
forceProxy: false,
|
|
1031
|
+
proxyTarget: Constants.INLINE
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
public getEscapedUntrustedData(dataObj: any): any {
|
|
1036
|
+
let sanitizedData: any;
|
|
1037
|
+
if (dataObj) {
|
|
1038
|
+
let keys = Object.keys(dataObj);
|
|
1039
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1040
|
+
let key = keys[i];
|
|
1041
|
+
dataObj[key] = this.domSanitizer.sanitize(SecurityContext.HTML, dataObj[key]);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
if (dataObj)
|
|
1045
|
+
return dataObj;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
public getRoutingURL(): any {
|
|
1049
|
+
let routeURL: any = this.routeAfter.url;
|
|
1050
|
+
if (routeURL.length > 1) {
|
|
1051
|
+
return "/" + routeURL[0].path + "/" + routeURL[1].path;
|
|
1052
|
+
}
|
|
1053
|
+
return routeURL[0] ? ("/" + routeURL[0].path) : null;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
public setToken(token: string) {
|
|
1057
|
+
this.sharedService.setToken(token);
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
public getToken() {
|
|
1061
|
+
return this.sharedService.getToken();
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
// shallow Clone
|
|
1065
|
+
// The Object.create() method creates a new object, using an existing object as the prototype of the newly created object
|
|
1066
|
+
public shallowClone(obj: any): any {
|
|
1067
|
+
let clone = Object.create(Object.getPrototypeOf(obj));
|
|
1068
|
+
let props = Object.getOwnPropertyNames(obj);
|
|
1069
|
+
props.forEach(function (key) {
|
|
1070
|
+
let desc = Object.getOwnPropertyDescriptor(obj, key);
|
|
1071
|
+
Object.defineProperty(clone, key, desc);
|
|
1072
|
+
});
|
|
1073
|
+
return clone;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
//Return string value from paste data
|
|
1077
|
+
public extractStringOnly(event: any) {
|
|
1078
|
+
let content = event.clipboardData.getData('text/plain');
|
|
1079
|
+
let stringContent: any = Constants.STRING_EMPTY;
|
|
1080
|
+
if (content) {
|
|
1081
|
+
stringContent = content.replace(/\s/g, " ").replace(/[!@#\$%\^\&*\)\(\{\}\[\]+=.;:_-]+/g, '');
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
return (stringContent) ? stringContent : Constants.STRING_EMPTY;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
public separateThousands(value: string) {
|
|
1088
|
+
if (!value) return '0.00';
|
|
1089
|
+
else return value.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// on Excel Export
|
|
1093
|
+
public onExcelExport(event: any, filterList: any): void {
|
|
1094
|
+
let countFilterFields: number = 0;
|
|
1095
|
+
let data: any[] = filterList.reverse();
|
|
1096
|
+
data.forEach((element: any) => {
|
|
1097
|
+
if (element.Value) {
|
|
1098
|
+
let cellContent = {
|
|
1099
|
+
cells: [
|
|
1100
|
+
{
|
|
1101
|
+
value: `${element.FieldName} :`,
|
|
1102
|
+
color: Constants.BLACK_COLOR,
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
value: `${element.Value}`,
|
|
1106
|
+
color: Constants.BLACK_COLOR,
|
|
1107
|
+
}
|
|
1108
|
+
]
|
|
1109
|
+
}
|
|
1110
|
+
if (countFilterFields == 0) {
|
|
1111
|
+
let blankCell = {
|
|
1112
|
+
cells: [
|
|
1113
|
+
{
|
|
1114
|
+
value: Constants.STRING_EMPTY,
|
|
1115
|
+
}
|
|
1116
|
+
]
|
|
1117
|
+
}
|
|
1118
|
+
// add blank cell
|
|
1119
|
+
event.workbook.sheets[0].rows.unshift(blankCell);
|
|
1120
|
+
}
|
|
1121
|
+
event.workbook.sheets[0].rows.unshift(cellContent);
|
|
1122
|
+
countFilterFields = countFilterFields + 1;
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
if (countFilterFields > 0) {
|
|
1127
|
+
event.workbook.sheets[0].freezePane.rowSplit = 0;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
public onExcelExportWithSummaryHeader(event: any, filterList: any): void {
|
|
1132
|
+
let countFilterFields: number = 0;
|
|
1133
|
+
let headerRow: any[] = [];
|
|
1134
|
+
let valueRow: any[] = [];
|
|
1135
|
+
filterList.forEach((element: any) => {
|
|
1136
|
+
if (element.FieldName) {
|
|
1137
|
+
let cell = {
|
|
1138
|
+
value: `${element.FieldName}`,
|
|
1139
|
+
color: Constants.WHITE_COLOR,
|
|
1140
|
+
background: Constants.GREY_COLOR
|
|
1141
|
+
}
|
|
1142
|
+
headerRow.push(cell);
|
|
1143
|
+
}
|
|
1144
|
+
if (element.Value) {
|
|
1145
|
+
let cell = {
|
|
1146
|
+
value: `${element.Value}`,
|
|
1147
|
+
color: Constants.BLACK_COLOR,
|
|
1148
|
+
}
|
|
1149
|
+
valueRow.push(cell);
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
let headerCellContent = {
|
|
1153
|
+
cells: headerRow
|
|
1154
|
+
}
|
|
1155
|
+
let valueCellContent = {
|
|
1156
|
+
cells: valueRow
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
let blankCell = {
|
|
1160
|
+
cells: [
|
|
1161
|
+
{
|
|
1162
|
+
value: Constants.STRING_EMPTY,
|
|
1163
|
+
}
|
|
1164
|
+
]
|
|
1165
|
+
}
|
|
1166
|
+
// add blank cell
|
|
1167
|
+
event.workbook.sheets[0].rows.unshift(blankCell);
|
|
1168
|
+
event.workbook.sheets[0].rows.unshift(valueCellContent);
|
|
1169
|
+
event.workbook.sheets[0].rows.unshift(headerCellContent);
|
|
1170
|
+
event.workbook.sheets[0].freezePane.rowSplit = 4;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
public formatNumber(data: any, format: string) {
|
|
1174
|
+
return this.numberPipe.transform(data, format);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
// get Field Names List excluding columns added in skipColumnArray
|
|
1178
|
+
public getFieldNamesList(grid: any, skipColumnArray?: any) {
|
|
1179
|
+
let fieldNameModel: any[] = [];
|
|
1180
|
+
let columns = grid.columnList.columns.toArray();
|
|
1181
|
+
this.createFieldNamesModel(columns, fieldNameModel, skipColumnArray);
|
|
1182
|
+
return fieldNameModel;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
public createFieldNamesModel(columns: any, fieldNameModel: any, skipColumnArray?: any) {
|
|
1186
|
+
for (let i = 0; i < columns.length; i++) {
|
|
1187
|
+
let toggleColumn: any = { fieldName: null, columnName: null };
|
|
1188
|
+
let column = columns[i];
|
|
1189
|
+
let isColumnAllowed = (skipColumnArray && skipColumnArray.length > 0) ? (skipColumnArray.indexOf(column.title) === -1) : true;
|
|
1190
|
+
|
|
1191
|
+
if (column.title && column.field && isColumnAllowed) {
|
|
1192
|
+
toggleColumn.fieldName = column.field;
|
|
1193
|
+
toggleColumn.columnName = column.title;
|
|
1194
|
+
fieldNameModel.push(toggleColumn);
|
|
1195
|
+
}
|
|
1196
|
+
let childColumns: any = column.children ? column.children.toArray() : null;
|
|
1197
|
+
|
|
1198
|
+
if (childColumns) {
|
|
1199
|
+
childColumns = childColumns.filter((c: any) => { return c.parent; });
|
|
1200
|
+
this.createFieldNameModel(childColumns, fieldNameModel, skipColumnArray);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
public redirectToCompanyLogin(skipTimeout?: boolean, merchanturl?: string) {
|
|
1206
|
+
let timeout: number = Constants.TIMEOUT;
|
|
1207
|
+
if (skipTimeout) {
|
|
1208
|
+
timeout = 0;
|
|
1209
|
+
}
|
|
1210
|
+
// clear session storage
|
|
1211
|
+
sessionStorage.clear();
|
|
1212
|
+
localStorage.clear();
|
|
1213
|
+
// navigate to login page
|
|
1214
|
+
setTimeout(() => { window.location.href = merchanturl }, timeout);
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
public setSelectedCompany(companyUniqueId: number) {
|
|
1218
|
+
this.sharedService.setSelectedCompany(companyUniqueId);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
public getSelectedCompany() {
|
|
1222
|
+
return this.sharedService.getSelectedCompany();
|
|
1223
|
+
}
|
|
1224
|
+
public setCompanyNameWalletProfile(companyName: any) {
|
|
1225
|
+
this.sharedService.setProperty('companyName', companyName);
|
|
1226
|
+
}
|
|
1227
|
+
public getCompanyNameWalletProfile(): any {
|
|
1228
|
+
return this.sharedService.companyName ? this.sharedService.companyName : null;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
public parseStringAmount(stringValue: string) {
|
|
1232
|
+
if (stringValue && stringValue.length > 1) {
|
|
1233
|
+
return Number(stringValue.replace(/,/g, ''));
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
public getDateDifferenceInDays(startDate: Date, endDate: Date) {
|
|
1238
|
+
if (startDate && endDate) {
|
|
1239
|
+
var diff = Math.abs(endDate.getTime() - startDate.getTime());
|
|
1240
|
+
return Math.ceil(diff / (1000 * 3600 * 24));
|
|
1241
|
+
}
|
|
1242
|
+
else {
|
|
1243
|
+
return 0;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
public revokeGoogleToken(token: string) {
|
|
1248
|
+
// Clear the current access token
|
|
1249
|
+
let xhr = new XMLHttpRequest();
|
|
1250
|
+
xhr.onreadystatechange = () => {
|
|
1251
|
+
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
1252
|
+
// Clear gapi.client token
|
|
1253
|
+
gapi.client.setToken('');
|
|
1254
|
+
return;
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
xhr.open(Constants.POST_REQUEST, `${Constants.GOOGLE_OAUTH}${Constants.GOOGLE_REVOKE_TOKEN}${token}`);
|
|
1259
|
+
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
1260
|
+
xhr.send();
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
// get current User Id
|
|
1264
|
+
public getCurrentUserId() {
|
|
1265
|
+
return localStorage.getItem('currentUser') ? JSON.parse(localStorage.getItem('currentUser')).uniqueID : null;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
public getIsPasswordExpired() {
|
|
1269
|
+
if (this.getToken()) {
|
|
1270
|
+
if (JSON.parse(localStorage.getItem('currentUser'))) {
|
|
1271
|
+
let passwordExpriedDate = JSON.parse(localStorage.getItem('currentUser')).expiredPasswordDate;
|
|
1272
|
+
return new Date(passwordExpriedDate) < new Date();
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
else {
|
|
1276
|
+
this.router.navigate([Constants.LOGIN])
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
public clearLocalStorage() {
|
|
1281
|
+
localStorage.clear();
|
|
1282
|
+
sessionStorage.clear();
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
// handle response
|
|
1286
|
+
public handleResponse(response: any) {
|
|
1287
|
+
if (response) {
|
|
1288
|
+
switch (response.Result.responseCode) {
|
|
1289
|
+
// success response
|
|
1290
|
+
case Constants.SUCCESS_CODE:
|
|
1291
|
+
if (google.accounts.oauth2 && gapi.client && this.isLoginWithInternalURL()) {
|
|
1292
|
+
let accessToken = gapi.client.getToken();
|
|
1293
|
+
if (google.accounts.oauth2 && gapi && accessToken) {
|
|
1294
|
+
this.revokeGoogleToken(accessToken.access_token);
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
this.ngZone.run(
|
|
1298
|
+
() => {
|
|
1299
|
+
// redirect to login page and clear the local storage
|
|
1300
|
+
this.clearLocalStorage();
|
|
1301
|
+
this.redirectToLogin(true);
|
|
1302
|
+
}
|
|
1303
|
+
);
|
|
1304
|
+
} else {
|
|
1305
|
+
// redirect to login page and clear the local storage
|
|
1306
|
+
this.clearLocalStorage();
|
|
1307
|
+
this.redirectToLogin(true);
|
|
1308
|
+
}
|
|
1309
|
+
break;
|
|
1310
|
+
// Login expired, you will be redirected to login page.
|
|
1311
|
+
case Constants.ACCESS_TOKEN_EXPIRED:
|
|
1312
|
+
//this.sharedService.errorMessage = response.message ? response.message : response.Message;
|
|
1313
|
+
console.log(response.message ? response.message : response.Message)
|
|
1314
|
+
this.redirectToLogin();
|
|
1315
|
+
break;
|
|
1316
|
+
// Other response message.
|
|
1317
|
+
default:
|
|
1318
|
+
//this.sharedService.errorMessage = response.message ? response.message : response.Message;
|
|
1319
|
+
console.log(response.message ? response.message : response.Message)
|
|
1320
|
+
break;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
// logout user
|
|
1326
|
+
public logout() {
|
|
1327
|
+
let url = Constants.LOGOUT_API_URL;
|
|
1328
|
+
this.sharedService.put(url, {}).subscribe((response: any) => {
|
|
1329
|
+
this.handleResponse(response);
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
public validateAlphaNumericLength(event: any, maxLength: number) {
|
|
1334
|
+
let value = event.currentTarget.value;
|
|
1335
|
+
if (value) {
|
|
1336
|
+
if(value.length > maxLength){
|
|
1337
|
+
return false;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
return true;
|
|
1341
|
+
}
|
|
1342
|
+
}
|