{"version":3,"file":"ContactExpert.bundle.js","sources":["../../../Static/src/react/components/ContactExpert/Vcard/Vcard.jsx","../../../Static/src/react/components/ContactExpert/ContactExpert.jsx"],"sourcesContent":["import React, {Component} from 'react';\r\nimport axios from \"axios/index\";\r\n\r\nexport default class Vcard extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n data: this.props.data ? this.props.data : this.getExpertDetails(this.props.id)\r\n };\r\n\r\n this.getExpertDetails = this.getExpertDetails.bind(this);\r\n }\r\n\r\n getExpertDetails(officeId) {\r\n axios.get('/api/marineproductsofficesearch/GetContactDetails', {\r\n params: {\r\n officeId: officeId\r\n }\r\n })\r\n .catch(function (error) {\r\n if (error.response) {\r\n console.log(error.response.data);\r\n console.log(error.response.status);\r\n console.log(error.response.headers);\r\n } else if (error.request) {\r\n console.log(error.request);\r\n } else {\r\n console.log('Error', error.message);\r\n }\r\n console.log(error.config);\r\n })\r\n .then(response => {\r\n if(response.data) {\r\n this.setState({\r\n data: response.data\r\n });\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n let vcardContent;\r\n\r\n if(this.state.data) {\r\n vcardContent = (\r\n \r\n \r\n {this.state.data.Name}\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n See office details\r\n \r\n \r\n \r\n \r\n Phone:\r\n \r\n
\r\n \r\n {this.state.data.Phone}\r\n \r\n \r\n \r\n E-mail:\r\n \r\n
\r\n \r\n {this.state.data.Email}\r\n \r\n
\r\n No results found\r\n
\r\n );\r\n }\r\n }\r\n\r\n return (\r\n