Skip to content

Commit 567a9ed

Browse files
committed
Various visual tweakings
1 parent ce27208 commit 567a9ed

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

outlook/manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
33
<Id>c5549a21-aefb-4ba8-ae7c-b77bceab4023</Id>
4-
<Version>1.0.0</Version>
4+
<Version>1.0.1</Version>
55
<ProviderName>Odoo</ProviderName>
66
<DefaultLocale>en-US</DefaultLocale>
77
<DisplayName DefaultValue="Odoo for Outlook"/>

outlook/src/classes/EnrichmentInfo.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class EnrichmentInfo {
1515

1616
constructor(type?:EnrichmentInfoType, info?:string) {
1717
this.type = type || EnrichmentInfoType.None;
18-
this.info = info || this.getTypicalMessage(this.type);
18+
// Override the info returned by the service, unless we don't actually have a typical message.
19+
// Messages' content should come from only one place, and ideally the front end.
20+
this.info = this.getTypicalMessage(this.type) || info;
1921
}
2022

2123
public getTypicalMessage(type: EnrichmentInfoType) {
@@ -26,11 +28,11 @@ class EnrichmentInfo {
2628
return "Company created!"
2729
case EnrichmentInfoType.NoData:
2830
case EnrichmentInfoType.NotConnected_NoData:
29-
return "Could not autocomplete the company: no data found";
31+
return "No data found for this email address.";
3032
case EnrichmentInfoType.InsufficientCredit:
31-
return "You don't have enough credit to enrich";
33+
return "You don't have enough credit to enrich.";
3234
case EnrichmentInfoType.NotConnected_InsufficientCredit:
33-
return "Oops, looks like you have exhausted your free enrichment requests. Please log in to try again";
35+
return "Oops, looks like you have exhausted your free enrichment requests. Please log in to try again.";
3436
case EnrichmentInfoType.Other:
3537
return "Something bad happened. Please, try again later."
3638
case EnrichmentInfoType.NotConnected_InternalError:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.add-to-db-txt {
2+
font-size: 12.5px;
3+
color: grey;
4+
}

outlook/src/taskpane/components/Leads/Leads.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import LeadList from './LeadList/LeadList';
44
import LeadData from '../../../classes/Lead';
55
import AppContext from '../AppContext';
66
import { HttpVerb, sendHttpRequest, ContentType } from "../../../utils/httpRequest";
7-
7+
import './Leads.css';
88

99
type LeadsProps = {};
1010
type LeadsState = {
@@ -101,7 +101,7 @@ class Leads extends React.Component<LeadsProps, LeadsState> {
101101
if (this.state.leads.length) {
102102
content = <LeadList leads={this.state.leads} more={this.loadMore} log={this.log} showMore={this.state.showMore}></LeadList>;
103103
} else if (this.context.partner.id === -1) {
104-
content = <div>Add the contact to your database to be able to create opportunities</div>
104+
content = <div className='add-to-db-txt'>Add the contact to create opportunities</div>
105105
}
106106

107107
return (

outlook/src/taskpane/components/Login/Login.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ class Login extends React.Component<LoginProps, LoginState> {
109109
<DefaultButton className="full-width odoo-clear-button" text='Sign up' onClick={this.signup}/>
110110

111111
<div className='login-info'>
112-
<div className='login-info-icon'><FontAwesomeIcon icon={faEnvelope} size="2x" /></div>
112+
<div className='login-info-icon'><FontAwesomeIcon icon={faEnvelope} size="2x" className="fa-fw"/></div>
113113
<div>Create leads from Emails sent to your personal email address.</div>
114114
</div>
115115
<div className='login-info'>
116-
<div className='login-info-icon'><FontAwesomeIcon icon={faHandshake} size="2x" /></div>
116+
<div className='login-info-icon'><FontAwesomeIcon icon={faHandshake} size="2x" className="fa-fw"/></div>
117117
<div>Centralize Prospects&apos; emails into a CRM.</div>
118118
</div>
119119
<div className='login-info'>
120-
<div className='login-info-icon'><FontAwesomeIcon icon={faSearch} size="2x" /></div>
120+
<div className='login-info-icon'><FontAwesomeIcon icon={faSearch} size="2x" className="fa-fw"/></div>
121121
<div>Search and store insights on your contacts.</div>
122122
</div>
123123
</div>

outlook/src/taskpane/components/Main/Main.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Main extends React.Component<MainProps, MainState> {
7171
const parsed = JSON.parse(response);
7272
var partner = PartnerData.fromJSON(parsed.result.partner);
7373
this.setState({
74-
EnrichmentInfo: EnrichmentInfo.fromJSON(parsed.result['enrichment_info']),
74+
EnrichmentInfo: new EnrichmentInfo(parsed.result['enrichment_info'].type, parsed.result['enrichment_info'].info),
7575
partnerCreated: parsed.result['created'],
7676
showEnrichmentInfoMessage: true,
7777
showPartnerCreatedMessage: true
@@ -131,9 +131,11 @@ class Main extends React.Component<MainProps, MainState> {
131131
this.context.addRequestCanceller(cancellableRequest.cancel);
132132
cancellableRequest.promise.then(response => {
133133
const parsed = JSON.parse(response);
134-
if ('error' in parsed) {
134+
//if ('error' in parsed) {
135+
if ('error' in parsed.result) {
135136
this.setState({
136-
EnrichmentInfo: new EnrichmentInfo(parsed.error.data.exception_type) ,
137+
//EnrichmentInfo: new EnrichmentInfo(parsed.error.data.exception_type), // TODO: investigate
138+
EnrichmentInfo: new EnrichmentInfo(parsed.result.error),
137139
showEnrichmentInfoMessage: true
138140
});
139141
this.context.setPartner(partner, false);
@@ -191,6 +193,7 @@ class Main extends React.Component<MainProps, MainState> {
191193
//setTimeout(this._hideEnrichmentInfoMessage, 3500);
192194
break;
193195
case EnrichmentInfoType.NoData:
196+
case EnrichmentInfoType.NotConnected_NoData:
194197
bars.push(<MessageBar messageBarType={MessageBarType.info} onDismiss={this._hideEnrichmentInfoMessage}>{info}</MessageBar>);
195198
break;
196199
case EnrichmentInfoType.InsufficientCredit:

0 commit comments

Comments
 (0)