Path: blob/master/sites/google-otp/otp_files/kyc.76b820c3.js.download
739 views
"use strict";Vue.component("kyc",{_scopeId:"data-v-b90a3d3e",owCSS:".pilot-header[data-v-b90a3d3e]{padding:16px;text-align:left;background:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.24),0 0 2px 0 rgba(0,0,0,.12);margin-bottom:4px}.pilot-header .icon[data-v-b90a3d3e]{position:absolute;top:6px;left:4px}.pilot-header .title[data-v-b90a3d3e]{font-size:18px;font-weight:500;letter-spacing:0;color:rgba(0,0,0,.86);padding-left:30px}.pilot-header .icon[data-v-b90a3d3e]{fill-opacity:.5;float:left}.loader[data-v-b90a3d3e]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%)}.custom-header[data-v-b90a3d3e]{font-size:14px;font-weight:400;margin-bottom:8px;padding:30px 8px 20px}",render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"pilot-header"},[e._t("header",["app"===e.cnl||"lite"===e.cnl?o("div",{staticClass:"icon",on:{click:e.handleBack}},[o("ow-icon",{attrs:{name:"CROSS",width:"20",height:"18"}})],1):e._e(),e._v(" "),o("div",{staticClass:"title"},[e._v("Ola Money KYC")])])],2),e._v(" "),"KYC_HOME"==e.screen?[e.owRegistry["sso-kyc-home"]?o("sso-kyc-home",{attrs:{documents:e.kycInfo.documents,userName:e.userName,queryParam:e.statusParam,coupon:e.couponDetails,errorCode:e.errorCodeParam,kycStatus:e.kycInfo.detailedStatus},on:{selected:e.openForm}}):e._e()]:e._e(),e._v(" "),"KYC_FORM"==e.screen?[e.owRegistry["sso-kyc-form"]?o("sso-kyc-form",{attrs:{documents:e.kycInfo.documents,userName:e.userName,selected:e.preSelectedDoc},on:{submit:e.submitDetails,error:e.formError}}):e._e()]:e._e(),e._v(" "),"KYC_INFO"==e.screen?[e.owRegistry["sso-kyc-verified"]?o("sso-kyc-verified",{attrs:{status:e.kycInfo.verificationDetails,kycStatus:e.kycInfo.detailedStatus},on:{selected:e.openForm}}):e._e()]:e._e(),e._v(" "),"KYC_FINO"==e.screen?[e.owRegistry["sso-kyc-fino"]?o("sso-kyc-fino"):e._e()]:e._e(),e._v(" "),e.owRegistry["ow-ajax"]?o("ow-ajax",{attrs:{url:"/alchemist-api/kyc/check",method:"GET",trigger:e.getDetailsAjax,params:e.$route.query},on:{success:e.showKycScreen}}):e._e(),e._v(" "),e.owRegistry["ow-ajax"]?o("ow-ajax",{attrs:{url:"/alchemist-api/kyc/submit",method:"POST",trigger:e.postDetailsAjax,body:e.formData,params:e.$route.query},on:{success:e.showInfoScreen,error:e.submitError}}):e._e(),e._v(" "),e.ajaxInProgress?[o("div",{staticClass:"loader"},[e.owRegistry["ow-loader"]?o("ow-loader"):e._e()],1)]:e._e(),e._v(" "),o("ow-toast",{attrs:{"toast-type":e.toast.type,content:e.toast.content,"show-toast":e.toast.show},on:{close:e.closeToast}})],2)},staticRenderFns:[],name:"kyc",data:function(){return{getDetailsAjax:"dormant",kycInfo:{},couponDetails:{},selectedDoc:"",ajaxInProgress:!0,postDetailsAjax:"dormant",formData:{},preSelectedDoc:null,userName:"",screen:"",statusParam:this.$route.query&&this.$route.query.status,errorCodeParam:this.$route.query&&this.$route.query.error_code,cnl:this.$route.query&&this.$route.query.cnl||"unknown",redirectTo:this.$route.query&&this.$route.query.redirectTo,toast:{show:!1,type:"blackbg",content:""}}},mounted:function(){this.loadOWComponent("sso-kyc-home","components/sso-kyc-home.8e98aeb0.js"),this.loadOWComponent("sso-kyc-verified","components/sso-kyc-verified.fe47dc06.js"),this.loadOWComponent("sso-kyc-form","components/sso-kyc-form.b6b64622.js"),this.loadOWComponent("sso-kyc-fino","components/sso-kyc-fino.0dcc7af3.js"),this.getDetailsAjax="fire"},methods:{checkFakeParams:function(){if(this.statusParam&&!this.isAadhaarClicked()){var e=window.location.origin+window.location.pathname;return window.location.href=e,!0}},openForm:function(e){this.preSelectedDoc=e.key,this.trackEvent({eventName:"id_proof_selected",eventValue:{cnl:this.cnl,value:this.preSelectedDoc}}),this.trackEvent({eventName:"om_kyc_username_available",eventValue:{cnl:this.cnl,value:!!this.userName}}),this.screen="KYC_FORM"},isAadhaarClicked:function(){return window.sessionStorage.getItem("aadhaarClicked")},formError:function(e){this.trackEvent({eventName:"om_kyc_minkyc_error",eventValue:{cnl:this.cnl,value:e}})},submitDetails:function(e){this.trackEvent({eventName:"om_kyc_submit_clicked",eventValue:{cnl:this.cnl,value:e.documentType}}),this.preSelectedDoc=e.documentType,this.formData=e,this.formData.cnl=this.cnl||"unknown",this.ajaxInProgress=!0,this.postDetailsAjax="fire"},submitError:function(){this.ajaxInProgress=!1,this.postDetailsAjax="dormant",this.toast={show:!0,type:"warning",content:"We were unable to process your request. Please try again."}},showInfoScreen:function(e){this.ajaxInProgress=!1,this.postDetailsAjax="dormant",e.response.error&&e.response.error.message?this.toast={show:!0,type:"warning",content:e.response.error.message}:(this.kycInfo.detailedStatus=e.response.data.detailedStatus,this.kycInfo.verificationDetails=e.response.data.verificationDetails,this.screen="KYC_INFO",this.trackEvent&&this.trackEvent({eventName:"om_kyc_minsuccess_shown",eventValue:{cnl:this.cnl}}))},showKycScreen:function(e){this.ajaxInProgress=!1,this.getDetailsAjax="dormant";var t=e.response;if(t.error&&t.error.code)return t.error.loginRequired&&(this.trackEvent&&this.trackEvent({eventName:"om_kyc_is_user_loggedin",eventValue:{cnl:this.cnl,value:!1}}),this.$router.replace({path:"/?returnurl="+window.location.href})),void(t.error.message&&(this.toast={show:!0,type:"warning",content:t.error.message}));this.trackEvent&&this.trackEvent({eventName:"om_kyc_is_user_loggedin",eventValue:{cnl:this.cnl,value:!0}}),this.kycInfo=t.data,this.userName=t.data.name;var o=!1,s=this.kycInfo.detailedStatus;this.couponDetails=t.data.couponResponse&&0<t.data.couponResponse.length?t.data.couponResponse[0]:{},"done"!=s.full_kyc?(this.statusParam?"failure"==this.statusParam?this.screen="KYC_HOME":(this.screen="KYC_INFO",o=!0):"not_done"==s.min_kyc&&"not_done"==s.e_kyc?this.screen="KYC_HOME":(this.screen="KYC_INFO",o=!0),o&&this.trackEvent&&this.trackEvent({eventName:"om_kyc_alreadydone_shown",eventValue:{cnl:this.cnl,value:s}})):this.screen="KYC_INFO"},closeToast:function(){this.toast={show:!1,type:"",content:""}},handleBack:function(){"app"==this.cnl?window.location="back:selfServe":-1<window.owConfig.domainList.indexOf(this.extractHostname(this.redirectTo))?window.location=this.redirectTo:this.toast={show:!0,type:"warning",content:"Invalid domain"}}}}); //# sourceMappingURL=../sourcemap/pages/kyc.76b820c3.js.map