diff --git a/outlook/manifest.xml b/outlook/manifest.xml index 786b397..9d8a3d7 100644 --- a/outlook/manifest.xml +++ b/outlook/manifest.xml @@ -1,7 +1,7 @@ c5549a21-aefb-4ba8-ae7c-b77bceab4023 - 1.0.0 + 1.0.1 Odoo en-US diff --git a/outlook/src/classes/EnrichmentInfo.ts b/outlook/src/classes/EnrichmentInfo.ts index 2348e78..d1f3029 100644 --- a/outlook/src/classes/EnrichmentInfo.ts +++ b/outlook/src/classes/EnrichmentInfo.ts @@ -15,7 +15,9 @@ class EnrichmentInfo { constructor(type?:EnrichmentInfoType, info?:string) { this.type = type || EnrichmentInfoType.None; - this.info = info || this.getTypicalMessage(this.type); + // Override the info returned by the service, unless we don't actually have a typical message. + // Messages' content should come from only one place, and ideally the front end. + this.info = this.getTypicalMessage(this.type) || info; } public getTypicalMessage(type: EnrichmentInfoType) { @@ -26,11 +28,11 @@ class EnrichmentInfo { return "Company created!" case EnrichmentInfoType.NoData: case EnrichmentInfoType.NotConnected_NoData: - return "Could not autocomplete the company: no data found"; + return "No data found for this email address."; case EnrichmentInfoType.InsufficientCredit: - return "You don't have enough credit to enrich"; + return "You don't have enough credit to enrich."; case EnrichmentInfoType.NotConnected_InsufficientCredit: - return "Oops, looks like you have exhausted your free enrichment requests. Please log in to try again"; + return "Oops, looks like you have exhausted your free enrichment requests. Please log in to try again."; case EnrichmentInfoType.Other: return "Something bad happened. Please, try again later." case EnrichmentInfoType.NotConnected_InternalError: diff --git a/outlook/src/taskpane/components/Leads/Leads.css b/outlook/src/taskpane/components/Leads/Leads.css new file mode 100644 index 0000000..e1cb746 --- /dev/null +++ b/outlook/src/taskpane/components/Leads/Leads.css @@ -0,0 +1,4 @@ +.add-to-db-txt { + font-size: 12.5px; + color: grey; +} \ No newline at end of file diff --git a/outlook/src/taskpane/components/Leads/Leads.tsx b/outlook/src/taskpane/components/Leads/Leads.tsx index 7d6a7db..730d842 100644 --- a/outlook/src/taskpane/components/Leads/Leads.tsx +++ b/outlook/src/taskpane/components/Leads/Leads.tsx @@ -4,7 +4,7 @@ import LeadList from './LeadList/LeadList'; import LeadData from '../../../classes/Lead'; import AppContext from '../AppContext'; import { HttpVerb, sendHttpRequest, ContentType } from "../../../utils/httpRequest"; - +import './Leads.css'; type LeadsProps = {}; type LeadsState = { @@ -101,7 +101,7 @@ class Leads extends React.Component { if (this.state.leads.length) { content = ; } else if (this.context.partner.id === -1) { - content =
Add the contact to your database to be able to create opportunities
+ content =
Add the contact to create opportunities
} return ( diff --git a/outlook/src/taskpane/components/Login/Login.tsx b/outlook/src/taskpane/components/Login/Login.tsx index 95db114..97f0ba1 100644 --- a/outlook/src/taskpane/components/Login/Login.tsx +++ b/outlook/src/taskpane/components/Login/Login.tsx @@ -109,15 +109,15 @@ class Login extends React.Component {
-
+
Create leads from Emails sent to your personal email address.
-
+
Centralize Prospects' emails into a CRM.
-
+
Search and store insights on your contacts.
diff --git a/outlook/src/taskpane/components/Main/Main.tsx b/outlook/src/taskpane/components/Main/Main.tsx index 8b0811c..c4fd1d4 100644 --- a/outlook/src/taskpane/components/Main/Main.tsx +++ b/outlook/src/taskpane/components/Main/Main.tsx @@ -71,7 +71,7 @@ class Main extends React.Component { const parsed = JSON.parse(response); var partner = PartnerData.fromJSON(parsed.result.partner); this.setState({ - EnrichmentInfo: EnrichmentInfo.fromJSON(parsed.result['enrichment_info']), + EnrichmentInfo: new EnrichmentInfo(parsed.result['enrichment_info'].type, parsed.result['enrichment_info'].info), partnerCreated: parsed.result['created'], showEnrichmentInfoMessage: true, showPartnerCreatedMessage: true @@ -131,9 +131,11 @@ class Main extends React.Component { this.context.addRequestCanceller(cancellableRequest.cancel); cancellableRequest.promise.then(response => { const parsed = JSON.parse(response); - if ('error' in parsed) { + //if ('error' in parsed) { + if ('error' in parsed.result) { this.setState({ - EnrichmentInfo: new EnrichmentInfo(parsed.error.data.exception_type) , + //EnrichmentInfo: new EnrichmentInfo(parsed.error.data.exception_type), // TODO: investigate + EnrichmentInfo: new EnrichmentInfo(parsed.result.error), showEnrichmentInfoMessage: true }); this.context.setPartner(partner, false); @@ -191,6 +193,7 @@ class Main extends React.Component { //setTimeout(this._hideEnrichmentInfoMessage, 3500); break; case EnrichmentInfoType.NoData: + case EnrichmentInfoType.NotConnected_NoData: bars.push({info}); break; case EnrichmentInfoType.InsufficientCredit: