|
|
|
@ -320,6 +320,19 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
}
|
|
|
|
|
checkIfProfileCompleted = () => {
|
|
|
|
|
return this.state.current_user && this.state.current_user.profile_completed
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ShowOnlinePdf = (url) => {
|
|
|
|
|
return axios({
|
|
|
|
|
method:'get',
|
|
|
|
|
url:url,
|
|
|
|
|
responseType: 'arraybuffer',
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
var binaryData = [];
|
|
|
|
|
binaryData.push(result.data);
|
|
|
|
|
this.url =window.URL.createObjectURL(new Blob(binaryData, {type:"application/pdf"}));
|
|
|
|
|
window.open(this.url);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let{Headertop,Footerdown, isRender, AccountProfiletype}=this.state;
|
|
|
|
@ -334,11 +347,11 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
isNotMember: this.isNotMember,
|
|
|
|
|
isUserid:this.state.coursedata&&this.state.coursedata.userid,
|
|
|
|
|
fetchUser: this.fetchUser,
|
|
|
|
|
|
|
|
|
|
showLoginDialog: this.showLoginDialog,
|
|
|
|
|
checkIfLogin: this.checkIfLogin,
|
|
|
|
|
showProfileCompleteDialog: this.showProfileCompleteDialog,
|
|
|
|
|
checkIfProfileCompleted: this.checkIfProfileCompleted,
|
|
|
|
|
ShowOnlinePdf:(url)=>this.ShowOnlinePdf(url)
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|